2010-12-13 17:49:54 +01:00
|
|
|
/* NSData+MAPIStore.h - this file is part of SOGo
|
2010-10-14 18:36:53 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Inverse inc.
|
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2010-10-18 14:57:31 +02:00
|
|
|
* the Free Software Foundation; either version 3, or (at your option)
|
2010-10-14 18:36:53 +02:00
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NSDATA_MAPISTORE_H
|
|
|
|
#define NSDATA_MAPISTORE_H
|
|
|
|
|
|
|
|
#import <Foundation/NSData.h>
|
|
|
|
|
|
|
|
@interface NSData (MAPIStoreDataTypes)
|
|
|
|
|
2010-11-23 15:49:46 +01:00
|
|
|
+ (id) dataWithBinary: (const struct Binary_r *) binData;
|
2010-10-14 18:36:53 +02:00
|
|
|
- (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx;
|
|
|
|
|
2010-12-13 17:49:54 +01:00
|
|
|
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData;
|
|
|
|
- (struct SBinary_short *) asShortBinaryInMemCtx: (void *) memCtx;
|
|
|
|
|
2010-12-30 15:47:27 +01:00
|
|
|
+ (id) dataWithFlatUID: (const struct FlatUID_r *) flatUID;
|
|
|
|
- (struct FlatUID_r *) asFlatUIDInMemCtx: (void *) memCtx;
|
|
|
|
|
|
|
|
+ (id) dataWithGUID: (const struct GUID *) guid;
|
|
|
|
- (struct GUID *) asGUIDInMemCtx: (void *) memCtx;
|
|
|
|
|
2011-09-20 21:28:21 +02:00
|
|
|
+ (id) dataWithXID: (const struct XID *) xid;
|
|
|
|
- (struct XID *) asXIDInMemCtx: (void *) memCtx;
|
|
|
|
|
2012-03-16 21:51:51 +01:00
|
|
|
+ (id) dataWithChangeKeyGUID: (NSString *) guidString
|
|
|
|
andCnt: (NSData *) globCnt;
|
|
|
|
|
2011-09-20 21:28:21 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSMutableData (MAPIStoreDataTypes)
|
|
|
|
|
|
|
|
- (void) appendUInt8: (uint8_t) value;
|
2011-09-30 21:58:39 +02:00
|
|
|
- (void) appendUInt16: (uint16_t) value;
|
2011-09-20 21:28:21 +02:00
|
|
|
- (void) appendUInt32: (uint32_t) value;
|
|
|
|
|
2010-10-14 18:36:53 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* NSDATA_MAPISTORE_H */
|