Monotone-Parent: a8e6d3c082060d0b8f4e1c547734baf974d5ee7c

Monotone-Revision: 5cf7ca16573b57f14380a1da5611560a68f5fd45

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-14T20:29:14
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-08-14 20:29:14 +00:00
parent aafcaeff9f
commit 9709e144bc
3 changed files with 30 additions and 4 deletions
+7
View File
@@ -1,3 +1,10 @@
2006-08-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/NGLdapEntry+Contact.m ([NGLdapEntry
-asDictionaryWithAttributeNames:withUID:andCName:cName]): add an
entry for "uid" with the field name representing the login name of
the user in the corresponding LDAP branch.
2006-08-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
+1
View File
@@ -33,6 +33,7 @@
- (NSString *) singleAttributeWithName: (NSString *) key;
- (NSDictionary *) asDictionaryWithAttributeNames: (NSArray *) attributes
withUID: (NSString *) uid
andCName: (NSString *) cName;
@end
+22 -4
View File
@@ -37,11 +37,12 @@
}
- (NSDictionary *) asDictionaryWithAttributeNames: (NSArray *) attributeNames
withUID: (NSString *) uid
andCName: (NSString *) cName
{
NSMutableDictionary *valuesDict;
NSEnumerator *attrEnum;
NSString *attribute;
NSString *attribute, *value;
if (!attributeNames)
attributeNames = [self attributeNames];
@@ -56,9 +57,26 @@
forKey: attribute];
attribute = [attrEnum nextObject];
}
[valuesDict setObject: [[self attributeWithName: cName]
stringValueAtIndex: 0]
forKey: @"c_name"];
if (cName)
{
value = [[self attributeWithName: cName]
stringValueAtIndex: 0];
if (!value)
value = @"";
NSLog (@"value for '%@' = '%@'", cName, value);
[valuesDict setObject: value
forKey: @"c_name"];
}
if (uid)
{
value = [[self attributeWithName: uid]
stringValueAtIndex: 0];
if (!value)
value = @"";
NSLog (@"value for '%@' = '%@'", uid, value);
[valuesDict setObject: value
forKey: @"c_uid"];
}
return valuesDict;
}