Monotone-Parent: 9109f0600492701322f24fb53d86a39821e26dc4
Monotone-Revision: cb5283601b9539bb382aa64a739bf758b9e2ac7f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-10-03T20:53:56 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
01e387b7b9
commit
88a5fec753
|
@ -1,3 +1,9 @@
|
|||
2011-10-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (sogo_message_modify_recipients):
|
||||
this backend op now has a "columns" arguments for the dynamic data
|
||||
records.
|
||||
|
||||
2011-09-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailMessage.m (-getMessageData:inMemCtx:):
|
||||
|
|
|
@ -51,7 +51,8 @@ extern NSData *MAPIStoreExternalEntryId (NSString *cn, NSString *email);
|
|||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
- (int) modifyRecipientsWithRows: (struct ModifyRecipientRow *) rows
|
||||
andCount: (NSUInteger) max;
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns;
|
||||
- (NSArray *) attachmentKeys;
|
||||
- (NSArray *) attachmentKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||
andSortOrderings: (NSArray *) sortOrderings;
|
||||
|
|
|
@ -204,10 +204,14 @@ NSData *MAPIStoreExternalEntryId (NSString *cn, NSString *email)
|
|||
}
|
||||
|
||||
- (NSDictionary *) _convertRecipientFromRow: (struct RecipientRow *) row
|
||||
andColumns: (struct SPropTagArray *) columns
|
||||
{
|
||||
NSMutableDictionary *recipient;
|
||||
NSString *value;
|
||||
NSMutableDictionary *recipient, *properties;
|
||||
SOGoUser *recipientUser;
|
||||
NSUInteger count, dataPos;
|
||||
struct mapi_SPropValue mapiValue;
|
||||
id value;
|
||||
TALLOC_CTX *memCtx;
|
||||
|
||||
recipient = [NSMutableDictionary dictionaryWithCapacity: 5];
|
||||
|
||||
|
@ -260,11 +264,39 @@ NSData *MAPIStoreExternalEntryId (NSString *cn, NSString *email)
|
|||
[recipient setObject: value forKey: @"fullName"];
|
||||
}
|
||||
|
||||
properties = [NSMutableDictionary new];
|
||||
[recipient setObject: properties forKey: @"properties"];
|
||||
dataPos = 0;
|
||||
|
||||
memCtx = talloc_zero (NULL, TALLOC_CTX);
|
||||
for (count = 0; count < columns->cValues; count++)
|
||||
{
|
||||
mapiValue.ulPropTag = columns->aulPropTag[count];
|
||||
if (row->layout)
|
||||
{
|
||||
if (row->prop_values.data[dataPos])
|
||||
{
|
||||
dataPos += 5;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
dataPos++;
|
||||
}
|
||||
set_mapi_SPropValue (memCtx, &mapiValue, row->prop_values.data + dataPos);
|
||||
value = NSObjectFromMAPISPropValue (&mapiValue);
|
||||
dataPos += get_mapi_property_size (&mapiValue);
|
||||
if (value)
|
||||
[properties setObject: value forKey: MAPIPropertyKey (columns->aulPropTag[count])];
|
||||
}
|
||||
[properties release];
|
||||
talloc_free (memCtx);
|
||||
|
||||
return recipient;
|
||||
}
|
||||
|
||||
- (int) modifyRecipientsWithRows: (struct ModifyRecipientRow *) rows
|
||||
andCount: (NSUInteger) max
|
||||
andColumns: (struct SPropTagArray *) columns
|
||||
{
|
||||
static NSString *recTypes[] = { @"orig", @"to", @"cc", @"bcc" };
|
||||
NSDictionary *recipientProperties;
|
||||
|
@ -296,8 +328,9 @@ NSData *MAPIStoreExternalEntryId (NSString *cn, NSString *email)
|
|||
[recipients setObject: list forKey: recType];
|
||||
[list release];
|
||||
}
|
||||
[list addObject: [self _convertRecipientFromRow:
|
||||
&(currentRow->RecipientRow)]];
|
||||
[list addObject:
|
||||
[self _convertRecipientFromRow: &(currentRow->RecipientRow)
|
||||
andColumns: columns]];
|
||||
}
|
||||
}
|
||||
[self addNewProperties: recipientProperties];
|
||||
|
|
|
@ -642,6 +642,7 @@ sogo_message_get_attachment_table (void *message_object, TALLOC_CTX *mem_ctx, vo
|
|||
|
||||
static int
|
||||
sogo_message_modify_recipients (void *message_object,
|
||||
struct SPropTagArray *columns,
|
||||
struct ModifyRecipientRow *recipients,
|
||||
uint16_t count)
|
||||
{
|
||||
|
@ -657,7 +658,9 @@ sogo_message_modify_recipients (void *message_object,
|
|||
wrapper = message_object;
|
||||
message = wrapper->MAPIStoreSOGoObject;
|
||||
pool = [NSAutoreleasePool new];
|
||||
rc = [message modifyRecipientsWithRows: recipients andCount: count];
|
||||
rc = [message modifyRecipientsWithRows: recipients
|
||||
andCount: count
|
||||
andColumns: columns];
|
||||
// [context tearDownRequest];
|
||||
[pool release];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue