2009-09-25 16:42:33 +02:00
|
|
|
/* SOGoUserManager.h - this file is part of SOGo
|
2007-05-09 21:07:35 +02:00
|
|
|
*
|
2011-06-24 21:19:50 +02:00
|
|
|
* Copyright (C) 2007-2011 Inverse inc.
|
2007-05-09 21:07:35 +02:00
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-06-24 21:19:50 +02:00
|
|
|
* Francis Lachapelle <flachapelle@inverse.ca>
|
2007-05-09 21:07:35 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
#ifndef SOGOUSERMANAGER_H
|
|
|
|
#define SOGOUSERMANAGER_H
|
2007-05-09 21:07:35 +02:00
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
#import "SOGoConstants.h"
|
|
|
|
|
2007-05-09 21:07:35 +02:00
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
|
|
|
@class NSTimer;
|
2009-04-30 23:17:55 +02:00
|
|
|
@class NGLdapEntry;
|
2007-05-09 21:07:35 +02:00
|
|
|
|
|
|
|
@class LDAPSource;
|
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
@protocol SOGoSource;
|
|
|
|
|
2009-12-02 21:53:52 +01:00
|
|
|
@interface SOGoUserManagerRegistry : NSObject
|
|
|
|
|
|
|
|
+ (id) sharedRegistry;
|
|
|
|
|
|
|
|
- (NSString *) sourceClassForType: (NSString *) type;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
@interface SOGoUserManager : NSObject
|
2007-05-09 21:07:35 +02:00
|
|
|
{
|
2009-02-24 02:54:59 +01:00
|
|
|
@private
|
2009-12-02 21:53:52 +01:00
|
|
|
SOGoUserManagerRegistry *_registry;
|
2009-09-25 16:42:33 +02:00
|
|
|
NSMutableDictionary *_sources;
|
|
|
|
NSMutableDictionary *_sourcesMetadata;
|
2007-05-09 21:07:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) sharedUserManager;
|
|
|
|
|
2009-12-02 21:53:52 +01:00
|
|
|
- (NSString *) registryClass;
|
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
- (NSArray *) sourceIDsInDomain: (NSString *) domain;
|
2009-11-29 22:48:00 +01:00
|
|
|
- (NSArray *) authenticationSourceIDsInDomain: (NSString *) domain;
|
2009-11-29 05:19:32 +01:00
|
|
|
- (NSArray *) addressBookSourceIDsInDomain: (NSString *) domain;
|
2007-05-09 21:07:35 +02:00
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
- (NSObject <SOGoSource> *) sourceWithID: (NSString *) sourceID;
|
|
|
|
- (NSDictionary *) metadataForSourceID: (NSString *) sourceID;
|
2007-05-09 21:07:35 +02:00
|
|
|
- (NSString *) displayNameForSourceWithID: (NSString *) sourceID;
|
|
|
|
- (NSDictionary *) contactInfosForUserWithUIDorEmail: (NSString *) uid;
|
2011-06-24 21:19:50 +02:00
|
|
|
- (NSDictionary *) contactInfosForUserWithUIDorEmail: (NSString *) uid
|
|
|
|
inDomain: (NSString *) domain;
|
2009-11-29 05:19:32 +01:00
|
|
|
- (NSArray *) fetchContactsMatching: (NSString *) match
|
|
|
|
inDomain: (NSString *) domain;
|
2009-11-29 22:48:00 +01:00
|
|
|
- (NSArray *) fetchUsersMatching: (NSString *) filter
|
|
|
|
inDomain: (NSString *) domain;
|
2007-05-09 21:07:35 +02:00
|
|
|
|
|
|
|
- (NSString *) getCNForUID: (NSString *) uid;
|
|
|
|
- (NSString *) getEmailForUID: (NSString *) uid;
|
2007-05-30 22:11:19 +02:00
|
|
|
- (NSString *) getFullEmailForUID: (NSString *) uid;
|
2011-06-24 21:19:50 +02:00
|
|
|
- (NSString *) getImapLoginForUID: (NSString *) uid
|
|
|
|
inDomain: (NSString *) domain;
|
2007-05-09 21:07:35 +02:00
|
|
|
- (NSString *) getUIDForEmail: (NSString *) email;
|
2009-05-03 19:50:57 +02:00
|
|
|
- (NSString *) getLoginForDN: (NSString *) theDN;
|
2007-05-09 21:07:35 +02:00
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
- (BOOL) checkLogin: (NSString *) _login
|
|
|
|
password: (NSString *) _pwd
|
2011-07-16 00:22:11 +02:00
|
|
|
domain: (NSString **) _domain
|
2010-03-08 16:18:05 +01:00
|
|
|
perr: (SOGoPasswordPolicyError *) _perr
|
|
|
|
expire: (int *) _expire
|
|
|
|
grace: (int *) _grace;
|
2007-05-09 21:07:35 +02:00
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
- (BOOL) changePasswordForLogin: (NSString *) login
|
2011-06-24 21:19:50 +02:00
|
|
|
inDomain: (NSString *) domain
|
2010-03-08 16:18:05 +01:00
|
|
|
oldPassword: (NSString *) oldPassword
|
|
|
|
newPassword: (NSString *) newPassword
|
|
|
|
perr: (SOGoPasswordPolicyError *) perr;
|
2007-05-09 21:07:35 +02:00
|
|
|
@end
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
#endif /* SOGOUSERMANAGER_H */
|