Explorar el Código

Add suppor for favorite

Marino Faggiana hace 8 años
padre
commit
f0622bf5b2

+ 4 - 0
Libraries external/OCCommunicationLib/OCCommunicationLib/OCFileDto.h

@@ -28,6 +28,9 @@
 //  Add Support for Quota
 //  Add Support for Quota
 //  quotaUsed and quotaAvailable
 //  quotaUsed and quotaAvailable
 //
 //
+//  Add Support for Favorite
+//  isFavorite
+//
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //
 //
 
 
@@ -45,5 +48,6 @@
 @property (nonatomic, copy) NSString *ocId;
 @property (nonatomic, copy) NSString *ocId;
 @property double quotaUsed;
 @property double quotaUsed;
 @property double quotaAvailable;
 @property double quotaAvailable;
+@property BOOL isFavorite;
 
 
 @end
 @end

+ 4 - 3
Libraries external/OCCommunicationLib/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m

@@ -28,10 +28,11 @@
 //  Add : getNotificationServer & setNotificationServer
 //  Add : getNotificationServer & setNotificationServer
 //  Add : getUserProfileServer
 //  Add : getUserProfileServer
 //
 //
+//  Add : Support for Favorite <favorite xmlns=\"http://owncloud.org/ns\"/>
+//
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //
 //
 
 
-
 #import "OCWebDAVClient.h"
 #import "OCWebDAVClient.h"
 #import "OCFrameworkConstants.h"
 #import "OCFrameworkConstants.h"
 #import "OCCommunication.h"
 #import "OCCommunication.h"
@@ -223,7 +224,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
 		depthHeader = @"infinity";
 		depthHeader = @"infinity";
     [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
     [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
     
     
-    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
+    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
     
     
     
@@ -249,7 +250,7 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
         depthHeader = @"infinity";
         depthHeader = @"infinity";
     [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
     [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
     
     
-    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
+    [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><favorite xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
     
     
     

+ 5 - 0
Libraries external/OCCommunicationLib/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m

@@ -27,6 +27,9 @@
 //  Add Support for Quota
 //  Add Support for Quota
 //  quotaUsed and quotaAvailable
 //  quotaUsed and quotaAvailable
 //
 //
+//  Add Support for Favorite
+//  isFavorite
+//
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //  Author Marino Faggiana <m.faggiana@twsweb.it>
 //
 //
 
 
@@ -236,6 +239,8 @@ NSString *OCCWebDAVURIKey           = @"uri";
         _currentFile.quotaUsed = (double)[_xmlChars doubleValue];
         _currentFile.quotaUsed = (double)[_xmlChars doubleValue];
     } else if ([elementName isEqualToString:@"d:quota-available-bytes"]) {
     } else if ([elementName isEqualToString:@"d:quota-available-bytes"]) {
         _currentFile.quotaAvailable = (double)[_xmlChars doubleValue];
         _currentFile.quotaAvailable = (double)[_xmlChars doubleValue];
+    } else if ([elementName isEqualToString:@"oc:favorite"]) {
+        _currentFile.isFavorite = [_xmlChars boolValue];
     }
     }
 }
 }