diff --git a/ChangeLog b/ChangeLog index ffa451500..d18615f64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-06 Wolfgang Sourdeau + + * SoObjects/SOGo/NSArray+DAV.m (-asDAVPropstatWithStatus:): new + method that creates a "PROPSTAT" element with the specified + status. + 2009-10-05 Wolfgang Sourdeau * Tests/test-maildav.py (DAVMailCollectionTest._testFilter): fixed diff --git a/SoObjects/SOGo/NSArray+DAV.h b/SoObjects/SOGo/NSArray+DAV.h index 2ff6863bc..47b9b5cc7 100644 --- a/SoObjects/SOGo/NSArray+DAV.h +++ b/SoObjects/SOGo/NSArray+DAV.h @@ -25,6 +25,7 @@ #import +@class NSDictionary; @class NSMutableDictionary; @class NSString; @@ -33,6 +34,8 @@ - (NSString *) asWebDavStringWithNamespaces: (NSMutableDictionary *) namespaces; +- (NSDictionary *) asDAVPropstatWithStatus: (NSString *) status; + @end #endif /* NSARRAY_DAV_H */ diff --git a/SoObjects/SOGo/NSArray+DAV.m b/SoObjects/SOGo/NSArray+DAV.m index 56cba073d..836c98036 100644 --- a/SoObjects/SOGo/NSArray+DAV.m +++ b/SoObjects/SOGo/NSArray+DAV.m @@ -20,9 +20,12 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import +#import + #import "NSObject+DAV.h" #import "NSArray+DAV.h" @@ -48,4 +51,17 @@ return webdavString; } +- (NSDictionary *) asDAVPropstatWithStatus: (NSString *) status +{ + NSMutableArray *propstat; + + propstat = [NSMutableArray arrayWithCapacity: 2]; + [propstat addObject: davElementWithContent (@"prop", XMLNS_WEBDAV, + self)]; + [propstat addObject: davElementWithContent (@"status", XMLNS_WEBDAV, + status)]; + + return davElementWithContent (@"propstat", XMLNS_WEBDAV, propstat); +} + @end