diff --git a/ChangeLog b/ChangeLog index 1bafc8212..b87994a30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-05-08 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactLDAPEntry.[hm]: renamed to + SOGOContactLDIFEntry. + * SoObjects/Contacts/NGLdapEntry+Contact.[hm]: removed class module, obsoleted by code in SOGo/LDAPSource.[hm]. diff --git a/SoObjects/Contacts/SOGoContactLDAPEntry.h b/SoObjects/Contacts/SOGoContactLDIFEntry.h similarity index 76% rename from SoObjects/Contacts/SOGoContactLDAPEntry.h rename to SoObjects/Contacts/SOGoContactLDIFEntry.h index 44e403334..69b0dcff1 100644 --- a/SoObjects/Contacts/SOGoContactLDAPEntry.h +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.h @@ -30,20 +30,20 @@ @class SOGoContactLDAPFolder; @class NGLdapEntry; -@interface SOGoContactLDAPEntry : SOGoObject +@interface SOGoContactLDAPEntry : NSObject { + NSString *name; NGLdapEntry *ldapEntry; NGVCard *vcard; + id container; } -+ (SOGoContactLDAPEntry *) contactEntryWithName: (NSString *) aName - withLDAPEntry: (NGLdapEntry *) anEntry - inContainer: (id) aContainer; -- (id) initWithName: (NSString *) aName - withLDAPEntry: (NGLdapEntry *) anEntry - inContainer: (id) aContainer; - -- (void) setLDAPEntry: (NGLdapEntry *) anEntry; ++ (SOGoContactLDAPEntry *) contactEntryWithName: (NSString *) newName + withLDAPEntry: (NGLdapEntry *) newEntry + inContainer: (id) newContainer; +- (id) initWithName: (NSString *) newName + withLDAPEntry: (NGLdapEntry *) newEntry + inContainer: (id) newContainer; @end diff --git a/SoObjects/Contacts/SOGoContactLDAPEntry.m b/SoObjects/Contacts/SOGoContactLDIFEntry.m similarity index 87% rename from SoObjects/Contacts/SOGoContactLDAPEntry.m rename to SoObjects/Contacts/SOGoContactLDIFEntry.m index 9168ed319..fe80a79db 100644 --- a/SoObjects/Contacts/SOGoContactLDAPEntry.m +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.m @@ -27,24 +27,19 @@ #import #import -#import -#import - -#import "NGLdapEntry+Contact.h" - #import "SOGoContactLDAPEntry.h" @implementation SOGoContactLDAPEntry -+ (SOGoContactLDAPEntry *) contactEntryWithName: (NSString *) aName - withLDAPEntry: (NGLdapEntry *) anEntry - inContainer: (id) aContainer ++ (SOGoContactLDAPEntry *) contactEntryWithName: (NSString *) newName + withLDAPEntry: (NGLdapEntry *) newEntry + inContainer: (id) newContainer { SOGoContactLDAPEntry *entry; - entry = [[self alloc] initWithName: aName - withLDAPEntry: anEntry - inContainer: aContainer]; + entry = [[self alloc] initWithName: newName + withLDAPEntry: newEntry + inContainer: newContainer]; [entry autorelease]; return entry; @@ -66,31 +61,31 @@ NSLog (@"dumping finished.."); } -- (id) initWithName: (NSString *) aName - withLDAPEntry: (NGLdapEntry *) anEntry - inContainer: (id) aContainer +- (id) initWithName: (NSString *) newName + withLDAPEntry: (NGLdapEntry *) newEntry + inContainer: (id) newContainer { - if ((self = [super initWithName: aName inContainer: aContainer])) - { - vcard = nil; - [self setLDAPEntry: anEntry]; - } + self = [self init]; + ASSIGN (name, newName); + ASSIGN (container, newContainer); + ASSIGN (ldapEntry, newEntry); + vcard = nil; - [self dumpEntry: anEntry]; +// [self dumpEntry: anEntry]; return self; } -- (void) dealloc +- (NSString *) nameInContainer { - if (vcard) - [vcard release]; - [super dealloc]; + return name; } -- (void) setLDAPEntry: (NGLdapEntry *) anEntry; +- (void) dealloc { - ldapEntry = anEntry; + [vcard release]; + [ldapEntry release]; + [super dealloc]; } - (NSString *) contentAsString