KLDAP Library
ldapsearch.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KLDAP_LDAPSEARCH_H
00022 #define KLDAP_LDAPSEARCH_H
00023
00024 #include <QtCore/QByteArray>
00025 #include <QtCore/QList>
00026 #include <QtCore/QObject>
00027 #include <QtCore/QString>
00028
00029 #include "kldap_export.h"
00030
00031 #include "ldapconnection.h"
00032 #include "ldapcontrol.h"
00033 #include "ldapobject.h"
00034 #include "ldapoperation.h"
00035 #include "ldapserver.h"
00036 #include "ldapurl.h"
00037
00038 namespace KLDAP {
00039
00045 class KLDAP_EXPORT LdapSearch : public QObject
00046 {
00047 Q_OBJECT
00048
00049 public:
00053 LdapSearch();
00054
00060 explicit LdapSearch( LdapConnection &connection );
00061
00062 virtual ~LdapSearch();
00063
00069 void setConnection( LdapConnection &connection );
00070
00074 void setClientControls( const LdapControls &ctrls );
00075
00079 void setServerControls( const LdapControls &ctrls );
00080
00088 bool search( const LdapServer &server,
00089 const QStringList &attributes = QStringList(), int count = 0 );
00090
00094 bool search( const LdapUrl &url, int count = 0 );
00095
00100 bool search( const LdapDN &base,
00101 LdapUrl::Scope scope = LdapUrl::Sub,
00102 const QString &filter = QString(),
00103 const QStringList &attributes = QStringList(),
00104 int pagesize = 0, int count = 0 );
00105
00109 void continueSearch();
00113 bool isFinished();
00117 void abandon();
00118
00122 int error() const;
00123
00127 QString errorString() const;
00128
00129 Q_SIGNALS:
00133 void data( KLDAP::LdapSearch *search, const KLDAP::LdapObject &obj );
00134
00138 void result( KLDAP::LdapSearch *search );
00139
00140 private:
00141 class Private;
00142 Private *const d;
00143
00144 Q_PRIVATE_SLOT( d, void result() )
00145
00146 Q_DISABLE_COPY( LdapSearch )
00147 };
00148
00149 }
00150
00151 #endif