ldapsdk 0.0.1
LDAPControl.h
Go to the documentation of this file.
1// $OpenLDAP$
2/*
3 * Copyright 2000-2013 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5 */
6
7
8#ifndef LDAP_CONTROL_H
9#define LDAP_CONTROL_H
10#include <string>
11#include <ldap.h>
12
18 public :
27 LDAPCtrl(const char *oid, bool critical=false, const char *data=0,
28 int length=0);
29
37 LDAPCtrl(const std::string& oid, bool critical,
38 const std::string& data);
39
43 LDAPCtrl(const LDAPControl* ctrl);
44
48 ~LDAPCtrl();
49
53 std::string getOID() const;
54
59 bool hasData() const;
60
64 std::string getData() const;
65
69 bool isCritical() const;
70
77 LDAPControl* getControlStruct() const;
78 static void freeLDAPControlStruct(LDAPControl *ctrl);
79
80 private :
81 std::string m_oid;
82 std::string m_data;
83 bool m_isCritical;
84 bool m_noData;
85};
86
87#endif //LDAP_CONTROL_H
This class is used to store Controls.
Definition: LDAPControl.h:17
LDAPCtrl(const std::string &oid, bool critical, const std::string &data)
Constructor.
std::string getOID() const
Definition: LDAPControl.cpp:50
static void freeLDAPControlStruct(LDAPControl *ctrl)
Definition: LDAPControl.cpp:87
bool isCritical() const
Definition: LDAPControl.cpp:55
~LDAPCtrl()
Destructor.
Definition: LDAPControl.cpp:46
std::string getData() const
Definition: LDAPControl.cpp:64
bool hasData() const
Definition: LDAPControl.cpp:60
LDAPControl * getControlStruct() const
For internal use only.
Definition: LDAPControl.cpp:69
LDAPCtrl(const char *oid, bool critical=false, const char *data=0, int length=0)
Constructor.
Definition: LDAPControl.cpp:13