2010-12-13 17:46:09 +01:00
|
|
|
/* MAPIStoreFreebusyContext.m - this file is part of SOGo
|
2010-11-19 22:18:43 +01:00
|
|
|
*
|
|
|
|
* 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
|
2010-12-13 17:46:09 +01:00
|
|
|
* the Free Software Foundation; either version 3, or (at your option)
|
2010-11-19 22:18:43 +01:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
|
|
|
|
|
|
|
#import <SOGo/SOGoUserFolder.h>
|
|
|
|
|
|
|
|
#import "MAPIApplication.h"
|
|
|
|
#import "MAPIStoreAuthenticator.h"
|
2010-11-22 17:03:30 +01:00
|
|
|
#import "MAPIStoreMapping.h"
|
2010-11-19 22:18:43 +01:00
|
|
|
|
|
|
|
#import "MAPIStoreFreebusyContext.h"
|
|
|
|
|
|
|
|
@implementation MAPIStoreFreebusyContext
|
|
|
|
|
2010-11-22 22:33:02 +01:00
|
|
|
+ (NSString *) MAPIModuleName
|
|
|
|
{
|
|
|
|
return @"freebusy";
|
|
|
|
}
|
|
|
|
|
2010-11-22 17:03:30 +01:00
|
|
|
+ (void) registerFixedMappings: (MAPIStoreMapping *) mapping
|
|
|
|
{
|
|
|
|
[mapping registerURL: @"sogo://openchange:openchange@freebusy/"
|
|
|
|
withID: 0x70001];
|
|
|
|
}
|
|
|
|
|
2010-11-19 22:18:43 +01:00
|
|
|
- (void) setupModuleFolder
|
|
|
|
{
|
2010-12-30 15:44:19 +01:00
|
|
|
SOGoUserFolder *userFolder;
|
2010-11-19 22:18:43 +01:00
|
|
|
|
|
|
|
userFolder = [SOGoUserFolder objectWithName: [authenticator username]
|
|
|
|
inContainer: MAPIApp];
|
2010-12-01 17:34:41 +01:00
|
|
|
[parentFoldersBag addObject: userFolder];
|
2010-11-19 22:18:43 +01:00
|
|
|
[woContext setClientObject: userFolder];
|
|
|
|
|
|
|
|
moduleFolder = [userFolder lookupName: @"Calendar"
|
|
|
|
inContext: woContext
|
|
|
|
acquire: NO];
|
|
|
|
[moduleFolder retain];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|