ldapsdk  0.0.1
Public Member Functions | Static Public Attributes | Friends | List of all members
LDAPResult Class Reference

This class is for representing LDAP-Result-Messages. More...

#include <LDAPResult.h>

Inheritance diagram for LDAPResult:
LDAPMsg LDAPExtResult LDAPSaslBindResult

Public Member Functions

 LDAPResult (const LDAPRequest *req, LDAPMessage *msg)
 This constructor is called by the LDAPMsg::create method in order to parse a LDAPResult-Message. More...
 
 LDAPResult (int type, int resultCode, const std::string &msg)
 
virtual ~LDAPResult ()
 The destructor. More...
 
int getResultCode () const
 
std::string resToString () const
 This method transforms the result code to a human-readable result message. More...
 
const std::string & getErrMsg () const
 In some case of error the server may return addional error messages. More...
 
const std::string & getMatchedDN () const
 For messages with a result code of: NO_SUCH_OBJECT, ALIAS_PROBLEM, ALIAS_DEREFERENCING_PROBLEM or INVALID_DN_SYNTAX the server returns the DN of deepest entry in the DIT that could be found for this operation. More...
 
const LDAPUrlListgetReferralUrls () const
 
- Public Member Functions inherited from LDAPMsg
virtual ~LDAPMsg ()
 The destructor has no implemenation, because this is an abstract class. More...
 
int getMessageType ()
 
int getMsgID ()
 
bool hasControls () const
 
const LDAPControlSetgetSrvControls () const
 

Static Public Attributes

static const int SUCCESS = 0
 
static const int OPERATIONS_ERROR = 1
 
static const int PROTOCOL_ERROR = 2
 
static const int TIME_LIMIT_EXCEEDED = 3
 
static const int SIZE_LIMIT_EXCEEDED = 4
 
static const int COMPARE_FALSE = 5
 
static const int COMPARE_TRUE = 6
 
static const int AUTH_METHOD_NOT_SUPPORTED = 7
 
static const int STRONG_AUTH_REQUIRED = 8
 
static const int REFERRAL = 10
 
static const int ADMIN_LIMIT_EXCEEDED = 11
 
static const int UNAVAILABLE_CRITICAL_EXTENSION = 12
 
static const int CONFIDENTIALITY_REQUIRED = 13
 
static const int SASL_BIND_IN_PROGRESS = 14
 
static const int NO_SUCH_ATTRIBUTE = 16
 
static const int UNDEFINED_ATTRIBUTE_TYP = 17
 
static const int INAPPROPRIATE_MATCHING = 18
 
static const int CONSTRAINT_VIOLATION = 19
 
static const int ATTRIBUTE_OR_VALUE_EXISTS = 20
 
static const int INVALID_ATTRIBUTE_SYNTAX = 21
 
static const int NO_SUCH_OBJECT = 32
 
static const int ALIAS_PROBLEM = 33
 
static const int INVALID_DN_SYNTAX = 34
 
static const int ALIAS_DEREFERENCING_PROBLEM = 36
 
static const int INAPPROPRIATE_AUTENTICATION = 48
 
static const int INVALID_CREDENTIALS = 49
 
static const int INSUFFICIENT_ACCESS = 50
 
static const int BUSY = 51
 
static const int UNAVAILABLE = 52
 
static const int UNWILLING_TO_PERFORM = 53
 
static const int LOOP_DETECT = 54
 
static const int NAMING_VIOLATION = 64
 
static const int OBJECT_CLASS_VIOLATION = 65
 
static const int NOT_ALLOWED_ON_NONLEAF = 66
 
static const int NOT_ALLOWED_ON_RDN = 67
 
static const int ENTRY_ALREADY_EXISTS = 68
 
static const int OBJECT_CLASS_MODS_PROHIBITED = 69
 
static const int AFFECTS_MULTIPLE_DSAS = 71
 
static const int OTHER = 80
 
static const int SERVER_DOWN = 81
 
static const int LOCAL_ERROR = 82
 
static const int ENCODING_ERROR = 83
 
static const int DECODING_ERROR = 84
 
static const int TIMEOUT = 85
 
static const int AUTH_UNKNOWN = 86
 
static const int FILTER_ERROR = 87
 
static const int USER_CANCELLED = 88
 
static const int PARAM_ERROR = 89
 
static const int NO_MEMORY = 90
 
static const int CONNECT_ERROR = 91
 
static const int NOT_SUPPORTED = 92
 
static const int CONTROL_NOT_FOUND = 93
 
static const int NO_RESULTS_RETURNED = 94
 
static const int MORE_RESULTS_TO_RETURN = 95
 
static const int CLIENT_LOOP = 96
 
static const int REFERRAL_LIMIT_EXCEEDED = 97
 
- Static Public Attributes inherited from LDAPMsg
static const int BIND_RESPONSE =LDAP_RES_BIND
 
static const int SEARCH_ENTRY =LDAP_RES_SEARCH_ENTRY
 
static const int SEARCH_DONE =LDAP_RES_SEARCH_RESULT
 
static const int SEARCH_REFERENCE =LDAP_RES_SEARCH_REFERENCE
 
static const int MODIFY_RESPONSE =LDAP_RES_MODIFY
 
static const int ADD_RESPONSE =LDAP_RES_ADD
 
static const int DEL_RESPONSE =LDAP_RES_DELETE
 
static const int MODDN_RESPONSE =LDAP_RES_MODDN
 
static const int COMPARE_RESPONSE =LDAP_RES_COMPARE
 
static const int EXTENDED_RESPONSE =LDAP_RES_EXTENDED
 
static const int BIND_REQUEST =LDAP_REQ_BIND
 
static const int UNBIND_REQUEST =LDAP_REQ_UNBIND
 
static const int SEARCH_REQUEST =LDAP_REQ_SEARCH
 
static const int MODIFY_REQUEST =LDAP_REQ_MODIFY
 
static const int ADD_REQUEST =LDAP_REQ_ADD
 
static const int DELETE_REQUEST =LDAP_REQ_DELETE
 
static const int MODRDN_REQUEST =LDAP_REQ_MODRDN
 
static const int COMPARE_REQUEST =LDAP_REQ_COMPARE
 
static const int ABANDON_REQUEST =LDAP_REQ_ABANDON
 
static const int EXTENDED_REQUEST =LDAP_REQ_EXTENDED
 

Friends

std::ostream & operator<< (std::ostream &s, LDAPResult &l)
 This method can be used to dump the data of a LDAPResult-Object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from LDAPMsg
static LDAPMsgcreate (const LDAPRequest *req, LDAPMessage *msg)
 This method is used by the library to parse the results returned by the C-API. More...
 
- Protected Member Functions inherited from LDAPMsg
 LDAPMsg (LDAPMessage *msg)
 This constructor make a copy of a LDAPMsg-pointer. More...
 
 LDAPMsg (int msgType, int msgID)
 
- Protected Attributes inherited from LDAPMsg
LDAPControlSet m_srvControls
 This attribute stores Server-Control that were returned with the message. More...
 
bool m_hasControls
 

Detailed Description

This class is for representing LDAP-Result-Messages.

It represents all Messages that were returned from LDAP-Operations except for Messages of the Type LDAPMsg::SEARCH_ENTRY, LDAPMsg::SEARCH_REFERENCE and LDAPMsg::EXTENDED_RESPONSE.
It defines a integer constant for every possible result type that can be returned by the server.

Constructor & Destructor Documentation

◆ LDAPResult() [1/2]

LDAPResult::LDAPResult ( const LDAPRequest req,
LDAPMessage *  msg 
)

This constructor is called by the LDAPMsg::create method in order to parse a LDAPResult-Message.

Parameters
reqThe request the result is associated with.
msgThe LDAPMessage-structure that contains the Message.

References DEBUG, LDAPRequest::getConnection(), LDAPAsynConnection::getSessionHandle(), LDAP_DEBUG_CONSTRUCT, LDAPMsg::m_hasControls, and LDAPMsg::m_srvControls.

◆ LDAPResult() [2/2]

LDAPResult::LDAPResult ( int  type,
int  resultCode,
const std::string &  msg 
)

◆ ~LDAPResult()

LDAPResult::~LDAPResult ( )
virtual

The destructor.

References DEBUG, and LDAP_DEBUG_DESTROY.

Member Function Documentation

◆ getErrMsg()

const string & LDAPResult::getErrMsg ( ) const

In some case of error the server may return addional error messages.

Returns
The additional error message returned by the server.

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPConnection::add(), LDAPConnection::bind(), LDAPConnection::compare(), LDAPConnection::del(), LDAPConnection::extOperation(), LDAPConnection::modify(), LDAPConnection::rename(), LDAPConnection::saslInteractiveBind(), and LDAPConnection::search().

◆ getMatchedDN()

const string & LDAPResult::getMatchedDN ( ) const

For messages with a result code of: NO_SUCH_OBJECT, ALIAS_PROBLEM, ALIAS_DEREFERENCING_PROBLEM or INVALID_DN_SYNTAX the server returns the DN of deepest entry in the DIT that could be found for this operation.

Returns
The Matched-DN value that was returned by the server.

References DEBUG, and LDAP_DEBUG_TRACE.

◆ getReferralUrls()

const LDAPUrlList & LDAPResult::getReferralUrls ( ) const
Returns
If the result code is REFERRAL this methode returns the URLs of the referral that was sent by the server.

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPConnection::add(), LDAPConnection::bind(), LDAPConnection::compare(), LDAPConnection::del(), LDAPConnection::extOperation(), LDAPConnection::modify(), LDAPConnection::rename(), LDAPConnection::saslInteractiveBind(), and LDAPConnection::search().

◆ getResultCode()

int LDAPResult::getResultCode ( ) const

◆ resToString()

string LDAPResult::resToString ( ) const

This method transforms the result code to a human-readable result message.

Returns
A std::string containing the result message.

References DEBUG, and LDAP_DEBUG_TRACE.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
LDAPResult l 
)
friend

This method can be used to dump the data of a LDAPResult-Object.

It is only useful for debugging purposes at the moment

Member Data Documentation

◆ ADMIN_LIMIT_EXCEEDED

const int LDAPResult::ADMIN_LIMIT_EXCEEDED = 11
static

◆ AFFECTS_MULTIPLE_DSAS

const int LDAPResult::AFFECTS_MULTIPLE_DSAS = 71
static

◆ ALIAS_DEREFERENCING_PROBLEM

const int LDAPResult::ALIAS_DEREFERENCING_PROBLEM = 36
static

◆ ALIAS_PROBLEM

const int LDAPResult::ALIAS_PROBLEM = 33
static

◆ ATTRIBUTE_OR_VALUE_EXISTS

const int LDAPResult::ATTRIBUTE_OR_VALUE_EXISTS = 20
static

◆ AUTH_METHOD_NOT_SUPPORTED

const int LDAPResult::AUTH_METHOD_NOT_SUPPORTED = 7
static

◆ AUTH_UNKNOWN

const int LDAPResult::AUTH_UNKNOWN = 86
static

◆ BUSY

const int LDAPResult::BUSY = 51
static

◆ CLIENT_LOOP

const int LDAPResult::CLIENT_LOOP = 96
static

◆ COMPARE_FALSE

const int LDAPResult::COMPARE_FALSE = 5
static

Referenced by LDAPConnection::compare().

◆ COMPARE_TRUE

const int LDAPResult::COMPARE_TRUE = 6
static

Referenced by LDAPConnection::compare().

◆ CONFIDENTIALITY_REQUIRED

const int LDAPResult::CONFIDENTIALITY_REQUIRED = 13
static

◆ CONNECT_ERROR

const int LDAPResult::CONNECT_ERROR = 91
static

◆ CONSTRAINT_VIOLATION

const int LDAPResult::CONSTRAINT_VIOLATION = 19
static

◆ CONTROL_NOT_FOUND

const int LDAPResult::CONTROL_NOT_FOUND = 93
static

◆ DECODING_ERROR

const int LDAPResult::DECODING_ERROR = 84
static

◆ ENCODING_ERROR

const int LDAPResult::ENCODING_ERROR = 83
static

◆ ENTRY_ALREADY_EXISTS

const int LDAPResult::ENTRY_ALREADY_EXISTS = 68
static

◆ FILTER_ERROR

const int LDAPResult::FILTER_ERROR = 87
static

◆ INAPPROPRIATE_AUTENTICATION

const int LDAPResult::INAPPROPRIATE_AUTENTICATION = 48
static

◆ INAPPROPRIATE_MATCHING

const int LDAPResult::INAPPROPRIATE_MATCHING = 18
static

◆ INSUFFICIENT_ACCESS

const int LDAPResult::INSUFFICIENT_ACCESS = 50
static

◆ INVALID_ATTRIBUTE_SYNTAX

const int LDAPResult::INVALID_ATTRIBUTE_SYNTAX = 21
static

◆ INVALID_CREDENTIALS

const int LDAPResult::INVALID_CREDENTIALS = 49
static

◆ INVALID_DN_SYNTAX

const int LDAPResult::INVALID_DN_SYNTAX = 34
static

◆ LOCAL_ERROR

const int LDAPResult::LOCAL_ERROR = 82
static

◆ LOOP_DETECT

const int LDAPResult::LOOP_DETECT = 54
static

◆ MORE_RESULTS_TO_RETURN

const int LDAPResult::MORE_RESULTS_TO_RETURN = 95
static

◆ NAMING_VIOLATION

const int LDAPResult::NAMING_VIOLATION = 64
static

◆ NO_MEMORY

const int LDAPResult::NO_MEMORY = 90
static

◆ NO_RESULTS_RETURNED

const int LDAPResult::NO_RESULTS_RETURNED = 94
static

◆ NO_SUCH_ATTRIBUTE

const int LDAPResult::NO_SUCH_ATTRIBUTE = 16
static

◆ NO_SUCH_OBJECT

const int LDAPResult::NO_SUCH_OBJECT = 32
static

◆ NOT_ALLOWED_ON_NONLEAF

const int LDAPResult::NOT_ALLOWED_ON_NONLEAF = 66
static

◆ NOT_ALLOWED_ON_RDN

const int LDAPResult::NOT_ALLOWED_ON_RDN = 67
static

◆ NOT_SUPPORTED

const int LDAPResult::NOT_SUPPORTED = 92
static

◆ OBJECT_CLASS_MODS_PROHIBITED

const int LDAPResult::OBJECT_CLASS_MODS_PROHIBITED = 69
static

◆ OBJECT_CLASS_VIOLATION

const int LDAPResult::OBJECT_CLASS_VIOLATION = 65
static

◆ OPERATIONS_ERROR

const int LDAPResult::OPERATIONS_ERROR = 1
static

◆ OTHER

const int LDAPResult::OTHER = 80
static

◆ PARAM_ERROR

const int LDAPResult::PARAM_ERROR = 89
static

◆ PROTOCOL_ERROR

const int LDAPResult::PROTOCOL_ERROR = 2
static

◆ REFERRAL

const int LDAPResult::REFERRAL = 10
static

◆ REFERRAL_LIMIT_EXCEEDED

const int LDAPResult::REFERRAL_LIMIT_EXCEEDED = 97
static

◆ SASL_BIND_IN_PROGRESS

const int LDAPResult::SASL_BIND_IN_PROGRESS = 14
static

◆ SERVER_DOWN

const int LDAPResult::SERVER_DOWN = 81
static

◆ SIZE_LIMIT_EXCEEDED

const int LDAPResult::SIZE_LIMIT_EXCEEDED = 4
static

◆ STRONG_AUTH_REQUIRED

const int LDAPResult::STRONG_AUTH_REQUIRED = 8
static

◆ SUCCESS

const int LDAPResult::SUCCESS = 0
static

◆ TIME_LIMIT_EXCEEDED

const int LDAPResult::TIME_LIMIT_EXCEEDED = 3
static

◆ TIMEOUT

const int LDAPResult::TIMEOUT = 85
static

◆ UNAVAILABLE

const int LDAPResult::UNAVAILABLE = 52
static

◆ UNAVAILABLE_CRITICAL_EXTENSION

const int LDAPResult::UNAVAILABLE_CRITICAL_EXTENSION = 12
static

◆ UNDEFINED_ATTRIBUTE_TYP

const int LDAPResult::UNDEFINED_ATTRIBUTE_TYP = 17
static

◆ UNWILLING_TO_PERFORM

const int LDAPResult::UNWILLING_TO_PERFORM = 53
static

◆ USER_CANCELLED

const int LDAPResult::USER_CANCELLED = 88
static

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