#include <LDAPUrl.h>
Public Member Functions | |
| LDAPUrl (const std::string &url="") | |
| Create a new object from a string that contains a LDAP-Url. | |
| ~LDAPUrl () | |
| Destructor. | |
| int | getPort () const |
| void | setPort (int port) |
| Set the port value of the URL. | |
| int | getScope () const |
| void | setScope (const std::string &scope) |
| Set the Scope part of the URL. | |
| const std::string & | getURLString () const |
| void | setURLString (const std::string &url) |
| Set the URL member attribute. | |
| const std::string & | getHost () const |
| void | setHost (const std::string &host) |
| Set the Host part of the URL. | |
| const std::string & | getScheme () const |
| void | setScheme (const std::string &scheme) |
| Set the Protocol Scheme of the URL. | |
| const std::string & | getDN () const |
| void | setDN (const std::string &dn) |
| Set the DN part of the URL. | |
| const std::string & | getFilter () const |
| void | setFilter (const std::string &filter) |
| Set the Filter part of the URL. | |
| const StringList & | getAttrs () const |
| void | setAttrs (const StringList &attrs) |
| Set the Attributes part of the URL. | |
| void | setExtensions (const StringList &ext) |
| const StringList & | getExtensions () const |
| void | percentDecode (const std::string &src, std::string &dest) |
| Percent-decode a string. | |
| void | percentEncode (const std::string &src, std::string &dest, int flags=0) const |
| Percent-encoded a string. | |
Protected Types | |
| enum | mode { base, attrs, scope, filter, extensions } |
Protected Member Functions | |
| void | parseUrl () |
| Split the url string that is associated with this Object into it components. | |
| void | components2Url () const |
| Generate an URL string from the components that were set with the various set. | |
| void | string2list (const std::string &src, StringList &sl, bool percentDecode=false) |
Protected Attributes | |
| bool | regenerate |
| int | m_Port |
| int | m_Scope |
| std::string | m_Host |
| std::string | m_DN |
| std::string | m_Filter |
| StringList | m_Attrs |
| StringList | m_Extensions |
| std::string | m_urlString |
| std::string | m_Scheme |
LDAP-URLs are defined in RFC1959 and have the following format:
ldap://host:port/baseDN[?attr[?scope[?filter]]]
enum LDAPUrl::mode [protected] |
| LDAPUrl::LDAPUrl | ( | const std::string & | url = "" |
) |
Create a new object from a string that contains a LDAP-Url.
| url | The URL String |
| LDAPUrl::~LDAPUrl | ( | ) |
Destructor.
| int LDAPUrl::getPort | ( | ) | const |
| void LDAPUrl::setPort | ( | int | port | ) |
Set the port value of the URL.
| dn | The port value |
| int LDAPUrl::getScope | ( | ) | const |
| void LDAPUrl::setScope | ( | const std::string & | scope | ) |
Set the Scope part of the URL.
| scope | The new scope |
| const string & LDAPUrl::getURLString | ( | ) | const |
| void LDAPUrl::setURLString | ( | const std::string & | url | ) |
Set the URL member attribute.
| url | The URL String |
| const string & LDAPUrl::getHost | ( | ) | const |
| void LDAPUrl::setHost | ( | const std::string & | host | ) |
Set the Host part of the URL.
| host | The new host part |
| const std::string & LDAPUrl::getScheme | ( | ) | const |
| void LDAPUrl::setScheme | ( | const std::string & | scheme | ) |
Set the Protocol Scheme of the URL.
| host | The Protcol scheme. Allowed values are ldap,ldapi,ldaps and cldap |
| const string & LDAPUrl::getDN | ( | ) | const |
| void LDAPUrl::setDN | ( | const std::string & | dn | ) |
Set the DN part of the URL.
| dn | The new DN part |
| const string & LDAPUrl::getFilter | ( | ) | const |
| void LDAPUrl::setFilter | ( | const std::string & | filter | ) |
Set the Filter part of the URL.
| filter | The new Filter |
| const StringList & LDAPUrl::getAttrs | ( | ) | const |
| void LDAPUrl::setAttrs | ( | const StringList & | attrs | ) |
| void LDAPUrl::setExtensions | ( | const StringList & | ext | ) |
| const StringList & LDAPUrl::getExtensions | ( | ) | const |
| void LDAPUrl::percentDecode | ( | const std::string & | src, | |
| std::string & | dest | |||
| ) |
Percent-decode a string.
| src | The string that is to be decoded | |
| dest | The decoded result string |
| void LDAPUrl::percentEncode | ( | const std::string & | src, | |
| std::string & | dest, | |||
| int | flags = 0 | |||
| ) | const |
Percent-encoded a string.
| src | The string that is to be encoded | |
| dest | The encoded result string | |
| flags |
| void LDAPUrl::parseUrl | ( | ) | [protected] |
Split the url string that is associated with this Object into it components.
The compontens of the URL can be access via the get...() methods. (this function is mostly for internal use and gets called automatically whenever necessary)
| void LDAPUrl::components2Url | ( | ) | const [protected] |
Generate an URL string from the components that were set with the various set.
..() methods (this function is mostly for internal use and gets called automatically whenever necessary)
| void LDAPUrl::string2list | ( | const std::string & | src, | |
| StringList & | sl, | |||
| bool | percentDecode = false | |||
| ) | [protected] |
bool LDAPUrl::regenerate [mutable, protected] |
int LDAPUrl::m_Port [protected] |
int LDAPUrl::m_Scope [protected] |
std::string LDAPUrl::m_Host [protected] |
std::string LDAPUrl::m_DN [protected] |
std::string LDAPUrl::m_Filter [protected] |
StringList LDAPUrl::m_Attrs [protected] |
StringList LDAPUrl::m_Extensions [protected] |
std::string LDAPUrl::m_urlString [mutable, protected] |
std::string LDAPUrl::m_Scheme [protected] |
1.5.5