Monotone-Parent: 3a26c13f547976a8cb598e6f141d4eaf0cb724ff

Monotone-Revision: b8881b30a3439916d39b400a9de1a5565d442b45

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-12-13T16:49:54
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2010-12-13 16:49:54 +00:00
parent 1306aaf659
commit feeb211abd
3 changed files with 29 additions and 11 deletions

View file

@ -1,5 +1,8 @@
2010-12-13 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2010-12-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/NSData+MAPIStore.m (-asShortBinaryInMemCtx:): new
corrolary method to +dataWithShortBinary:.
* OpenChange/MAPIStoreFileSystemBaseContext.[hm]: new base * OpenChange/MAPIStoreFileSystemBaseContext.[hm]: new base
MAPIStoreContext class that handles requests for objects based on MAPIStoreContext class that handles requests for objects based on
the SOGoMAPIFSFolder and SOGoMAPIFSMessage classes. the SOGoMAPIFSFolder and SOGoMAPIFSMessage classes.
@ -82,8 +85,8 @@
* UI/WebServerResources/MailerUI.js * UI/WebServerResources/MailerUI.js
(deleteSelectedMessagesCallback): must set the value of (deleteSelectedMessagesCallback): must set the value of
lastClickedRow and lastClickedRowId when selecting the next row. lastClickedRow and lastClickedRowId when selecting the next row.
* UI/WebServerResources/HTMLElement.js (refreshSelectionByIds): * UI/WebServerResources/HTMLElement.js (refreshSelectionByIds):
log invalid references to element IDs. log invalid references to element IDs.

View file

@ -1,4 +1,4 @@
/* NSData+MAPIStore.h - this file is part of $PROJECT_NAME_HERE$ /* NSData+MAPIStore.h - this file is part of SOGo
* *
* Copyright (C) 2010 Inverse inc. * Copyright (C) 2010 Inverse inc.
* *
@ -28,10 +28,11 @@
@interface NSData (MAPIStoreDataTypes) @interface NSData (MAPIStoreDataTypes)
+ (id) dataWithBinary: (const struct Binary_r *) binData; + (id) dataWithBinary: (const struct Binary_r *) binData;
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData;
- (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx; - (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx;
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData;
- (struct SBinary_short *) asShortBinaryInMemCtx: (void *) memCtx;
@end @end
#endif /* NSDATA_MAPISTORE_H */ #endif /* NSDATA_MAPISTORE_H */

View file

@ -1,4 +1,4 @@
/* NSData+MAPIStore.m - this file is part of $PROJECT_NAME_HERE$ /* NSData+MAPIStore.m - this file is part of SOGo
* *
* Copyright (C) 2010 Inverse inc. * Copyright (C) 2010 Inverse inc.
* *
@ -34,11 +34,6 @@
return [NSData dataWithBytes: binData->lpb length: binData->cb]; return [NSData dataWithBytes: binData->lpb length: binData->cb];
} }
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData
{
return [NSData dataWithBytes: binData->lpb length: binData->cb];
}
- (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx - (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx
{ {
struct Binary_r *binary; struct Binary_r *binary;
@ -53,4 +48,23 @@
return binary; return binary;
} }
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData
{
return [NSData dataWithBytes: binData->lpb length: binData->cb];
}
- (struct SBinary_short *) asShortBinaryInMemCtx: (void *) memCtx
{
struct SBinary_short *binary;
uint8_t *lpb;
binary = talloc_zero (memCtx, struct SBinary_short);
binary->cb = [self length];
lpb = talloc_array (binary, uint8_t, binary->cb);
[self getBytes: lpb];
binary->lpb = lpb;
return binary;
}
@end @end