summaryrefslogtreecommitdiffstats
path: root/src/kvilib/ext/kvi_regusersdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/ext/kvi_regusersdb.h')
-rw-r--r--src/kvilib/ext/kvi_regusersdb.h115
1 files changed, 58 insertions, 57 deletions
diff --git a/src/kvilib/ext/kvi_regusersdb.h b/src/kvilib/ext/kvi_regusersdb.h
index 06152f24..0cfd6c71 100644
--- a/src/kvilib/ext/kvi_regusersdb.h
+++ b/src/kvilib/ext/kvi_regusersdb.h
@@ -27,7 +27,7 @@
//
// REGISTERED USERS
//
-// Here we manage users resigered by mask and their (generic!) properties
+// Here we manage users resigered by tqmask and their (generic!) properties
//
#include "kvi_settings.h"
@@ -38,7 +38,7 @@
#include "kvi_pointerlist.h"
#include "kvi_pointerhashtable.h"
-#include <qobject.h>
+#include <tqobject.h>
class KviRegisteredUserDataBase;
@@ -64,20 +64,20 @@ public:
Dcc=32
};
- KviRegisteredUser(const QString &name);
+ KviRegisteredUser(const TQString &name);
~KviRegisteredUser();
private:
int m_iIgnoreFlags;
bool m_bIgnoreEnabled;
- QString m_szName;
- QString m_szGroup;
- KviPointerHashTable<QString,QString> * m_pPropertyDict; // owned properties
- KviPointerList<KviIrcMask> * m_pMaskList; // owned masks
+ TQString m_szName;
+ TQString m_szGroup;
+ KviPointerHashTable<TQString,TQString> * m_pPropertyDict; // owned properties
+ KviPointerList<KviIrcMask> * m_pMaskList; // owned tqmasks
protected:
- // mask ownership is transferred! (always!) returns false if the mask was already there
- bool addMask(KviIrcMask * mask);
- bool removeMask(KviIrcMask * mask);
- KviIrcMask * findMask(const KviIrcMask &mask);
+ // tqmask ownership is transferred! (always!) returns false if the tqmask was already there
+ bool addMask(KviIrcMask * tqmask);
+ bool removeMask(KviIrcMask * tqmask);
+ KviIrcMask * findMask(const KviIrcMask &tqmask);
public:
int ignoreFlags() { return m_iIgnoreFlags; };
void setIgnoreFlags(int flags) {m_iIgnoreFlags=flags; };
@@ -85,24 +85,24 @@ public:
void setIgnoreEnabled(bool enabled) {m_bIgnoreEnabled=enabled;};
bool isIgnoreEnabledFor(IgnoreFlags flag);
- const QString &name(){ return m_szName; };
- bool matches(const KviIrcMask &mask);
- bool matchesFixed(const KviIrcMask &mask);
- bool matchesFixed(const QString &nick,const QString &user,const QString &host);
+ const TQString &name(){ return m_szName; };
+ bool matches(const KviIrcMask &tqmask);
+ bool matchesFixed(const KviIrcMask &tqmask);
+ bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host);
- void setProperty(const QString &name,const QString &value);
- void setProperty(const QString &name,bool value);
+ void setProperty(const TQString &name,const TQString &value);
+ void setProperty(const TQString &name,bool value);
- void setGroup(const QString &name) { m_szGroup=name; };
- const QString &group(){ return m_szGroup; };
+ void setGroup(const TQString &name) { m_szGroup=name; };
+ const TQString &group(){ return m_szGroup; };
- const QString & getProperty(const QString &name); // returns 0 if the property is not there
- bool getProperty(const QString &name,QString &value); // returns false if the property is not there
- bool getBoolProperty(const QString &name,bool def=FALSE); // returns true if the property is there and is true
+ const TQString & getProperty(const TQString &name); // returns 0 if the property is not there
+ bool getProperty(const TQString &name,TQString &value); // returns false if the property is not there
+ bool getBoolProperty(const TQString &name,bool def=FALSE); // returns true if the property is there and is true
// the propertyDict may be 0!
- KviPointerHashTable<QString,QString> * propertyDict(){ return m_pPropertyDict; };
- // this is never zero (but may contain no masks)
- KviPointerList<KviIrcMask> * maskList(){ return m_pMaskList; };
+ KviPointerHashTable<TQString,TQString> * propertyDict(){ return m_pPropertyDict; };
+ // this is never zero (but may contain no tqmasks)
+ KviPointerList<KviIrcMask> * tqmaskList(){ return m_pMaskList; };
};
//============================================================================================================
@@ -114,13 +114,13 @@ class KVILIB_API KviRegisteredUserGroup : public KviHeapObject
{
friend class KviRegisteredUserDataBase;
public:
- KviRegisteredUserGroup(const QString &name);
+ KviRegisteredUserGroup(const TQString &name);
~KviRegisteredUserGroup();
- void setName(const QString &name) { m_szName=name; };
- const QString &name(){ return m_szName; };
+ void setName(const TQString &name) { m_szName=name; };
+ const TQString &name(){ return m_szName; };
private:
- QString m_szName;
+ TQString m_szName;
};
//============================================================================================================
//
@@ -139,7 +139,7 @@ public:
public:
int nonWildChars(){ return m_iMaskNonWildChars; };
KviRegisteredUser * user(){ return m_pUser; };
- KviIrcMask * mask(){ return m_pMask; };
+ KviIrcMask * tqmask(){ return m_pMask; };
};
typedef KviPointerList<KviRegisteredMask> KviRegisteredMaskList;
@@ -149,51 +149,52 @@ typedef KviPointerList<KviRegisteredMask> KviRegisteredMaskList;
// KviRegisteredUsersDb
//
// Manages a set of KviRegisteredUser instances stored in the m_pUserDict dictionary
-// The users are identified by masks stored in m_pMaskDict and m_pWildMaskList
+// The users are identified by tqmasks stored in m_pMaskDict and m_pWildMaskList
// m_pMaskDict contains lists of non wild-nick KviRegisteredMask that point to users
// m_pWildMaskList is a list of wild-nick KviRegisteredMask that point to users
//
-class KVILIB_API KviRegisteredUserDataBase : public QObject
+class KVILIB_API KviRegisteredUserDataBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KviRegisteredUserDataBase();
~KviRegisteredUserDataBase();
private:
- KviPointerHashTable<QString,KviRegisteredUser> * m_pUserDict; // unique namespace, owns the objects, does not copy keys
- KviPointerHashTable<QString,KviRegisteredMaskList> * m_pMaskDict; // owns the objects, copies the keys
+ KviPointerHashTable<TQString,KviRegisteredUser> * m_pUserDict; // unique namespace, owns the objects, does not copy keys
+ KviPointerHashTable<TQString,KviRegisteredMaskList> * m_pMaskDict; // owns the objects, copies the keys
KviRegisteredMaskList * m_pWildMaskList; // owns the objects
- KviPointerHashTable<QString,KviRegisteredUserGroup>* m_pGroupDict;
+ KviPointerHashTable<TQString,KviRegisteredUserGroup>* m_pGroupDict;
public:
void copyFrom(KviRegisteredUserDataBase * db);
- KviRegisteredUser * addUser(const QString &name); // returns 0 if already there
- KviRegisteredUser * getUser(const QString &name); // returns existing or adds
- bool removeUser(const QString &name);
- bool removeGroup(const QString &name);
- KviRegisteredUser * findUserByName(const QString &name){ return m_pUserDict->find(name); };
- // mask must be allocated on the heap and the ownership is transferred!
- // returns non zero if there is already an user with this mask (returns the pointer to it!)
- KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * mask);
- bool removeMaskByPointer(KviIrcMask * mask);
- bool removeMask(const KviIrcMask &mask);
- KviRegisteredUser * findMatchingUser(const QString &nick,const QString &user,const QString &host);
- KviRegisteredUser * findUserWithMask(const KviIrcMask &mask);
- KviRegisteredMask * findExactMask(const KviIrcMask &mask);
- KviRegisteredMask * findMatchingMask(const QString &nick,const QString &user,const QString &host);
+ KviRegisteredUser * addUser(const TQString &name); // returns 0 if already there
+ KviRegisteredUser * getUser(const TQString &name); // returns existing or adds
+ bool removeUser(const TQString &name);
+ bool removeGroup(const TQString &name);
+ KviRegisteredUser * findUserByName(const TQString &name){ return m_pUserDict->tqfind(name); };
+ // tqmask must be allocated on the heap and the ownership is transferred!
+ // returns non zero if there is already an user with this tqmask (returns the pointer to it!)
+ KviRegisteredUser * addMask(KviRegisteredUser * u,KviIrcMask * tqmask);
+ bool removeMaskByPointer(KviIrcMask * tqmask);
+ bool removeMask(const KviIrcMask &tqmask);
+ KviRegisteredUser * findMatchingUser(const TQString &nick,const TQString &user,const TQString &host);
+ KviRegisteredUser * findUserWithMask(const KviIrcMask &tqmask);
+ KviRegisteredMask * findExactMask(const KviIrcMask &tqmask);
+ KviRegisteredMask * findMatchingMask(const TQString &nick,const TQString &user,const TQString &host);
//Only used in few places (actually one) of the code, but lot of times;perfect for inlining...
//bool isIgnoredUser(const char * nick,const char * user,const char * host);
- void load(const QString &filename);
- void save(const QString &filename);
+ void load(const TQString &filename);
+ void save(const TQString &filename);
- KviPointerHashTable<QString,KviRegisteredUser> * userDict(){ return m_pUserDict; };
- KviPointerHashTable<QString,KviRegisteredUserGroup>* groupDict() { return m_pGroupDict; };
+ KviPointerHashTable<TQString,KviRegisteredUser> * userDict(){ return m_pUserDict; };
+ KviPointerHashTable<TQString,KviRegisteredUserGroup>* groupDict() { return m_pGroupDict; };
- KviRegisteredUserGroup* addGroup(const QString &name);
+ KviRegisteredUserGroup* addGroup(const TQString &name);
signals:
- void userRemoved(const QString&);
- void userChanged(const QString&);
- void userAdded (const QString&);
+ void userRemoved(const TQString&);
+ void userChanged(const TQString&);
+ void userAdded (const TQString&);
void databaseCleared();
};