merge of '6a276a3a3ea0a9b3f1f8f69464b4b6058b639b18'
and 'd7fa74829c523fd87dd6cb456ed8fb4b12564db0' Monotone-Parent: 6a276a3a3ea0a9b3f1f8f69464b4b6058b639b18 Monotone-Parent: d7fa74829c523fd87dd6cb456ed8fb4b12564db0 Monotone-Revision: a3f1c656d74d4c83ed4a4c27370063c474942f29 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-05T00:27:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
c0d0b65a9f
|
@ -15,6 +15,14 @@
|
|||
We now update the request's content in case we got participants
|
||||
with status change (for resources, for example)
|
||||
|
||||
2011-06-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_op_get_folders_list): method
|
||||
removed from struct mapistore_backend.
|
||||
|
||||
* OpenChange/MAPIStoreContext.m: the ldb connection handle to
|
||||
openchange.ldb is now passed via struct mapistore_connection_info.
|
||||
|
||||
2011-06-29 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Added get/set/unset capabilities to sogo-tool to set
|
||||
|
|
|
@ -158,8 +158,6 @@
|
|||
withFlags: (uint8_t) flags;
|
||||
- (int) releaseRecordWithFMID: (uint64_t) fmid
|
||||
ofTableType: (uint8_t) tableType;
|
||||
- (int) getFoldersList: (struct indexing_folders_list **) folders_list
|
||||
withFMID: (uint64_t) fmid;
|
||||
|
||||
/* util methods */
|
||||
- (NSString *) extractChildNameFromURL: (NSString *) childURL
|
||||
|
|
|
@ -73,8 +73,6 @@ static Class NSDataK, NSStringK, MAPIStoreFAIMessageK;
|
|||
static NSMutableDictionary *contextClassMapping;
|
||||
static NSMutableDictionary *userMAPIStoreMapping;
|
||||
|
||||
static void *ldbCtx = NULL;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
NSArray *classes;
|
||||
|
@ -211,17 +209,10 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
|||
andFID: (uint64_t) newFid
|
||||
inMemCtx: (struct mapistore_context *) newMemCtx
|
||||
{
|
||||
struct loadparm_context *lpCtx;
|
||||
NSString *username;
|
||||
|
||||
if ((self = [self init]))
|
||||
{
|
||||
if (!ldbCtx)
|
||||
{
|
||||
lpCtx = loadparm_init (newMemCtx);
|
||||
ldbCtx = mapiproxy_server_openchange_ldb_init (lpCtx);
|
||||
}
|
||||
|
||||
ASSIGN (contextUrl, newUrl);
|
||||
|
||||
username = [NSString stringWithUTF8String: newConnInfo->username];
|
||||
|
@ -1018,7 +1009,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
|||
*path = [[objectURL substringFromIndex: 7]
|
||||
asUnicodeInMemCtx: memCtx];
|
||||
[self logWithFormat: @"found path '%s' for fmid %.16x",
|
||||
*path, fmid];
|
||||
*path, fmid];
|
||||
rc = MAPI_E_SUCCESS;
|
||||
}
|
||||
else
|
||||
|
@ -1373,57 +1364,6 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
|||
return rc;
|
||||
}
|
||||
|
||||
- (int) getFoldersList: (struct indexing_folders_list **) folders_list
|
||||
withFMID: (uint64_t) fmid
|
||||
{
|
||||
int rc;
|
||||
NSString *currentURL, *url;
|
||||
NSMutableArray *nsFolderList;
|
||||
uint64_t fid;
|
||||
|
||||
[self logWithFormat: @"METHOD '%s' -- fmid: 0x%.16x", __FUNCTION__, fmid];
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
|
||||
url = [contextUrl absoluteString];
|
||||
currentURL = [mapping urlFromID: fmid];
|
||||
if (currentURL && ![currentURL isEqualToString: url]
|
||||
&& [currentURL hasPrefix: url])
|
||||
{
|
||||
nsFolderList = [NSMutableArray arrayWithCapacity: 32];
|
||||
[self extractChildNameFromURL: currentURL
|
||||
andFolderURLAt: ¤tURL];
|
||||
while (currentURL && rc == MAPI_E_SUCCESS
|
||||
&& ![currentURL isEqualToString: url])
|
||||
{
|
||||
fid = [mapping idFromURL: currentURL];
|
||||
if (fid == NSNotFound)
|
||||
{
|
||||
[self logWithFormat: @"no fid found for url '%@'", currentURL];
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
}
|
||||
else
|
||||
{
|
||||
[nsFolderList addObject: [NSNumber numberWithUnsignedLongLong: fid]];
|
||||
[self extractChildNameFromURL: currentURL
|
||||
andFolderURLAt: ¤tURL];
|
||||
}
|
||||
}
|
||||
|
||||
if (rc != MAPI_E_NOT_FOUND)
|
||||
{
|
||||
fid = [mapping idFromURL: url];
|
||||
[nsFolderList addObject: [NSNumber numberWithUnsignedLongLong: fid]];
|
||||
[self logWithFormat: @"resulting folder list: %@", nsFolderList];
|
||||
*folders_list = [nsFolderList asFoldersListInCtx: memCtx];
|
||||
}
|
||||
}
|
||||
else
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* utils */
|
||||
|
||||
- (NSString *) extractChildNameFromURL: (NSString *) objectURL
|
||||
|
@ -1466,7 +1406,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
|||
mappingId = [mapping idFromURL: childURL];
|
||||
if (mappingId == NSNotFound)
|
||||
{
|
||||
openchangedb_get_new_folderID (ldbCtx, &mappingId);
|
||||
openchangedb_get_new_folderID (connInfo->oc_ctx, &mappingId);
|
||||
[mapping registerURL: childURL withID: mappingId];
|
||||
contextId = 0;
|
||||
mapistore_search_context_by_uri (memCtx, [folderURL UTF8String] + 7,
|
||||
|
|
|
@ -712,32 +712,6 @@ sogo_op_deletemessage(void *private_data,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sogo_op_get_folders_list(void *private_data,
|
||||
uint64_t fmid,
|
||||
struct indexing_folders_list **folders_list)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
sogo_context *cContext;
|
||||
MAPIStoreContext *context;
|
||||
int rc;
|
||||
|
||||
DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__));
|
||||
|
||||
pool = [NSAutoreleasePool new];
|
||||
|
||||
cContext = private_data;
|
||||
context = cContext->objcContext;
|
||||
[context setupRequest];
|
||||
|
||||
rc = [context getFoldersList: folders_list withFMID: fmid];
|
||||
|
||||
[context tearDownRequest];
|
||||
[pool release];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sogo_op_set_restrictions (void *private_data, uint64_t fid, uint8_t type,
|
||||
struct mapi_SRestriction *res, uint8_t *tableStatus)
|
||||
|
@ -1238,7 +1212,6 @@ int mapistore_init_backend(void)
|
|||
backend.op_readdir_count = sogo_op_readdir_count;
|
||||
backend.op_get_table_property = sogo_op_get_table_property;
|
||||
backend.op_get_available_table_properties = sogo_op_get_available_table_properties;
|
||||
backend.op_get_folders_list = sogo_op_get_folders_list;
|
||||
backend.op_set_restrictions = sogo_op_set_restrictions;
|
||||
backend.op_set_sort_order = sogo_op_set_sort_order;
|
||||
backend.op_openmessage = sogo_op_openmessage;
|
||||
|
|
Loading…
Reference in a new issue