00001 // @(#)root/ldap:$Id: TLDAPAttribute.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Evgenia Smirnova 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_TLDAPAttribute 00010 #define ROOT_TLDAPAttribute 00011 00012 #ifndef ROOT_TNamed 00013 #include "TNamed.h" 00014 #endif 00015 #ifndef ROOT_TList 00016 #include "TList.h" 00017 #endif 00018 #ifndef ROOT_CintLDAP 00019 #include "CintLDAP.h" 00020 #endif 00021 00022 class TLDAPEntry; 00023 00024 00025 class TLDAPAttribute : public TNamed { 00026 00027 friend class TLDAPEntry; 00028 00029 private: 00030 TList *fValues; // list of values 00031 mutable Int_t fNCount; // next value to be returned by GetValue() 00032 00033 LDAPMod *GetMod(Int_t op); // for getting mod for attribute 00034 00035 protected: 00036 TLDAPAttribute& operator=(const TLDAPAttribute &); 00037 00038 public: 00039 TLDAPAttribute(const char *name); 00040 TLDAPAttribute(const char *name, const char *value); 00041 TLDAPAttribute(const TLDAPAttribute &attr); 00042 virtual ~TLDAPAttribute(); 00043 00044 void AddValue(const char *value); 00045 void DeleteValue(const char *value); 00046 const char *GetValue() const; 00047 Int_t GetCount() const { return fValues->GetSize(); } 00048 void Print(Option_t * = "") const; 00049 00050 ClassDef(TLDAPAttribute, 0) //interface to LDAP 00051 }; 00052 00053 #endif