00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef EDGReplicaManager_LDAPQuery_H
00012 #define EDGReplicaManager_LDAPQuery_H
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <sys/time.h>
00022
00023 #include <string>
00024 #include <vector>
00025 #include <map>
00026 #include <list>
00027
00028
00029 #include "lber.h"
00030 #include "ldap.h"
00031
00032 #include "EdgReplicaManager/ReplicaManagerExceptions.h"
00033
00034 namespace EdgReplicaManager {
00035
00039 class LDAPQuery {
00040 public:
00041 LDAPQuery(const std::string& baseDN, const std::string& hostname) throw(LDAPException);
00042
00043 ~LDAPQuery();
00044
00046 const std::vector<std::string>& query(const std::string& constraint,
00047 const std::string& attr) throw(LDAPException);
00048
00049
00050 private:
00051
00053 const std::string m_baseDN;
00055 std::string m_hostname;
00057 int m_port;
00059 LDAP* m_handle;
00061 struct timeval m_timeout;
00063 std::vector<std::string> m_buffer;
00065 LDAPMessage* m_result;
00066
00067 };
00068
00069 };
00070
00071 #endif