diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
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
Diffstat (limited to 'kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc')
-rw-r--r-- | kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc index 82207f3b..38ed1994 100644 --- a/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc +++ b/kopete/protocols/jabber/jingle/libjingle/talk/xmpp/xmpptask.cc @@ -32,9 +32,9 @@ namespace buzz { -XmppTask::XmppTask(Task * parent, XmppEngine::HandlerLevel level) - : Task(parent), client_(NULL) { - XmppClient * client = (XmppClient*)parent->GetParent(XMPP_CLIENT_TASK_CODE); +XmppTask::XmppTask(Task * tqparent, XmppEngine::HandlerLevel level) + : Task(tqparent), client_(NULL) { + XmppClient * client = (XmppClient*)tqparent->GetParent(XMPP_CLIENT_TASK_CODE); client_ = client; id_ = client->NextId(); client->AddXmppTask(this, level); @@ -55,14 +55,14 @@ XmppTask::StopImpl() { } } -XmppReturnStatus +XmppReturntqStatus XmppTask::SendStanza(const XmlElement * stanza) { if (client_ == NULL) return XMPP_RETURN_BADSTATE; return client_->SendStanza(stanza); } -XmppReturnStatus +XmppReturntqStatus XmppTask::SendStanzaError(const XmlElement * element_original, XmppStanzaError code, const std::string & text) { @@ -102,37 +102,37 @@ XmppTask::NextStanza() { XmlElement * XmppTask::MakeIq(const std::string & type, const buzz::Jid & to, const std::string id) { - XmlElement * result = new XmlElement(QN_IQ); + XmlElement * result = new XmlElement(TQN_IQ); if (!type.empty()) - result->AddAttr(QN_TYPE, type); + result->AddAttr(TQN_TYPE, type); if (to != JID_EMPTY) - result->AddAttr(QN_TO, to.Str()); + result->AddAttr(TQN_TO, to.Str()); if (!id.empty()) - result->AddAttr(QN_ID, id); + result->AddAttr(TQN_ID, id); return result; } XmlElement * XmppTask::MakeIqResult(const XmlElement * query) { - XmlElement * result = new XmlElement(QN_IQ); - result->AddAttr(QN_TYPE, STR_RESULT); - if (query->HasAttr(QN_FROM)) { - result->AddAttr(QN_TO, query->Attr(QN_FROM)); + XmlElement * result = new XmlElement(TQN_IQ); + result->AddAttr(TQN_TYPE, STR_RESULT); + if (query->HasAttr(TQN_FROM)) { + result->AddAttr(TQN_TO, query->Attr(TQN_FROM)); } - result->AddAttr(QN_ID, query->Attr(QN_ID)); + result->AddAttr(TQN_ID, query->Attr(TQN_ID)); return result; } bool XmppTask::MatchResponseIq(const XmlElement * stanza, const Jid & to, const std::string & id) { - if (stanza->Name() != QN_IQ) + if (stanza->Name() != TQN_IQ) return false; - if (stanza->Attr(QN_ID) != id) + if (stanza->Attr(TQN_ID) != id) return false; - Jid from(stanza->Attr(QN_FROM)); + Jid from(stanza->Attr(TQN_FROM)); if (from != to) { Jid me = client_->jid(); // we address the server as "", but it is legal for the server @@ -152,11 +152,11 @@ XmppTask::MatchResponseIq(const XmlElement * stanza, bool XmppTask::MatchRequestIq(const XmlElement * stanza, - const std::string & type, const QName & qn) { - if (stanza->Name() != QN_IQ) + const std::string & type, const TQName & qn) { + if (stanza->Name() != TQN_IQ) return false; - if (stanza->Attr(QN_TYPE) != type) + if (stanza->Attr(TQN_TYPE) != type) return false; if (stanza->FirstNamed(qn) == NULL) |