Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

LDAPResult Class Reference

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

#include <LDAPResult.h>

Inheritance diagram for LDAPResult:

LDAPMsg LDAPExtResult List of all members.

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.
virtual ~LDAPResult ()
 The destructor.
int getResultCode () const
std::string resToString () const
 This method transforms the result code to a human-readable result message.
const std::string & getErrMsg () const
 In some case of error the server may return addional error messages.
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.
const LDAPUrlListgetReferralUrls () const

Static Public Attributes

const int SUCCESS = 0
const int OPERATIONS_ERROR = 1
const int PROTOCOL_ERROR = 2
const int TIME_LIMIT_EXCEEDED = 3
const int SIZE_LIMIT_EXCEEDED = 4
const int COMPARE_FALSE = 5
const int COMPARE_TRUE = 6
const int AUTH_METHOD_NOT_SUPPORTED = 7
const int STRONG_AUTH_REQUIRED = 8
const int REFERRAL = 10
const int ADMIN_LIMIT_EXCEEDED = 11
const int UNAVAILABLE_CRITICAL_EXTENSION = 12
const int CONFIDENTIALITY_REQUIRED = 13
const int SASL_BIND_IN_PROGRESS = 14
const int NO_SUCH_ATTRIBUTE = 16
const int UNDEFINED_ATTRIBUTE_TYP = 17
const int INAPPROPRIATE_MATCHING = 18
const int CONSTRAINT_VIOLATION = 19
const int ATTRIBUTE_OR_VALUE_EXISTS = 20
const int INVALID_ATTRIBUTE_SYNTAX = 21
const int NO_SUCH_OBJECT = 32
const int ALIAS_PROBLEM = 33
const int INVALID_DN_SYNTAX = 34
const int ALIAS_DEREFERENCING_PROBLEM = 36
const int INAPPROPRIATE_AUTENTICATION = 48
const int INVALID_CREDENTIALS = 49
const int INSUFFICIENT_ACCESS = 50
const int BUSY = 51
const int UNAVAILABLE = 52
const int UNWILLING_TO_PERFORM = 53
const int LOOP_DETECT = 54
const int NAMING_VIOLATION = 64
const int OBJECT_CLASS_VIOLATION = 65
const int NOT_ALLOWED_ON_NONLEAF = 66
const int NOT_ALLOWED_ON_RDN = 67
const int ENTRY_ALREADY_EXISTS = 68
const int OBJECT_CLASS_MODS_PROHIBITED = 69
const int AFFECTS_MULTIPLE_DSAS = 71
const int OTHER = 80
const int SERVER_DOWN = 81
const int LOCAL_ERROR = 82
const int ENCODING_ERROR = 83
const int DECODING_ERROR = 84
const int TIMEOUT = 85
const int AUTH_UNKNOWN = 86
const int FILTER_ERROR = 87
const int USER_CANCELLED = 88
const int PARAM_ERROR = 89
const int NO_MEMORY = 90
const int CONNECT_ERROR = 91
const int NOT_SUPPORTED = 92
const int CONTROL_NOT_FOUND = 93
const int NO_RESULTS_RETURNED = 94
const int MORE_RESULTS_TO_RETURN = 95
const int CLIENT_LOOP = 96
const int REFERRAL_LIMIT_EXCEEDED = 97

Private Attributes

int m_resCode
std::string m_matchedDN
std::string m_errMsg
LDAPUrlList m_referrals

Friends

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

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::LDAPResult const LDAPRequest req,
LDAPMessage *  msg
 

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

Parameters:
req The request the result is associated with.
msg The LDAPMessage-structure that contains the Message.

LDAPResult::~LDAPResult  )  [virtual]
 

The destructor.


Member Function Documentation

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.

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.

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.

int LDAPResult::getResultCode  )  const
 

Returns:
The result code of the Message. Possible values are the integer constants defined in this class.

string LDAPResult::resToString  )  const
 

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

Returns:
A std::string containing the result message.


Friends And Related Function Documentation

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

const int LDAPResult::ADMIN_LIMIT_EXCEEDED = 11 [static]
 

const int LDAPResult::AFFECTS_MULTIPLE_DSAS = 71 [static]
 

const int LDAPResult::ALIAS_DEREFERENCING_PROBLEM = 36 [static]
 

const int LDAPResult::ALIAS_PROBLEM = 33 [static]
 

const int LDAPResult::ATTRIBUTE_OR_VALUE_EXISTS = 20 [static]
 

const int LDAPResult::AUTH_METHOD_NOT_SUPPORTED = 7 [static]
 

const int LDAPResult::AUTH_UNKNOWN = 86 [static]
 

const int LDAPResult::BUSY = 51 [static]
 

const int LDAPResult::CLIENT_LOOP = 96 [static]
 

const int LDAPResult::COMPARE_FALSE = 5 [static]
 

const int LDAPResult::COMPARE_TRUE = 6 [static]
 

const int LDAPResult::CONFIDENTIALITY_REQUIRED = 13 [static]
 

const int LDAPResult::CONNECT_ERROR = 91 [static]
 

const int LDAPResult::CONSTRAINT_VIOLATION = 19 [static]
 

const int LDAPResult::CONTROL_NOT_FOUND = 93 [static]
 

const int LDAPResult::DECODING_ERROR = 84 [static]
 

const int LDAPResult::ENCODING_ERROR = 83 [static]
 

const int LDAPResult::ENTRY_ALREADY_EXISTS = 68 [static]
 

const int LDAPResult::FILTER_ERROR = 87 [static]
 

const int LDAPResult::INAPPROPRIATE_AUTENTICATION = 48 [static]
 

const int LDAPResult::INAPPROPRIATE_MATCHING = 18 [static]
 

const int LDAPResult::INSUFFICIENT_ACCESS = 50 [static]
 

const int LDAPResult::INVALID_ATTRIBUTE_SYNTAX = 21 [static]
 

const int LDAPResult::INVALID_CREDENTIALS = 49 [static]
 

const int LDAPResult::INVALID_DN_SYNTAX = 34 [static]
 

const int LDAPResult::LOCAL_ERROR = 82 [static]
 

const int LDAPResult::LOOP_DETECT = 54 [static]
 

std::string LDAPResult::m_errMsg [private]
 

std::string LDAPResult::m_matchedDN [private]
 

LDAPUrlList LDAPResult::m_referrals [private]
 

int LDAPResult::m_resCode [private]
 

const int LDAPResult::MORE_RESULTS_TO_RETURN = 95 [static]
 

const int LDAPResult::NAMING_VIOLATION = 64 [static]
 

const int LDAPResult::NO_MEMORY = 90 [static]
 

const int LDAPResult::NO_RESULTS_RETURNED = 94 [static]
 

const int LDAPResult::NO_SUCH_ATTRIBUTE = 16 [static]
 

const int LDAPResult::NO_SUCH_OBJECT = 32 [static]
 

const int LDAPResult::NOT_ALLOWED_ON_NONLEAF = 66 [static]
 

const int LDAPResult::NOT_ALLOWED_ON_RDN = 67 [static]
 

const int LDAPResult::NOT_SUPPORTED = 92 [static]
 

const int LDAPResult::OBJECT_CLASS_MODS_PROHIBITED = 69 [static]
 

const int LDAPResult::OBJECT_CLASS_VIOLATION = 65 [static]
 

const int LDAPResult::OPERATIONS_ERROR = 1 [static]
 

const int LDAPResult::OTHER = 80 [static]
 

const int LDAPResult::PARAM_ERROR = 89 [static]
 

const int LDAPResult::PROTOCOL_ERROR = 2 [static]
 

const int LDAPResult::REFERRAL = 10 [static]
 

const int LDAPResult::REFERRAL_LIMIT_EXCEEDED = 97 [static]
 

const int LDAPResult::SASL_BIND_IN_PROGRESS = 14 [static]
 

const int LDAPResult::SERVER_DOWN = 81 [static]
 

const int LDAPResult::SIZE_LIMIT_EXCEEDED = 4 [static]
 

const int LDAPResult::STRONG_AUTH_REQUIRED = 8 [static]
 

const int LDAPResult::SUCCESS = 0 [static]
 

const int LDAPResult::TIME_LIMIT_EXCEEDED = 3 [static]
 

const int LDAPResult::TIMEOUT = 85 [static]
 

const int LDAPResult::UNAVAILABLE = 52 [static]
 

const int LDAPResult::UNAVAILABLE_CRITICAL_EXTENSION = 12 [static]
 

const int LDAPResult::UNDEFINED_ATTRIBUTE_TYP = 17 [static]
 

const int LDAPResult::UNWILLING_TO_PERFORM = 53 [static]
 

const int LDAPResult::USER_CANCELLED = 88 [static]
 


The documentation for this class was generated from the following files:
Generated on Wed Nov 12 02:19:04 2008 for ldapsdk by  doxygen 1.3.9.1