2006-06-15 21:34:10 +02:00
|
|
|
/*
|
2011-04-25 12:31:08 +02:00
|
|
|
Copyright (C) 2006-2011 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
Copyright (C) 2005 SKYRIX Software AG
|
|
|
|
|
2010-12-14 19:08:36 +01:00
|
|
|
This file is part of SOGo.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-12-14 19:08:36 +01:00
|
|
|
SOGo is free software; you can redistribute it and/or modify it under
|
2006-06-15 21:34:10 +02:00
|
|
|
the terms of the GNU Lesser General Public License as published by the
|
|
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
later version.
|
|
|
|
|
2010-12-14 19:08:36 +01:00
|
|
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
2006-06-15 21:34:10 +02:00
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with OGo; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SOGoUser_H__
|
|
|
|
#define __SOGoUser_H__
|
|
|
|
|
2007-06-19 20:06:18 +02:00
|
|
|
#import <NGObjWeb/SoUser.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
SOGoUser
|
|
|
|
|
|
|
|
This adds some additional SOGo properties to the SoUser object. The
|
2010-12-14 19:08:36 +01:00
|
|
|
properties are (currently) looked up using the SOGoUserManager.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
You have access to this object from the WOContext:
|
|
|
|
context.activeUser
|
|
|
|
*/
|
|
|
|
|
2007-04-11 21:11:23 +02:00
|
|
|
@class NSArray;
|
|
|
|
@class NSDictionary;
|
2008-04-22 01:03:48 +02:00
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSMutableDictionary;
|
2007-11-18 11:16:25 +01:00
|
|
|
@class NSString;
|
|
|
|
|
2006-12-14 22:20:13 +01:00
|
|
|
@class WOContext;
|
2007-11-18 11:16:25 +01:00
|
|
|
|
2007-11-13 23:38:05 +01:00
|
|
|
@class SOGoAppointmentFolder;
|
|
|
|
@class SOGoAppointmentFolders;
|
2007-06-19 20:06:18 +02:00
|
|
|
@class SOGoDateFormatter;
|
2009-11-29 05:19:32 +01:00
|
|
|
@class SOGoDomainDefaults;
|
2008-11-05 22:04:16 +01:00
|
|
|
@class SOGoUserDefaults;
|
2007-11-18 11:16:25 +01:00
|
|
|
@class SOGoUserFolder;
|
2009-11-29 05:19:32 +01:00
|
|
|
@class SOGoUserProfile;
|
|
|
|
@class SOGoUserSettings;
|
2007-06-19 20:06:18 +02:00
|
|
|
|
2012-01-03 23:52:27 +01:00
|
|
|
@protocol SOGoSource;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@interface SOGoUser : SoUser
|
|
|
|
{
|
2009-11-29 05:19:32 +01:00
|
|
|
SOGoUserDefaults *_defaults;
|
|
|
|
SOGoDomainDefaults *_domainDefaults;
|
|
|
|
SOGoUserSettings *_settings;
|
2009-03-22 17:03:21 +01:00
|
|
|
SOGoUserFolder *homeFolder;
|
2009-03-03 20:08:02 +01:00
|
|
|
NSString *currentPassword;
|
2011-06-24 21:19:50 +02:00
|
|
|
NSString *loginInDomain;
|
2009-03-22 17:03:21 +01:00
|
|
|
NSString *language;
|
2009-03-03 20:08:02 +01:00
|
|
|
NSArray *allEmails;
|
2010-08-03 20:54:49 +02:00
|
|
|
NSMutableArray *mailAccounts;
|
2008-08-29 02:31:27 +02:00
|
|
|
NSString *cn;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2009-08-25 23:28:24 +02:00
|
|
|
+ (SOGoUser *) userWithLogin: (NSString *) newLogin;
|
|
|
|
|
2007-04-11 21:07:54 +02:00
|
|
|
+ (SOGoUser *) userWithLogin: (NSString *) login
|
2007-05-09 21:23:09 +02:00
|
|
|
roles: (NSArray *) roles;
|
2008-02-07 17:53:19 +01:00
|
|
|
|
2009-04-21 17:20:52 +02:00
|
|
|
+ (SOGoUser *) userWithLogin: (NSString *) login
|
|
|
|
roles: (NSArray *) roles
|
|
|
|
trust: (BOOL) b;
|
|
|
|
|
|
|
|
- (id) initWithLogin: (NSString *) newLogin
|
|
|
|
roles: (NSArray *) newRoles
|
|
|
|
trust: (BOOL) b;
|
|
|
|
|
2008-02-07 17:53:19 +01:00
|
|
|
- (void) setPrimaryRoles: (NSArray *) newRoles;
|
|
|
|
|
2007-06-19 20:06:18 +02:00
|
|
|
- (void) setCurrentPassword: (NSString *) newPassword;
|
|
|
|
- (NSString *) currentPassword;
|
2007-04-11 21:07:54 +02:00
|
|
|
|
2011-06-24 21:19:50 +02:00
|
|
|
- (NSString *) loginInDomain;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* properties */
|
2009-11-29 05:19:32 +01:00
|
|
|
- (NSString *) domain;
|
2012-01-03 23:52:27 +01:00
|
|
|
- (id <SOGoSource>) authenticationSource;
|
2009-11-29 05:19:32 +01:00
|
|
|
|
2007-11-12 18:08:12 +01:00
|
|
|
- (NSArray *) allEmails;
|
2007-05-09 21:23:09 +02:00
|
|
|
- (BOOL) hasEmail: (NSString *) email;
|
2009-11-04 23:13:20 +01:00
|
|
|
- (NSString *) systemEmail;
|
2007-04-11 21:07:54 +02:00
|
|
|
- (NSString *) cn;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-06-19 20:06:18 +02:00
|
|
|
- (SOGoDateFormatter *) dateFormatterInContext: (WOContext *) context;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* defaults */
|
2009-11-29 05:19:32 +01:00
|
|
|
- (SOGoUserDefaults *) userDefaults;
|
|
|
|
- (SOGoDomainDefaults *) domainDefaults;
|
|
|
|
- (SOGoUserSettings *) userSettings;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2008-07-18 21:25:26 +02:00
|
|
|
- (NSCalendarDate *) firstDayOfWeekForDate: (NSCalendarDate *) date;
|
|
|
|
- (unsigned int) dayOfWeekForDate: (NSCalendarDate *) date;
|
|
|
|
|
|
|
|
- (NSCalendarDate *) firstWeekOfYearForDate: (NSCalendarDate *) date;
|
|
|
|
- (unsigned int) weekNumberForDate: (NSCalendarDate *) date;
|
|
|
|
|
2007-08-15 22:30:37 +02:00
|
|
|
- (NSArray *) mailAccounts;
|
2008-02-08 00:09:12 +01:00
|
|
|
- (NSDictionary *) accountWithName: (NSString *) accountName;
|
2007-08-15 22:30:37 +02:00
|
|
|
- (NSArray *) allIdentities;
|
|
|
|
- (NSDictionary *) primaryIdentity;
|
2008-02-07 17:53:19 +01:00
|
|
|
- (NSMutableDictionary *) defaultIdentity;
|
|
|
|
|
2007-11-19 23:34:31 +01:00
|
|
|
- (BOOL) isSuperUser;
|
2011-04-14 20:41:10 +02:00
|
|
|
- (BOOL) canAuthenticate;
|
2007-11-19 23:34:31 +01:00
|
|
|
|
2011-04-25 12:31:08 +02:00
|
|
|
/* resource */
|
|
|
|
- (BOOL) isResource;
|
|
|
|
- (int) numberOfSimultaneousBookings;
|
|
|
|
|
2007-11-26 21:41:59 +01:00
|
|
|
/* module access */
|
|
|
|
- (BOOL) canAccessModule: (NSString *) module;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* folders */
|
2007-11-18 11:16:25 +01:00
|
|
|
- (SOGoUserFolder *) homeFolderInContext: (id) context;
|
2007-11-13 23:38:05 +01:00
|
|
|
- (SOGoAppointmentFolders *) calendarsFolderInContext: (WOContext *) context;
|
2011-04-25 12:31:08 +02:00
|
|
|
- (SOGoAppointmentFolder *) personalCalendarFolderInContext: (WOContext *) context;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __SOGoUser_H__ */
|