Monotone-Parent: 8e645f6ce572b9b56929f17f32c93a52e98cef27
Monotone-Revision: 068bea34405b0256117d10e651c8cbc5279e8821 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-12T21:44:38 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
8a2abef968
commit
54b3b042c5
|
@ -17,6 +17,10 @@
|
||||||
|
|
||||||
2011-07-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-07-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreSOGo.m: (sogo_op_get_table_property)
|
||||||
|
(sogo_op_get_available_table_properties): removed obsolete
|
||||||
|
methods.
|
||||||
|
|
||||||
* OpenChange/MAPIStoreCalendarMessageTable.m,
|
* OpenChange/MAPIStoreCalendarMessageTable.m,
|
||||||
OpenChange/MAPIStoreContactsMessageTable.m,
|
OpenChange/MAPIStoreContactsMessageTable.m,
|
||||||
OpenChange/MAPIStoreFAIMessageTable.m,
|
OpenChange/MAPIStoreFAIMessageTable.m,
|
||||||
|
|
|
@ -119,14 +119,6 @@
|
||||||
withFID: (uint64_t) fid andTableType: (uint8_t) type
|
withFID: (uint64_t) fid andTableType: (uint8_t) type
|
||||||
getTableStatus: (uint8_t *) tableStatus;
|
getTableStatus: (uint8_t *) tableStatus;
|
||||||
|
|
||||||
- (enum MAPISTATUS) getTableProperty: (void **) data
|
|
||||||
withTag: (enum MAPITAGS) proptag
|
|
||||||
atPosition: (uint32_t) pos
|
|
||||||
withTableType: (uint8_t) tableType
|
|
||||||
andQueryType: (enum table_query_type) queryType
|
|
||||||
inFID: (uint64_t) fid
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
||||||
|
|
||||||
- (int) mkDir: (struct SRow *) aRow
|
- (int) mkDir: (struct SRow *) aRow
|
||||||
withFID: (uint64_t) fid
|
withFID: (uint64_t) fid
|
||||||
inParentFID: (uint64_t) parentFID;
|
inParentFID: (uint64_t) parentFID;
|
||||||
|
@ -153,9 +145,6 @@
|
||||||
inRow: (struct SRow *) aRow
|
inRow: (struct SRow *) aRow
|
||||||
withMID: (uint64_t) fmid
|
withMID: (uint64_t) fmid
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||||
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
|
||||||
ofTableType: (uint8_t) type
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
||||||
- (int) setPropertiesWithFMID: (uint64_t) fmid
|
- (int) setPropertiesWithFMID: (uint64_t) fmid
|
||||||
ofTableType: (uint8_t) tableType
|
ofTableType: (uint8_t) tableType
|
||||||
inRow: (struct SRow *) aRow;
|
inRow: (struct SRow *) aRow;
|
||||||
|
|
|
@ -676,91 +676,6 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (enum MAPISTATUS) getTableProperty: (void **) data
|
|
||||||
withTag: (enum MAPITAGS) propTag
|
|
||||||
atPosition: (uint32_t) pos
|
|
||||||
withTableType: (uint8_t) tableType
|
|
||||||
andQueryType: (enum table_query_type) queryType
|
|
||||||
inFID: (uint64_t) fid
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
{
|
|
||||||
NSString *folderURL;
|
|
||||||
MAPIStoreTable *table;
|
|
||||||
MAPIStoreObject *object;
|
|
||||||
const char *propName;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
// [self errorWithFormat: @"%s: obsolete method", __FUNCTION__];
|
|
||||||
|
|
||||||
folderURL = [mapping urlFromID: fid];
|
|
||||||
if (folderURL)
|
|
||||||
{
|
|
||||||
table = [self _tableForFID: fid andTableType: tableType];
|
|
||||||
*data = NULL;
|
|
||||||
object = [table childAtRowID: pos forQueryType: queryType];
|
|
||||||
if (object)
|
|
||||||
{
|
|
||||||
rc = [object getProperty: data withTag: propTag inMemCtx: memCtx];
|
|
||||||
if (rc == MAPISTORE_ERR_NOT_FOUND)
|
|
||||||
rc = MAPI_E_NOT_FOUND;
|
|
||||||
else if (rc == MAPISTORE_ERR_NO_MEMORY)
|
|
||||||
rc = MAPI_E_NOT_ENOUGH_MEMORY;
|
|
||||||
else if (rc == MAPISTORE_SUCCESS && *data == NULL)
|
|
||||||
{
|
|
||||||
propName = get_proptag_name (propTag);
|
|
||||||
if (!propName)
|
|
||||||
propName = "<unknown>";
|
|
||||||
|
|
||||||
[self errorWithFormat: @"both 'success' and NULL data"
|
|
||||||
@" returned for proptag %s(0x%.8x)",
|
|
||||||
propName, propTag];
|
|
||||||
rc = MAPI_E_NOT_FOUND;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rc = MAPI_E_INVALID_OBJECT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self errorWithFormat: @"No url found for FID: %lld", fid];
|
|
||||||
rc = MAPI_E_INVALID_OBJECT;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
|
||||||
ofTableType: (uint8_t) type
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
{
|
|
||||||
int rc = MAPISTORE_SUCCESS;
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case MAPISTORE_FOLDER_TABLE:
|
|
||||||
[[baseFolder class] getAvailableProperties: propertiesP inMemCtx: memCtx];
|
|
||||||
break;
|
|
||||||
case MAPISTORE_MESSAGE_TABLE:
|
|
||||||
[[baseFolder messageClass] getAvailableProperties: propertiesP inMemCtx: memCtx];
|
|
||||||
break;
|
|
||||||
case MAPISTORE_FAI_TABLE:
|
|
||||||
[MAPIStoreFAIMessage getAvailableProperties: propertiesP inMemCtx: memCtx];
|
|
||||||
break;
|
|
||||||
case MAPISTORE_RULE_TABLE:
|
|
||||||
[self errorWithFormat: @"%s: rules not handled yet",
|
|
||||||
__PRETTY_FUNCTION__];
|
|
||||||
rc = MAPISTORE_ERROR;
|
|
||||||
break;
|
|
||||||
case MAPISTORE_ATTACHMENT_TABLE:
|
|
||||||
[self errorWithFormat: @"%s: attachments not handled yet",
|
|
||||||
__PRETTY_FUNCTION__];
|
|
||||||
rc = MAPISTORE_ERROR;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (int) openMessage: (struct mapistore_message *) msg
|
- (int) openMessage: (struct mapistore_message *) msg
|
||||||
withMID: (uint64_t) mid
|
withMID: (uint64_t) mid
|
||||||
inFID: (uint64_t) fid
|
inFID: (uint64_t) fid
|
||||||
|
|
|
@ -426,68 +426,6 @@ sogo_op_readdir_count(void *private_data,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
sogo_op_get_table_property(void *private_data,
|
|
||||||
TALLOC_CTX *mem_ctx,
|
|
||||||
uint64_t fid,
|
|
||||||
uint8_t table_type,
|
|
||||||
enum table_query_type query_type,
|
|
||||||
uint32_t pos,
|
|
||||||
uint32_t proptag,
|
|
||||||
void **data)
|
|
||||||
{
|
|
||||||
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 getTableProperty: data withTag: proptag atPosition: pos
|
|
||||||
withTableType: table_type andQueryType: query_type
|
|
||||||
inFID: fid inMemCtx: mem_ctx];
|
|
||||||
|
|
||||||
[context tearDownRequest];
|
|
||||||
[pool release];
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
sogo_op_get_available_table_properties(void *private_data, TALLOC_CTX *mem_ctx,
|
|
||||||
uint8_t type,
|
|
||||||
struct SPropTagArray **propertiesP)
|
|
||||||
{
|
|
||||||
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 getAvailableProperties: propertiesP
|
|
||||||
ofTableType: type
|
|
||||||
inMemCtx: mem_ctx];
|
|
||||||
|
|
||||||
[context tearDownRequest];
|
|
||||||
[pool release];
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sogo_op_openmessage(void *private_data,
|
sogo_op_openmessage(void *private_data,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
|
@ -1235,8 +1173,6 @@ int mapistore_init_backend(void)
|
||||||
backend.op_opendir = sogo_op_opendir;
|
backend.op_opendir = sogo_op_opendir;
|
||||||
backend.op_closedir = sogo_op_closedir;
|
backend.op_closedir = sogo_op_closedir;
|
||||||
backend.op_readdir_count = sogo_op_readdir_count;
|
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_set_restrictions = sogo_op_set_restrictions;
|
backend.op_set_restrictions = sogo_op_set_restrictions;
|
||||||
backend.op_set_sort_order = sogo_op_set_sort_order;
|
backend.op_set_sort_order = sogo_op_set_sort_order;
|
||||||
backend.op_openmessage = sogo_op_openmessage;
|
backend.op_openmessage = sogo_op_openmessage;
|
||||||
|
|
Loading…
Reference in a new issue