sogo/OpenChange/NSData+MAPIStore.h
Enrique J. Hernández Blasco 321672e2c3 oc: Update predecessor change list on saving
There were cases where only the change key was updated (GCS) or
others were the change key was updated with wrong info.

This changeset has as goal to update the predecessor change list
and, change key if required, on saving taking into account the latest information
given by the client in high level ROPs such as ImportMessageMove
or SetProperties, and merge it with information provided by the server
backend (IMAP server, SOGo DB) using `synchroniseCache`.

For more details about `PidTagChangeKey` and `PidTagPredecessorChangeList`
property values check [MS-OXCFXICS] Section 2.2.1.2
2015-08-04 08:41:38 +02:00

63 lines
2 KiB
Objective-C

/* NSData+MAPIStore.h - this file is part of SOGo
*
* 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
* the Free Software Foundation; either version 3, or (at your option)
* 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)
+ (id) dataWithBinary: (const struct Binary_r *) binData;
- (struct Binary_r *) asBinaryInMemCtx: (void *) memCtx;
+ (id) dataWithShortBinary: (const struct SBinary_short *) binData;
- (struct SBinary_short *) asShortBinaryInMemCtx: (void *) memCtx;
+ (id) dataWithFlatUID: (const struct FlatUID_r *) flatUID;
- (struct FlatUID_r *) asFlatUIDInMemCtx: (void *) memCtx;
+ (id) dataWithGUID: (const struct GUID *) guid;
- (struct GUID *) asGUIDInMemCtx: (void *) memCtx;
+ (id) dataWithXID: (const struct XID *) xid;
- (struct XID *) asXIDInMemCtx: (void *) memCtx;
- (struct SizedXid *) asSizedXidArrayInMemCtx: (void *) memCtx
with: (uint32_t *) length;
+ (id) dataWithChangeKeyGUID: (NSString *) guidString
andCnt: (NSData *) globCnt;
- (void) hexDumpWithLineSize: (NSUInteger) lineSize;
@end
@interface NSMutableData (MAPIStoreDataTypes)
- (void) appendUInt8: (uint8_t) value;
- (void) appendUInt16: (uint16_t) value;
- (void) appendUInt32: (uint32_t) value;
@end
#endif /* NSDATA_MAPISTORE_H */