Monotone-Parent: 7e2d84b941087b6996499d8c6a6832f1b87db837
Monotone-Revision: 267b360550dcc02b5b9590b3fe3268d521bd74e4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-04T14:09:59 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
9b00eaa966
commit
736ccd7bf0
|
@ -1,3 +1,8 @@
|
|||
2011-08-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_backend_create_context):
|
||||
adaoted to new prototype.
|
||||
|
||||
2011-08-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreFolder.m (-permissionsTable): new method
|
||||
|
|
|
@ -67,10 +67,12 @@
|
|||
|
||||
+ (int) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
andConnectionInfo: (struct mapistore_connection_info *) newConnInfo;
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct tdb_wrap *) indexingTdb;
|
||||
|
||||
- (id) initFromURL: (NSURL *) newUri
|
||||
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo;
|
||||
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct tdb_wrap *) indexingTdb;
|
||||
|
||||
- (void) setAuthenticator: (MAPIStoreAuthenticator *) newAuthenticator;
|
||||
- (MAPIStoreAuthenticator *) authenticator;
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
static Class NSDataK, NSStringK, MAPIStoreFAIMessageK;
|
||||
|
||||
static NSMutableDictionary *contextClassMapping;
|
||||
static NSMutableDictionary *userMAPIStoreMapping;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
|
@ -99,13 +98,12 @@ static NSMutableDictionary *userMAPIStoreMapping;
|
|||
NSStringFromClass (currentClass), moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
userMAPIStoreMapping = [NSMutableDictionary new];
|
||||
}
|
||||
|
||||
static inline MAPIStoreContext *
|
||||
_prepareContextClass (Class contextClass,
|
||||
struct mapistore_connection_info *connInfo, NSURL *url)
|
||||
struct mapistore_connection_info *connInfo,
|
||||
struct tdb_wrap *indexingTdb, NSURL *url)
|
||||
{
|
||||
static NSMutableDictionary *registration = nil;
|
||||
MAPIStoreContext *context;
|
||||
|
@ -119,7 +117,8 @@ _prepareContextClass (Class contextClass,
|
|||
forKey: contextClass];
|
||||
|
||||
context = [[contextClass alloc] initFromURL: url
|
||||
withConnectionInfo: connInfo];
|
||||
withConnectionInfo: connInfo
|
||||
andTDBIndexing: indexingTdb];
|
||||
[context autorelease];
|
||||
|
||||
authenticator = [MAPIStoreAuthenticator new];
|
||||
|
@ -137,7 +136,8 @@ _prepareContextClass (Class contextClass,
|
|||
|
||||
+ (int) openContext: (MAPIStoreContext **) contextPtr
|
||||
withURI: (const char *) newUri
|
||||
andConnectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
connectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct tdb_wrap *) indexingTdb
|
||||
{
|
||||
MAPIStoreContext *context;
|
||||
Class contextClass;
|
||||
|
@ -165,7 +165,7 @@ _prepareContextClass (Class contextClass,
|
|||
if (contextClass)
|
||||
{
|
||||
context = _prepareContextClass (contextClass,
|
||||
newConnInfo,
|
||||
newConnInfo, indexingTdb,
|
||||
baseURL);
|
||||
if (context)
|
||||
{
|
||||
|
@ -201,23 +201,12 @@ _prepareContextClass (Class contextClass,
|
|||
|
||||
- (id) initFromURL: (NSURL *) newUrl
|
||||
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo
|
||||
andTDBIndexing: (struct tdb_wrap *) indexingTdb
|
||||
{
|
||||
NSString *username;
|
||||
|
||||
if ((self = [self init]))
|
||||
{
|
||||
ASSIGN (contextUrl, newUrl);
|
||||
|
||||
username = [NSString stringWithUTF8String: newConnInfo->username];
|
||||
mapping = [userMAPIStoreMapping objectForKey: username];
|
||||
if (!mapping)
|
||||
{
|
||||
[self logWithFormat: @"generating mapping of ids for user '%@'",
|
||||
username];
|
||||
mapping = [MAPIStoreMapping mappingWithIndexing: newConnInfo->indexing];
|
||||
[userMAPIStoreMapping setObject: mapping forKey: username];
|
||||
}
|
||||
|
||||
ASSIGN (mapping, [MAPIStoreMapping mappingWithIndexing: indexingTdb]);
|
||||
mstoreCtx = newConnInfo->mstore_ctx;
|
||||
connInfo = newConnInfo;
|
||||
}
|
||||
|
@ -230,7 +219,7 @@ _prepareContextClass (Class contextClass,
|
|||
[baseFolder release];
|
||||
[woContext release];
|
||||
[authenticator release];
|
||||
|
||||
[mapping release];
|
||||
[contextUrl release];
|
||||
|
||||
[super dealloc];
|
||||
|
|
|
@ -103,6 +103,7 @@ sogo_backend_init (void)
|
|||
static int
|
||||
sogo_backend_create_context(TALLOC_CTX *mem_ctx,
|
||||
struct mapistore_connection_info *conn_info,
|
||||
struct tdb_wrap *indexingTdb,
|
||||
const char *uri, void **context_object)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
|
@ -119,7 +120,8 @@ sogo_backend_create_context(TALLOC_CTX *mem_ctx,
|
|||
{
|
||||
rc = [MAPIStoreContextK openContext: &context
|
||||
withURI: uri
|
||||
andConnectionInfo: conn_info];
|
||||
connectionInfo: conn_info
|
||||
andTDBIndexing: indexingTdb];
|
||||
if (rc == MAPISTORE_SUCCESS)
|
||||
*context_object = [context tallocWrapper: mem_ctx];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue