From 952404d05fa432a8442f63c5543a2d8749f53988 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 3 Feb 2011 22:09:41 +0000 Subject: [PATCH] Monotone-Parent: a830e73fbed57c6ef30ede64ea5bfa6d85af8f74 Monotone-Revision: ade57d95f9e3d9e8015757ea30d104d416c32d67 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-03T22:09:41 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIStoreMapping.h | 2 +- OpenChange/MAPIStoreMapping.m | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) 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