diff --git a/ChangeLog b/ChangeLog index 7b5146e07..525533c7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-03 Ludovic Marcotte + + * OpenChange/MAPIStoreMapping.m (-unregisterURLWithID:): new + method for removing entries from the mapping dictionaries. + 2011-02-03 Wolfgang Sourdeau * SoObjects/SOGo/WOResourceManager+SOGo.m: new category module diff --git a/OpenChange/MAPIStoreMapping.h b/OpenChange/MAPIStoreMapping.h index 9889da85f..fa52509a3 100644 --- a/OpenChange/MAPIStoreMapping.h +++ b/OpenChange/MAPIStoreMapping.h @@ -41,7 +41,7 @@ - (uint64_t) idFromURL: (NSString *) url; - (BOOL) registerURL: (NSString *) urlString withID: (uint64_t) idNbr; -// - (void) registerURL: (NSString *) urlString; +- (void) unregisterURLWithID: (uint64_t) idNbr; @end diff --git a/OpenChange/MAPIStoreMapping.m b/OpenChange/MAPIStoreMapping.m index 17b3da146..d600728f4 100644 --- a/OpenChange/MAPIStoreMapping.m +++ b/OpenChange/MAPIStoreMapping.m @@ -180,4 +180,15 @@ MAPIStoreMappingInitDictionary (NSMutableDictionary *mapping) return rc; } +- (void) unregisterURLWithID: (uint64_t) idNbr +{ + NSNumber *idKey; + NSString *urlString; + + idKey = [NSNumber numberWithUnsignedLongLong: idNbr]; + urlString = [mapping objectForKey: idKey]; + [reverseMapping removeObjectForKey: urlString]; + [mapping removeObjectForKey: idKey]; +} + @end