diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/ldapclient.h | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/ldapclient.h')
-rw-r--r-- | libkdepim/ldapclient.h | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/libkdepim/ldapclient.h b/libkdepim/ldapclient.h index 5be00e85c..5167660e2 100644 --- a/libkdepim/ldapclient.h +++ b/libkdepim/ldapclient.h @@ -23,13 +23,13 @@ #define KPIM_LDAPCLIENT_H -#include <qobject.h> -#include <qstring.h> -#include <qcstring.h> -#include <qstringlist.h> -#include <qmemarray.h> -#include <qguardedptr.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqstringlist.h> +#include <tqmemarray.h> +#include <tqguardedptr.h> +#include <tqtimer.h> #include <kio/job.h> #include <kabc/ldif.h> @@ -40,8 +40,8 @@ namespace KPIM { class LdapClient; -typedef QValueList<QByteArray> LdapAttrValue; -typedef QMap<QString,LdapAttrValue > LdapAttrMap; +typedef TQValueList<TQByteArray> LdapAttrValue; +typedef TQMap<TQString,LdapAttrValue > LdapAttrMap; class LdapServer { @@ -57,40 +57,40 @@ class LdapServer enum Security{ Sec_None, TLS, SSL }; enum Auth{ Anonymous, Simple, SASL }; - QString host() const { return mHost; } + TQString host() const { return mHost; } int port() const { return mPort; } - const QString &baseDN() const { return mBaseDN; } - const QString &user() const { return mUser; } - const QString &bindDN() const { return mBindDN; } - const QString &pwdBindDN() const { return mPwdBindDN; } + const TQString &baseDN() const { return mBaseDN; } + const TQString &user() const { return mUser; } + const TQString &bindDN() const { return mBindDN; } + const TQString &pwdBindDN() const { return mPwdBindDN; } int timeLimit() const { return mTimeLimit; } int sizeLimit() const { return mSizeLimit; } int version() const { return mVersion; } int security() const { return mSecurity; } int auth() const { return mAuth; } - const QString &mech() const { return mMech; } + const TQString &mech() const { return mMech; } - void setHost( const QString &host ) { mHost = host; } + void setHost( const TQString &host ) { mHost = host; } void setPort( int port ) { mPort = port; } - void setBaseDN( const QString &baseDN ) { mBaseDN = baseDN; } - void setUser( const QString &user ) { mUser = user; } - void setBindDN( const QString &bindDN ) { mBindDN = bindDN; } - void setPwdBindDN( const QString &pwdBindDN ) { mPwdBindDN = pwdBindDN; } + void setBaseDN( const TQString &baseDN ) { mBaseDN = baseDN; } + void setUser( const TQString &user ) { mUser = user; } + void setBindDN( const TQString &bindDN ) { mBindDN = bindDN; } + void setPwdBindDN( const TQString &pwdBindDN ) { mPwdBindDN = pwdBindDN; } void setTimeLimit( int timelimit ) { mTimeLimit = timelimit; } void setSizeLimit( int sizelimit ) { mSizeLimit = sizelimit; } void setVersion( int version ) { mVersion = version; } void setSecurity( int security ) { mSecurity = security; } //0-No, 1-TLS, 2-SSL - KDE4: add an enum to Lda void setAuth( int auth ) { mAuth = auth; } //0-Anonymous, 1-simple, 2-SASL - KDE4: add an enum to LdapCon - void setMech( const QString &mech ) { mMech = mech; } + void setMech( const TQString &mech ) { mMech = mech; } private: - QString mHost; + TQString mHost; int mPort; - QString mBaseDN; - QString mUser; - QString mBindDN; - QString mPwdBindDN; - QString mMech; + TQString mBaseDN; + TQString mUser; + TQString mBindDN; + TQString mPwdBindDN; + TQString mMech; int mTimeLimit, mSizeLimit, mVersion, mSecurity, mAuth; }; @@ -106,8 +106,8 @@ class LdapObject { public: LdapObject() - : dn( QString::null ), client( 0 ) {} - explicit LdapObject( const QString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} + : dn( TQString::null ), client( 0 ) {} + explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {} LdapObject( const LdapObject& that ) { assign( that ); } LdapObject& operator=( const LdapObject& that ) @@ -116,12 +116,12 @@ class LdapObject return *this; } - QString toString() const; + TQString toString() const; void clear(); - QString dn; - QString objectClass; + TQString dn; + TQString objectClass; LdapAttrMap attrs; LdapClient* client; @@ -144,7 +144,7 @@ class KDE_EXPORT LdapClient : public QObject Q_OBJECT public: - LdapClient( int clientNumber, QObject* parent = 0, const char* name = 0 ); + LdapClient( int clientNumber, TQObject* parent = 0, const char* name = 0 ); virtual ~LdapClient(); /*! returns true if there is a query running */ @@ -160,14 +160,14 @@ class KDE_EXPORT LdapClient : public QObject * returned, or an empty list if * all attributes are wanted */ - QStringList attrs() const { return mAttrs; } + TQStringList attrs() const { return mAttrs; } signals: /*! Emitted when the query is done */ void done(); /*! Emitted in case of error */ - void error( const QString& ); + void error( const TQString& ); /*! Emitted once for each object returned * from the query @@ -179,14 +179,14 @@ class KDE_EXPORT LdapClient : public QObject * returned, or an empty list if * all attributes are wanted */ - void setAttrs( const QStringList& attrs ); + void setAttrs( const TQStringList& attrs ); - void setScope( const QString scope ) { mScope = scope; } + void setScope( const TQString scope ) { mScope = scope; } /*! * Start the query with filter filter */ - void startQuery( const QString& filter ); + void startQuery( const TQString& filter ); /*! * Abort a running query @@ -194,21 +194,21 @@ class KDE_EXPORT LdapClient : public QObject void cancelQuery(); protected slots: - void slotData( KIO::Job*, const QByteArray &data ); - void slotInfoMessage( KIO::Job*, const QString &info ); + void slotData( KIO::Job*, const TQByteArray &data ); + void slotInfoMessage( KIO::Job*, const TQString &info ); void slotDone(); protected: void startParseLDIF(); - void parseLDIF( const QByteArray& data ); + void parseLDIF( const TQByteArray& data ); void endParseLDIF(); void finishCurrentObject(); LdapServer mServer; - QString mScope; - QStringList mAttrs; + TQString mScope; + TQStringList mAttrs; - QGuardedPtr<KIO::SimpleJob> mJob; + TQGuardedPtr<KIO::SimpleJob> mJob; bool mActive; bool mReportObjectClass; @@ -227,12 +227,12 @@ class KDE_EXPORT LdapClient : public QObject * Structure describing one result returned by a LDAP query */ struct LdapResult { - QString name; ///< full name - QStringList email; ///< emails + TQString name; ///< full name + TQStringList email; ///< emails int clientNumber; ///< for sorting in a ldap-only lookup int completionWeight; ///< for sorting in a completion list }; -typedef QValueList<LdapResult> LdapResultList; +typedef TQValueList<LdapResult> LdapResultList; /** @@ -253,16 +253,16 @@ class KDE_EXPORT LdapSearch : public QObject static void readConfig( LdapServer &server, KConfig *config, int num, bool active ); static void writeConfig( const LdapServer &server, KConfig *config, int j, bool active ); - void startSearch( const QString& txt ); + void startSearch( const TQString& txt ); void cancelSearch(); bool isAvailable() const; - QValueList< LdapClient* > clients() const { return mClients; } + TQValueList< LdapClient* > clients() const { return mClients; } signals: /// Results, assembled as "Full Name <email>" /// (This signal can be emitted many times) - void searchData( const QStringList& ); + void searchData( const TQStringList& ); /// Another form for the results, with separate fields /// (This signal can be emitted many times) void searchData( const KPIM::LdapResultList& ); @@ -270,22 +270,22 @@ class KDE_EXPORT LdapSearch : public QObject private slots: void slotLDAPResult( const KPIM::LdapObject& ); - void slotLDAPError( const QString& ); + void slotLDAPError( const TQString& ); void slotLDAPDone(); void slotDataTimer(); - void slotFileChanged( const QString& ); + void slotFileChanged( const TQString& ); private: void readConfig(); void finish(); - void makeSearchData( QStringList& ret, LdapResultList& resList ); - QValueList< LdapClient* > mClients; - QString mSearchText; - QTimer mDataTimer; + void makeSearchData( TQStringList& ret, LdapResultList& resList ); + TQValueList< LdapClient* > mClients; + TQString mSearchText; + TQTimer mDataTimer; int mActiveClients; bool mNoLDAPLookup; - QValueList< LdapObject > mResults; - QString mConfigFile; + TQValueList< LdapObject > mResults; + TQString mConfigFile; private: static KConfig *s_config; |