mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-09 21:45:26 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
- (NSString *)
|
||||
asWebDavStringWithNamespaces: (NSMutableDictionary *) namespaces;
|
||||
- (NSDictionary *) asWebDAVTuple;
|
||||
- (NSMutableDictionary *) asWebDAVTuple;
|
||||
- (NSMutableDictionary *) asWebDAVTupleWithContent: (id) content;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user