ldapsdk  0.0.1
Public Member Functions | Static Public Member Functions | List of all members
LDAPCtrl Class Reference

This class is used to store Controls. More...

#include <LDAPControl.h>

Public Member Functions

 LDAPCtrl (const char *oid, bool critical=false, const char *data=0, int length=0)
 Constructor. More...
 
 LDAPCtrl (const std::string &oid, bool critical, const std::string &data)
 Constructor. More...
 
 LDAPCtrl (const LDAPControl *ctrl)
 Creates a copy of the Control that "ctrl is pointing to. More...
 
 ~LDAPCtrl ()
 Destructor. More...
 
std::string getOID () const
 
bool hasData () const
 
std::string getData () const
 
bool isCritical () const
 
LDAPControl * getControlStruct () const
 For internal use only. More...
 

Static Public Member Functions

static void freeLDAPControlStruct (LDAPControl *ctrl)
 

Detailed Description

This class is used to store Controls.

Controls are a mechanism to extend and modify LDAP-Operations.

Constructor & Destructor Documentation

◆ LDAPCtrl() [1/3]

LDAPCtrl::LDAPCtrl ( const char *  oid,
bool  critical = false,
const char *  data = 0,
int  length = 0 
)

Constructor.

Parameters
oidThe Object Identifier of the Control
critical"true" if the Control should be handled critical by the server.
dataIf there is data for the control, put it here.
lengthThe length of the data field

References DEBUG, LDAP_DEBUG_CONSTRUCT, and LDAP_DEBUG_PARAMETER.

◆ LDAPCtrl() [2/3]

LDAPCtrl::LDAPCtrl ( const std::string &  oid,
bool  critical,
const std::string &  data 
)

Constructor.

Parameters
oidThe Object Identifier of the Control
critical"true" if the Control should be handled critical by the server.
dataIf there is data for the control, put it here.

◆ LDAPCtrl() [3/3]

LDAPCtrl::LDAPCtrl ( const LDAPControl *  ctrl)

Creates a copy of the Control that "ctrl is pointing to.

References DEBUG, and LDAP_DEBUG_CONSTRUCT.

◆ ~LDAPCtrl()

LDAPCtrl::~LDAPCtrl ( )

Destructor.

References DEBUG, and LDAP_DEBUG_DESTROY.

Member Function Documentation

◆ freeLDAPControlStruct()

void LDAPCtrl::freeLDAPControlStruct ( LDAPControl *  ctrl)
static

◆ getControlStruct()

LDAPControl * LDAPCtrl::getControlStruct ( ) const

For internal use only.

Translates the control to a LDAPControl-structure as needed by the C-API

References DEBUG, and LDAP_DEBUG_TRACE.

◆ getData()

string LDAPCtrl::getData ( ) const
Returns
The Data of the control as a std::string-Object

References DEBUG, and LDAP_DEBUG_TRACE.

◆ getOID()

string LDAPCtrl::getOID ( ) const
Returns
The OID of the control

References DEBUG, and LDAP_DEBUG_TRACE.

◆ hasData()

bool LDAPCtrl::hasData ( ) const
Returns
true if there is no "Control Value" (there is a difference between no and an empty control value)

◆ isCritical()

bool LDAPCtrl::isCritical ( ) const
Returns
"true" if the control is critical

References DEBUG, and LDAP_DEBUG_TRACE.


The documentation for this class was generated from the following files: