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
00035 class KLDAP_EXPORT LdapServer
00036 {
00037 public:
00038 LdapServer();
00039 LdapServer( const LdapUrl &url );
00040
00041 LdapServer( const LdapServer &that );
00042 LdapServer &operator= ( const LdapServer &that );
00043
00044 virtual ~LdapServer();
00045
00046 typedef enum {
00047 None, TLS, SSL
00048 } Security;
00049 typedef enum {
00050 Anonymous, Simple, SASL
00051 } Auth;
00052
00056 void clear();
00057
00058 QString host() const;
00059 int port() const;
00060 LdapDN baseDn() const;
00061 QString user() const;
00062 QString bindDn() const;
00063 QString realm() const;
00064 QString password() const;
00065 int version() const;
00066 Security security() const;
00067 Auth auth() const;
00068 QString mech() const;
00069 int timeout() const;
00070
00071 LdapUrl::Scope scope() const;
00072 int timeLimit() const;
00073 int sizeLimit() const;
00074 int pageSize() const;
00075 QString filter() const;
00076
00077 void setHost( const QString &host );
00078 void setPort( int port );
00079 void setBaseDn( const LdapDN &baseDn );
00080 void setUser( const QString &user );
00081 void setBindDn( const QString &bindDn );
00082 void setRealm( const QString &realm );
00083 void setPassword( const QString &password );
00084 void setVersion( int version );
00085 void setSecurity( Security security );
00086 void setAuth( Auth auth );
00087 void setMech( const QString &mech );
00088 void setTimeout( int timeout );
00089
00090 void setScope( LdapUrl::Scope scope );
00091 void setTimeLimit( int timelimit );
00092 void setSizeLimit( int sizelimit );
00093 void setPageSize( int pagesize );
00094 void setFilter( const QString &filter );
00095
00103 LdapUrl url() const;
00107 void setUrl( const LdapUrl &url );
00108
00109 private:
00110 class LdapServerPrivate;
00111 LdapServerPrivate *const d;
00112 };
00113
00114 }
00115
00116 #endif