ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TLDAPEntry.h
Go to the documentation of this file.
1 // @(#)root/ldap:$Id$
2 // Author: Evgenia Smirnova 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_TLDAPEntry
10 #define ROOT_TLDAPEntry
11 
12 #ifndef ROOT_TObject
13 #include "TObject.h"
14 #endif
15 #ifndef ROOT_TString
16 #include "TString.h"
17 #endif
18 #ifndef ROOT_TList
19 #include "TList.h"
20 #endif
21 #ifndef ROOT_CintLDAP
22 #include "CintLDAP.h"
23 #endif
24 
25 
26 class TLDAPServer;
27 class TLDAPAttribute;
28 
29 
30 class TLDAPEntry: public TObject {
31 
32 friend class TLDAPServer;
33 
34 private:
35  TString fDn; // Distinguished name of entry
36  TList *fAttr; // List of attributes
37  mutable Int_t fNCount; // Index of attribute to be returned from GetAttribute()
38 
39  LDAPMod **GetMods(Int_t op); // Get array of LDAPMod structures of the entry
40 
41 protected:
43 
44 public:
45  TLDAPEntry(const char *dn);
46  TLDAPEntry(const TLDAPEntry &e);
47  virtual ~TLDAPEntry();
48 
49  const char *GetDn() const { return fDn; }
50  void SetDn(const char *dn) { fDn = dn; }
51  void AddAttribute(const TLDAPAttribute &attr);
53  TLDAPAttribute *GetAttribute(const char *name) const;
54  void DeleteAttribute(const char *name);
55  Int_t GetCount() const { return fAttr->GetSize(); }
56  Bool_t IsReferral() const;
57  TList *GetReferrals() const;
58  void Print(Option_t * = "") const;
59 
60  ClassDef(TLDAPEntry, 0) //describe one entry in LDAP
61 };
62 
63 #endif
virtual ~TLDAPEntry()
Deletes all the attributes of the entry.
Definition: TLDAPEntry.cxx:60
TLDAPEntry & operator=(const TLDAPEntry &)
Equal operator.
Definition: TLDAPEntry.cxx:47
const char Option_t
Definition: RtypesCore.h:62
void DeleteAttribute(const char *name)
Delete attribute by name.
Definition: TLDAPEntry.cxx:127
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void AddAttribute(const TLDAPAttribute &attr)
Add an attribute to the entry.
Definition: TLDAPEntry.cxx:69
TList * fAttr
Definition: TLDAPEntry.h:36
Bool_t IsReferral() const
Check if entry is referal.
Definition: TLDAPEntry.cxx:142
#define ClassDef(name, id)
Definition: Rtypes.h:254
TList * GetReferrals() const
Get the TList of referrals.
Definition: TLDAPEntry.cxx:169
TLDAPEntry(const char *dn)
A doubly linked list.
Definition: TList.h:47
const char * GetDn() const
Definition: TLDAPEntry.h:49
TString fDn
Definition: TLDAPEntry.h:35
LDAPMod ** GetMods(Int_t op)
Get array of "LDAPMod" structures for entry.
Definition: TLDAPEntry.cxx:185
TLDAPAttribute * GetAttribute() const
Get next attribute of the entry.
Definition: TLDAPEntry.cxx:96
void SetDn(const char *dn)
Definition: TLDAPEntry.h:50
Int_t fNCount
Definition: TLDAPEntry.h:37
virtual Int_t GetSize() const
Definition: TCollection.h:95
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
Int_t GetCount() const
Definition: TLDAPEntry.h:55
void Print(Option_t *="") const
Print entry in LDIF format.
Definition: TLDAPEntry.cxx:77