pEpObjCAdapter/PEPSync.h
author Dirk Zimmermann <dz@pep.security>
Thu, 21 Mar 2019 12:37:32 +0100
branchrefactor
changeset 903 e9428f52fd88
parent 732 defc14d75ec9
child 942 80fc04888567
permissions -rw-r--r--
IOS-1480 Merge IOS-1480 into refactor.
dirk@681
     1
//
dirk@681
     2
//  PEPSync.h
dirk@681
     3
//  pEpObjCAdapter
dirk@681
     4
//
dirk@681
     5
//  Created by Dirk Zimmermann on 04.10.18.
dirk@681
     6
//  Copyright © 2018 p≡p. All rights reserved.
dirk@681
     7
//
dirk@681
     8
dirk@681
     9
#import <Foundation/Foundation.h>
dirk@681
    10
dirk@682
    11
#import "pEpEngine.h"
dirk@682
    12
dirk@732
    13
#import "PEPSendMessageDelegate.h"
dirk@708
    14
#import "PEPNotifyHandshakeDelegate.h"
dirk@695
    15
dirk@686
    16
@class PEPSyncSendMessageDelegate;
dirk@686
    17
dirk@690
    18
/**
dirk@690
    19
 @see libpEpAdapter: Adapter.{cc|hh}
dirk@690
    20
 @see sync_codec.h
dirk@690
    21
 */
dirk@681
    22
@interface PEPSync : NSObject
dirk@681
    23
dirk@722
    24
/**
dirk@725
    25
 Creates an engine session.
dirk@725
    26
 */
dirk@725
    27
+ (PEP_SESSION)createSession:(NSError **)error;
dirk@725
    28
dirk@725
    29
/**
dirk@725
    30
 Releases an engine session that was created by `createSession`.
dirk@725
    31
 */
dirk@725
    32
+ (void)releaseSession:(PEP_SESSION)session;
dirk@725
    33
dirk@732
    34
- (instancetype)initWithSendMessageDelegate:(id<PEPSendMessageDelegate>
dirk@732
    35
                                             _Nonnull)sendMessageDelegate
dirk@732
    36
                    notifyHandshakeDelegate:(id<PEPNotifyHandshakeDelegate>
dirk@732
    37
                                             _Nonnull)notifyHandshakeDelegate;
dirk@720
    38
dirk@720
    39
- (void)startup;
dirk@720
    40
dirk@701
    41
- (void)shutdown;
dirk@695
    42
dirk@681
    43
@end