pEpObjCAdapter/PEPSync.m
branchIOSAD-103
changeset 720 1134b54a7082
parent 704 f5036c40fbd8
child 721 0da7ffe1e9e2
     1.1 --- a/pEpObjCAdapter/PEPSync.m	Tue Oct 30 14:50:53 2018 +0100
     1.2 +++ b/pEpObjCAdapter/PEPSync.m	Tue Oct 30 14:50:53 2018 +0100
     1.3 @@ -23,6 +23,7 @@
     1.4  @property (nonatomic, nullable, weak) id<PEPSyncSendMessageDelegate> syncSendMessageDelegate;
     1.5  @property (nonatomic, nullable, weak) id<PEPNotifyHandshakeDelegate> notifyHandshakeDelegate;
     1.6  @property (nonatomic, nonnull) PEPQueue *queue;
     1.7 +@property (nonatomic, nullable) NSThread *syncThread;
     1.8  
     1.9  - (int)injectSyncEvent:(SYNC_EVENT)event;
    1.10  
    1.11 @@ -60,7 +61,7 @@
    1.12  
    1.13  static __weak PEPSync *s_pEpSync;
    1.14  
    1.15 -// MARK: - PEPSync class
    1.16 +// MARK: - Public PEPSync class
    1.17  
    1.18  @implementation PEPSync
    1.19  
    1.20 @@ -83,10 +84,24 @@
    1.21      return self;
    1.22  }
    1.23  
    1.24 +- (void)startup
    1.25 +{
    1.26 +    NSThread *theSyncThread = [[NSThread alloc] initWithTarget:self
    1.27 +                                                      selector:@selector(syncThreadLoop:)
    1.28 +                                                        object:nil];
    1.29 +    self.syncThread = theSyncThread;
    1.30 +}
    1.31 +
    1.32  - (void)shutdown
    1.33  {
    1.34  }
    1.35  
    1.36 +// MARK: - Private
    1.37 +
    1.38 +- (void)syncThreadLoop:(id)object {
    1.39 +
    1.40 +}
    1.41 +
    1.42  - (int)injectSyncEvent:(SYNC_EVENT)event
    1.43  {
    1.44      [self.queue enqueue:[NSValue valueWithBytes:&event objCType:@encode(SYNC_EVENT)]];