mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 21:34:08 -07:00
Add id for IQ stanzas
Patch by: Dunedan Differential Revision: https://code.wildfiregames.com/D899 This was SVN commit r20321.
This commit is contained in:
parent
23893415d1
commit
5f0a0fbbef
4 changed files with 14 additions and 7 deletions
|
|
@ -64,6 +64,7 @@
|
|||
{"nick": "Dietger", "name": "Dietger van Antwerpen"},
|
||||
{"nick": "dpiquet", "name": "Damien Piquet"},
|
||||
{"nick": "dumbo"},
|
||||
{"nick": "Dunedan", "name": "Daniel Roschka"},
|
||||
{"nick": "dvangennip", "name": "Doménique"},
|
||||
{"nick": "Echelon9", "name": "Rhys Kidd"},
|
||||
{"nick": "echotangoecho"},
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ void XmppClient::SendIqGetBoardList()
|
|||
// Send IQ
|
||||
BoardListQuery* b = new BoardListQuery();
|
||||
b->m_Command = "getleaderboard";
|
||||
glooxwrapper::IQ iq(gloox::IQ::Get, xpartamuppJid);
|
||||
glooxwrapper::IQ iq(gloox::IQ::Get, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(b);
|
||||
DbgXMPP("SendIqGetBoardList [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
@ -290,7 +290,7 @@ void XmppClient::SendIqGetProfile(const std::string& player)
|
|||
// Send IQ
|
||||
ProfileQuery* b = new ProfileQuery();
|
||||
b->m_Command = player;
|
||||
glooxwrapper::IQ iq(gloox::IQ::Get, xpartamuppJid);
|
||||
glooxwrapper::IQ iq(gloox::IQ::Get, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(b);
|
||||
DbgXMPP("SendIqGetProfile [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
@ -323,7 +323,7 @@ void XmppClient::SendIqGameReport(const ScriptInterface& scriptInterface, JS::Ha
|
|||
game->m_GameReport.emplace_back(report);
|
||||
|
||||
// Send IQ
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid);
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(game);
|
||||
DbgXMPP("SendGameReport [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
@ -359,7 +359,7 @@ void XmppClient::SendIqRegisterGame(const ScriptInterface& scriptInterface, JS::
|
|||
g->m_GameList.emplace_back(game);
|
||||
|
||||
// Send IQ
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid);
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(g);
|
||||
DbgXMPP("SendIqRegisterGame [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
@ -377,7 +377,7 @@ void XmppClient::SendIqUnregisterGame()
|
|||
g->m_Command = "unregister";
|
||||
g->m_GameList.emplace_back(glooxwrapper::Tag::allocate("game"));
|
||||
|
||||
glooxwrapper::IQ iq( gloox::IQ::Set, xpartamuppJid );
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(g);
|
||||
DbgXMPP("SendIqUnregisterGame [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
@ -402,7 +402,7 @@ void XmppClient::SendIqChangeStateGame(const std::string& nbp, const std::string
|
|||
game->addAttribute("players", players);
|
||||
g->m_GameList.emplace_back(game);
|
||||
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid);
|
||||
glooxwrapper::IQ iq(gloox::IQ::Set, xpartamuppJid, m_client->getID());
|
||||
iq.addExtension(g);
|
||||
DbgXMPP("SendIqChangeStateGame [" << tag_xml(iq) << "]");
|
||||
m_client->send(iq);
|
||||
|
|
|
|||
|
|
@ -346,6 +346,11 @@ gloox::ConnectionError glooxwrapper::Client::recv(int timeout)
|
|||
return m_Wrapped->recv(timeout);
|
||||
}
|
||||
|
||||
std::string glooxwrapper::Client::getID()
|
||||
{
|
||||
return m_Wrapped->getID();
|
||||
}
|
||||
|
||||
void glooxwrapper::Client::send(const IQ& iq)
|
||||
{
|
||||
m_Wrapped->send(iq.getWrapped());
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ namespace glooxwrapper
|
|||
|
||||
bool connect(bool block = true);
|
||||
gloox::ConnectionError recv(int timeout = -1);
|
||||
std::string getID();
|
||||
void send(const IQ& iq);
|
||||
|
||||
void setTls(gloox::TLSPolicy tls);
|
||||
|
|
@ -448,7 +449,7 @@ namespace glooxwrapper
|
|||
const gloox::IQ& getWrapped() const { return *m_Wrapped; }
|
||||
IQ(const gloox::IQ& iq) : m_Wrapped(const_cast<gloox::IQ*>(&iq)), m_Owned(false) { }
|
||||
|
||||
IQ(gloox::IQ::IqType type, const JID& to, const string& id = "");
|
||||
IQ(gloox::IQ::IqType type, const JID& to, const string& id);
|
||||
~IQ();
|
||||
|
||||
void addExtension(const StanzaExtension* se);
|
||||
|
|
|
|||
Loading…
Reference in a new issue