2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
14 LDAPUrl::LDAPUrl(const char *url){
15 DEBUG(LDAP_DEBUG_CONSTRUCT, "LDAPUrl::LDAPUrl()" << endl);
16 DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER,
17 " url:" << url << endl);
18 if (ldap_is_ldap_url(url)){
20 ldap_url_parse(url, &urlDesc);
21 if(urlDesc->lud_host){
22 m_Host = string(urlDesc->lud_host);
24 m_Port = urlDesc->lud_port;
26 m_DN = string(urlDesc->lud_dn);
28 m_Attrs = StringList(urlDesc->lud_attrs);
29 m_Scope = urlDesc->lud_scope;
30 if(urlDesc->lud_filter){
31 m_Filter = string(urlDesc->lud_filter);
35 m_urlString= string(url);
36 ldap_free_urldesc(urlDesc);
38 DEBUG(LDAP_DEBUG_TRACE," noUrl:" << url << endl);
43 DEBUG(LDAP_DEBUG_DESTROY, "LDAPUrl::~LDAPUrl()" << endl);
47 int LDAPUrl::getPort() const {
51 int LDAPUrl::getScope() const {
55 const string& LDAPUrl::getURLString() const {
59 const string& LDAPUrl::getHost() const {
63 const string& LDAPUrl::getDN() const {
67 const string& LDAPUrl::getFilter() const {
71 const StringList& LDAPUrl::getAttrs() const {