KLDAP Library
ldapurl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KLDAP_LDAPURL_H
00022 #define KLDAP_LDAPURL_H
00023
00024 #include <QtCore/QMap>
00025 #include <QtCore/QStringList>
00026
00027 #include <kurl.h>
00028
00029 #include "ldapdn.h"
00030 #include "kldap_export.h"
00031
00032 namespace KLDAP {
00033
00043 class KLDAP_EXPORT LdapUrl : public KUrl
00044 {
00045 public:
00046
00047 typedef struct {
00048 QString value;
00049 bool critical;
00050 } Extension;
00051
00052 typedef enum {
00053 Base, One, Sub
00054 } Scope;
00055
00057 LdapUrl();
00058
00060 explicit LdapUrl( const KUrl &url );
00061
00063 LdapUrl( const LdapUrl &that );
00064
00065 LdapUrl &operator=( const LdapUrl &that );
00066
00067 virtual ~LdapUrl();
00068
00073 LdapDN dn() const;
00074
00076 void setDn( const LdapDN &dn );
00077
00079 QStringList attributes() const;
00080
00082 void setAttributes( const QStringList &attributes );
00083
00085 Scope scope() const;
00086
00088 void setScope( Scope scope );
00089
00091 QString filter() const;
00092
00094 void setFilter( const QString &filter );
00095
00097 bool hasExtension( const QString &key ) const;
00098
00100 Extension extension( const QString &key ) const;
00101
00103 QString extension( const QString &key, bool &critical ) const;
00104
00106 void setExtension( const QString &key, const Extension &ext );
00107
00109 void setExtension( const QString &key, const QString &value, bool critical = false );
00110
00112 void setExtension( const QString &key, int value, bool critical = false );
00113
00115 void removeExtension( const QString &key );
00116
00118 void updateQuery();
00119
00123 void parseQuery();
00124
00125 private:
00126 class LdapUrlPrivate;
00127 LdapUrlPrivate *const d;
00128 };
00129
00130 }
00131
00132 #endif