From e1daba320a6de787d9e4df7e25c7163fbb21f9d4 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 12 Jul 2011 04:23:43 +0000 Subject: [PATCH] Monotone-Parent: 07c1acd90de17a7e8f0064aff341a4244b2f090b Monotone-Revision: 19d23c85306b1d118c275902d56124e34314598d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-12T04:23:43 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ OpenChange/MAPIStoreSOGo.m | 2 +- OpenChange/MAPIStoreTable.h | 2 +- OpenChange/MAPIStoreTable.m | 13 ++++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04ce53b70..dbdffd6a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-07-12 Wolfgang Sourdeau + + * OpenChange/MAPIStoreTable.m + (-getRow:withRowID:andQueryType:inMemCtx:): slight change of + prototype in order to leave the structure initialization to the + backend. + 2011-07-11 Francis Lachapelle * UI/Scheduler/UIxAppointmentEditor.m diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 9ca76cd8d..4737ef46f 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -1086,7 +1086,7 @@ sogo_pocop_set_table_sort_order (void *table_object, struct SSortOrderSet *sort_ static int sogo_pocop_get_table_row (void *table_object, TALLOC_CTX *mem_ctx, enum table_query_type query_type, uint32_t row_id, - struct mapistore_property_data *data) + struct mapistore_property_data **data) { struct MAPIStoreTallocWrapper *wrapper; NSAutoreleasePool *pool; diff --git a/OpenChange/MAPIStoreTable.h b/OpenChange/MAPIStoreTable.h index 7db3c3b06..e1bc3a7f3 100644 --- a/OpenChange/MAPIStoreTable.h +++ b/OpenChange/MAPIStoreTable.h @@ -92,7 +92,7 @@ typedef enum { - (void) setRestrictions: (const struct mapi_SRestriction *) res; - (int) setColumns: (enum MAPITAGS *) newColumns withCount: (uint16_t) newColumCount; -- (int) getRow: (struct mapistore_property_data *) data +- (int) getRow: (struct mapistore_property_data **) dataP withRowID: (uint32_t) rowId andQueryType: (enum table_query_type) queryType inMemCtx: (TALLOC_CTX *) memCtx; diff --git a/OpenChange/MAPIStoreTable.m b/OpenChange/MAPIStoreTable.m index 26c4b7ae0..28b54b41e 100644 --- a/OpenChange/MAPIStoreTable.m +++ b/OpenChange/MAPIStoreTable.m @@ -803,7 +803,7 @@ static Class NSDataK, NSStringK; return child; } -- (int) getRow: (struct mapistore_property_data *) data +- (int) getRow: (struct mapistore_property_data **) dataP withRowID: (uint32_t) rowId andQueryType: (enum table_query_type) queryType inMemCtx: (TALLOC_CTX *) memCtx @@ -811,16 +811,19 @@ static Class NSDataK, NSStringK; NSUInteger count; MAPIStoreObject *child; enum MAPISTATUS rc; + struct mapistore_property_data *rowData; child = [self childAtRowID: rowId forQueryType: queryType]; if (child) { - rc = MAPI_E_SUCCESS; + rowData = talloc_array(memCtx, struct mapistore_property_data, columnsCount); for (count = 0; count < columnsCount; count++) - data[count].error = [child getProperty: &data[count].data - withTag: columns[count] - inMemCtx: memCtx]; + rowData[count].error = [child getProperty: &rowData[count].data + withTag: columns[count] + inMemCtx: memCtx]; + *datap = rowData; + rc = MAPI_E_SUCCESS; } else rc = MAPI_E_INVALID_OBJECT;