KLDAP Library
ldapserver.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KLDAP_LDAPSERVER_H
00022 #define KLDAP_LDAPSERVER_H
00023
00024 #include <QtCore/QString>
00025
00026 #include "ldapurl.h"
00027 #include "ldapdn.h"
00028 #include "kldap_export.h"
00029
00030 namespace KLDAP {
00031
00038 class KLDAP_EXPORT LdapServer
00039 {
00040 public:
00044 LdapServer();
00045
00051 LdapServer( const LdapUrl &url );
00052
00056 LdapServer( const LdapServer &other );
00057
00062 LdapServer &operator=( const LdapServer &other );
00063
00067 virtual ~LdapServer();
00068
00073 typedef enum
00074 {
00075 None,
00076 TLS,
00077 SSL
00078 } Security;
00079
00084 typedef enum
00085 {
00086 Anonymous,
00087 Simple,
00088 SASL
00089 } Auth;
00090
00094 void clear();
00095
00099 void setHost( const QString &host );
00100
00104 QString host() const;
00105
00110 void setPort( int port );
00111
00115 int port() const;
00116
00120 void setBaseDn( const LdapDN &baseDn );
00121
00125 LdapDN baseDn() const;
00126
00130 void setUser( const QString &user );
00131
00135 QString user() const;
00136
00140 void setBindDn( const QString &bindDn );
00141
00145 QString bindDn() const;
00146
00150 void setRealm( const QString &realm );
00151
00155 QString realm() const;
00156
00160 void setPassword( const QString &password );
00161
00165 QString password() const;
00166
00171 void setVersion( int version );
00172
00176 int version() const;
00177
00182 void setSecurity( Security mode );
00183
00187 Security security() const;
00188
00193 void setAuth( Auth authentication );
00194
00198 Auth auth() const;
00199
00203 void setMech( const QString &mech );
00204
00208 QString mech() const;
00209
00213 void setTimeout( int timeout );
00214
00218 int timeout() const;
00219
00223 void setScope( LdapUrl::Scope scope );
00224
00228 LdapUrl::Scope scope() const;
00229
00233 void setTimeLimit( int limit );
00234
00238 int timeLimit() const;
00239
00243 void setSizeLimit( int sizelimit );
00244
00248 int sizeLimit() const;
00249
00253 void setPageSize( int size );
00254
00258 int pageSize() const;
00259
00263 void setFilter( const QString &filter );
00264
00268 QString filter() const;
00269
00273 void setUrl( const LdapUrl &url );
00274
00282 LdapUrl url() const;
00283
00284 private:
00285 class LdapServerPrivate;
00286 LdapServerPrivate *const d;
00287 };
00288
00289 }
00290
00291 #endif