Quellcode durchsuchen

change name to deletemarkEndToEndFolderEncrypted

Marino Faggiana vor 7 Jahren
Ursprung
Commit
cbf892e46e

+ 1 - 1
iOSClient/CCGlobal.h

@@ -210,7 +210,7 @@ extern NSString *const dav;
 #define actionDeleteEndToEndPrivateKey                  @"deleteEndToEndPrivateKey"
 #define actionGetEndToEndServerPublicKey                @"getEndToEndServerPublicKey"
 #define actionMarkEndToEndFolderEncrypted               @"markEndToEndFolderEncrypted"
-#define actionDeleteEndToEndFolderEncrypted             @"deleteEndToEndFolderEncrypted"
+#define actionDeletemarkEndToEndFolderEncrypted         @"deletemarkEndToEndFolderEncrypted"
 
 
 // Metadata : FileType

+ 1 - 1
iOSClient/Library/OCCommunicationLib/OCCommunication.h

@@ -921,7 +921,7 @@ typedef enum {
 
 - (void)markEndToEndFolderEncrypted:(NSString*)serverPath fileID:(NSString *)fileID onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
 
-- (void)deleteEndToEndFolderEncrypted:(NSString*)serverPath fileID:(NSString *)fileID onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
+- (void)deletemarkEndToEndFolderEncrypted:(NSString*)serverPath fileID:(NSString *)fileID onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
 
 @end
 

+ 2 - 2
iOSClient/Library/OCCommunicationLib/OCCommunication.m

@@ -2229,7 +2229,7 @@
     }];
 }
 
-- (void)deleteEndToEndFolderEncrypted:(NSString*)serverPath fileID:(NSString *)fileID onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {
+- (void)deletemarkEndToEndFolderEncrypted:(NSString*)serverPath fileID:(NSString *)fileID onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {
     
     serverPath = [serverPath stringByAppendingString:k_url_client_side_encryption];
     serverPath = [NSString stringWithFormat:@"%@/encrypted/%@", serverPath, fileID];
@@ -2238,7 +2238,7 @@
     OCWebDAVClient *request = [OCWebDAVClient new];
     request = [self getRequestWithCredentials:request];
     
-    [request deleteEndToEndFolderEncrypted:serverPath onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
+    [request deletemarkEndToEndFolderEncrypted:serverPath onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
         
         //Return success
         successRequest(response, request.redirectedServer);

+ 1 - 1
iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h

@@ -619,6 +619,6 @@ extern NSString * _Nullable OCWebDAVModificationDateKey;
 
 - (void)markEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id  _Nullable responseObject, NSError * _Nonnull error))failure;
 
-- (void)deleteEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id  _Nullable responseObject, NSError * _Nonnull error))failure;
+- (void)deletemarkEndToEndFolderEncrypted:(NSString * _Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCComunication success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id  _Nullable responseObject, NSError * _Nonnull error))failure;
 
 @end

+ 1 - 1
iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m

@@ -988,7 +988,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
 }
 
 // curl -X DELETE http://<user>:<password>@nextcloud/ocs/v2.php/apps/end_to_end_encryption/api/v1/encrypted/<file-id> -H "OCS-APIRequest:true"
-- (void)deleteEndToEndFolderEncrypted:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
+- (void)deletemarkEndToEndFolderEncrypted:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
                             failure:(void(^)(NSHTTPURLResponse *operation, id  _Nullable responseObject, NSError *error))failure{
     
     _requestMethod = @"DELETE";

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -4058,7 +4058,7 @@
                                        type:AHKActionSheetButtonTypeEncrypted
                                     handler:^(AHKActionSheet *as) {
                                         
-                                        [app.endToEndInterface deleteEndToEndFolderEncrypted:_metadata];
+                                        [app.endToEndInterface deletemarkEndToEndFolderEncrypted:_metadata];
                                     }];
         }
 #endif

+ 2 - 2
iOSClient/Networking/OCNetworking.h

@@ -145,8 +145,8 @@
 - (void)markEndToEndFolderEncryptedSuccess:(CCMetadataNet *)metadataNet;
 - (void)markEndToEndFolderEncryptedFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode;
 
-- (void)deleteEndToEndFolderEncryptedSuccess:(CCMetadataNet *)metadataNet;
-- (void)deleteEndToEndFolderEncryptedFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode;
+- (void)deletemarkEndToEndFolderEncryptedSuccess:(CCMetadataNet *)metadataNet;
+- (void)deletemarkEndToEndFolderEncryptedFailure:(CCMetadataNet *)metadataNet message:(NSString *)message errorCode:(NSInteger)errorCode;
 
 @end
 

+ 6 - 6
iOSClient/Networking/OCNetworking.m

@@ -1951,19 +1951,19 @@
     }];
 }
 
-- (void)deleteEndToEndFolderEncrypted
+- (void)deletemarkEndToEndFolderEncrypted
 {
     OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
     
     [communication setCredentialsWithUser:_activeUser andUserID:_activeUserID andPassword:_activePassword];
     [communication setUserAgent:[CCUtility getUserAgent]];
     
-    [communication deleteEndToEndFolderEncrypted:[_activeUrl stringByAppendingString:@"/"] fileID:_metadataNet.fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
+    [communication deletemarkEndToEndFolderEncrypted:[_activeUrl stringByAppendingString:@"/"] fileID:_metadataNet.fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
         
         // 200 ok: body contain the public key
         
-        if ([self.delegate respondsToSelector:@selector(deleteEndToEndFolderEncryptedSuccess:)])
-            [self.delegate deleteEndToEndFolderEncryptedSuccess:_metadataNet];
+        if ([self.delegate respondsToSelector:@selector(deletemarkEndToEndFolderEncryptedSuccess:)])
+            [self.delegate deletemarkEndToEndFolderEncryptedSuccess:_metadataNet];
         
         [self complete];
         
@@ -1974,8 +1974,8 @@
             errorCode = error.code;
         
         // Error
-        if ([self.delegate respondsToSelector:@selector(deleteEndToEndFolderEncryptedFailure:message:errorCode:)])
-            [self.delegate deleteEndToEndFolderEncryptedFailure:_metadataNet message:[error.userInfo valueForKey:@"NSLocalizedDescription"] errorCode:errorCode];
+        if ([self.delegate respondsToSelector:@selector(deletemarkEndToEndFolderEncryptedFailure:message:errorCode:)])
+            [self.delegate deletemarkEndToEndFolderEncryptedFailure:_metadataNet message:[error.userInfo valueForKey:@"NSLocalizedDescription"] errorCode:errorCode];
         
         // Request trusted certificated
         if ([error code] == NSURLErrorServerCertificateUntrusted)

+ 4 - 4
iOSClient/Security/NCEntoToEndInterface.swift

@@ -331,11 +331,11 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
         appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)        
     }
     
-    func deleteEnd(toEndFolderEncryptedSuccess metadataNet: CCMetadataNet!) {
+    func deletemarkEnd(toEndFolderEncryptedSuccess metadataNet: CCMetadataNet!) {
         print("E2E delete folder success")
     }
     
-    func deleteEnd(toEndFolderEncryptedFailure metadataNet: CCMetadataNet!, message: String!, errorCode: Int) {
+    func deletemarkEnd(toEndFolderEncryptedFailure metadataNet: CCMetadataNet!, message: String!, errorCode: Int) {
        
         // Unauthorized
         if (errorCode == kOCErrorServerUnauthorized) {
@@ -348,11 +348,11 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
         }
     }
     
-    @objc func deleteEndToEndFolderEncrypted(_ metadata: tableMetadata) {
+    @objc func deletemarkEndToEndFolderEncrypted(_ metadata: tableMetadata) {
         
         let metadataNet: CCMetadataNet = CCMetadataNet.init(account: appDelegate.activeAccount)
         
-        metadataNet.action = actionDeleteEndToEndFolderEncrypted;
+        metadataNet.action = actionDeletemarkEndToEndFolderEncrypted;
         metadataNet.fileID = metadata.fileID;
         
         appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)