Logo ROOT   6.16/01
Reference Guide
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#include "TObject.h"
13#include "TString.h"
14#include "TList.h"
15#include "CintLDAP.h"
16
17
18class TLDAPServer;
19class TLDAPAttribute;
20
21
22class TLDAPEntry: public TObject {
23
24friend class TLDAPServer;
25
26private:
27 TString fDn; // Distinguished name of entry
28 TList *fAttr; // List of attributes
29 mutable Int_t fNCount; // Index of attribute to be returned from GetAttribute()
30
31 LDAPMod **GetMods(Int_t op); // Get array of LDAPMod structures of the entry
32
33protected:
35
36public:
37 TLDAPEntry(const char *dn);
38 TLDAPEntry(const TLDAPEntry &e);
39 virtual ~TLDAPEntry();
40
41 const char *GetDn() const { return fDn; }
42 void SetDn(const char *dn) { fDn = dn; }
43 void AddAttribute(const TLDAPAttribute &attr);
45 TLDAPAttribute *GetAttribute(const char *name) const;
46 void DeleteAttribute(const char *name);
47 Int_t GetCount() const { return fAttr->GetSize(); }
48 Bool_t IsReferral() const;
49 TList *GetReferrals() const;
50 void Print(Option_t * = "") const;
51
52 ClassDef(TLDAPEntry, 0) //describe one entry in LDAP
53};
54
55#endif
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
void AddAttribute(const TLDAPAttribute &attr)
Add an attribute to the entry.
Definition: TLDAPEntry.cxx:69
TLDAPAttribute * GetAttribute() const
Get next attribute of the entry.
Definition: TLDAPEntry.cxx:96
TList * GetReferrals() const
Get the TList of referrals.
Definition: TLDAPEntry.cxx:169
LDAPMod ** GetMods(Int_t op)
Get array of "LDAPMod" structures for entry.
Definition: TLDAPEntry.cxx:185
void Print(Option_t *="") const
Print entry in LDIF format.
Definition: TLDAPEntry.cxx:77
TString fDn
Definition: TLDAPEntry.h:27
Int_t fNCount
Definition: TLDAPEntry.h:29
TLDAPEntry & operator=(const TLDAPEntry &)
Equal operator.
Definition: TLDAPEntry.cxx:47
Int_t GetCount() const
Definition: TLDAPEntry.h:47
void SetDn(const char *dn)
Definition: TLDAPEntry.h:42
TList * fAttr
Definition: TLDAPEntry.h:28
Bool_t IsReferral() const
Check if entry is referal.
Definition: TLDAPEntry.cxx:142
TLDAPEntry(const char *dn)
Creates the new TLDAPEntry object with the specified DN (distinguished name) and the empty list of at...
Definition: TLDAPEntry.cxx:22
const char * GetDn() const
Definition: TLDAPEntry.h:41
void DeleteAttribute(const char *name)
Delete attribute by name.
Definition: TLDAPEntry.cxx:127
virtual ~TLDAPEntry()
Deletes all the attributes of the entry.
Definition: TLDAPEntry.cxx:60
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131