diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-11-26 17:28:19 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-11-26 17:28:19 -0600 |
commit | 2c67f751ab4568d9c1d33d9a4be31e0ca33e8342 (patch) | |
tree | c74a5216a3cdac0102b9f149113e884660c5b06a /kopete/protocols/jabber/libiris/005_join_muc_with_password.patch | |
parent | ff26edf4064a15a77f6eb16bf45700a7f5eaacfb (diff) | |
download | tdenetwork-2c67f751ab4568d9c1d33d9a4be31e0ca33e8342.tar.gz tdenetwork-2c67f751ab4568d9c1d33d9a4be31e0ca33e8342.zip |
Remove old *.patch files. Code is already merged or obsolete.
Diffstat (limited to 'kopete/protocols/jabber/libiris/005_join_muc_with_password.patch')
-rw-r--r-- | kopete/protocols/jabber/libiris/005_join_muc_with_password.patch | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/kopete/protocols/jabber/libiris/005_join_muc_with_password.patch b/kopete/protocols/jabber/libiris/005_join_muc_with_password.patch deleted file mode 100644 index 058825db..00000000 --- a/kopete/protocols/jabber/libiris/005_join_muc_with_password.patch +++ /dev/null @@ -1,163 +0,0 @@ -Index: iris/include/im.h -=================================================================== ---- iris/include/im.h (révision 498969) -+++ iris/include/im.h (copie de travail) -@@ -607,6 +607,7 @@ - FileTransferManager *fileTransferManager() const; - - bool groupChatJoin(const QString &host, const QString &room, const QString &nick); -+ bool groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password); - void groupChatSetStatus(const QString &host, const QString &room, const Status &); - void groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &); - void groupChatLeave(const QString &host, const QString &room); -Index: iris/xmpp-im/client.cpp -=================================================================== ---- iris/xmpp-im/client.cpp (révision 498969) -+++ iris/xmpp-im/client.cpp (copie de travail) -@@ -315,6 +315,35 @@ - return true; - } - -+bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password) -+{ -+ Jid jid(room + "@" + host + "/" + nick); -+ for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) { -+ GroupChat &i = *it; -+ if(i.j.compare(jid, false)) { -+ // if this room is shutting down, then free it up -+ if(i.status == GroupChat::Closing) -+ it = d->groupChatList.remove(it); -+ else -+ return false; -+ } -+ else -+ ++it; -+ } -+ -+ debug(QString("Client: Joined: [%1]\n").arg(jid.full())); -+ GroupChat i; -+ i.j = jid; -+ i.status = GroupChat::Connecting; -+ d->groupChatList += i; -+ -+ JT_MucPresence *j = new JT_MucPresence(rootTask()); -+ j->pres(jid, Status(), password); -+ j->go(true); -+ -+ return true; -+} -+ - void Client::groupChatSetStatus(const QString &host, const QString &room, const Status &_s) - { - Jid jid(room + "@" + host); -Index: iris/xmpp-im/xmpp_tasks.h -=================================================================== ---- iris/xmpp-im/xmpp_tasks.h (révision 498969) -+++ iris/xmpp-im/xmpp_tasks.h (copie de travail) -@@ -439,6 +439,26 @@ - class Private; - Private *d; - }; -+ -+ class JT_MucPresence : public Task -+ { -+ Q_OBJECT -+ public: -+ JT_MucPresence(Task *parent); -+ ~JT_MucPresence(); -+ -+ void pres(const Status &); -+ void pres(const Jid &, const Status &, const QString &password); -+ -+ void onGo(); -+ -+ private: -+ QDomElement tag; -+ int type; -+ -+ class Private; -+ Private *d; -+ }; - } - - #endif -Index: iris/xmpp-im/xmpp_tasks.cpp -=================================================================== ---- iris/xmpp-im/xmpp_tasks.cpp (révision 498969) -+++ iris/xmpp-im/xmpp_tasks.cpp (copie de travail) -@@ -1956,3 +1956,75 @@ - return true; - } - -+//---------------------------------------------------------------------------- -+// JT_MucPresence -+//---------------------------------------------------------------------------- -+JT_MucPresence::JT_MucPresence(Task *parent) -+:Task(parent) -+{ -+ type = -1; -+} -+ -+JT_MucPresence::~JT_MucPresence() -+{ -+} -+ -+void JT_MucPresence::pres(const Status &s) -+{ -+ type = 0; -+ -+ tag = doc()->createElement("presence"); -+ if(!s.isAvailable()) { -+ tag.setAttribute("type", "unavailable"); -+ if(!s.status().isEmpty()) -+ tag.appendChild(textTag(doc(), "status", s.status())); -+ } -+ else { -+ if(s.isInvisible()) -+ tag.setAttribute("type", "invisible"); -+ -+ if(!s.show().isEmpty()) -+ tag.appendChild(textTag(doc(), "show", s.show())); -+ if(!s.status().isEmpty()) -+ tag.appendChild(textTag(doc(), "status", s.status())); -+ -+ tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) ); -+ -+ if(!s.keyID().isEmpty()) { -+ QDomElement x = textTag(doc(), "x", s.keyID()); -+ x.setAttribute("xmlns", "http://jabber.org/protocol/e2e"); -+ tag.appendChild(x); -+ } -+ if(!s.xsigned().isEmpty()) { -+ QDomElement x = textTag(doc(), "x", s.xsigned()); -+ x.setAttribute("xmlns", "jabber:x:signed"); -+ tag.appendChild(x); -+ } -+ -+ if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) { -+ QDomElement c = doc()->createElement("c"); -+ c.setAttribute("xmlns","http://jabber.org/protocol/caps"); -+ c.setAttribute("node",s.capsNode()); -+ c.setAttribute("ver",s.capsVersion()); -+ if (!s.capsExt().isEmpty()) -+ c.setAttribute("ext",s.capsExt()); -+ tag.appendChild(c); -+ } -+ } -+} -+ -+void JT_MucPresence::pres(const Jid &to, const Status &s, const QString &password) -+{ -+ pres(s); -+ tag.setAttribute("to", to.full()); -+ QDomElement x = textTag(doc(), "x", s.xsigned()); -+ x.setAttribute("xmlns", "http://jabber.org/protocol/muc"); -+ x.appendChild( textTag(doc(), "password", password.latin1()) ); -+ tag.appendChild(x); -+} -+ -+void JT_MucPresence::onGo() -+{ -+ send(tag); -+ setSuccess(); -+} |