2012-01-29 20:40:44 +01:00
|
|
|
/* MAPIStoreUserContext.h - this file is part of $PROJECT_NAME_HERE$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 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 MAPISTOREUSERCONTEXT_H
|
|
|
|
#define MAPISTOREUSERCONTEXT_H
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2012-02-02 02:48:26 +01:00
|
|
|
@class NSMutableDictionary;
|
2012-01-29 20:40:44 +01:00
|
|
|
@class NSString;
|
2012-03-30 17:33:47 +02:00
|
|
|
@class NSTimeZone;
|
2012-06-29 19:59:38 +02:00
|
|
|
@class NSURL;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
|
|
|
@class WOContext;
|
|
|
|
|
|
|
|
@class SOGoAppointmentFolders;
|
|
|
|
@class SOGoContactFolders;
|
|
|
|
@class SOGoMailAccount;
|
|
|
|
@class SOGoUser;
|
|
|
|
@class SOGoUserFolder;
|
|
|
|
|
|
|
|
@class MAPIStoreAuthenticator;
|
|
|
|
@class MAPIStoreMapping;
|
|
|
|
|
|
|
|
@interface MAPIStoreUserContext : NSObject
|
|
|
|
{
|
|
|
|
NSString *username;
|
|
|
|
SOGoUser *sogoUser;
|
2012-03-30 17:33:47 +02:00
|
|
|
NSTimeZone *timeZone;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
|
|
|
SOGoUserFolder *userFolder;
|
|
|
|
NSMutableArray *containersBag;
|
2012-01-30 21:17:21 +01:00
|
|
|
NSMutableDictionary *rootFolders;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
|
|
|
MAPIStoreMapping *mapping;
|
|
|
|
|
2012-06-29 19:59:38 +02:00
|
|
|
BOOL userDbTableExists;
|
|
|
|
NSURL *folderTableURL;
|
|
|
|
|
2012-01-29 20:40:44 +01:00
|
|
|
WOContext *woContext;
|
|
|
|
MAPIStoreAuthenticator *authenticator;
|
2012-09-26 17:50:28 +02:00
|
|
|
|
|
|
|
BOOL inboxHasNoInferiors;
|
2012-01-29 20:40:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) userContextWithUsername: (NSString *) username
|
2013-11-08 17:02:50 +01:00
|
|
|
andTDBIndexing: (struct indexing_context *) indexing;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
|
|
|
- (id) initWithUsername: (NSString *) newUsername
|
2013-11-08 17:02:50 +01:00
|
|
|
andTDBIndexing: (struct indexing_context *) indexing;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
|
|
|
- (NSString *) username;
|
|
|
|
- (SOGoUser *) sogoUser;
|
|
|
|
|
2012-03-30 17:33:47 +02:00
|
|
|
- (NSTimeZone *) timeZone;
|
|
|
|
|
2012-01-29 20:40:44 +01:00
|
|
|
- (SOGoUserFolder *) userFolder;
|
|
|
|
|
2012-01-30 21:17:21 +01:00
|
|
|
- (NSDictionary *) rootFolders;
|
2012-01-29 20:40:44 +01:00
|
|
|
|
2012-09-26 17:50:28 +02:00
|
|
|
- (BOOL) inboxHasNoInferiors;
|
|
|
|
|
2012-06-29 19:59:38 +02:00
|
|
|
- (NSURL *) folderTableURL;
|
2012-01-29 20:40:44 +01:00
|
|
|
- (MAPIStoreMapping *) mapping;
|
|
|
|
|
2012-06-29 19:59:38 +02:00
|
|
|
- (void) ensureFolderTableExists;
|
|
|
|
|
2012-01-29 20:40:44 +01:00
|
|
|
/* SOGo hacky magic */
|
|
|
|
- (void) activateWithUser: (SOGoUser *) activeUser;
|
|
|
|
- (MAPIStoreAuthenticator *) authenticator;
|
|
|
|
- (WOContext *) woContext;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* MAPISTOREUSERCONTEXT_H */
|