diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h')
-rw-r--r-- | kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h index 16ff8e01..e3da8a09 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h @@ -21,8 +21,8 @@ #ifndef XMLPROTOCOL_H #define XMLPROTOCOL_H -#include<qdom.h> -#include<qvaluelist.h> +#include<tqdom.h> +#include<tqvaluelist.h> #include"parser.h" #define NS_XML "http://www.w3.org/XML/1998/namespace" @@ -59,8 +59,8 @@ namespace XMPP virtual void reset(); // byte I/O for the stream - void addIncomingData(const QByteArray &); - QByteArray takeOutgoingData(); + void addIncomingData(const TQByteArray &); + TQByteArray takeOutgoingData(); void outgoingDataWritten(int); // advance the state machine @@ -70,47 +70,47 @@ namespace XMPP int need, event, errorCode, notify; inline bool isIncoming() const { return incoming; } - QString xmlEncoding() const; - QString elementToString(const QDomElement &e, bool clip=false); + TQString xmlEncoding() const; + TQString elementToString(const TQDomElement &e, bool clip=false); class TransferItem { public: TransferItem(); - TransferItem(const QString &str, bool sent, bool external=false); - TransferItem(const QDomElement &elem, bool sent, bool external=false); + TransferItem(const TQString &str, bool sent, bool external=false); + TransferItem(const TQDomElement &elem, bool sent, bool external=false); bool isSent; // else, received bool isString; // else, is element bool isExternal; // not owned by protocol - QString str; - QDomElement elem; + TQString str; + TQDomElement elem; }; - QValueList<TransferItem> transferItemList; + TQValueList<TransferItem> transferItemList; void setIncomingAsExternal(); protected: - virtual QDomElement docElement()=0; + virtual TQDomElement docElement()=0; virtual void handleDocOpen(const Parser::Event &pe)=0; virtual bool handleError()=0; virtual bool handleCloseFinished()=0; virtual bool stepAdvancesParser() const=0; virtual bool stepRequiresElement() const; - virtual bool doStep(const QDomElement &e)=0; + virtual bool doStep(const TQDomElement &e)=0; virtual void itemWritten(int id, int size); // 'debug' - virtual void stringSend(const QString &s); - virtual void stringRecv(const QString &s); - virtual void elementSend(const QDomElement &e); - virtual void elementRecv(const QDomElement &e); + virtual void stringSend(const TQString &s); + virtual void stringRecv(const TQString &s); + virtual void elementSend(const TQDomElement &e); + virtual void elementRecv(const TQDomElement &e); void startConnect(); void startAccept(); bool close(); - int writeString(const QString &s, int id, bool external); - int writeElement(const QDomElement &e, int id, bool external, bool clip=false); - QByteArray resetStream(); + int writeString(const TQString &s, int id, bool external); + int writeElement(const TQDomElement &e, int id, bool external, bool clip=false); + TQByteArray resetStream(); private: enum { SendOpen, RecvOpen, Open, Closing }; @@ -122,20 +122,20 @@ namespace XMPP }; bool incoming; - QDomDocument elemDoc; - QDomElement elem; - QString tagOpen, tagClose; + TQDomDocument elemDoc; + TQDomElement elem; + TQString tagOpen, tagClose; int state; bool peerClosed; bool closeWritten; Parser xml; - QByteArray outData; - QValueList<TrackItem> trackQueue; + TQByteArray outData; + TQValueList<TrackItem> trackQueue; void init(); - int internalWriteData(const QByteArray &a, TrackItem::Type t, int id=-1); - int internalWriteString(const QString &s, TrackItem::Type t, int id=-1); + int internalWriteData(const TQByteArray &a, TrackItem::Type t, int id=-1); + int internalWriteString(const TQString &s, TrackItem::Type t, int id=-1); void sendTagOpen(); void sendTagClose(); bool baseStep(const Parser::Event &pe); |