00001
00002
00003
00004
00005
00006
00007 #ifndef LDAP_CONTROL_H
00008 #define LDAP_CONTROL_H
00009 #include <string>
00010 #include <ldap.h>
00011
00016 class LDAPCtrl{
00017 public :
00021 LDAPCtrl(const LDAPCtrl& c);
00022
00031 LDAPCtrl(const char *oid, bool critical, const char *data=0,
00032 int length=0);
00033
00041 LDAPCtrl(const std::string& oid, bool critical=false,
00042 const std::string& data=std::string());
00043
00047 LDAPCtrl(const LDAPControl* ctrl);
00048
00052 ~LDAPCtrl();
00053
00057 std::string getOID() const;
00058
00062 std::string getData() const;
00063
00067 bool isCritical() const;
00068
00075 LDAPControl* getControlStruct() const;
00076 static void freeLDAPControlStruct(LDAPControl *ctrl);
00077
00078 private :
00079 std::string m_oid;
00080 std::string m_data;
00081 bool m_isCritical;
00082 };
00083
00084 #endif //LDAP_CONTROL_H