mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-03 07:44:25 +00:00
Monotone-Parent: 9ecd395b491a71e267b8a655b26e49e1a20d8655
Monotone-Revision: 9a2499685fbc7c107c6a8a04f34c7435343e64f4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-12T16:11:49 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2011-08-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_table_handle_destructor): added
|
||||
new backend operation.
|
||||
|
||||
* OpenChange/NSAutoreleasePool+MAPIStore: removed module since it
|
||||
was a lot of code to handle one specific case.
|
||||
|
||||
|
||||
@@ -906,6 +906,31 @@ sogo_table_get_row_count (void *table_object,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sogo_table_handle_destructor (void *table_object, uint32_t handle_id)
|
||||
{
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
|
||||
DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__));
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
wrapper = table_object;
|
||||
table = wrapper->MAPIStoreSOGoObject;
|
||||
pool = [NSAutoreleasePool new];
|
||||
[table destroyHandle: handle_id];
|
||||
[pool release];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
}
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
static int sogo_properties_get_available_properties(void *object,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct SPropTagArray **propertiesP)
|
||||
@@ -1040,6 +1065,7 @@ int mapistore_init_backend(void)
|
||||
backend.table.set_columns = sogo_table_set_columns;
|
||||
backend.table.get_row = sogo_table_get_row;
|
||||
backend.table.get_row_count = sogo_table_get_row_count;
|
||||
backend.table.handle_destructor = sogo_table_handle_destructor;
|
||||
backend.properties.get_available_properties = sogo_properties_get_available_properties;
|
||||
backend.properties.get_properties = sogo_properties_get_properties;
|
||||
backend.properties.set_properties = sogo_properties_set_properties;
|
||||
|
||||
@@ -78,6 +78,7 @@ typedef enum {
|
||||
- (uint8_t) tableType;
|
||||
|
||||
- (void) setHandleId: (uint32_t) newHandleId;
|
||||
- (void) destroyHandle: (uint32_t) handleId;
|
||||
|
||||
- (id) childAtRowID: (uint32_t) rowId
|
||||
forQueryType: (enum table_query_type) queryType;
|
||||
|
||||
@@ -325,8 +325,6 @@ static Class NSDataK, NSStringK;
|
||||
[self logWithFormat: @"-dealloc"];
|
||||
if (columns)
|
||||
NSZoneFree (NULL, columns);
|
||||
if (container)
|
||||
[[MAPIStoreActiveTables activeTables] unregisterTable: self];
|
||||
[currentChild release];
|
||||
[childKeys release];
|
||||
[restrictedChildKeys release];
|
||||
@@ -350,6 +348,12 @@ static Class NSDataK, NSStringK;
|
||||
handleId = newHandleId;
|
||||
}
|
||||
|
||||
- (void) destroyHandle: (uint32_t) tableHandleId
|
||||
{
|
||||
if (handleId == tableHandleId)
|
||||
[[MAPIStoreActiveTables activeTables] unregisterTable: self];
|
||||
}
|
||||
|
||||
- (void) cleanupCaches
|
||||
{
|
||||
[restrictedChildKeys release];
|
||||
|
||||
Reference in New Issue
Block a user