IOSAD-157 Change delegate method name and docs IOSAD-157
authorDirk Zimmermann <dz@pep.security>
Wed, 20 Nov 2019 16:39:59 +0100
branchIOSAD-157
changeset 13588266b8194627
parent 1357 9295e6eceea7
child 1359 decf1a9ccd50
IOSAD-157 Change delegate method name and docs
pEpObjCAdapter/PEPSync.m
pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h
pEpObjCTests/PEPSessionTest.m
pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.h
pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.m
     1.1 --- a/pEpObjCAdapter/PEPSync.m	Wed Nov 20 16:39:59 2019 +0100
     1.2 +++ b/pEpObjCAdapter/PEPSync.m	Wed Nov 20 16:39:59 2019 +0100
     1.3 @@ -254,7 +254,7 @@
     1.4          self.conditionLockForJoiningSyncThread = nil;
     1.5          if (!isFromShutdown) {
     1.6              // Only inform the delegate if the shutdown came from the engine
     1.7 -            [self.notifyHandshakeDelegate keySyncDisabled];
     1.8 +            [self.notifyHandshakeDelegate engineShutdownKeySync];
     1.9          }
    1.10      }
    1.11  
     2.1 --- a/pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h	Wed Nov 20 16:39:59 2019 +0100
     2.2 +++ b/pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h	Wed Nov 20 16:39:59 2019 +0100
     2.3 @@ -38,7 +38,8 @@
     2.4                       partner:(PEPIdentity * _Nonnull)partner
     2.5                        signal:(PEPSyncHandshakeSignal)signal;
     2.6  
     2.7 -/// Sent when the sync loop was shut down
     2.8 -- (void)keySyncDisabled;
     2.9 +/// Sent when the sync loop was shut down by the engine,
    2.10 +/// e.g. in response to leving the device group
    2.11 +- (void)engineShutdownKeySync;
    2.12  
    2.13  @end
     3.1 --- a/pEpObjCTests/PEPSessionTest.m	Wed Nov 20 16:39:59 2019 +0100
     3.2 +++ b/pEpObjCTests/PEPSessionTest.m	Wed Nov 20 16:39:59 2019 +0100
     3.3 @@ -1317,7 +1317,7 @@
     3.4      XCTAssertNil(error);
     3.5  
     3.6      // leaving a device group should disable sync
     3.7 -    XCTAssertTrue(self.notifyHandshakeDelegate.engineDisabledKeySync);
     3.8 +    XCTAssertTrue(self.notifyHandshakeDelegate.engineDidShutdownKeySync);
     3.9  
    3.10      [self shutdownSync];
    3.11  }
     4.1 --- a/pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.h	Wed Nov 20 16:39:59 2019 +0100
     4.2 +++ b/pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.h	Wed Nov 20 16:39:59 2019 +0100
     4.3 @@ -13,6 +13,6 @@
     4.4  @interface PEPSessionTestNotifyHandshakeDelegate : NSObject<PEPNotifyHandshakeDelegate>
     4.5  
     4.6  /// This is set to YES if the _engine_ shut the sync loop down.
     4.7 -@property (nonatomic) BOOL engineDisabledKeySync;
     4.8 +@property (nonatomic) BOOL engineDidShutdownKeySync;
     4.9  
    4.10  @end
     5.1 --- a/pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.m	Wed Nov 20 16:39:59 2019 +0100
     5.2 +++ b/pEpObjCTests/TestUtils/PEPSessionTestNotifyHandshakeDelegate.m	Wed Nov 20 16:39:59 2019 +0100
     5.3 @@ -18,9 +18,9 @@
     5.4      return PEPStatusOK;
     5.5  }
     5.6  
     5.7 -- (void)keySyncDisabled
     5.8 +- (void)engineShutdownKeySync
     5.9  {
    5.10 -    self.engineDisabledKeySync = YES;
    5.11 +    self.engineDidShutdownKeySync = YES;
    5.12  }
    5.13  
    5.14  @end