summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h')
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h132
1 files changed, 66 insertions, 66 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
index 6cb82472..0c735192 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
@@ -21,7 +21,7 @@
#ifndef PROTOCOL_H
#define PROTOCOL_H
-#include<qpair.h>
+#include<tqpair.h>
#include"xmlprotocol.h"
#include"xmpp.h"
@@ -56,7 +56,7 @@ namespace XMPP
bool tls_supported, sasl_supported, bind_supported;
bool tls_required;
- QStringList sasl_mechs;
+ TQStringList sasl_mechs;
};
class BasicProtocol : public XmlProtocol
@@ -136,78 +136,78 @@ namespace XMPP
void reset();
// for outgoing xml
- QDomDocument doc;
+ TQDomDocument doc;
// sasl-related
- QString saslMech() const;
- QByteArray saslStep() const;
- void setSASLMechList(const QStringList &list);
- void setSASLFirst(const QString &mech, const QByteArray &step);
- void setSASLNext(const QByteArray &step);
+ TQString saslMech() const;
+ TQByteArray saslStep() const;
+ void setSASLMechList(const TQStringList &list);
+ void setSASLFirst(const TQString &mech, const TQByteArray &step);
+ void setSASLNext(const TQByteArray &step);
void setSASLAuthed();
// send / recv
- void sendStanza(const QDomElement &e);
- void sendDirect(const QString &s);
+ void sendStanza(const TQDomElement &e);
+ void sendDirect(const TQString &s);
void sendWhitespace();
- QDomElement recvStanza();
+ TQDomElement recvStanza();
// shutdown
void shutdown();
- void shutdownWithError(int cond, const QString &otherHost="");
+ void shutdownWithError(int cond, const TQString &otherHost="");
// <stream> information
- QString to, from, id, lang;
+ TQString to, from, id, lang;
Version version;
// error output
int errCond;
- QString errText;
- QDomElement errAppSpec;
- QString otherHost;
+ TQString errText;
+ TQDomElement errAppSpec;
+ TQString otherHost;
- QByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
+ TQByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
bool isReady() const;
enum { TypeElement, TypeStanza, TypeDirect, TypePing };
protected:
- static int stringToSASLCond(const QString &s);
- static int stringToStreamCond(const QString &s);
- static QString saslCondToString(int);
- static QString streamCondToString(int);
+ static int stringToSASLCond(const TQString &s);
+ static int stringToStreamCond(const TQString &s);
+ static TQString saslCondToString(int);
+ static TQString streamCondToString(int);
- void send(const QDomElement &e, bool clip=false);
- void sendStreamError(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
- void sendStreamError(const QString &text); // old-style
+ void send(const TQDomElement &e, bool clip=false);
+ void sendStreamError(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
+ void sendStreamError(const TQString &text); // old-style
- bool errorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ bool errorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
bool error(int code);
- void delayErrorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ void delayErrorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
void delayError(int code);
// reimplemented
- QDomElement docElement();
+ TQDomElement docElement();
void handleDocOpen(const Parser::Event &pe);
bool handleError();
bool handleCloseFinished();
- bool doStep(const QDomElement &e);
+ bool doStep(const TQDomElement &e);
void itemWritten(int id, int size);
- virtual QString defaultNamespace();
- virtual QStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
+ virtual TQString defaultNamespace();
+ virtual TQStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
virtual void handleStreamOpen(const Parser::Event &pe);
- virtual bool doStep2(const QDomElement &e)=0;
+ virtual bool doStep2(const TQDomElement &e)=0;
void setReady(bool b);
- QString sasl_mech;
- QStringList sasl_mechlist;
- QByteArray sasl_step;
+ TQString sasl_mech;
+ TQStringList sasl_mechlist;
+ TQByteArray sasl_step;
bool sasl_authed;
- QDomElement stanzaToRecv;
+ TQDomElement stanzaToRecv;
private:
struct SASLCondEntry
@@ -226,17 +226,17 @@ namespace XMPP
struct SendItem
{
- QDomElement stanzaToSend;
- QString stringToSend;
+ TQDomElement stanzaToSend;
+ TQString stringToSend;
bool doWhitespace;
};
- QValueList<SendItem> sendList;
+ TQValueList<SendItem> sendList;
bool doShutdown, delayedError, closeError, ready;
int stanzasPending, stanzasWritten;
void init();
- void extractStreamError(const QDomElement &e);
+ void extractStreamError(const TQDomElement &e);
};
class CoreProtocol : public BasicProtocol
@@ -254,30 +254,30 @@ namespace XMPP
void reset();
void startClientOut(const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth);
- void startServerOut(const QString &to);
- void startDialbackOut(const QString &to, const QString &from);
- void startDialbackVerifyOut(const QString &to, const QString &from, const QString &id, const QString &key);
- void startClientIn(const QString &id);
- void startServerIn(const QString &id);
+ void startServerOut(const TQString &to);
+ void startDialbackOut(const TQString &to, const TQString &from);
+ void startDialbackVerifyOut(const TQString &to, const TQString &from, const TQString &id, const TQString &key);
+ void startClientIn(const TQString &id);
+ void startServerIn(const TQString &id);
- void setLang(const QString &s);
+ void setLang(const TQString &s);
void setAllowTLS(bool b);
void setAllowBind(bool b);
void setAllowPlain(bool b); // old-mode
- void setPassword(const QString &s);
- void setFrom(const QString &s);
- void setDialbackKey(const QString &s);
+ void setPassword(const TQString &s);
+ void setFrom(const TQString &s);
+ void setDialbackKey(const TQString &s);
// input
- QString user, host;
+ TQString user, host;
// status
bool old;
StreamFeatures features;
- //static QString xmlToString(const QDomElement &e, bool clip=false);
+ //static TQString xmlToString(const TQDomElement &e, bool clip=false);
class DBItem
{
@@ -285,7 +285,7 @@ namespace XMPP
enum { ResultRequest, ResultGrant, VerifyRequest, VerifyGrant, Validated };
int type;
Jid to, from;
- QString key, id;
+ TQString key, id;
bool ok;
};
@@ -312,7 +312,7 @@ namespace XMPP
GetAuthSetResponse // read auth-set response
};
- QValueList<DBItem> dbrequests, dbpending, dbvalidated;
+ TQValueList<DBItem> dbrequests, dbpending, dbvalidated;
bool server, dialback, dialback_verify;
int step;
@@ -324,31 +324,31 @@ namespace XMPP
bool oldOnly;
bool allowPlain;
bool doTLS, doAuth, doBinding;
- QString password;
+ TQString password;
- QString dialback_id, dialback_key;
- QString self_from;
+ TQString dialback_id, dialback_key;
+ TQString self_from;
void init();
- static int getOldErrorCode(const QDomElement &e);
+ static int getOldErrorCode(const TQDomElement &e);
bool loginComplete();
- bool isValidStanza(const QDomElement &e) const;
+ bool isValidStanza(const TQDomElement &e) const;
bool grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item);
- bool normalStep(const QDomElement &e);
- bool dialbackStep(const QDomElement &e);
+ bool normalStep(const TQDomElement &e);
+ bool dialbackStep(const TQDomElement &e);
// reimplemented
bool stepAdvancesParser() const;
bool stepRequiresElement() const;
- void stringSend(const QString &s);
- void stringRecv(const QString &s);
- QString defaultNamespace();
- QStringList extraNamespaces();
+ void stringSend(const TQString &s);
+ void stringRecv(const TQString &s);
+ TQString defaultNamespace();
+ TQStringList extraNamespaces();
void handleStreamOpen(const Parser::Event &pe);
- bool doStep2(const QDomElement &e);
- void elementSend(const QDomElement &e);
- void elementRecv(const QDomElement &e);
+ bool doStep2(const TQDomElement &e);
+ void elementSend(const TQDomElement &e);
+ void elementRecv(const TQDomElement &e);
};
}