From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/jabber/libiris/iris/include/im.h | 62 +++++++++++----------- .../protocols/jabber/libiris/iris/include/xmpp.h | 46 +++++++++------- 2 files changed, 58 insertions(+), 50 deletions(-) (limited to 'kopete/protocols/jabber/libiris/iris/include') diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h index f4905057..12b9ad55 100644 --- a/kopete/protocols/jabber/libiris/iris/include/im.h +++ b/kopete/protocols/jabber/libiris/iris/include/im.h @@ -136,11 +136,11 @@ namespace XMPP SubType value; }; - class Status + class tqStatus { public: - Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true); - ~Status(); + tqStatus(const TQString &show="", const TQString &status="", int priority=0, bool available=true); + ~tqStatus(); int priority() const; const TQString & show() const; @@ -162,7 +162,7 @@ namespace XMPP void setPriority(int); void setShow(const TQString &); - void setStatus(const TQString &); + void settqStatus(const TQString &); void setTimeStamp(const TQDateTime &); void setKeyID(const TQString &); void setIsAvailable(bool); @@ -197,19 +197,19 @@ namespace XMPP class Resource { public: - Resource(const TQString &name="", const Status &s=Status()); + Resource(const TQString &name="", const tqStatus &s=tqStatus()); ~Resource(); const TQString & name() const; int priority() const; - const Status & status() const; + const tqStatus & status() const; void setName(const TQString &); - void setStatus(const Status &); + void settqStatus(const tqStatus &); private: TQString v_name; - Status v_status; + tqStatus v_status; class ResourcePrivate *d; }; @@ -220,10 +220,10 @@ namespace XMPP ResourceList(); ~ResourceList(); - ResourceList::Iterator find(const TQString &); + ResourceList::Iterator tqfind(const TQString &); ResourceList::Iterator priority(); - ResourceList::ConstIterator find(const TQString &) const; + ResourceList::ConstIterator tqfind(const TQString &) const; ResourceList::ConstIterator priority() const; private: @@ -273,8 +273,8 @@ namespace XMPP Roster(); ~Roster(); - Roster::Iterator find(const Jid &); - Roster::ConstIterator find(const Jid &) const; + Roster::Iterator tqfind(const Jid &); + Roster::ConstIterator tqfind(const Jid &) const; private: class RosterPrivate *d; @@ -492,16 +492,17 @@ namespace XMPP class JidLinkManager; class FileTransferManager; - class Task : public QObject + class Task : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { ErrDisc }; - Task(Task *parent); + Task(Task *tqparent); Task(Client *, bool isRoot); virtual ~Task(); - Task *parent() const; + Task *tqparent() const; Client *client() const; TQDomDocument *doc() const; TQString id() const; @@ -539,12 +540,13 @@ namespace XMPP TaskPrivate *d; }; - class Client : public QObject + class Client : public TQObject { Q_OBJECT + TQ_OBJECT public: - Client(TQObject *parent=0); + Client(TQObject *tqparent=0); ~Client(); bool isActive() const; @@ -568,7 +570,7 @@ namespace XMPP void rosterRequest(); void sendMessage(const Message &); void sendSubscription(const Jid &, const TQString &); - void setPresence(const Status &); + void setPresence(const tqStatus &); void debug(const TQString &); TQString genUniqueId(); @@ -608,8 +610,8 @@ namespace XMPP bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick); bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password); - void groupChatSetStatus(const TQString &host, const TQString &room, const Status &); - void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &); + void groupChatSettqStatus(const TQString &host, const TQString &room, const tqStatus &); + void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const tqStatus &); void groupChatLeave(const TQString &host, const TQString &room); signals: @@ -630,7 +632,7 @@ namespace XMPP void xmlOutgoing(const TQString &); void groupChatJoined(const Jid &); void groupChatLeft(const Jid &); - void groupChatPresence(const Jid &, const Status &); + void groupChatPresence(const Jid &, const tqStatus &); void groupChatError(const Jid &, int, const TQString &); void incomingJidLink(); @@ -639,7 +641,7 @@ namespace XMPP //void streamConnected(); //void streamHandshaken(); //void streamError(const StreamError &); - //void streamSSLCertificateReady(const QSSLCert &); + //void streamSSLCertificateReady(const TQSSLCert &); //void streamCloseFinished(); void streamError(int); void streamReadyRead(); @@ -650,7 +652,7 @@ namespace XMPP // basic daemons void ppSubscription(const Jid &, const TQString &); - void ppPresence(const Jid &, const Status &); + void ppPresence(const Jid &, const tqStatus &); void pmMessage(const Message &); void prRoster(const Roster &); @@ -664,8 +666,8 @@ namespace XMPP void distribute(const TQDomElement &); void importRoster(const Roster &); void importRosterItem(const RosterItem &); - void updateSelfPresence(const Jid &, const Status &); - void updatePresence(LiveRosterItem *, const Jid &, const Status &); + void updateSelfPresence(const Jid &, const tqStatus &); + void updatePresence(LiveRosterItem *, const Jid &, const tqStatus &); class ClientPrivate; ClientPrivate *d; @@ -687,15 +689,15 @@ namespace XMPP ResourceList::ConstIterator priority() const; bool isAvailable() const; - const Status & lastUnavailableStatus() const; + const tqStatus & lastUnavailabletqStatus() const; bool flagForDelete() const; - void setLastUnavailableStatus(const Status &); + void setLastUnavailabletqStatus(const tqStatus &); void setFlagForDelete(bool); private: ResourceList v_resourceList; - Status v_lastUnavailableStatus; + tqStatus v_lastUnavailabletqStatus; bool v_flagForDelete; class LiveRosterItemPrivate; @@ -709,8 +711,8 @@ namespace XMPP ~LiveRoster(); void flagAllForDelete(); - LiveRoster::Iterator find(const Jid &, bool compareRes=true); - LiveRoster::ConstIterator find(const Jid &, bool compareRes=true) const; + LiveRoster::Iterator tqfind(const Jid &, bool compareRes=true); + LiveRoster::ConstIterator tqfind(const Jid &, bool compareRes=true) const; private: class LiveRosterPrivate; diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h index 12d87d18..a59a4827 100644 --- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h +++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h @@ -60,11 +60,12 @@ namespace XMPP void setDebug(Debug *); - class Connector : public QObject + class Connector : public TQObject { Q_OBJECT + TQ_OBJECT public: - Connector(TQObject *parent=0); + Connector(TQObject *tqparent=0); virtual ~Connector(); virtual void connectToServer(const TQString &server)=0; @@ -74,7 +75,7 @@ namespace XMPP bool useSSL() const; bool havePeerAddress() const; TQHostAddress peerAddress() const; - Q_UINT16 peerPort() const; + TQ_UINT16 peerPort() const; signals: void connected(); @@ -83,21 +84,22 @@ namespace XMPP protected: void setUseSSL(bool b); void setPeerAddressNone(); - void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, TQ_UINT16 port); private: bool ssl; bool haveaddr; TQHostAddress addr; - Q_UINT16 port; + TQ_UINT16 port; }; class AdvancedConnector : public Connector { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream }; - AdvancedConnector(TQObject *parent=0); + AdvancedConnector(TQObject *tqparent=0); virtual ~AdvancedConnector(); class Proxy @@ -109,28 +111,28 @@ namespace XMPP int type() const; TQString host() const; - Q_UINT16 port() const; + TQ_UINT16 port() const; TQString url() const; TQString user() const; TQString pass() const; int pollInterval() const; - void setHttpConnect(const TQString &host, Q_UINT16 port); - void setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url); - void setSocks(const TQString &host, Q_UINT16 port); + void setHttpConnect(const TQString &host, TQ_UINT16 port); + void setHttpPoll(const TQString &host, TQ_UINT16 port, const TQString &url); + void setSocks(const TQString &host, TQ_UINT16 port); void setUserPass(const TQString &user, const TQString &pass); void setPollInterval(int secs); private: int t; TQString v_host, v_url; - Q_UINT16 v_port; + TQ_UINT16 v_port; TQString v_user, v_pass; int v_poll; }; void setProxy(const Proxy &proxy); - void setOptHostPort(const TQString &host, Q_UINT16 port); + void setOptHostPort(const TQString &host, TQ_UINT16 port); void setOptProbe(bool); void setOptSSL(bool); @@ -166,11 +168,12 @@ namespace XMPP void tryNextSrv(); }; - class TLSHandler : public QObject + class TLSHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: - TLSHandler(TQObject *parent=0); + TLSHandler(TQObject *tqparent=0); virtual ~TLSHandler(); virtual void reset()=0; @@ -189,8 +192,9 @@ namespace XMPP class QCATLSHandler : public TLSHandler { Q_OBJECT + TQ_OBJECT public: - QCATLSHandler(QCA::TLS *parent); + QCATLSHandler(QCA::TLS *tqparent); ~QCATLSHandler(); QCA::TLS *tls() const; @@ -353,9 +357,10 @@ namespace XMPP Private *d; }; - class Stream : public QObject + class Stream : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Error { ErrParse, ErrProtocol, ErrStream, ErrCustom = 10 }; enum StreamCond { @@ -370,7 +375,7 @@ namespace XMPP SystemShutdown }; - Stream(TQObject *parent=0); + Stream(TQObject *tqparent=0); virtual ~Stream(); virtual TQDomDocument & doc() const=0; @@ -404,6 +409,7 @@ namespace XMPP class ClientStream : public Stream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnection = ErrCustom, // Connection error, ask Connector-subclass what's up @@ -450,8 +456,8 @@ namespace XMPP BindConflict // resource in-use }; - ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0); - ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *parent=0); // server + ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *tqparent=0); + ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *tqparent=0); // server ~ClientStream(); Jid jid() const; @@ -479,7 +485,7 @@ namespace XMPP void setSSFRange(int low, int high); void setOldOnly(bool); void setSASLMechanism(const TQString &s); - void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, TQ_UINT16 port); // reimplemented TQDomDocument & doc() const; -- cgit v1.2.1