Browse Source

IOSAD-134 New: disableSyncForIdentity.

IOSAD-134
Dirk Zimmermann 3 years ago
parent
commit
d673b31825
3 changed files with 28 additions and 0 deletions
  1. +17
    -0
      pEpObjCAdapter/PEPInternalSession.m
  2. +8
    -0
      pEpObjCAdapter/PEPSession.m
  3. +3
    -0
      pEpObjCAdapterFramework/PEPSessionProtocol.h

+ 17
- 0
pEpObjCAdapter/PEPInternalSession.m View File

@ -665,6 +665,23 @@ typedef PEP_STATUS (* rating_function_type)(PEP_SESSION session, message *msg, P
return YES;
}
- (BOOL)disableSyncForIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error
{
pEp_identity *ident = PEP_identityToStruct(identity);
PEPStatus status = (PEPStatus) disable_identity_for_sync(_session, ident);
if ([NSError setError:error fromPEPStatus:status]) {
free_identity(ident);
return NO;
}
free_identity(ident);
return YES;
}
- (NSArray<PEPIdentity *> * _Nullable)importKey:(NSString * _Nonnull)keydata
error:(NSError * _Nullable * _Nullable)error
{


+ 8
- 0
pEpObjCAdapter/PEPSession.m View File

@ -302,6 +302,14 @@
return [session enableSyncForIdentity:identity error:error];
}
- (BOOL)disableSyncForIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error
{
PEPInternalSession *session = [PEPSessionProvider session];
RETURN_ON_ERROR(session, error, NO);
return [session disableSyncForIdentity:identity error:error];
}
#pragma mark Internal API (testing etc.)
- (NSArray * _Nullable)importKey:(NSString * _Nonnull)keydata


+ 3
- 0
pEpObjCAdapterFramework/PEPSessionProtocol.h View File

@ -183,6 +183,9 @@
- (BOOL)enableSyncForIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error;
- (BOOL)disableSyncForIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error;
#pragma mark -- Internal API (testing etc.)
/** For testing purpose, manual key import */


Loading…
Cancel
Save