sogo/OpenChange/MAPIStoreTypes.h
Wolfgang Sourdeau 5d652701b3 Monotone-Parent: da7301d3c0a55520b84d234529b84e3741006bf0
Monotone-Revision: f0d1b16bd7d62ae794114e9df5377a901fba1a74

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-11-19T20:56:11
Monotone-Branch: ca.inverse.sogo
2010-11-19 20:56:11 +00:00

58 lines
1.7 KiB
Objective-C

/* MAPIStoreTypes.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 2, 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 MAPISTORETYPES_H
#define MAPISTORETYPES_H
#import <Foundation/NSValue.h>
#include <stdbool.h>
#include <gen_ndr/exchange.h>
@class NSDictionary;
uint8_t *MAPIBoolValue (void *memCtx, BOOL value);
uint32_t *MAPILongValue (void *memCtx, uint32_t value);
uint64_t *MAPILongLongValue (void *memCtx, uint64_t value);
id NSObjectFromSPropValue (const struct SPropValue *);
#if (GS_SIZEOF_LONG == 4)
static inline NSNumber *
MAPIPropertyNumber (unsigned long propTag)
{
return [NSNumber numberWithUnsignedLong: propTag];
}
#elif (GS_SIZEOF_INT == 4)
static inline NSNumber *
MAPIPropertyNumber (unsigned int propTag)
{
return [NSNumber numberWithUnsignedInt: propTag];
}
#else
#error No suitable type for 4 bytes integers
#endif
void MAPIStoreDumpMessageProperties (NSDictionary *properties);
#endif /* MAPISTORETYPES_H */