Browse Source

APPLEMAIL-58 Code review modifications.

APPLEMAIL-58
David Alarcon 1 year ago
parent
commit
55239ad63b
1 changed files with 17 additions and 19 deletions
  1. +17
    -19
      Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCApiClient/XPCService/PEPObjCAdapterXPCApiClientService.m

+ 17
- 19
Subprojects/PEPObjCAdapterXPCService/PEPObjCAdapterXPCApiClient/XPCService/PEPObjCAdapterXPCApiClientService.m View File

@ -87,6 +87,23 @@ successCallback:(nonnull void (^)(PEPIdentity * _Nonnull))successCallback {
}];
}
- (void)encryptMessage:(PEPMessage *)message
forSelf:(PEPIdentity *)ownIdentity
extraKeys:(PEPStringList *_Nullable)extraKeys
errorCallback:(void (^)(NSError *error))errorCallback
successCallback:(void (^)(PEPMessage *srcMessage,
PEPMessage *destMessage))successCallback {
[[self.connection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) {
errorCallback(error);
}] encryptMessage:message forSelf:ownIdentity extraKeys:extraKeys
resultBlock:^(PEPObjCAdapterXpcApiResult * _Nonnull result) {
PEPMessage *srcMessage = result.result[0];
PEPMessage *destMessage = result.result[1];
successCallback(srcMessage, destMessage);
}];
}
- (void)outgoingRatingForMessage:(PEPMessage *)theMessage
errorCallback:(void (^)(NSError * _Nonnull))errorCallback
successCallback:(void (^)(PEPRating))successCallback {
@ -112,23 +129,4 @@ successCallback:(nonnull void (^)(PEPIdentity * _Nonnull))successCallback {
return color;
}
- (void)encryptMessage:(PEPMessage *)message
forSelf:(PEPIdentity *)ownIdentity
extraKeys:(PEPStringList *_Nullable)extraKeys
errorCallback:(void (^)(NSError *error))errorCallback
successCallback:(void (^)(PEPMessage *srcMessage,
PEPMessage *destMessage))successCallback {
[[self.connection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) {
NSLog(@"[PEP4APPLEMAIL] Error: %@", error);
// Nothing to do
}] encryptMessage:message forSelf:ownIdentity extraKeys:extraKeys
resultBlock:^(PEPObjCAdapterXpcApiResult * _Nonnull result) {
PEPMessage *srcMessage = result.result[0];
PEPMessage *destMessage = result.result[1];
successCallback(srcMessage, destMessage);
}];
}
@end

Loading…
Cancel
Save