2006-06-15 21:34:10 +02:00
|
|
|
/*
|
2008-12-30 20:48:33 +01:00
|
|
|
Copyright (C) 2006-2009 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
Copyright (C) 2005 SKYRIX Software AG
|
|
|
|
|
|
|
|
This file is part of OpenGroupware.org.
|
|
|
|
|
|
|
|
OGo is free software; you can redistribute it and/or modify it under
|
|
|
|
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.
|
|
|
|
|
|
|
|
OGo 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 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
|
2008-07-25 19:52:49 +02:00
|
|
|
properties are (currently) looked up using the LDAPUserManager.
|
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;
|
|
|
|
@class NSTimeZone;
|
2007-04-11 21:11:23 +02:00
|
|
|
@class NSURL;
|
|
|
|
@class NSUserDefaults;
|
2007-11-18 11:16:25 +01:00
|
|
|
|
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;
|
2008-11-05 22:04:16 +01:00
|
|
|
@class SOGoUserDefaults;
|
2007-11-18 11:16:25 +01:00
|
|
|
@class SOGoUserFolder;
|
2007-06-19 20:06:18 +02:00
|
|
|
|
|
|
|
extern NSString *SOGoWeekStartJanuary1;
|
|
|
|
extern NSString *SOGoWeekStartFirst4DayWeek;
|
|
|
|
extern NSString *SOGoWeekStartFirstFullWeek;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-10-18 19:17:29 +02:00
|
|
|
@interface SoUser (SOGoExtension)
|
|
|
|
|
|
|
|
- (NSString *) language;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@interface SOGoUser : SoUser
|
|
|
|
{
|
2009-08-03 17:46:02 +02:00
|
|
|
SOGoUserDefaults *_defaults, *_settings;
|
2009-03-22 17:03:21 +01:00
|
|
|
SOGoUserFolder *homeFolder;
|
2009-03-03 20:08:02 +01:00
|
|
|
NSString *currentPassword;
|
2009-03-22 17:03:21 +01:00
|
|
|
NSString *language;
|
2009-03-03 20:08:02 +01:00
|
|
|
NSArray *allEmails;
|
2008-08-29 02:31:27 +02:00
|
|
|
NSString *cn;
|
2009-04-21 17:20:52 +02:00
|
|
|
BOOL propagateCache;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-10-23 00:24:08 +02:00
|
|
|
+ (NSString *) language;
|
|
|
|
|
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
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* properties */
|
2007-11-12 18:08:12 +01:00
|
|
|
- (NSArray *) allEmails;
|
2007-05-09 21:23:09 +02:00
|
|
|
- (BOOL) hasEmail: (NSString *) email;
|
2007-04-11 21:07:54 +02:00
|
|
|
- (NSString *) cn;
|
|
|
|
- (NSURL *) freeBusyURL;
|
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 */
|
2007-03-27 20:16:52 +02:00
|
|
|
- (NSUserDefaults *) userDefaults;
|
|
|
|
- (NSUserDefaults *) userSettings;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2009-03-24 21:36:49 +01:00
|
|
|
- (void) invalidateLanguage;
|
2007-05-30 22:20:02 +02:00
|
|
|
- (NSString *) language;
|
2007-04-11 21:07:54 +02:00
|
|
|
- (NSTimeZone *) timeZone;
|
|
|
|
- (NSTimeZone *) serverTimeZone;
|
|
|
|
|
2008-07-18 21:25:26 +02:00
|
|
|
- (unsigned int) firstDayOfWeek;
|
|
|
|
- (NSCalendarDate *) firstDayOfWeekForDate: (NSCalendarDate *) date;
|
|
|
|
- (unsigned int) dayOfWeekForDate: (NSCalendarDate *) date;
|
|
|
|
|
|
|
|
- (unsigned int) dayStartHour;
|
|
|
|
- (unsigned int) dayEndHour;
|
|
|
|
|
|
|
|
- (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-08-22 17:16:35 +02:00
|
|
|
- (NSString *) messageForwarding;
|
2007-08-15 22:30:37 +02:00
|
|
|
|
2007-11-19 23:34:31 +01:00
|
|
|
- (NSString *) signature;
|
2008-09-28 21:49:17 +02:00
|
|
|
- (NSString *) replyPlacement;
|
|
|
|
- (NSString *) signaturePlacement;
|
2007-11-19 23:34:31 +01:00
|
|
|
|
2008-02-07 17:53:19 +01:00
|
|
|
- (void) saveMailAccounts;
|
|
|
|
|
2007-11-19 23:34:31 +01:00
|
|
|
- (BOOL) isSuperUser;
|
|
|
|
|
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;
|
|
|
|
- (SOGoAppointmentFolder *)
|
|
|
|
personalCalendarFolderInContext: (WOContext *) context;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-12-14 22:20:13 +01:00
|
|
|
- (NSArray *) rolesForObject: (NSObject *) object
|
|
|
|
inContext: (WOContext *) context;
|
|
|
|
|
2009-08-25 19:51:20 +02:00
|
|
|
- (void) migrateSignature;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __SOGoUser_H__ */
|