Monotone-Parent: 1b66e85ded0b1d64105f0f5d2035ef81e9a8eb4f
Monotone-Revision: 8d4ca03b16c54609dce23f43fc358a43d7e96d99 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-08-10T21:03:05 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
a735498d7b
commit
dd48699bb3
|
@ -1,3 +1,8 @@
|
|||
2012-08-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_properties_get_uri): new
|
||||
backend method.
|
||||
|
||||
2012-08-10 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Changed OpenChange/SOGoMAPIDBObject.m so we use
|
||||
|
|
|
@ -68,6 +68,9 @@
|
|||
- (NSMutableDictionary *) properties;
|
||||
|
||||
/* ops */
|
||||
- (enum mapistore_error) getURI: (char **) uriP
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) getProperties: (struct mapistore_property_data *) data
|
||||
withTags: (enum MAPITAGS *) tags
|
||||
andCount: (uint16_t) columnCount
|
||||
|
|
|
@ -150,6 +150,24 @@ static Class NSExceptionK, MAPIStoreFolderK;
|
|||
return properties;
|
||||
}
|
||||
|
||||
- (enum mapistore_error) getURI: (char **) uriP
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
enum mapistore_error rc;
|
||||
NSString *url;
|
||||
|
||||
url = [self url];
|
||||
if (url)
|
||||
{
|
||||
*uriP = [url asUnicodeInMemCtx: memCtx];
|
||||
rc = MAPISTORE_SUCCESS;
|
||||
}
|
||||
else
|
||||
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getProperty: (void **) data
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
|
|
|
@ -1325,6 +1325,35 @@ sogo_table_handle_destructor (void *table_object, uint32_t handle_id)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static enum mapistore_error sogo_properties_get_uri(void *object,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
char **uriP)
|
||||
{
|
||||
struct MAPIStoreTallocWrapper *wrapper;
|
||||
NSAutoreleasePool *pool;
|
||||
MAPIStoreObject *propObject;
|
||||
int rc;
|
||||
|
||||
DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__));
|
||||
|
||||
if (object)
|
||||
{
|
||||
wrapper = object;
|
||||
propObject = wrapper->instance;
|
||||
GSRegisterCurrentThread ();
|
||||
pool = [NSAutoreleasePool new];
|
||||
rc = [propObject getURI: uriP inMemCtx: mem_ctx];
|
||||
[pool release];
|
||||
GSUnregisterCurrentThread ();
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = sogo_backend_unexpected_error();
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static enum mapistore_error sogo_properties_get_available_properties(void *object,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct SPropTagArray **propertiesP)
|
||||
|
@ -1517,6 +1546,7 @@ int mapistore_init_backend(void)
|
|||
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_uri = sogo_properties_get_uri;
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue