2007-05-09 21:06:15 +02:00
|
|
|
/* LDAPSource.h - this file is part of SOGo
|
|
|
|
*
|
2009-03-16 22:13:01 +01:00
|
|
|
* Copyright (C) 2007-2009 Inverse inc.
|
2007-05-09 21:06:15 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* 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 LDAPSOURCE_H
|
|
|
|
#define LDAPSOURCE_H
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSString;
|
|
|
|
@class NGLdapConnection;
|
|
|
|
|
|
|
|
@interface LDAPSource : NSObject
|
|
|
|
{
|
2007-10-10 20:44:26 +02:00
|
|
|
NSString *sourceID;
|
2007-05-09 21:06:15 +02:00
|
|
|
NSString *bindDN;
|
|
|
|
NSString *hostname;
|
|
|
|
unsigned int port;
|
|
|
|
NSString *password;
|
2009-04-02 22:51:46 +02:00
|
|
|
NSString *encryption;
|
2009-03-16 22:13:01 +01:00
|
|
|
NSString *_filter;
|
2009-04-06 14:54:03 +02:00
|
|
|
NSString *_scope;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
|
|
|
NSString *baseDN;
|
|
|
|
NSString *IDField; /* the first part of a user DN */
|
|
|
|
NSString *CNField;
|
|
|
|
NSString *UIDField;
|
2007-11-18 11:16:25 +01:00
|
|
|
NSArray *mailFields;
|
2007-05-10 23:18:13 +02:00
|
|
|
NSString *bindFields;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2007-11-26 21:41:59 +01:00
|
|
|
NSDictionary *modulesConstraints;
|
|
|
|
|
2007-05-09 21:06:15 +02:00
|
|
|
NGLdapConnection *ldapConnection;
|
|
|
|
NSMutableArray *searchAttributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) sourceFromUDSource: (NSDictionary *) udSource;
|
|
|
|
|
|
|
|
- (id) initFromUDSource: (NSDictionary *) udSource;
|
|
|
|
|
|
|
|
- (void) setBindDN: (NSString *) newBindDN
|
2009-04-02 22:51:46 +02:00
|
|
|
password: (NSString *) newBindPassword
|
2007-05-09 21:06:15 +02:00
|
|
|
hostname: (NSString *) newBindHostname
|
|
|
|
port: (NSString *) newBindPort
|
2009-04-02 22:51:46 +02:00
|
|
|
encryption: (NSString *) newEncryption;
|
2007-05-09 21:06:15 +02:00
|
|
|
- (void) setBaseDN: (NSString *) newBaseDN
|
|
|
|
IDField: (NSString *) newIDField
|
|
|
|
CNField: (NSString *) newCNField
|
2007-05-10 23:18:13 +02:00
|
|
|
UIDField: (NSString *) newUIDField
|
2007-11-18 11:16:25 +01:00
|
|
|
mailFields: (NSArray *) newMailFields
|
2007-05-10 23:18:13 +02:00
|
|
|
andBindFields: (NSString *) newBindFields;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
|
|
|
- (BOOL) checkLogin: (NSString *) login
|
|
|
|
andPassword: (NSString *) password;
|
|
|
|
|
|
|
|
- (NSDictionary *) lookupContactEntry: (NSString *) entryID;
|
|
|
|
- (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) entryID;
|
|
|
|
- (NSArray *) allEntryIDs;
|
|
|
|
- (NSArray *) fetchContactsMatching: (NSString *) filter;
|
2007-10-10 20:44:26 +02:00
|
|
|
- (NSString *) sourceID;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* LDAPSOURCE_H */
|