ROOT logo
ROOT » NET » LDAP » TLDAPServer

class TLDAPServer: public TObject

Function Members (Methods)

public:
TLDAPServer(const char* host, Int_t port = LDAP_PORT, const char* binddn = 0, const char* password = 0, Int_t version = LDAP_VERSION2)
virtual~TLDAPServer()
voidTObject::AbstractMethod(const char* method) const
Int_tAddEntry(TLDAPEntry& entry)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tDeleteEntry(const char* dn)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TLDAPResult*GetAttributeTypes()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
const char*GetNamingContexts()
TLDAPResult*GetObjectClasses()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*GetSubschemaSubentry()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsConnected() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
Int_tModifyEntry(TLDAPEntry& entry, Int_t mode = LDAP_MOD_REPLACE)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
Int_tRenameEntry(const char* dn, const char* newrdn, Bool_t removeattr = kFALSE)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
TLDAPResult*Search(const char* base = "", Int_t scope = LDAP_SCOPE_BASE, const char* filter = 0, TList* attrs = 0, Bool_t attrsonly = 0)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
TLDAPServer(const TLDAPServer&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TLDAPServer&operator=(const TLDAPServer&)
private:
Int_tBind()
static voidDeleteMods(LDAPMod** mods)
voidUnbind()

Data Members

private:
TStringfBinddnBind name
Bool_tfIsConnectedCurrent connection state
LDAP*fLdLDAP handle of current connection
TStringfPasswordPassword

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TLDAPServer(const char* host, Int_t port = LDAP_PORT, const char* binddn = 0, const char* password = 0, Int_t version = LDAP_VERSION2)
 During construction TLDAPServer object tries to connect to the
 specified server and you should check the connection status by
 calling the IsConnected() member function immediately after
 creating that object.
 const char *host:     The name of host to connect. Default is "localhost".
 Int_t port:           Port number to connect. Default is LDAP_PORT (=389).
 const char *binddn:   Bind DN.
 const char *password: Password. Usually you have to specify bind DN and
                       password to have the write permissions. Default
                       values for bind DN and password are zero, that means
                       anonymous connection. Usually it is enough to read
                       the data from the server.
  Int_t version        Set LDAP protocol version: LDAP_VERSION1,
                       LDAP_VERSION2, LDAP_VERSION3
TLDAPServer(const TLDAPServer& )
 Copy constructor
TLDAPServer& operator=(const TLDAPServer& )
 Equal operator
~TLDAPServer()
 If the object is connected to the server, it disconnects.
Int_t Bind()
 Binds to the server with specified binddn and password.
 Return value: LDAP error code, 0 if successfully bound.
void Unbind()
 Unbinds from the server with specified binddn and password.
const char * GetNamingContexts()
 Performs an LDAPSearch with the attribute "namingContexts" to be
 returned with the result. The value of this attribute is
 extracted and returned as const char.
const char * GetSubschemaSubentry()
 Performs an LDAPSearch with the attribute "subschemaSubentry" to
 be returned with the result. The value of this attribute is
 extracted and returned as const char.
TLDAPResult * GetObjectClasses()
 Calls GetSubschemaSubentry() and performs and LDAPSearch with
 the attribute "objectClasses" to be returned with the result.
 The returned result object must be deleted by the user.
TLDAPResult * GetAttributeTypes()
 Calls GetSubschemaSubentry() and performs and LDAPSearch with the
 attribute "attributeTypes" to be returned with the result.
 The returned result object must be deleted by the user.
TLDAPResult * Search(const char* base = "", Int_t scope = LDAP_SCOPE_BASE, const char* filter = 0, TList* attrs = 0, Bool_t attrsonly = 0)
 Performs searching at the LDAP directory.
 Return value:     a TLDAPResult object or 0 in case of error.
                   Result needs to be deleted by user.
 const char *base: Specifies the base object for the search operation
 Int_t scope:      Specifies the portion of the LDAP tree, relative to
                   the base object, to search.
                   Must be one of LDAP_SCOPE_BASE (==0),
                   LDAP_SCOPE_ONELEVEL (==1) or LDAP_SCOPE_SUBTREE (==2).
 char *filter:     The criteria during the search to determine which
                   entries to return, 0 means that the filter
                   "(objectclass=*)" will be applied
 TList *attrs:     The TList of attributes to be returned along with
                   each entry, 0 means that all available attributes
                   should be returned.
 Int_t attrsonly:  This parameter is a boolean specifying whether both
                   types and values should be returned with each
                   attribute (zero) or types only should be returned
                   (non-zero).
Int_t AddEntry(TLDAPEntry& entry)
 Adds entry to the LDAP tree.
 Be sure that you are bound with write permissions.
 Return value: LDAP error code.
Int_t ModifyEntry(TLDAPEntry& entry, Int_t mode = LDAP_MOD_REPLACE)
 Modifies specified entry.
 Be sure that you are bound with write permissions.
 Return value:      LDAP error code, 0 = success.
 TLDAPEntry &entry: Entry to be modified.
 Int_t mode:        Modifying mode.
                    Should be one of LDAP_MOD_ADD (==0),
                    LDAP_MOD_DELETE (==1) or LDAP_MOD_REPLACE (==2)
                    Specifies what to do with all the entry's attributes
                    and its values - add to the corresponding entry on
                    the server, delete from it, or replace the
                    corresponding attributes with new values
Int_t DeleteEntry(const char* dn)
 Deletes the entry with specified DN, the base entry must exist.
 Be sure that you are bound with write permissions.
 Return value: LDAP error code, 0 = succes.
Int_t RenameEntry(const char* dn, const char* newrdn, Bool_t removeattr = kFALSE)
 Renames the entry with specified DN, the entry must be leaf
 Be sure that you are bound with the write permissions
 Return value:      LDAP error code, 0 = succes
 char *dn:          Distinguished name of entry to be renamed.
                    This entry must be a leaf in the LDAP directory tree.
 char *newrdn:      The new relative distinguished name to give the entry
                    being renamed.
 Bool_t removeattr: This parameter specifies whether or not the
                    attribute values in the old relative distinguished
                    name should be removed from the entry
                    or retained as non-distinguished attributes.
void DeleteMods(LDAPMod** mods)
 Deletes the array of LDAPMod structures and frees its memory.
 LDAPMod **mods: Pointer to the zero-terminated array of pointers
                 to LDAPMod structures
Bool_t IsConnected() const
{ return fIsConnected; }