IOSAD-164 Let mySelf wrap myself, and that's it IOSAD-164
authorDirk Zimmermann <dz@pep.security>
Fri, 10 Jan 2020 12:29:17 +0100
branchIOSAD-164
changeset 1387b0e0c5afc224
parent 1386 e3d0fa030830
child 1388 ba4af3ec787c
IOSAD-164 Let mySelf wrap myself, and that's it
pEpObjCAdapter/PEPInternalSession.m
pEpObjCAdapter/PEPSession.m
pEpObjCAdapterFramework/PEPSessionProtocol.h
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Fri Jan 10 11:04:25 2020 +0100
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Fri Jan 10 12:29:17 2020 +0100
     1.3 @@ -536,23 +536,9 @@
     1.4  }
     1.5  
     1.6  - (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
     1.7 -         error:(NSError * _Nullable * _Nullable)error
     1.8 -{
     1.9 -    // The default for pEpSyncEnabled is YES, that means the adapter
    1.10 -    // will not change the engine identity in that regard after new_identity
    1.11 -    // (called by PEP_identityToStruct).
    1.12 -    return [self mySelf:identity pEpSyncEnabled:YES error:error];
    1.13 -}
    1.14 -
    1.15 -- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
    1.16 -pEpSyncEnabled:(BOOL)pEpSyncEnabled
    1.17           error:(NSError * _Nullable * _Nullable)error {
    1.18      pEp_identity *ident = PEP_identityToStruct(identity);
    1.19  
    1.20 -    if (!pEpSyncEnabled) {
    1.21 -        ident->flags |= PEP_idf_not_for_sync;
    1.22 -    }
    1.23 -
    1.24      PEPStatus status = (PEPStatus) myself(_session, ident);
    1.25  
    1.26      if ([NSError setError:error fromPEPStatus:status]) {
     2.1 --- a/pEpObjCAdapter/PEPSession.m	Fri Jan 10 11:04:25 2020 +0100
     2.2 +++ b/pEpObjCAdapter/PEPSession.m	Fri Jan 10 12:29:17 2020 +0100
     2.3 @@ -179,14 +179,6 @@
     2.4      return [session mySelf:identity error:error];
     2.5  }
     2.6  
     2.7 -- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
     2.8 -pEpSyncEnabled:(BOOL)pEpSyncEnabled
     2.9 -         error:(NSError * _Nullable * _Nullable)error {
    2.10 -    PEPInternalSession *session = [PEPSessionProvider session];
    2.11 -    RETURN_ON_ERROR(session, error, NO);
    2.12 -    return [session mySelf:identity pEpSyncEnabled:pEpSyncEnabled error:error];
    2.13 -}
    2.14 -
    2.15  - (BOOL)updateIdentity:(PEPIdentity * _Nonnull)identity
    2.16                   error:(NSError * _Nullable * _Nullable)error
    2.17  {
     3.1 --- a/pEpObjCAdapterFramework/PEPSessionProtocol.h	Fri Jan 10 11:04:25 2020 +0100
     3.2 +++ b/pEpObjCAdapterFramework/PEPSessionProtocol.h	Fri Jan 10 12:29:17 2020 +0100
     3.3 @@ -97,22 +97,6 @@
     3.4  - (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
     3.5           error:(NSError * _Nullable * _Nullable)error;
     3.6  
     3.7 -/// Marks an identity as an own identity, and decides about participation in pEp sync.
     3.8 -///
     3.9 -/// @return Returns YES on success, NO on error, setting `*error` accordingly if possible.
    3.10 -///
    3.11 -/// @note See the engine's myself function for details.
    3.12 -///
    3.13 -/// @param identity The identity to mark as own.
    3.14 -///
    3.15 -/// @param pEpSyncEnabled Whether to enable sync, or not. Will set PEP_idf_not_for_sync
    3.16 -/// accordingly.
    3.17 -///
    3.18 -/// @param error Standard cocoa error handling.
    3.19 -- (BOOL)mySelf:(PEPIdentity * _Nonnull)identity
    3.20 -pEpSyncEnabled:(BOOL)pEpSyncEnabled
    3.21 -         error:(NSError * _Nullable * _Nullable)error;
    3.22 -
    3.23  /// Calls the engine's update_identity on the given identity.
    3.24  ///
    3.25  /// @note Prior this was invoking myself if the identity was identified as being an own