mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-26 13:55:23 +00:00
Monotone-Parent: dc704fb10726eca5edd9213a64dd7edc139de7b4
Monotone-Revision: 1e777b448f611699c505f7adf188b474c8be8766 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-15T19:29:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2011-07-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/*.m: make use of mapistore error code rather than
|
||||
MAPI ones.
|
||||
|
||||
* OpenChange/MAPIStoreMailMessage.m (-getPrHtml:inMemCtx:): fixed
|
||||
leak.
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ _prepareContextClass (Class contextClass,
|
||||
asUnicodeInMemCtx: memCtx];
|
||||
[self logWithFormat: @"found path '%s' for fmid %.16x",
|
||||
*path, fmid];
|
||||
rc = MAPI_E_SUCCESS;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -320,7 +320,7 @@ _prepareContextClass (Class contextClass,
|
||||
@" found fmid: 0x%.16x",
|
||||
objectURL, url, fmid];
|
||||
*path = NULL;
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -335,7 +335,7 @@ _prepareContextClass (Class contextClass,
|
||||
// talloc_free (key.dptr);
|
||||
// uri = talloc_strndup (memCtx, (const char *)dbuf.dptr, dbuf.dsize);
|
||||
*path = NULL;
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
||||
@@ -64,12 +64,12 @@
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (enum MAPISTATUS) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
id value;
|
||||
enum MAPISTATUS rc;
|
||||
int rc;
|
||||
|
||||
value = [[sogoObject properties] objectForKey: MAPIPropertyKey (propTag)];
|
||||
if (value)
|
||||
|
||||
@@ -321,7 +321,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
ofTableType: (uint8_t) tableType
|
||||
{
|
||||
NSArray *keys;
|
||||
int rc;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
|
||||
[self logWithFormat: @"METHOD '%s' (%d) -- tableType: %d",
|
||||
__FUNCTION__, __LINE__, tableType];
|
||||
@@ -333,7 +333,6 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
else if (tableType == MAPISTORE_FAI_TABLE)
|
||||
keys = [self faiMessageKeys];
|
||||
*rowCount = [keys count];
|
||||
rc = MAPI_E_SUCCESS;
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -489,7 +488,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||
}
|
||||
}
|
||||
else
|
||||
rc = MAPI_E_INVALID_OBJECT;
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
if ([self getProperty: &propValue withTag: tags[count] inMemCtx: msgData]
|
||||
== MAPI_E_SUCCESS)
|
||||
== MAPISTORE_SUCCESS)
|
||||
{
|
||||
if (propValue == NULL)
|
||||
{
|
||||
|
||||
+26
-26
@@ -165,7 +165,7 @@ sogo_context_get_path(void *backend_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -196,7 +196,7 @@ sogo_context_get_root_folder(void *backend_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -235,7 +235,7 @@ sogo_folder_open_folder(void *folder_object, TALLOC_CTX *mem_ctx, uint64_t fid,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -273,7 +273,7 @@ sogo_folder_create_folder(void *folder_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -309,7 +309,7 @@ sogo_folder_delete_folder(void *folder_object, uint64_t fid)
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -336,7 +336,7 @@ sogo_folder_get_child_count(void *folder_object, uint8_t table_type, uint32_t *c
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -370,7 +370,7 @@ sogo_folder_open_message(void *folder_object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -405,7 +405,7 @@ sogo_folder_create_message(void *folder_object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -432,7 +432,7 @@ sogo_folder_delete_message(void *folder_object, uint64_t mid, uint8_t flags)
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -467,7 +467,7 @@ sogo_folder_open_table(void *folder_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -498,7 +498,7 @@ sogo_message_create_attachment (void *message_object, TALLOC_CTX *mem_ctx, void
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -530,7 +530,7 @@ sogo_message_open_attachment (void *message_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -562,7 +562,7 @@ sogo_message_get_attachment_table (void *message_object, TALLOC_CTX *mem_ctx, vo
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -592,7 +592,7 @@ sogo_message_modify_recipients (void *message_object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -620,7 +620,7 @@ sogo_message_save (void *message_object)
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -648,7 +648,7 @@ sogo_message_submit (void *message_object, enum SubmitFlags flags)
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO OBJECT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -687,7 +687,7 @@ sogo_message_attachment_open_embedded_message
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO CONTEXT");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -714,7 +714,7 @@ static int sogo_table_get_available_properties(void *table_object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -742,7 +742,7 @@ sogo_table_set_columns (void *table_object, uint16_t count, enum MAPITAGS *prope
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -772,7 +772,7 @@ sogo_table_set_restrictions (void *table_object, struct mapi_SRestriction *restr
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -802,7 +802,7 @@ sogo_table_set_sort_order (void *table_object, struct SSortOrderSet *sort_order,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -832,7 +832,7 @@ sogo_table_get_row (void *table_object, TALLOC_CTX *mem_ctx,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -860,7 +860,7 @@ static int sogo_properties_get_available_properties(void *object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -892,7 +892,7 @@ sogo_properties_get_properties (void *object,
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -919,7 +919,7 @@ sogo_properties_set_properties (void *object, struct SRow *aRow)
|
||||
else
|
||||
{
|
||||
NSLog (@" bad object pointer");
|
||||
rc = MAPI_E_NOT_FOUND;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -928,7 +928,7 @@ sogo_properties_set_properties (void *object, struct SRow *aRow)
|
||||
/**
|
||||
\details Entry point for mapistore SOGO backend
|
||||
|
||||
\return MAPI_E_SUCCESS on success, otherwise MAPISTORE error
|
||||
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
|
||||
*/
|
||||
int mapistore_init_backend(void)
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#undef DEBUG
|
||||
#include <mapistore/mapistore.h>
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
#include <libmapiproxy.h>
|
||||
|
||||
@interface MAPIStoreTable (Private)
|
||||
@@ -824,8 +825,8 @@ static Class NSDataK, NSStringK;
|
||||
{
|
||||
NSUInteger count;
|
||||
MAPIStoreObject *child;
|
||||
enum MAPISTATUS rc;
|
||||
struct mapistore_property_data *rowData;
|
||||
int rc;
|
||||
|
||||
child = [self childAtRowID: rowId
|
||||
forQueryType: queryType];
|
||||
@@ -837,10 +838,10 @@ static Class NSDataK, NSStringK;
|
||||
withTag: columns[count]
|
||||
inMemCtx: memCtx];
|
||||
*dataP = rowData;
|
||||
rc = MAPI_E_SUCCESS;
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
rc = MAPI_E_INVALID_OBJECT;
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ struct MAPIStoreTallocWrapper
|
||||
|
||||
@interface NSObject (MAPIStoreDataTypes)
|
||||
|
||||
- (enum MAPISTATUS) getMAPIValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getMAPIValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#undef DEBUG
|
||||
#include <mapistore/mapistore.h>
|
||||
#include <mapistore/mapistore_errors.h>
|
||||
|
||||
@implementation NSObject (MAPIStoreTallocHelpers)
|
||||
|
||||
@@ -66,14 +67,12 @@ static int MAPIStoreTallocWrapperDestroy (void *data)
|
||||
|
||||
@implementation NSObject (MAPIStoreDataTypes)
|
||||
|
||||
- (enum MAPISTATUS) getMAPIValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
- (int) getMAPIValue: (void **) data
|
||||
forTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
uint16_t valueType;
|
||||
enum MAPISTATUS rc;
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
int rc = MAPISTORE_SUCCESS;
|
||||
|
||||
// [self logWithFormat: @"property %.8x found", propTag];
|
||||
valueType = (propTag & 0xffff);
|
||||
@@ -115,7 +114,7 @@ static int MAPIStoreTallocWrapperDestroy (void *data)
|
||||
[self errorWithFormat: @"object type not handled: %d (0x%.4x)",
|
||||
valueType, valueType];
|
||||
*data = NULL;
|
||||
rc = MAPI_E_NO_SUPPORT;
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user