diff --git a/OpenChange/MAPIStoreContext.h b/OpenChange/MAPIStoreContext.h index 9987b8d2f..533d7f278 100644 --- a/OpenChange/MAPIStoreContext.h +++ b/OpenChange/MAPIStoreContext.h @@ -61,10 +61,10 @@ } + (struct mapistore_contexts_list *) listAllContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx; + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx; + (enum mapistore_error) createRootFolder: (NSString **) mapistoreUriP withFID: (uint64_t ) fid @@ -75,11 +75,11 @@ + (int) openContext: (MAPIStoreContext **) contextPtr withURI: (const char *) newUri connectionInfo: (struct mapistore_connection_info *) newConnInfo - andTDBIndexing: (struct tdb_wrap *) indexingTdb; + andTDBIndexing: (struct indexing_context *) indexing; - (id) initFromURL: (NSURL *) newUri withConnectionInfo: (struct mapistore_connection_info *) newConnInfo - andTDBIndexing: (struct tdb_wrap *) indexingTdb; + andTDBIndexing: (struct indexing_context *) indexing; - (NSURL *) url; - (struct mapistore_connection_info *) connectionInfo; diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index 4f1e67819..ce447d87e 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -100,7 +100,7 @@ static NSMutableDictionary *contextClassMapping; } + (struct mapistore_contexts_list *) listAllContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *list, *current; @@ -112,7 +112,7 @@ static NSMutableDictionary *contextClassMapping; list = NULL; userContext = [MAPIStoreUserContext userContextWithUsername: userName - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; [userContext activateWithUser: [userContext sogoUser]]; classes = GSObjCAllSubclassesOfClass (self); @@ -121,7 +121,7 @@ static NSMutableDictionary *contextClassMapping; { currentClass = [classes objectAtIndex: count]; current = [currentClass listContextsForUser: userName - withTDBIndexing: indexingTdb + withIndexing: indexing inMemCtx: memCtx]; if (current) DLIST_CONCATENATE(list, current, void); @@ -131,7 +131,7 @@ static NSMutableDictionary *contextClassMapping; } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { return NULL; @@ -216,7 +216,7 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri) + (int) openContext: (MAPIStoreContext **) contextPtr withURI: (const char *) newUri connectionInfo: (struct mapistore_connection_info *) newConnInfo - andTDBIndexing: (struct tdb_wrap *) indexingTdb + andTDBIndexing: (struct indexing_context *) indexing { MAPIStoreContext *context; Class contextClass; @@ -239,7 +239,7 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri) { context = [[contextClass alloc] initFromURL: baseURL withConnectionInfo: newConnInfo - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; if (context) { [context autorelease]; @@ -272,7 +272,7 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri) - (id) initFromURL: (NSURL *) newUrl withConnectionInfo: (struct mapistore_connection_info *) newConnInfo - andTDBIndexing: (struct tdb_wrap *) indexingTdb + andTDBIndexing: (struct indexing_context *) indexing { NSString *username; @@ -291,7 +291,7 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri) ASSIGN (userContext, [MAPIStoreUserContext userContextWithUsername: username - andTDBIndexing: indexingTdb]); + andTDBIndexing: indexing]); #if 0 mapistore_mgmt_backend_register_user (newConnInfo, diff --git a/OpenChange/MAPIStoreFallbackContext.m b/OpenChange/MAPIStoreFallbackContext.m index 1c9a0106b..41463542a 100644 --- a/OpenChange/MAPIStoreFallbackContext.m +++ b/OpenChange/MAPIStoreFallbackContext.m @@ -45,7 +45,7 @@ } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *firstContext = NULL, *context; @@ -72,7 +72,7 @@ inContainer: nil]; [root setOwner: userName]; userContext = [MAPIStoreUserContext userContextWithUsername: userName - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; [userContext ensureFolderTableExists]; [root setTableUrl: [userContext folderTableURL]]; names = [root toManyRelationshipKeys]; diff --git a/OpenChange/MAPIStoreGCSBaseContext.m b/OpenChange/MAPIStoreGCSBaseContext.m index cc09a41fe..216eab01c 100644 --- a/OpenChange/MAPIStoreGCSBaseContext.m +++ b/OpenChange/MAPIStoreGCSBaseContext.m @@ -64,7 +64,7 @@ } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *firstContext = NULL, *context; @@ -79,7 +79,7 @@ if (moduleName) { userContext = [MAPIStoreUserContext userContextWithUsername: userName - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; parentFolder = [[userContext rootFolders] objectForKey: moduleName]; baseUrl = [NSString stringWithFormat: @"sogo://%@@%@/", userName, moduleName]; diff --git a/OpenChange/MAPIStoreMailContext.m b/OpenChange/MAPIStoreMailContext.m index 79ea0b62e..24d974e5a 100644 --- a/OpenChange/MAPIStoreMailContext.m +++ b/OpenChange/MAPIStoreMailContext.m @@ -83,7 +83,7 @@ MakeDisplayFolderName (NSString *folderName) } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *firstContext = NULL, *context; @@ -100,7 +100,7 @@ MakeDisplayFolderName (NSString *folderName) WOContext *woContext; userContext = [MAPIStoreUserContext userContextWithUsername: userName - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; accountFolder = [[userContext rootFolders] objectForKey: @"mail"]; woContext = [userContext woContext]; @@ -245,7 +245,7 @@ MakeDisplayFolderName (NSString *folderName) } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *context; @@ -256,7 +256,7 @@ MakeDisplayFolderName (NSString *folderName) WOContext *woContext; userContext = [MAPIStoreUserContext userContextWithUsername: userName - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; accountFolder = [[userContext rootFolders] objectForKey: @"mail"]; woContext = [userContext woContext]; diff --git a/OpenChange/MAPIStoreMapping.h b/OpenChange/MAPIStoreMapping.h index c974c7496..c756686f4 100644 --- a/OpenChange/MAPIStoreMapping.h +++ b/OpenChange/MAPIStoreMapping.h @@ -32,17 +32,17 @@ { void *memCtx; NSString *username; - struct tdb_wrap *indexing; + struct indexing_context *indexing; NSMutableDictionary *mapping; /* FID/MID -> url */ NSMutableDictionary *reverseMapping; /* url -> FID/MID */ NSUInteger useCount; } + (id) mappingForUsername: (NSString *) username - withIndexing: (struct tdb_wrap *) indexing; + withIndexing: (struct indexing_context *) indexing; - (id) initForUsername: (NSString *) username - withIndexing: (struct tdb_wrap *) indexing; + withIndexing: (struct indexing_context *) indexing; - (void) increaseUseCount; diff --git a/OpenChange/MAPIStoreMapping.m b/OpenChange/MAPIStoreMapping.m index ffc035aea..5fa9e851d 100644 --- a/OpenChange/MAPIStoreMapping.m +++ b/OpenChange/MAPIStoreMapping.m @@ -39,10 +39,6 @@ #include #include - -struct tdb_wrap { - struct tdb_context *tdb; -}; static NSMutableDictionary *mappingRegistry = nil; @@ -103,7 +99,7 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2, } + (id) mappingForUsername: (NSString *) username - withIndexing: (struct tdb_wrap *) indexing + withIndexing: (struct indexing_context *) indexing { id mapping; @@ -153,7 +149,7 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2, } - (id) initForUsername: (NSString *) newUsername - withIndexing: (struct tdb_wrap *) newIndexing + withIndexing: (struct indexing_context *) newIndexing { NSString *idNbr, *uri; NSArray *keys; diff --git a/OpenChange/MAPIStoreNotesContext.m b/OpenChange/MAPIStoreNotesContext.m index 36d6804b9..594a819b5 100644 --- a/OpenChange/MAPIStoreNotesContext.m +++ b/OpenChange/MAPIStoreNotesContext.m @@ -38,7 +38,7 @@ } + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName - withTDBIndexing: (struct tdb_wrap *) indexingTdb + withIndexing: (struct indexing_context *) indexing inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *context; diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 720635975..23cee8290 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -144,7 +144,7 @@ sogo_backend_init (void) static enum mapistore_error sogo_backend_create_context(TALLOC_CTX *mem_ctx, struct mapistore_connection_info *conn_info, - struct tdb_wrap *indexingTdb, + struct indexing_context *indexing, const char *uri, void **context_object) { NSAutoreleasePool *pool; @@ -161,7 +161,7 @@ sogo_backend_create_context(TALLOC_CTX *mem_ctx, rc = [MAPIStoreContextK openContext: &context withURI: uri connectionInfo: conn_info - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; if (rc == MAPISTORE_SUCCESS) *context_object = [context tallocWrapper: mem_ctx]; } @@ -178,7 +178,7 @@ static enum mapistore_error sogo_backend_create_root_folder (const char *username, enum mapistore_context_role role, uint64_t fid, const char *name, - // struct tdb_wrap *indexingTdb, + // struct indexing_context *indexing, TALLOC_CTX *mem_ctx, char **mapistore_urip) { NSAutoreleasePool *pool; @@ -213,7 +213,7 @@ sogo_backend_create_root_folder (const char *username, } static enum mapistore_error -sogo_backend_list_contexts(const char *username, struct tdb_wrap *indexingTdb, +sogo_backend_list_contexts(const char *username, struct indexing_context *indexing, TALLOC_CTX *mem_ctx, struct mapistore_contexts_list **contexts_listp) { @@ -230,7 +230,7 @@ sogo_backend_list_contexts(const char *username, struct tdb_wrap *indexingTdb, { userName = [NSString stringWithUTF8String: username]; *contexts_listp = [MAPIStoreContextK listAllContextsForUser: userName - withTDBIndexing: indexingTdb + withIndexing: indexing inMemCtx: mem_ctx]; rc = MAPISTORE_SUCCESS; } diff --git a/OpenChange/MAPIStoreUserContext.h b/OpenChange/MAPIStoreUserContext.h index 237819655..f9867d15a 100644 --- a/OpenChange/MAPIStoreUserContext.h +++ b/OpenChange/MAPIStoreUserContext.h @@ -63,10 +63,10 @@ } + (id) userContextWithUsername: (NSString *) username - andTDBIndexing: (struct tdb_wrap *) indexingTdb; + andTDBIndexing: (struct indexing_context *) indexing; - (id) initWithUsername: (NSString *) newUsername - andTDBIndexing: (struct tdb_wrap *) indexingTdb; + andTDBIndexing: (struct indexing_context *) indexing; - (NSString *) username; - (SOGoUser *) sogoUser; diff --git a/OpenChange/MAPIStoreUserContext.m b/OpenChange/MAPIStoreUserContext.m index bad00b260..e034ce3bc 100644 --- a/OpenChange/MAPIStoreUserContext.m +++ b/OpenChange/MAPIStoreUserContext.m @@ -60,7 +60,7 @@ static NSMapTable *contextsTable = nil; } + (id) userContextWithUsername: (NSString *) username - andTDBIndexing: (struct tdb_wrap *) indexingTdb; + andTDBIndexing: (struct indexing_context *) indexing; { id userContext; @@ -68,7 +68,7 @@ static NSMapTable *contextsTable = nil; if (!userContext) { userContext = [[self alloc] initWithUsername: username - andTDBIndexing: indexingTdb]; + andTDBIndexing: indexing]; [userContext autorelease]; [contextsTable setObject: userContext forKey: username]; } @@ -125,7 +125,7 @@ static NSMapTable *contextsTable = nil; } - (id) initWithUsername: (NSString *) newUsername - andTDBIndexing: (struct tdb_wrap *) indexingTdb + andTDBIndexing: (struct indexing_context *) indexing { NSString *userPassword; @@ -133,9 +133,9 @@ static NSMapTable *contextsTable = nil; { /* "username" will be retained by table */ username = newUsername; - if (indexingTdb) + if (indexing) ASSIGN (mapping, [MAPIStoreMapping mappingForUsername: username - withIndexing: indexingTdb]); + withIndexing: indexing]); authenticator = [MAPIStoreAuthenticator new]; [authenticator setUsername: username];