TLDAPServer.h

Go to the documentation of this file.
00001 // @(#)root/ldap:$Id: TLDAPServer.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Oleksandr Grebenyuk   21/09/2001
00003 
00004 /*************************************************************************
00005  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00006  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00007  *************************************************************************/
00008 
00009 #ifndef ROOT_TLDAPServer
00010 #define ROOT_TLDAPServer
00011 
00012 #ifndef ROOT_TObject
00013 #include "TObject.h"
00014 #endif
00015 #ifndef ROOT_TString
00016 #include "TString.h"
00017 #endif
00018 #ifndef ROOT_CintLDAP
00019 #include "CintLDAP.h"
00020 #endif
00021 
00022 class TList;
00023 class TLDAPResult;
00024 class TLDAPEntry;
00025 
00026 
00027 class TLDAPServer : public TObject {
00028 
00029 private:
00030    LDAP         *fLd;           // LDAP handle of current connection
00031    TString       fBinddn;       // Bind name
00032    TString       fPassword;     // Password
00033    Bool_t        fIsConnected;  // Current connection state
00034 
00035    Int_t         Bind();
00036    void          Unbind();
00037 
00038    static void   DeleteMods(LDAPMod **mods);
00039 
00040 protected:
00041    TLDAPServer(const TLDAPServer&);
00042    TLDAPServer& operator=(const TLDAPServer&);
00043 
00044 public:
00045    TLDAPServer(const char *host, Int_t port = LDAP_PORT,
00046                const char *binddn = 0, const char *password = 0,
00047                Int_t version = LDAP_VERSION2);
00048 
00049    virtual ~TLDAPServer();
00050 
00051    Bool_t        IsConnected() const { return fIsConnected; };
00052    TLDAPResult  *Search(const char *base = "",
00053                         Int_t scope = LDAP_SCOPE_BASE,
00054                         const char *filter = 0,
00055                         TList *attrs = 0,
00056                         Bool_t attrsonly = 0);
00057    const char   *GetNamingContexts();
00058    const char   *GetSubschemaSubentry();
00059    TLDAPResult  *GetObjectClasses();
00060    TLDAPResult  *GetAttributeTypes();
00061 
00062    Int_t         AddEntry(TLDAPEntry &entry);
00063    Int_t         ModifyEntry(TLDAPEntry &entry, Int_t mode = LDAP_MOD_REPLACE);
00064    Int_t         DeleteEntry(const char *dn);
00065    Int_t         RenameEntry(const char *dn, const char *newrdn,
00066                              Bool_t removeattr = kFALSE);
00067 
00068    ClassDef(TLDAPServer, 0)  // Connection to LDAP server
00069 };
00070 
00071 #endif

Generated on Tue Jul 5 14:45:41 2011 for ROOT_528-00b_version by  doxygen 1.5.1