Browse Source

IOSAD-203 Internal. wrap disable_all_sync_channels

IOSAD-203
Dirk Zimmermann 1 year ago
parent
commit
235684f188
2 changed files with 16 additions and 0 deletions
  1. +3
    -0
      pEpObjCAdapter/PEPInternalSession.h
  2. +13
    -0
      pEpObjCAdapter/PEPInternalSession.m

+ 3
- 0
pEpObjCAdapter/PEPInternalSession.h View File

@ -337,4 +337,7 @@
- (BOOL)configurePassphrase:(NSString * _Nonnull)passphrase
error:(NSError * _Nullable * _Nullable)error;
/// Wraps `disable_all_sync_channels` (`sync_api.h`).
- (BOOL)disableAllSyncChannels:(NSError * _Nullable * _Nullable)error;
@end

+ 13
- 0
pEpObjCAdapter/PEPInternalSession.m View File

@ -1033,4 +1033,17 @@ static NSDictionary *stringToRating;
return [PEPPassphraseCache sharedInstance];
}
- (BOOL)disableAllSyncChannels:(NSError * _Nullable * _Nullable)error
{
PEPStatus theStatus = (PEPStatus) [self runWithPasswords:^PEP_STATUS(PEP_SESSION session) {
return disable_all_sync_channels(self.session);
}];
if ([NSError setError:error fromPEPStatus:theStatus]) {
return NO;
} else {
return YES;
}
}
@end

Loading…
Cancel
Save