Monotone-Parent: 394b1692941b08185f4b0f87ec52bc7c0dc6c824
Monotone-Revision: 32b84d9dc2715067c885c49bfc26087eac4dcd2b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-22T20:51:05 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
6192f0d077
commit
b10d7500d0
|
@ -1,5 +1,8 @@
|
|||
2011-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_table_get_row_count): added new
|
||||
backend operation.
|
||||
|
||||
* Tests/Unit/SaxXMLReaderFactory+SOGoTests.m: new module offering
|
||||
a category on SaxXMLReaderFactory that enables finding our NGCards
|
||||
SAX driver in our source directories.
|
||||
|
|
|
@ -841,6 +841,36 @@ sogo_table_get_row (void *table_object, TALLOC_CTX *mem_ctx,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sogo_table_get_row_count (void *table_object,
|
||||
enum table_query_type query_type,
|
||||
uint32_t *row_countp)
|
||||
{
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreTable *table;
|
||||
int rc;
|
||||
|
||||
DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__));
|
||||
|
||||
if (table_object)
|
||||
{
|
||||
wrapper = table_object;
|
||||
table = wrapper->MAPIStoreSOGoObject;
|
||||
pool = [NSAutoreleasePool new];
|
||||
rc = [table getRowCount: row_countp
|
||||
withQueryType: query_type];
|
||||
[pool release];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog (@" UNEXPECTED WEIRDNESS: RECEIVED NO DATA");
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int sogo_properties_get_available_properties(void *object,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct SPropTagArray **propertiesP)
|
||||
|
@ -973,6 +1003,7 @@ int mapistore_init_backend(void)
|
|||
backend.table.set_sort_order = sogo_table_set_sort_order;
|
||||
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.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;
|
||||
|
|
|
@ -96,6 +96,8 @@ typedef enum {
|
|||
withRowID: (uint32_t) rowId
|
||||
andQueryType: (enum table_query_type) queryType
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum table_query_type) queryType;
|
||||
|
||||
- (void) notifyChangesForChild: (MAPIStoreObject *) child;
|
||||
|
||||
|
|
|
@ -846,6 +846,21 @@ static Class NSDataK, NSStringK;
|
|||
return rc;
|
||||
}
|
||||
|
||||
- (int) getRowCount: (uint32_t *) countP
|
||||
withQueryType: (enum table_query_type) queryType
|
||||
{
|
||||
NSArray *children;
|
||||
|
||||
if (queryType == MAPISTORE_PREFILTERED_QUERY)
|
||||
children = [self restrictedChildKeys];
|
||||
else
|
||||
children = [self childKeys];
|
||||
|
||||
*countP = [children count];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (void) notifyChangesForChild: (MAPIStoreObject *) child
|
||||
{
|
||||
NSUInteger currentChildRow, newChildRow;
|
||||
|
|
Loading…
Reference in New Issue