2011-02-24 21:27:55 +01:00
|
|
|
/* MAPIStoreObject.h - this file is part of SOGo
|
|
|
|
*
|
2012-08-17 21:04:57 +02:00
|
|
|
* Copyright (C) 2011-2012 Inverse inc
|
2011-02-24 21:27:55 +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
|
|
|
|
* 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
|
|
|
|
|
2016-02-17 16:09:18 +01:00
|
|
|
#include <talloc.h>
|
2011-07-11 23:40:47 +02:00
|
|
|
|
2016-02-17 16:09:18 +01:00
|
|
|
#import <Foundation/NSObject.h>
|
2011-02-24 21:27:55 +01:00
|
|
|
|
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;
|
2012-07-19 21:28:44 +02:00
|
|
|
@class MAPIStoreObjectProxy;
|
2012-01-29 20:55:21 +01:00
|
|
|
@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-07-19 21:28:44 +02:00
|
|
|
NSMutableArray *proxies;
|
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;
|
|
|
|
|
2012-07-19 21:28:44 +02:00
|
|
|
- (void) addProxy: (MAPIStoreObjectProxy *) newProxy;
|
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
|
|
|
|
2012-07-19 22:31:15 +02:00
|
|
|
- (NSString *) url;
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
/* properties */
|
|
|
|
|
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 */
|
|
|
|
- (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
|
|
|
|
2012-08-15 03:02:08 +02:00
|
|
|
/* move and copy operations */
|
2012-12-03 15:18:17 +01:00
|
|
|
- (void) copyPropertiesToObject: (MAPIStoreObject *) newObject inMemCtx: (TALLOC_CTX *) memCtx;
|
2012-08-15 03:02:08 +02:00
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
/* subclasses */
|
2012-07-20 08:53:01 +02:00
|
|
|
- (NSString *) nameInContainer;
|
2011-06-07 02:17:46 +02:00
|
|
|
- (NSDate *) creationTime;
|
|
|
|
- (NSDate *) lastModificationTime;
|
|
|
|
|
2011-02-24 21:27:55 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* MAPISTOREOBJECT_H */
|