Monotone-Parent: 80883dcf3bf8ccef4d22a65b5963c363db031c0c
Monotone-Revision: fde0ef781cb60652a47fc1c5edcece9225aafa07 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-09-20T19:30:33 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
cb78625e97
commit
50d960cf91
|
@ -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
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
|
||||
@interface NSString (MAPIStoreDataTypes)
|
||||
|
||||
+ (id) stringWithGUID: (const struct GUID *) guid;
|
||||
- (void) extractGUID: (struct GUID *) guid;
|
||||
|
||||
- (char *) asUnicodeInMemCtx: (void *) memCtx;
|
||||
|
||||
- (NSData *) convertHexStringToBytes;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue