From 5e8a31d900c98f91922ac839a6e8834e4d2deb01 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 23 Nov 2010 14:49:46 +0000 Subject: [PATCH] Monotone-Parent: f6dd6e26aadfa52716bf3ca2c504de3593e5f35b Monotone-Revision: 7717958c228c80920ba54d6300d040c7112bb646 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-11-23T14:49:46 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ OpenChange/NSData+MAPIStore.h | 3 ++- OpenChange/NSData+MAPIStore.m | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1671bde50..e9019e88e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-11-23 Wolfgang Sourdeau + * OpenChange/NSData+MAPIStore.m (+dataWithBinary:): new + constructor for generating an NSData instance from a struct + Binary_r *. + * SoObjects/Mailer/SOGoDraftObject.m (-setIsHTML, -isHTML): new accessors, which enables the setting of html mode from the caller rather than from the user defaults. diff --git a/OpenChange/NSData+MAPIStore.h b/OpenChange/NSData+MAPIStore.h index 99b38b4af..b82ad56d2 100644 --- a/OpenChange/NSData+MAPIStore.h +++ b/OpenChange/NSData+MAPIStore.h @@ -27,9 +27,10 @@ @interface NSData (MAPIStoreDataTypes) ++ (id) dataWithBinary: (const struct Binary_r *) binData; + - (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx; @end - #endif /* NSDATA_MAPISTORE_H */ diff --git a/OpenChange/NSData+MAPIStore.m b/OpenChange/NSData+MAPIStore.m index 8456a1c0a..02213c535 100644 --- a/OpenChange/NSData+MAPIStore.m +++ b/OpenChange/NSData+MAPIStore.m @@ -29,6 +29,11 @@ @implementation NSData (MAPIStoreDataTypes) ++ (id) dataWithBinary: (const struct Binary_r *) binData +{ + return [NSData dataWithBytes: binData->lpb length: binData->cb]; +} + - (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx { struct Binary_r *binary;