22 #include <tqstringlist.h>
27 using namespace TDEABC;
35 :
KURL(_url), m_extensions()
38 if ( !TQDir::isRelativePath(m_dn) )
50 if ( !TQDir::isRelativePath(m_dn) )
61 return m_extensions.contains( key );
66 TQMap<TQString, Extension>::const_iterator it;
68 it = m_extensions.find( key );
69 if ( it != m_extensions.constEnd() )
84 critical = ext.critical;
90 m_extensions[ key ] = ext;
98 ext.critical = critical;
104 m_extensions.remove( key );
111 TQMap<TQString, Extension>::iterator it;
115 if ( m_attributes.count() > 0 ) q += m_attributes.join(
",");
133 if ( m_filter !=
"(objectClass=*)" && !m_filter.isEmpty() )
138 for ( it = m_extensions.begin(); it != m_extensions.end(); ++it ) {
139 if ( it.data().critical ) q +=
"!";
141 if ( !it.data().value.isEmpty() )
142 q +=
"=" + it.data().value;
145 while ( q.endsWith(
"?") || q.endsWith(
",") )
146 q.remove( q.length() - 1, 1 );
152 void LDAPUrl::parseQuery()
155 TQStringList extensions;
156 TQString q =
query();
158 if (q.startsWith(
"?"))
164 m_attributes.clear();
166 m_filter =
"(objectClass=*)";
167 m_extensions.clear();
170 for ( TQStringList::Iterator it = url_items.begin(); it != url_items.end(); ++it, i++ ) {
176 if ( (*it) ==
"sub" ) m_scope = Sub;
else
177 if ( (*it) ==
"one") m_scope = One;
189 for ( TQStringList::Iterator it = extensions.begin(); it != extensions.end(); ++it ) {
190 ext.critical =
false;
193 if ( name.startsWith(
"!") ) {
197 kdDebug(5700) <<
"LDAPUrl extensions name= " << name <<
" value: " << value <<
endl;
198 ext.value = value.replace(
"%2",
"," );