2011-02-24 21:27:55 +01:00
|
|
|
/* MAPIStoreObject.h - this file is part of SOGo
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 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 MAPISTOREOBJECT_H
|
|
|
|
#define MAPISTOREOBJECT_H
|
|
|
|
|
2011-07-11 23:40:47 +02:00
|
|
|
#include <talloc.h>
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2011-10-14 21:50:21 +02:00
|
|
|
@class NSDate;
|
2011-09-20 21:38:51 +02:00
|
|
|
@class NSData;
|
2011-02-24 21:27:55 +01:00
|
|
|
@class NSString;
|
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
|
2012-01-29 20:55:21 +01:00
|
|
|
@class MAPIStoreContext;
|
|
|
|
@class MAPIStoreMapping;
|
|
|
|
@class MAPIStoreUserContext;
|
2012-06-29 19:59:38 +02:00
|
|
|
@class MAPIStoreSOGoObject;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
@interface MAPIStoreObject : NSObject
|
|
|
|
{
|
2011-04-13 21:59:04 +02:00
|
|
|
const IMP *classGetters;
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
NSMutableArray *parentContainersBag;
|
2012-06-29 19:59:38 +02:00
|
|
|
id container;
|
2011-10-26 17:15:17 +02:00
|
|
|
NSMutableDictionary *properties;
|
2011-02-24 21:27:55 +01:00
|
|
|
}
|
|
|
|
|
2012-06-29 19:59:38 +02:00
|
|
|
+ (id) mapiStoreObjectInContainer: (MAPIStoreObject *) newContainer;
|
|
|
|
- (id) initInContainer: (MAPIStoreObject *) newContainer;
|
|
|
|
|
2011-07-11 23:40:47 +02:00
|
|
|
+ (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
2011-04-19 23:57:52 +02:00
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
- (MAPIStoreObject *) container;
|
|
|
|
|
2012-01-29 20:55:21 +01:00
|
|
|
- (MAPIStoreContext *) context;
|
|
|
|
- (MAPIStoreUserContext *) userContext;
|
|
|
|
- (MAPIStoreMapping *) mapping;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
/* properties */
|
|
|
|
|
2011-10-27 17:59:50 +02:00
|
|
|
- (BOOL) canGetProperty: (enum MAPITAGS) propTag;
|
|
|
|
|
2011-10-26 17:15:17 +02:00
|
|
|
- (void) addProperties: (NSDictionary *) newProperties;
|
2012-06-29 19:59:38 +02:00
|
|
|
- (NSMutableDictionary *) properties;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
/* ops */
|
2011-07-11 23:40:47 +02:00
|
|
|
- (int) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
|
|
|
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
2011-02-24 21:27:55 +01:00
|
|
|
- (int) getProperties: (struct mapistore_property_data *) data
|
|
|
|
withTags: (enum MAPITAGS *) tags
|
2011-07-11 23:40:47 +02:00
|
|
|
andCount: (uint16_t) columnCount
|
|
|
|
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
2011-10-26 17:15:17 +02:00
|
|
|
- (int) addPropertiesFromRow: (struct SRow *) aRow;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
- (int) getProperty: (void **) data
|
2011-07-11 23:40:47 +02:00
|
|
|
withTag: (enum MAPITAGS) propTag
|
|
|
|
inMemCtx: (TALLOC_CTX *) localMemCtx;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
2011-04-13 21:59:04 +02:00
|
|
|
/* helper getters */
|
2011-09-20 21:38:51 +02:00
|
|
|
- (NSData *) getReplicaKeyFromGlobCnt: (uint64_t) objectCnt;
|
2011-06-07 02:17:46 +02:00
|
|
|
- (int) getReplicaKey: (void **) data
|
2011-07-11 23:40:47 +02:00
|
|
|
fromGlobCnt: (uint64_t) objectCnt
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
2011-06-07 02:17:46 +02:00
|
|
|
|
2012-03-02 21:44:24 +01:00
|
|
|
- (int) getPidTagCreationTime: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (int) getPidTagLastModificationTime: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
2011-04-13 21:59:04 +02:00
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
/* subclasses */
|
2011-06-07 02:17:46 +02:00
|
|
|
- (NSDate *) creationTime;
|
|
|
|
- (NSDate *) lastModificationTime;
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* MAPISTOREOBJECT_H */
|