22 #ifndef KABC_LDAPCLIENT_H
23 #define KABC_LDAPCLIENT_H
28 #include <tqcstring.h>
29 #include <tqstringlist.h>
30 #include <tqmemarray.h>
31 #include <tqguardedptr.h>
34 #include <tdeio/job.h>
39 typedef TQValueList<TQByteArray> LdapAttrValue;
40 typedef TQMap<TQString,LdapAttrValue > LdapAttrMap;
53 : dn( TQString::null ), client( 0 ) {}
63 TQString toString()
const;
90 LdapClient( TQObject* parent = 0,
const char* name = 0 );
112 void setHost(
const TQString& host );
113 TQString host()
const {
return mHost; }
119 void setPort(
const TQString& port );
120 TQString port()
const {
return mPort; }
125 void setBase(
const TQString& base );
126 TQString base()
const {
return mBase; }
131 void setBindDN(
const TQString& bindDN );
132 TQString bindDN()
const;
137 void setPwdBindDN(
const TQString& pwdBindDN );
138 TQString pwdBindDN()
const;
144 void setAttrs(
const TQStringList& attrs );
145 TQStringList attrs()
const {
return mAttrs; }
147 void setScope(
const TQString scope ) { mScope = scope; }
152 void startQuery(
const TQString& filter );
160 void slotData( TDEIO::Job*,
const TQByteArray &data );
161 void slotInfoMessage( TDEIO::Job*,
const TQString &info );
165 void startParseLDIF();
166 void parseLDIF(
const TQByteArray& data );
175 TQGuardedPtr<TDEIO::SimpleJob> mJob;
178 LdapObject mCurrentObject;
180 TQCString mLastAttrName;
181 TQCString mLastAttrValue;
185 class LdapClientPrivate;
186 LdapClientPrivate* d;
197 typedef TQValueList<LdapResult> LdapResultList;
214 void startSearch(
const TQString& txt );
216 bool isAvailable()
const;
229 void slotLDAPError(
const TQString& );
231 void slotDataTimer();
235 void makeSearchData( TQStringList& ret, LdapResultList& resList );
236 TQValueList< LdapClient* > mClients;
237 TQString mSearchText;
241 TQValueList< LdapObject > mResults;
244 class LdapSearchPrivate* d;
void error(const TQString &)
void result(const TDEABC::LdapObject &)
void searchData(const TQStringList &)
Results, assembled as "Full Name <email>" (This signal can be emitted many times)
void searchData(const TDEABC::LdapResultList &)
Another form for the results, with separate fields (This signal can be emitted many times)
static data, shared by ALL addressee objects
Structure describing one result returned by a LDAP query.
int clientNumber
for sorting