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;