Monotone-Parent: a87d7a6ebe1e63e7828494f7104ff49289abc15e

Monotone-Revision: e785838ad834b8a805eeb85700cd115f2501c0f7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-06-19T14:48:25
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-06-19 14:48:25 +00:00
parent 411b7df5b7
commit 853cc1312e
4 changed files with 32 additions and 9 deletions
+9
View File
@@ -1,3 +1,12 @@
2009-06-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSString+DAV.m (asWebDAVTupleWithContent:): new
method that returns a DAV dictionary from a flat DAV element (self)
string and a content.
* SoObjects/SOGo/NSArray+DAV.m (asWebDavStringWithNamespaces:): we
no longer use an NSEnumerator in order to be a bit faster.
2009-06-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/DOMNode+SOGo.m
+8 -5
View File
@@ -33,14 +33,17 @@
asWebDavStringWithNamespaces: (NSMutableDictionary *) namespaces
{
NSMutableString *webdavString;
NSEnumerator *children;
unsigned int count, max;
NSObject *child;
webdavString = [NSMutableString string];
children = [self objectEnumerator];
while ((child = [children nextObject]))
[webdavString appendString:
[child asWebDavStringWithNamespaces: namespaces]];
max = [self count];
for (count = 0; count < max; count++)
{
child = [self objectAtIndex: count];
[webdavString appendString:
[child asWebDavStringWithNamespaces: namespaces]];
}
return webdavString;
}
+2 -1
View File
@@ -31,7 +31,8 @@
- (NSString *)
asWebDavStringWithNamespaces: (NSMutableDictionary *) namespaces;
- (NSDictionary *) asWebDAVTuple;
- (NSMutableDictionary *) asWebDAVTuple;
- (NSMutableDictionary *) asWebDAVTupleWithContent: (id) content;
@end
+13 -3
View File
@@ -35,7 +35,7 @@
}
#warning we should use the same nomenclature as the webdav values...
- (NSDictionary *) asWebDAVTuple
- (NSMutableDictionary *) asWebDAVTuple
{
NSString *namespace, *nodeName;
NSRange nsEnd;
@@ -44,9 +44,19 @@
namespace = [self substringFromRange: NSMakeRange (1, nsEnd.location - 1)];
nodeName = [self substringFromIndex: nsEnd.location + 1];
return [NSDictionary dictionaryWithObjectsAndKeys: namespace, @"ns",
nodeName, @"method", nil];
return [NSMutableDictionary
dictionaryWithObjectsAndKeys: namespace, @"ns",
nodeName, @"method", nil];
}
- (NSMutableDictionary *) asWebDAVTupleWithContent: (id) content
{
NSMutableDictionary *tuple;
tuple = [self asWebDAVTuple];
[tuple setObject: content forKey: @"content"];
return tuple;
}
@end