summaryrefslogtreecommitdiffstats
path: root/src/kvilib/irc/kvi_ircmask.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/irc/kvi_ircmask.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/irc/kvi_ircmask.h')
-rw-r--r--src/kvilib/irc/kvi_ircmask.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/kvilib/irc/kvi_ircmask.h b/src/kvilib/irc/kvi_ircmask.h
index 3c9ccf5..18d6d70 100644
--- a/src/kvilib/irc/kvi_ircmask.h
+++ b/src/kvilib/irc/kvi_ircmask.h
@@ -3,7 +3,7 @@
//=============================================================================
//
-// File : kvi_ircmask.h
+// File : kvi_irctqmask.h
// Creation date : Fri Jan 8 1999 19:50:35 by Szymon Stefanek
//
// This file is part of the KVirc irc client distribution
@@ -33,7 +33,7 @@
#include "kvi_qstring.h"
//=============================================================================
-// Irc user mask abstraction
+// Irc user tqmask abstraction
//=============================================================================
class KVILIB_API KviIrcMask : public KviHeapObject
@@ -41,47 +41,47 @@ class KVILIB_API KviIrcMask : public KviHeapObject
friend class KviIrcUserList;
friend class KviIrcUserChanList;
private:
- QString m_szNick;
- QString m_szUser;
- QString m_szHost;
- static QString m_szWild;
+ TQString m_szNick;
+ TQString m_szUser;
+ TQString m_szHost;
+ static TQString m_szWild;
public:
// Sets the nick for this user.<br>
// If szNick is NULL or it points to an empty string the nick is set to "*".<br>
- void setNick(const QString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; };
+ void setNick(const TQString &szNick){ m_szNick = szNick.isEmpty() ? m_szWild : szNick; };
// Sets the username for this user.<br>
// If szUsername is NULL or it points to an empty string the username is set to "*".<br>
- void setUsername(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
- void setUser(const QString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
+ void setUsername(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
+ void setUser(const TQString &szUser){ m_szUser = szUser.isEmpty() ? m_szWild : szUser; };
// Sets the host for this user.<br>
// If szHost is NULL or it points to an empty string the host is set to "*".<br>
- void setHost(const QString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; };
- // Sets the host , nick and username extracting it from an irc mask:<br>
+ void setHost(const TQString &szHost){ m_szHost = szHost.isEmpty() ? m_szWild : szHost; };
+ // Sets the host , nick and username extracting it from an irc tqmask:<br>
// nick!user@host<br>
- // The mask is terminated by end-of string null character or a character equal to c in the string.<br>
- // Returns the pointer to the end of the mask in the szMask string.(c or null-terminator)<br>
- //const char * setMask(const QString &szMask,char c=' ');
- // Sets the host , nick and username extracting it from an userhost mask:<br>
+ // The tqmask is terminated by end-of string null character or a character equal to c in the string.<br>
+ // Returns the pointer to the end of the tqmask in the szMask string.(c or null-terminator)<br>
+ //const char * setMask(const TQString &szMask,char c=' ');
+ // Sets the host , nick and username extracting it from an userhost tqmask:<br>
// nick[*]=<+|->user@host<br>
- // The mask is terminated by end-of string null char or a space character.<br>
+ // The tqmask is terminated by end-of string null char or a space character.<br>
// Returns the pointer to the next non-space char in the szMask string or to the null-terminator<br>
- // If there are no more masks avaiable.
+ // If there are no more tqmasks avaiable.
// WARNING : the szMask pointer can NOT be NULL
- //const char *setUserhostMask(const QString &szMask);
+ //const char *setUserhostMask(const TQString &szMask);
// Returns the nick of this user.<br>
// In the worst case you get a string == "*"<br>
- const QString &nick() const { return m_szNick; };
+ const TQString &nick() const { return m_szNick; };
// DEPRECATED!
- const QString &username() const { return m_szUser; };
- const QString &user() const { return m_szUser; };
- const QString &host() const { return m_szHost; };
+ const TQString &username() const { return m_szUser; };
+ const TQString &user() const { return m_szUser; };
+ const TQString &host() const { return m_szHost; };
bool hasUser() const { return !(m_szUser.isEmpty() || (m_szUser == m_szWild)); };
bool hasHost() const { return !(m_szHost.isEmpty() || (m_szHost == m_szWild)); };
bool hasNumericHost() const;
- // Retuns in szMask the specified (if possible) mask of this user.<br>
- // If the host or username are not known , the mask may contain less information
+ // Retuns in szMask the specified (if possible) tqmask of this user.<br>
+ // If the host or username are not known , the tqmask may contain less information
// than requested.<br>
enum MaskType
@@ -108,7 +108,7 @@ public:
UserLargeNet = 19, // 19 : *!~user@*.host.top (*!~user@XXX.XXX.*)
NickCleanUserLargeNet = 20, // 20 : nick!*user@*.host.top (nick!*user@XXX.XXX.*)
CleanUserLargeNet = 21, // 21 : *!*user@*.host.top (*!user@*XXX.XXX.*)
- // smart versions of the masks 17-21 that try take care of masked ip addresses
+ // smart versions of the tqmasks 17-21 that try take care of tqmasked ip addresses
// in the form xxx.xxx.INVALID-TOP-MASK
NickUserSmartNet = 22, // 22 : nick!~user@*.host.top (nick!~user@XXX.XXX.*)
NickSmartNet = 23, // 23 : nick!*@*.host.top (nick!*@XXX.XXX.*)
@@ -117,7 +117,7 @@ public:
CleanUserSmartNet = 26 // 26 : *!*user@*.host.top (*!user@*XXX.XXX.*)
};
- void mask(QString &szMask,MaskType eMaskType = NickCleanUserHost) const;
+ void tqmask(TQString &szMask,MaskType eMaskType = NickCleanUserHost) const;
bool hasWildNick();
// Wild external matches (this and external are wild)
@@ -125,35 +125,35 @@ public:
// bool matches(const char *szMask);
// // passing 0 as one of params here means that it is a match by default
// bool matches(const char *nick,const char *user,const char *host);
- bool matches(const KviIrcMask &mask) const;
+ bool matches(const KviIrcMask &tqmask) const;
// Fixed external matches (this is wild , external is fixed)
- bool matchesFixed(const QString &nick,const QString &user,const QString &host) const;
-// bool matchesFixed(const QString &szMask) const;
- bool matchesFixed(const KviIrcMask &mask) const;
+ bool matchesFixed(const TQString &nick,const TQString &user,const TQString &host) const;
+// bool matchesFixed(const TQString &szMask) const;
+ bool matchesFixed(const KviIrcMask &tqmask) const;
// Fixed internal matches (this is fixed , external is wild)
- //bool matchedBy(const QString &szMask) const;
- bool matchedBy(const KviIrcMask &mask) const { return mask.matchesFixed(*this); };
+ //bool matchedBy(const TQString &szMask) const;
+ bool matchedBy(const KviIrcMask &tqmask) const { return tqmask.matchesFixed(*this); };
int nonWildChars();
bool operator==(const KviIrcMask &user);
public:
- // Constructs an empty mask (*!*@*)
+ // Constructs an empty tqmask (*!*@*)
KviIrcMask();
- // Constructs this KviIrcMask object from a string mask
- KviIrcMask(const QString &szMask);
+ // Constructs this KviIrcMask object from a string tqmask
+ KviIrcMask(const TQString &szMask);
// Carbon copy
KviIrcMask(const KviIrcMask &ircUser)
: m_szNick(ircUser.m_szNick), m_szUser(ircUser.m_szUser), m_szHost(ircUser.m_szHost) {};
- KviIrcMask(const QString &nick,const QString &user,const QString &host)
+ KviIrcMask(const TQString &nick,const TQString &user,const TQString &host)
: m_szNick(nick), m_szUser(user), m_szHost(host) {};
private:
int getIpDomainMaskLen() const;
- QString getHostDomainMask() const;
+ TQString getHostDomainMask() const;
int getLargeIpDomainMaskLen() const;
- QString getLargeHostDomainMask() const;
+ TQString getLargeHostDomainMask() const;
// this is just a GUESS and must be called AFTER making sure that it is NOT a plain numeric IP
bool hasMaskedIp() const;
};