Browse Source

APPLEMAIL-45 Add undo xpc call.

APPLEMAIL-45
David Alarcon 2 months ago
parent
commit
cc6e00d93e
3 changed files with 34 additions and 1 deletions
  1. +8
    -1
      Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCApiClient/XPCService/PEPObjCAdapterXPCApiClientService.m
  2. +24
    -0
      Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCService/XPCService/PEPObjCAdapterXPCApi.m
  3. +2
    -0
      Subprojects/PEPObjCAdapterXPCService/Shared/PEPObjCAdapterXpcApiProtocol.h

+ 8
- 1
Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCApiClient/XPCService/PEPObjCAdapterXPCApiClientService.m View File

@ -198,7 +198,7 @@ successCallback:(nonnull void (^)(PEPIdentity * _Nonnull))successCallback {
- (void)keyMistrusted:(PEPIdentity *)identity errorCallback:(void (^)(NSError * _Nonnull))errorCallback successCallback:(void (^)(void))successCallback {
[[self.connection remoteObjectProxyWithErrorHandler:errorCallback] keyMistrusted:identity resultBlock:^(PEPObjCAdapterXpcApiResult * _Nonnull) {
[[self.connection remoteObjectProxyWithErrorHandler:errorCallback] keyMistrusted:identity resultBlock:^(PEPObjCAdapterXpcApiResult * _Nonnull result) {
successCallback();
}];
}
@ -212,6 +212,13 @@ successCallback:(nonnull void (^)(PEPIdentity * _Nonnull))successCallback {
}];
}
- (void)keyResetTrust:(PEPIdentity *)identity errorCallback:(void (^)(NSError * _Nonnull))errorCallback successCallback:(void (^)(void))successCallback {
[[self.connection remoteObjectProxyWithErrorHandler:errorCallback] keyResetTrust:identity resultBlock:^(PEPObjCAdapterXpcApiResult * _Nonnull result) {
successCallback();
}];
}
// MARK: - PEPObjCAdapterConfigurationProtocol
- (void)setPassiveModeEnabled:(BOOL)enabled {


+ 24
- 0
Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCService/XPCService/PEPObjCAdapterXPCApi.m View File

@ -250,4 +250,28 @@
}];
}
- (void)keyResetTrust:(PEPIdentity *)identity resultBlock:(void (^)(PEPObjCAdapterXpcApiResult * _Nonnull))resultCallback {
NSLog(@"%s", __PRETTY_FUNCTION__);
id<PEPSessionProtocol> session = [PEPSession new];
[session keyResetTrust:identity errorCallback:^(NSError * _Nonnull error) {
PEPObjCAdapterXpcApiResult *result = [[PEPObjCAdapterXpcApiResult alloc]
initWithResult:nil
error:error];
resultCallback(result);
} successCallback:^{
PEPObjCAdapterXpcApiResult *result = [[PEPObjCAdapterXpcApiResult alloc]
initWithResult:@[]
error:nil];
resultCallback(result);
}];
}
//- (void)callTheError:(NSError * _Nonnull)error withResultCallback:(void (^)(PEPObjCAdapterXpcApiResult * _Nonnull))resultCallback {
// PEPObjCAdapterXpcApiResult *result = [[PEPObjCAdapterXpcApiResult alloc]
// initWithResult:nil
// error:error];
// resultCallback(result);
//}
@end

+ 2
- 0
Subprojects/PEPObjCAdapterXPCService/Shared/PEPObjCAdapterXpcApiProtocol.h View File

@ -66,6 +66,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)languageList:(void (^)(PEPObjCAdapterXpcApiResult *))resultCallback;
- (void)keyResetTrust:(PEPIdentity *)identity
resultBlock:(void (^)(PEPObjCAdapterXpcApiResult *))resultCallback;
@end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save