Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

LDAPQuery.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *  filename  : LDAPQuery.h
00003  *  authors   : Salvatore Monforte <salvatore.monforte@ct.infn.it>
00004  *  copyright : (C) 2001, 2002 by INFN
00005  ***************************************************************************/
00006 
00007 // $Id:
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   /* search scopes */
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; /* < Pointer to generic search result */
00091   std::string              search_filter; 
00092   std::vector<std::string> search_topic;  
00093   int                      search_scope;  
00098 };
00099 
00100 } // namespace ldif2classad
00101 } // namespace common
00102 } // namespace workload
00103 } // namespace edg
00104 
00105 
00106 #endif
00107 
00108 
00109 /*
00110   Local Variables:
00111   mode: c++
00112   End:
00113 */
00114 
00115 
00116 
00117 
00118 
00119 
00120 

Generated on Wed Mar 1 00:37:55 2006 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen 1.3.5