2010-11-19 21:56:11 +01:00
|
|
|
/* MAPIStoreTypes.h - this file is part of SOGo
|
|
|
|
*
|
2012-08-17 21:04:57 +02:00
|
|
|
* Copyright (C) 2010-2012 Inverse inc.
|
2010-11-19 21:56:11 +01:00
|
|
|
*
|
|
|
|
* 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-12-13 17:51:48 +01:00
|
|
|
* the Free Software Foundation; either version 3, or (at your option)
|
2010-11-19 21:56:11 +01: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 MAPISTORETYPES_H
|
|
|
|
#define MAPISTORETYPES_H
|
|
|
|
|
|
|
|
#import <Foundation/NSValue.h>
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2011-11-09 16:02:29 +01:00
|
|
|
#include <talloc.h>
|
|
|
|
#include <util/time.h>
|
2010-11-19 21:56:11 +01:00
|
|
|
#include <gen_ndr/exchange.h>
|
|
|
|
|
2010-11-26 22:46:57 +01:00
|
|
|
@class NSData;
|
2010-11-19 21:56:11 +01:00
|
|
|
@class NSDictionary;
|
2012-03-30 21:51:37 +02:00
|
|
|
@class NSTimeZone;
|
|
|
|
|
|
|
|
extern NSTimeZone *utcTZ;
|
2010-11-19 21:56:11 +01:00
|
|
|
|
|
|
|
uint8_t *MAPIBoolValue (void *memCtx, BOOL value);
|
|
|
|
uint32_t *MAPILongValue (void *memCtx, uint32_t value);
|
|
|
|
uint64_t *MAPILongLongValue (void *memCtx, uint64_t value);
|
2010-12-30 15:49:54 +01:00
|
|
|
double *MAPIDoubleValue (void *memCtx, double value);
|
2010-11-19 21:56:11 +01:00
|
|
|
|
|
|
|
id NSObjectFromSPropValue (const struct SPropValue *);
|
2010-12-03 19:29:19 +01:00
|
|
|
id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *);
|
2011-11-22 20:31:12 +01:00
|
|
|
id NSObjectFromValuePointer (enum MAPITAGS, const void *);
|
2010-11-19 21:56:11 +01:00
|
|
|
|
2012-03-16 22:12:12 +01:00
|
|
|
NSComparisonResult MAPICNCompare (uint64_t cn1, uint64_t cn2, void *);
|
2012-03-20 14:42:40 +01:00
|
|
|
NSComparisonResult MAPIChangeKeyGUIDCompare (id ck1, id ck2, void *);
|
2012-03-12 06:55:26 +01:00
|
|
|
|
2010-11-19 21:56:11 +01:00
|
|
|
static inline NSNumber *
|
2010-12-13 17:51:48 +01:00
|
|
|
MAPIPropertyKey (enum MAPITAGS propTag)
|
2010-11-19 21:56:11 +01:00
|
|
|
{
|
2010-11-30 22:04:58 +01:00
|
|
|
#if (GS_SIZEOF_LONG == 4)
|
2011-03-07 20:15:16 +01:00
|
|
|
return [NSNumber numberWithUnsignedLong: propTag];
|
2010-11-19 21:56:11 +01:00
|
|
|
#elif (GS_SIZEOF_INT == 4)
|
2011-03-07 20:15:16 +01:00
|
|
|
return [NSNumber numberWithUnsignedInt: propTag];
|
2010-11-19 21:56:11 +01:00
|
|
|
#else
|
|
|
|
#error No suitable type for 4 bytes integers
|
|
|
|
#endif
|
2010-11-30 22:04:58 +01:00
|
|
|
}
|
2010-11-19 21:56:11 +01:00
|
|
|
|
|
|
|
void MAPIStoreDumpMessageProperties (NSDictionary *properties);
|
|
|
|
|
|
|
|
#endif /* MAPISTORETYPES_H */
|