From f518e5f4a9f839b34118e556be04a9f1c5dd8a13 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 6 Oct 2009 18:24:47 +0000 Subject: [PATCH] Monotone-Parent: 86d5fda1266a9ae6071c1b0c48daa229594679fb Monotone-Revision: 319124b4db57da3c6d63eabff877eacac5c8a8a2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-06T18:24:47 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/NSArray+DAV.h | 3 +++ SoObjects/SOGo/NSArray+DAV.m | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) 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