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;
|
|
|
|
|
|
|
|
@class EOQualifier;
|
|
|
|
|
2012-01-29 20:55:21 +01:00
|
|
|
@class MAPIStoreContext;
|
2011-02-24 21:27:55 +01:00
|
|
|
@class MAPIStoreFolder;
|
2012-01-29 20:55:21 +01:00
|
|
|
@class MAPIStoreMapping;
|
2011-03-07 20:15:16 +01:00
|
|
|
@class MAPIStoreTable;
|
2012-01-29 20:55:21 +01:00
|
|
|
@class MAPIStoreUserContext;
|
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;
|
|
|
|
MAPIStoreObject *container;
|
|
|
|
id sogoObject;
|
2011-10-26 17:15:17 +02:00
|
|
|
NSMutableDictionary *properties;
|
2011-03-07 20:15:16 +01:00
|
|
|
BOOL isNew;
|
2011-02-24 21:27:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) mapiStoreObjectWithSOGoObject: (id) newSOGoObject
|
|
|
|
inContainer: (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
|
|
|
- (id) initWithSOGoObject: (id) newSOGoObject
|
|
|
|
inContainer: (MAPIStoreObject *) newFolder;
|
|
|
|
|
2011-03-07 20:15:16 +01:00
|
|
|
- (void) setIsNew: (BOOL) newIsNew;
|
|
|
|
- (BOOL) isNew;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
- (NSString *) nameInContainer;
|
|
|
|
|
|
|
|
- (id) sogoObject;
|
|
|
|
- (MAPIStoreObject *) container;
|
|
|
|
|
2012-01-29 20:55:21 +01:00
|
|
|
- (MAPIStoreContext *) context;
|
|
|
|
- (MAPIStoreUserContext *) userContext;
|
|
|
|
- (MAPIStoreMapping *) mapping;
|
2011-02-24 21:27:55 +01:00
|
|
|
|
|
|
|
- (void) cleanupCaches;
|
|
|
|
|
|
|
|
- (uint64_t) objectId;
|
|
|
|
- (NSString *) url;
|
|
|
|
|
|
|
|
/* 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;
|
|
|
|
- (NSDictionary *) 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
|
|
|
|
|
|
|
/* implemented getters */
|
2012-03-02 21:44:24 +01:00
|
|
|
- (int) getPidTagDisplayName: (void **) data
|
2011-07-11 23:40:47 +02:00
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
2012-03-02 21:44:24 +01:00
|
|
|
- (int) getPidTagSearchKey: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (int) getPidTagGenerateExchangeViews: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (int) getPidTagParentSourceKey: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (int) getPidTagSourceKey: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (int) getPidTagChangeKey: (void **) data
|
|
|
|
inMemCtx: (TALLOC_CTX *) memCtx;
|
|
|
|
- (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-08-04 17:35:55 +02:00
|
|
|
- (uint64_t) objectVersion;
|
2011-06-07 02:17:46 +02:00
|
|
|
- (NSDate *) creationTime;
|
|
|
|
- (NSDate *) lastModificationTime;
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* MAPISTOREOBJECT_H */
|