Quellcode durchsuchen

add isEncrypted on driver

Marino Faggiana vor 7 Jahren
Ursprung
Commit
d4511bec4f

+ 2 - 0
iOSClient/Library/OCCommunicationLib/OCFileDto.h

@@ -47,5 +47,7 @@
 @property (nonatomic, copy) NSString *permissions;
 @property (nonatomic, copy) NSString *ocId;
 @property BOOL isFavorite;
+@property BOOL isEncrypted;
+
 
 @end

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

@@ -217,7 +217,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
 	NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
     
     [request setValue: depth forHTTPHeaderField: @"Depth"];
-    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
+    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:getcontenttype/><nc:is-encrypted/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
     
@@ -292,6 +292,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
                             "<oc:permissions />"
                             "<oc:size />"
                             "<oc:favorite/>"
+                            "<nc:is-encrypted/>"
                         "</d:prop>"
                     "</d:select>"
                     "<d:from>"
@@ -370,6 +371,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
                     "<oc:id/>"
                     "<oc:permissions/>"
                     "<oc:favorite/>"
+                    "<nc:is-encrypted/>"
                 "</d:prop>"
                 "<oc:filter-rules>"
                     "<oc:favorite>1</oc:favorite>"

+ 2 - 0
iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m

@@ -196,6 +196,8 @@
         _xmlBucket = nil;
     } else if ([elementName isEqualToString:@"oc:favorite"]) {
         _currentFile.isFavorite = [_xmlChars boolValue];
+    } else if ([elementName isEqualToString:@"nc:is-encrypted"]) {
+        _currentFile.isEncrypted = [_xmlChars boolValue];
     }
 }