ldapsdk 0.0.1
Public Member Functions | Static Public Member Functions

LDAPCtrl Class Reference

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

#include <LDAPControl.h>

List of all members.

Public Member Functions

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

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::LDAPCtrl ( const char *  oid,
bool  critical = false,
const char *  data = 0,
int  length = 0 
)

Constructor.

Parameters:
oid,:The Object Identifier of the Control
critical,:"true" if the Control should be handled critical by the server.
data,:If there is data for the control, put it here.
length,:The length of the data field

References DEBUG, LDAP_DEBUG_CONSTRUCT, LDAP_DEBUG_PARAMETER, and string.

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

Constructor.

Parameters:
oid,:The Object Identifier of the Control
critical,:"true" if the Control should be handled critical by the server.
data,:If there is data for the control, put it here.
LDAPCtrl::LDAPCtrl ( const LDAPControl *  ctrl)

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

References DEBUG, LDAP_DEBUG_CONSTRUCT, and string.

LDAPCtrl::~LDAPCtrl ( )

Destructor.

References DEBUG, and LDAP_DEBUG_DESTROY.


Member Function Documentation

void LDAPCtrl::freeLDAPControlStruct ( LDAPControl *  ctrl) [static]
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.

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

References DEBUG, and LDAP_DEBUG_TRACE.

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

References DEBUG, and LDAP_DEBUG_TRACE.

bool LDAPCtrl::hasData ( ) const
Returns:
true if there is no "Control Value" (there is a difference between no and an empty control value)
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: