diff --git a/SoObjects/Contacts/SOGoContactFolder.h b/SoObjects/Contacts/SOGoContactFolder.h index 4e4e3f66c..4b4562387 100644 --- a/SoObjects/Contacts/SOGoContactFolder.h +++ b/SoObjects/Contacts/SOGoContactFolder.h @@ -26,9 +26,9 @@ /* SOGoContactFolder - Parent object: the SOGoUserFolder + Parent object: the user's SOGoUserFolders Child objects: SOGoContactObject - + The SOGoContactFolder maps to an GCS folder of type 'contact', that is, a content folder containing vcal?? files (and a proper quicktable). */ @@ -36,12 +36,23 @@ @class NSString, NSArray, NSCalendarDate, NSException; @class GCSFolder; +@class SOGoContactSource; + @interface SOGoContactFolder : SOGoFolder -{ -} /* fetching */ ++ (id) contactFolderWithSource: (SOGoContactSource *) source + inContainer: (SOGoObject *) newContainer + andName: (NSString *) name; + +- (id) initWithSource: (SOGoContactSource *) source + inContainer: (SOGoObject *) newContainer + andName: (NSString *) name; + +- (void) setContactSource: (SOGoContactSource *) source + andName: name; + - (NSArray *)fetchCoreInfos; @end diff --git a/SoObjects/Contacts/SOGoContactFolder.m b/SoObjects/Contacts/SOGoContactFolder.m index 5792643ce..9b6f801af 100644 --- a/SoObjects/Contacts/SOGoContactFolder.m +++ b/SoObjects/Contacts/SOGoContactFolder.m @@ -30,6 +30,35 @@ @implementation SOGoContactFolder ++ (id) contactFolderWithSource: (SOGoContactSource *) source + inContainer: (SOGoObject *) container + andName: (NSString *) name +{ + SOGoContactFolder *folder; + + folder = [[self alloc] initWithSource: source + inContainer: container + andName: name]; + [folder autorelease]; + + return folder; +} + +- (id) initWithSource: (SOGoContactSource *) source + inContainer: (SOGoObject *) newContainer + andName: (NSString *) name +{ + if ((self = [self initWithName: name inContainer: newContainer])) + [self setContactSource: source andName: name]; + + return self; +} + +- (void) setContactSource: (SOGoContactSource *) source + andName: name +{ +} + /* name lookup */ - (BOOL)isValidContactName:(NSString *)_key { @@ -39,7 +68,9 @@ return YES; } -- (id)contactWithName:(NSString *)_key inContext:(id)_ctx { +- (id) contactWithName: (NSString *) _key + inContext: (id)_ctx +{ static Class ctClass = Nil; id ct;