Monotone-Parent: 80883dcf3bf8ccef4d22a65b5963c363db031c0c

Monotone-Revision: fde0ef781cb60652a47fc1c5edcece9225aafa07

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-09-20T19:30:33
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-09-20 19:30:33 +00:00
parent cb78625e97
commit 50d960cf91
3 changed files with 28 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2011-09-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/NSString+MAPIStore.m (+stringWithGUID:)
(-extractGUID:): new wrapper methods around the GUID utility
functions in libndr.
* OpenChange/NSData+MAPIStore.m (+dataWithXID: asXIDInMemCtx:):
new method to handle XID structs.
(-appendUInt8, -appendUInt32): new methods to easily append

View File

@ -27,6 +27,9 @@
@interface NSString (MAPIStoreDataTypes)
+ (id) stringWithGUID: (const struct GUID *) guid;
- (void) extractGUID: (struct GUID *) guid;
- (char *) asUnicodeInMemCtx: (void *) memCtx;
- (NSData *) convertHexStringToBytes;

View File

@ -21,13 +21,34 @@
*/
#include <talloc.h>
#include <stdbool.h>
#import <Foundation/NSData.h>
#import "NSString+MAPIStore.h"
#undef DEBUG
#include <mapistore/mapistore.h>
@implementation NSString (MAPIStoreDataTypes)
+ (id) stringWithGUID: (const struct GUID *) guid
{
char *guidString;
NSString *newString;
guidString = GUID_string (NULL, guid);
newString = [self stringWithUTF8String: guidString];
talloc_free (guidString);
return newString;
}
- (void) extractGUID: (struct GUID *) guid
{
GUID_from_string ([self UTF8String], guid);
}
- (char *) asUnicodeInMemCtx: (void *) memCtx
{
char *unicode;