diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-06 19:10:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-06 19:10:00 +0000 |
commit | a7d8c5aa21a1470dbab6f4d8c31292e402d8bdf0 (patch) | |
tree | 3d0c3ec0f8f6bfa1789343625585f101f5b87d26 /kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp | |
parent | 6f832f84419698dd02876e27c042793630d0a4df (diff) | |
download | tdenetwork-a7d8c5aa21a1470dbab6f4d8c31292e402d8bdf0.tar.gz tdenetwork-a7d8c5aa21a1470dbab6f4d8c31292e402d8bdf0.zip |
Fix kdenetwork FTBFS
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1251871 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp')
-rw-r--r-- | kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp index 4e4c96d1..89d66796 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp @@ -2118,3 +2118,34 @@ TQDomElement JT_PrivateStorage::element( ) return d->elem; } +//---------------------------------------------------------------------------- +// PongServer +//---------------------------------------------------------------------------- +/** + * \class PongServer + * \brief Answers XMPP Pings + */ + +PongServer::PongServer(Task *parent) +:Task(parent) +{ +} + +PongServer::~PongServer() +{ +} + +bool PongServer::take(const TQDomElement &e) +{ + if (e.tagName() != "iq" || e.attribute("type") != "get") + return false; + + bool found = false; + TQDomElement ping = findSubTag(e, "ping", &found); + if (found && ping.attribute("xmlns") == "urn:xmpp:ping") { + TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id")); + send(iq); + return true; + } + return false; +} |