Monotone-Parent: 38a3270c68b7a55a50c94569d54d172e37841eba

Monotone-Revision: 385b1ef1c54f07a7e75a0de0fdf1149cd54755b8

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-02-06T16:45:34
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2011-02-06 16:45:34 +00:00
parent 6dac2e38f7
commit 3cb14e0cc8
6 changed files with 66 additions and 0 deletions

View file

@ -1,5 +1,12 @@
2011-02-06 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2011-02-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreMessageTable.m (-setSortOrder:): implemented
stub method.
* OpenChange/MAPIStoreContext.m
(-setSortOrder:withFID:andTableType:getTableStatus:): implemented
backend method for sorting messages.
* OpenChange/SOGoMAPIFSMessage.m (-MAPISave): restored old way of * OpenChange/SOGoMAPIFSMessage.m (-MAPISave): restored old way of
decoding the property dictionary from the property list as the decoding the property dictionary from the property list as the
"new method" was working around that was solved elsewhere and was "new method" was working around that was solved elsewhere and was

View file

@ -94,6 +94,9 @@
withFID: (uint64_t) fid withFID: (uint64_t) fid
andTableType: (uint8_t) tableType andTableType: (uint8_t) tableType
getTableStatus: (uint8_t *) tableStatus; getTableStatus: (uint8_t *) tableStatus;
- (int) setSortOrder: (const struct SSortOrderSet *) set
withFID: (uint64_t) fid andTableType: (uint8_t) type
getTableStatus: (uint8_t *) tableStatus;
- (enum MAPISTATUS) getTableProperty: (void **) data - (enum MAPISTATUS) getTableProperty: (void **) data
withTag: (enum MAPITAGS) proptag withTag: (enum MAPITAGS) proptag

View file

@ -674,6 +674,18 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
return MAPISTORE_SUCCESS; return MAPISTORE_SUCCESS;
} }
- (int) setSortOrder: (const struct SSortOrderSet *) set
withFID: (uint64_t) fid andTableType: (uint8_t) type
getTableStatus: (uint8_t *) tableStatus
{
MAPIStoreMessageTable *table;
table = (MAPIStoreMessageTable *) [self _tableForFID: fid andTableType: type];
[table setSortOrder: set];
return MAPISTORE_SUCCESS;
}
- (enum MAPISTATUS) getTableProperty: (void **) data - (enum MAPISTATUS) getTableProperty: (void **) data
withTag: (enum MAPITAGS) propTag withTag: (enum MAPITAGS) propTag
atPosition: (uint32_t) pos atPosition: (uint32_t) pos

View file

@ -26,6 +26,9 @@
#import "MAPIStoreTable.h" #import "MAPIStoreTable.h"
@interface MAPIStoreMessageTable : MAPIStoreTable @interface MAPIStoreMessageTable : MAPIStoreTable
- (void) setSortOrder: (const struct SSortOrderSet *) set;
@end @end
#endif /* MAPISTOREMESSAGETABLE_H */ #endif /* MAPISTOREMESSAGETABLE_H */

View file

@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#import <NGExtensions/NSObject+Logs.h>
#import <SOGo/SOGoFolder.h> #import <SOGo/SOGoFolder.h>
#import <SOGo/SOGoObject.h> #import <SOGo/SOGoObject.h>
@ -210,4 +212,9 @@ static MAPIStoreMapping *mapping;
return rc; return rc;
} }
- (void) setSortOrder: (const struct SSortOrderSet *) set
{
[self logWithFormat: @"unimplemented method: %@", NSStringFromSelector (_cmd)];
}
@end @end

View file

@ -799,6 +799,39 @@ sogo_op_set_restrictions (void *private_data, uint64_t fid, uint8_t type,
return rc; return rc;
} }
static int
sogo_op_set_sort_order (void *private_data, uint64_t fid, uint8_t type,
struct SSortOrderSet *set, uint8_t *tableStatus)
{
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;
if (context)
{
[context setupRequest];
rc = [context setSortOrder: set
withFID: fid andTableType: type
getTableStatus: tableStatus];
[context tearDownRequest];
[pool release];
}
else
{
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO CONTEXT");
rc = MAPI_E_NOT_FOUND;
}
return rc;
}
/** /**
\details Entry point for mapistore SOGO backend \details Entry point for mapistore SOGO backend
@ -839,6 +872,7 @@ int mapistore_init_backend(void)
backend.op_get_table_property = sogo_op_get_table_property; backend.op_get_table_property = sogo_op_get_table_property;
backend.op_get_folders_list = sogo_op_get_folders_list; backend.op_get_folders_list = sogo_op_get_folders_list;
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_openmessage = sogo_op_openmessage; backend.op_openmessage = sogo_op_openmessage;
backend.op_createmessage = sogo_op_createmessage; backend.op_createmessage = sogo_op_createmessage;
backend.op_modifyrecipients = sogo_op_modifyrecipients; backend.op_modifyrecipients = sogo_op_modifyrecipients;