00001
00002
00003
00004
00005
00006
00007
00008
00015 #ifndef _LDAP_QUERY_
00016 #define _LDAP_QUERY_
00017
00018 #include <string>
00019 #include <vector>
00020
00021 namespace edg {
00022 namespace workload {
00023 namespace common {
00024 namespace ldif2classad {
00025
00027 class LDAPConnection;
00028
00030 struct generic_search_result_t;
00031
00037 class LDAPQuery
00038 {
00039 public:
00040
00041 enum search_scope_t { SCOPE_BASE, SCOPE_ONELEVEL, SCOPE_SUBTREE };
00042
00048 LDAPQuery(LDAPConnection*, const std::string&, const std::vector<std::string>&, int s = SCOPE_SUBTREE);
00049
00053 ~LDAPQuery();
00054
00060 int scope() const { return search_scope; }
00066 std::string filter() const { return search_filter; }
00072 const std::vector<std::string>& topics() const { return search_topic; }
00078 generic_search_result_t* tuples() const;
00083 bool execute();
00084
00085 std::string what() const;
00086
00087 private:
00088
00089 LDAPConnection *connection;
00090 generic_search_result_t *search_result;
00091 std::string search_filter;
00092 std::vector<std::string> search_topic;
00093 int search_scope;
00098 };
00099
00100 }
00101 }
00102 }
00103 }
00104
00105
00106 #endif
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120