Logo ROOT   6.07/09
Reference Guide
TLDAPResult.h
Go to the documentation of this file.
1 // @(#)root/ldap:$Id$
2 // Author: Oleksandr Grebenyuk 21/09/2001
3 
4 /*************************************************************************
5  * For the licensing terms see $ROOTSYS/LICENSE. *
6  * For the list of contributors see $ROOTSYS/README/CREDITS. *
7  *************************************************************************/
8 
9 #ifndef ROOT_TLDAPResult
10 #define ROOT_TLDAPResult
11 
12 #ifndef ROOT_TObject
13 #include "TObject.h"
14 #endif
15 #ifndef ROOT_CintLDAP
16 #include "CintLDAP.h"
17 #endif
18 
19 
20 class TLDAPServer;
21 class TLDAPEntry;
22 
23 
24 class TLDAPResult : public TObject {
25 
26 friend class TLDAPServer;
27 
28 private:
29  LDAP *fLd; // LDAP handle of current connection
30  LDAPMessage *fSearchResult; // Pointer to the LDAP structure that contain search results
31  LDAPMessage *fCurrentEntry; // Pointer to the current entry to be returned from the next GetNext() call
32 
33  TLDAPEntry *CreateEntry(LDAPMessage *entry);
34  TLDAPResult() : fLd(NULL), fSearchResult(NULL), fCurrentEntry(NULL) { }
35  TLDAPResult(LDAP *ld, LDAPMessage *searchresult);
36 
37 protected:
38  TLDAPResult(const TLDAPResult&);
40 
41 public:
42  virtual ~TLDAPResult();
43 
44  Int_t GetCount() const;
46  void Print(Option_t *option="") const;
47 
48  ClassDef(TLDAPResult, 0) // LDAP search result set
49 };
50 
51 #endif
const char Option_t
Definition: RtypesCore.h:62
Int_t GetCount() const
Returns the number of entries in the search result.
TLDAPEntry * CreateEntry(LDAPMessage *entry)
Creates TLDAPEntry object from the data containing in the LDAPMessage structure and returns pointer t...
Definition: TLDAPResult.cxx:83
int Int_t
Definition: RtypesCore.h:41
#define ClassDef(name, id)
Definition: Rtypes.h:254
TLDAPResult & operator=(const TLDAPResult &)
Equal operator.
Definition: TLDAPResult.cxx:43
LDAPMessage * fCurrentEntry
Definition: TLDAPResult.h:31
TLDAPEntry * GetNext()
Returns next entry from the search result.
Definition: TLDAPResult.cxx:68
void Print(Option_t *option="") const
Prints all entries.
Mother of all ROOT objects.
Definition: TObject.h:44
virtual ~TLDAPResult()
Deletes the LDAPMessage structure.
Definition: TLDAPResult.cxx:56
#define NULL
Definition: Rtypes.h:82
LDAPMessage * fSearchResult
Definition: TLDAPResult.h:30
LDAP * fLd
Definition: TLDAPResult.h:29