You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

// PEPSync.h
// pEpObjCAdapter
// Created by Dirk Zimmermann on 04.10.18.
// Copyright © 2018 p≡p. All rights reserved.
#import <Foundation/Foundation.h>
#import <PEPObjCAdapterFramework/PEPSendMessageDelegate.h>
#import <PEPObjCAdapterFramework/PEPNotifyHandshakeDelegate.h>
@class PEPSyncSendMessageDelegate;
Manages the key-sync loop.
@interface PEPSync : NSObject
@property (nonatomic, nullable, weak) id<PEPSendMessageDelegate> sendMessageDelegate;
@property (nonatomic, nullable, weak) id<PEPNotifyHandshakeDelegate> notifyHandshakeDelegate;
Manages the key-sync loop, and other key-sync related elements.
@note This object should only exist once per app.
@param sendMessageDelegate Will be called on behalf of the engine for outgoing messages,
needed e.g. in case of key rest, or for key-sync.
@param notifyHandshakeDelegate Called whever there is a key-sync related information that
should be displayed to the user.
@return The object that binds the delegates given in the constructor and can be used to control
the key-sync loop.
- (instancetype _Nonnull)initWithSendMessageDelegate:(id <PEPSendMessageDelegate>
Start the key-sync loop in its own, separate thread.
- (void)startup;
Shuts the key-sync loop down.
- (void)shutdown;