Browse Source

IOSAD-203 Session: Sync disableAllSyncChannels

IOSAD-203
Dirk Zimmermann 1 year ago
parent
commit
e2f6d60aca
2 changed files with 15 additions and 0 deletions
  1. +3
    -0
      PEPObjCAdapterTypes/PublicHeaders/PEPSessionProtocol.h
  2. +12
    -0
      pEpObjCAdapter/PEPSession.m

+ 3
- 0
PEPObjCAdapterTypes/PublicHeaders/PEPSessionProtocol.h View File

@ -231,6 +231,9 @@ extern NSString *const _Nonnull PEPObjCAdapterErrorDomain;
/// Wraps color_from_rating.
- (PEPColor)colorFromRating:(PEPRating)rating;
/// Wraps `disable_all_sync_channels` (`sync_api.h`).
- (BOOL)disableAllSyncChannels:(NSError * _Nullable * _Nullable)error;
@end
NS_ASSUME_NONNULL_END

+ 12
- 0
pEpObjCAdapter/PEPSession.m View File

@ -650,4 +650,16 @@ successCallback:(void (^)(NSString *log))successCallback
return [session colorFromRating:rating];
}
- (BOOL)disableAllSyncChannels:(NSError * _Nullable * _Nullable)error
{
PEPInternalSession *session = [PEPSessionProvider session];
if (session == nil) {
if (error) {
*error = [NSError errorWithPEPStatusInternal:PEP_UNKNOWN_ERROR];
}
return NO;
}
return [session disableAllSyncChannels:error];
}
@end

Loading…
Cancel
Save