#include <LDAPConnection.h>
Inheritance diagram for LDAPConnection:
Public Member Functions | |
LDAPConnection (const std::string &hostname="localhost", int port=389, LDAPConstraints *cons=new LDAPConstraints()) | |
This Constructor initializes synchronous LDAP-Connection. | |
~LDAPConnection () | |
Destructor. | |
void | init (const std::string &hostname, int port) |
Initzializes a synchronous connection to a server. | |
void | start_tls () |
Start TLS on this connection. | |
void | bind (const std::string &dn="", const std::string &passwd="", LDAPConstraints *cons=0) |
Performs a simple authentication with the server. | |
void | unbind () |
Performs the UNBIND-operation on the destination server. | |
bool | compare (const std::string &dn, const LDAPAttribute &attr, LDAPConstraints *cons=0) |
Performs a COMPARE-operation on an entery of the destination server. | |
void | del (const std::string &dn, const LDAPConstraints *cons=0) |
Deletes an entry from the directory. | |
void | add (const LDAPEntry *le, const LDAPConstraints *cons=0) |
Use this method to perform the ADD-operation. | |
void | modify (const std::string &dn, const LDAPModList *mods, const LDAPConstraints *cons=0) |
To modify the attributes of an entry, this method can be used. | |
void | rename (const std::string &dn, const std::string &newRDN, bool delOldRDN=false, const std::string &newParentDN="", const LDAPConstraints *cons=0) |
This method performs the ModDN-operation. | |
LDAPSearchResults * | search (const std::string &base, int scope=0, const std::string &filter="objectClass=*", const StringList &attrs=StringList(), bool attrsOnly=false, const LDAPConstraints *cons=0) |
This method can be used for the sync. | |
LDAPExtResult * | extOperation (const std::string &oid, const std::string &value="", const LDAPConstraints *const =0) |
This method is for extended LDAP-Operations. | |
const std::string & | getHost () const |
int | getPort () const |
void | setConstraints (LDAPConstraints *cons) |
Change the default constraints of the connection. | |
const LDAPConstraints * | getConstraints () const |
Get the default constraints of the connection. | |
Static Public Attributes | |
static const int | SEARCH_BASE = LDAPAsynConnection::SEARCH_BASE |
Constant for the Search-Operation to indicate a Base-Level Search. | |
static const int | SEARCH_ONE = LDAPAsynConnection::SEARCH_ONE |
Constant for the Search-Operation to indicate a One-Level Search. | |
static const int | SEARCH_SUB = LDAPAsynConnection::SEARCH_SUB |
Constant for the Search-Operation to indicate a Subtree Search. |
The class represent a LDAP-Connection to perform synchronous LDAP-Operations. This provides methodes for the different LDAP-Operations. All the methods for the LDAP-operations block until all results for the operation are received or until an error occurs
|
This Constructor initializes synchronous LDAP-Connection. During execution of this constructor no network communication is performed. Just some internal data structure are initialized
|
|
Destructor.
|
|
Use this method to perform the ADD-operation.
Reimplemented from LDAPAsynConnection. |
|
Performs a simple authentication with the server.
|
|
Performs a COMPARE-operation on an entery of the destination server.
|
|
Deletes an entry from the directory. This method performs the DELETE operation on the server
Reimplemented from LDAPAsynConnection. |
|
This method is for extended LDAP-Operations.
Reimplemented from LDAPAsynConnection. |
|
Get the default constraints of the connection.
Reimplemented from LDAPAsynConnection. |
|
Reimplemented from LDAPAsynConnection. |
|
Reimplemented from LDAPAsynConnection. |
|
Initzializes a synchronous connection to a server. There is actually no communication to the server. Just the object is initialized (e.g. this method is called within the LDAPConnection(char*,int,LDAPConstraints) constructor.)
Reimplemented from LDAPAsynConnection. |
|
To modify the attributes of an entry, this method can be used.
Reimplemented from LDAPAsynConnection. |
|
This method performs the ModDN-operation. It can be used to rename or move an entry by modifing its DN.
Reimplemented from LDAPAsynConnection. |
|
This method can be used for the sync. SEARCH-operation.
Reimplemented from LDAPAsynConnection. |
|
Change the default constraints of the connection. cons cons New LDAPConstraints to use with the connection Reimplemented from LDAPAsynConnection. |
|
Start TLS on this connection. This isn't in the constructor, because it could fail (i.e. server doesn't have SSL cert, client api wasn't compiled against OpenSSL, etc.).
Reimplemented from LDAPAsynConnection. |
|
Performs the UNBIND-operation on the destination server.
Reimplemented from LDAPAsynConnection. |
|
Constant for the Search-Operation to indicate a Base-Level Search.
Reimplemented from LDAPAsynConnection. |
|
Constant for the Search-Operation to indicate a One-Level Search.
Reimplemented from LDAPAsynConnection. |
|
Constant for the Search-Operation to indicate a Subtree Search.
Reimplemented from LDAPAsynConnection. |