Browse Source

merge default

IOSAD-128
Dirk Zimmermann 2 years ago
parent
commit
b2a6b5972e
4 changed files with 11 additions and 12 deletions
  1. +5
    -1
      pEpObjCAdapter/PEPSync.m
  2. +2
    -0
      pEpObjCAdapterFramework/PEPEngineTypes.h
  3. +1
    -5
      pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h
  4. +3
    -6
      pEpObjCTests/TestUtils/PEPInternalSessionTestNotifyHandshakeDelegate.m

+ 5
- 1
pEpObjCAdapter/PEPSync.m View File

@ -350,7 +350,11 @@ static __weak PEPSync *s_pEpSync;
}
if (!isFromShutdown) {
// Only inform the delegate if the shutdown came from the engine
[self.notifyHandshakeDelegate engineShutdownKeySync];
[self.notifyHandshakeDelegate
notifyHandshake:NULL
me:nil
partner:nil
signal:PEPSyncHandshakeSignalStop];
}
}


+ 2
- 0
pEpObjCAdapterFramework/PEPEngineTypes.h View File

@ -175,6 +175,8 @@ typedef NS_CLOSED_ENUM(int, PEPSyncHandshakeSignal) {
PEPSyncHandshakeSignalAcceptedDeviceAccepted = 8, // SYNC_NOTIFY_ACCEPTED_DEVICE_ACCEPTED
PEPSyncHandshakeSignalStop = 127, // SYNC_NOTIFY_STOP
PEPSyncHandshakeSignalPassphraseRequired = 128, // SYNC_PASSPHRASE_REQUIRED
PEPSyncHandshakeSignalSole = 254, // SYNC_NOTIFY_SOLE


+ 1
- 5
pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h View File

@ -35,12 +35,8 @@
/// The (delayed) response from the user are communicated to the engine
/// via separate method calls, as noted in the discussion.
- (PEPStatus)notifyHandshake:(void * _Nullable)object
me:(PEPIdentity * _Nonnull)me
me:(PEPIdentity * _Nullable)me
partner:(PEPIdentity * _Nullable)partner
signal:(PEPSyncHandshakeSignal)signal;
/// Sent when the sync loop was shut down by the engine,
/// e.g. in response to leving the device group
- (void)engineShutdownKeySync;
@end

+ 3
- 6
pEpObjCTests/TestUtils/PEPInternalSessionTestNotifyHandshakeDelegate.m View File

@ -11,20 +11,17 @@
@implementation PEPInternalSessionTestNotifyHandshakeDelegate
- (PEPStatus)notifyHandshake:(void * _Nullable)object
me:(PEPIdentity * _Nonnull)me
me:(PEPIdentity * _Nullable)me
partner:(PEPIdentity * _Nullable)partner
signal:(PEPSyncHandshakeSignal)signal
{
if (partner == nil && signal == PEPSyncHandshakeSignalPassphraseRequired) {
self.notifyHandshakePassphraseRequired = YES;
} else if (signal == PEPSyncHandshakeSignalStop) {
self.engineDidShutdownKeySync = YES;
}
return PEPStatusOK;
}
- (void)engineShutdownKeySync
{
self.engineDidShutdownKeySync = YES;
}
@end

Loading…
Cancel
Save