Monotone-Parent: 9c93be42dce13d70eb5f0bc31e7ff8fff3aa82c3
Monotone-Revision: 23f1f1841b0ca1de79b952a793ed0513208ab6a9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-10T17:46:47 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
61ea724f60
commit
a74ce11a7f
|
@ -1,3 +1,8 @@
|
|||
2011-02-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/NSArray+MAPIStore.m (-asArrayOfUnicodeStringsInCtx:):
|
||||
new method for returning array of "PT_UNICODE" values.
|
||||
|
||||
2011-02-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMessageTable.m
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
@interface NSArray (MAPIStoreFolders)
|
||||
|
||||
- (struct indexing_folders_list *) asFoldersListInCtx: (void *) memCtx;
|
||||
- (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import "NSString+MAPIStore.h"
|
||||
|
||||
#import "NSArray+MAPIStore.h"
|
||||
|
||||
#undef DEBUG
|
||||
|
@ -47,4 +49,21 @@
|
|||
return flist;
|
||||
}
|
||||
|
||||
- (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx
|
||||
{
|
||||
struct mapi_SPLSTRArrayW *list;
|
||||
NSInteger count, max;
|
||||
|
||||
max = [self count];
|
||||
|
||||
list = talloc_zero(memCtx, struct mapi_SPLSTRArrayW);
|
||||
list->cValues = max;
|
||||
list->strings = talloc_array(memCtx, struct mapi_LPWSTR, max);
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
(list->strings + count)->lppszW = [[self objectAtIndex: count] asUnicodeInMemCtx: memCtx];
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue