2009-09-25 16:42:33 +02:00
|
|
|
/* SOGoSource.h - this file is part of SOGo
|
|
|
|
*
|
2010-03-08 16:18:05 +01:00
|
|
|
* Copyright (C) 2009-2010 Inverse inc.
|
2009-09-25 16:42:33 +02:00
|
|
|
*
|
|
|
|
* Author: Ludovic Marcotte <lmarcotte@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 SOGOSOURCE_H
|
|
|
|
#define SOGOSOURCE_H
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
#import "SOGoConstants.h"
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
@class NSDictionary;
|
|
|
|
@class NSString;
|
|
|
|
|
|
|
|
@protocol SOGoSource
|
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
+ (id) sourceFromUDSource: (NSDictionary *) udSource
|
|
|
|
inDomain: (NSString *) domain;
|
2009-09-25 16:42:33 +02:00
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
- (id) initFromUDSource: (NSDictionary *) udSource
|
|
|
|
inDomain: (NSString *) domain;
|
|
|
|
|
|
|
|
- (NSString *) domain;
|
2009-09-25 16:42:33 +02:00
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
- (BOOL) checkLogin: (NSString *) _login
|
2010-12-14 19:08:36 +01:00
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
password: (NSString *) _pwd
|
|
|
|
perr: (SOGoPasswordPolicyError *) _perr
|
|
|
|
expire: (int *) _expire
|
|
|
|
grace: (int *) _grace;
|
|
|
|
|
|
|
|
- (BOOL) changePasswordForLogin: (NSString *) login
|
|
|
|
oldPassword: (NSString *) oldPassword
|
|
|
|
newPassword: (NSString *) newPassword
|
|
|
|
perr: (SOGoPasswordPolicyError *) perr;
|
2009-09-25 16:42:33 +02:00
|
|
|
|
|
|
|
- (NSDictionary *) lookupContactEntry: (NSString *) theID;
|
|
|
|
- (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) entryID;
|
|
|
|
|
|
|
|
- (NSArray *) allEntryIDs;
|
|
|
|
- (NSArray *) fetchContactsMatching: (NSString *) filter;
|
|
|
|
- (NSString *) sourceID;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2009-12-02 21:55:13 +01:00
|
|
|
@protocol SOGoDNSource <SOGoSource>
|
|
|
|
|
2010-12-14 19:08:36 +01:00
|
|
|
- (void) setBindDN: (NSString *) theDN;
|
|
|
|
- (void) setBindPassword: (NSString *) thePassword;
|
|
|
|
- (BOOL) bindAsCurrentUser;
|
|
|
|
|
2009-12-02 21:55:13 +01:00
|
|
|
- (NSString *) lookupLoginByDN: (NSString *) theDN;
|
2010-12-14 19:08:36 +01:00
|
|
|
- (NSString *) lookupDNByLogin: (NSString *) theLogin;
|
|
|
|
|
2009-12-02 21:55:13 +01:00
|
|
|
- (NSString *) baseDN;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
#endif /* SOGOSOURCE_H */
|