Changeset View
Changeset View
Standalone View
Standalone View
source/lobby/StanzaExtensions.h
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2018 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 20 Lines | |||||
/// Global Gamereport Extension | /// Global Gamereport Extension | ||||
#define EXTGAMEREPORT 1405 | #define EXTGAMEREPORT 1405 | ||||
#define XMLNS_GAMEREPORT "jabber:iq:gamereport" | #define XMLNS_GAMEREPORT "jabber:iq:gamereport" | ||||
/// Global Profile Extension | /// Global Profile Extension | ||||
#define EXTPROFILEQUERY 1406 | #define EXTPROFILEQUERY 1406 | ||||
#define XMLNS_PROFILE "jabber:iq:profile" | #define XMLNS_PROFILE "jabber:iq:profile" | ||||
/// Global Lobby Authentication Extension | |||||
#define EXTLOBBYAUTH 1407 | |||||
#define XMLNS_LOBBYAUTH "jabber:iq:lobbyauth" | |||||
class GameReport : public glooxwrapper::StanzaExtension | class GameReport : public glooxwrapper::StanzaExtension | ||||
{ | { | ||||
public: | public: | ||||
GameReport(const glooxwrapper::Tag* tag = 0); | GameReport(const glooxwrapper::Tag* tag = 0); | ||||
// Following four methods are all required by gloox | // Following four methods are all required by gloox | ||||
virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const | virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public: | ||||
virtual const glooxwrapper::string& filterString() const; | virtual const glooxwrapper::string& filterString() const; | ||||
virtual glooxwrapper::Tag* tag() const; | virtual glooxwrapper::Tag* tag() const; | ||||
virtual glooxwrapper::StanzaExtension* clone() const; | virtual glooxwrapper::StanzaExtension* clone() const; | ||||
~ProfileQuery(); | ~ProfileQuery(); | ||||
glooxwrapper::string m_Command; | glooxwrapper::string m_Command; | ||||
std::vector<const glooxwrapper::Tag*> m_StanzaProfile; | std::vector<const glooxwrapper::Tag*> m_StanzaProfile; | ||||
}; | }; | ||||
class LobbyAuth : public glooxwrapper::StanzaExtension | |||||
{ | |||||
public: | |||||
LobbyAuth(const glooxwrapper::Tag* tag = 0); | |||||
// Following four methods are all required by gloox | |||||
elexis: I have no clue why these four methods are all required by gloox or what that actually does and… | |||||
virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const | |||||
{ | |||||
return new LobbyAuth(tag); | |||||
} | |||||
virtual const glooxwrapper::string& filterString() const; | |||||
virtual glooxwrapper::Tag* tag() const; | |||||
virtual glooxwrapper::StanzaExtension* clone() const; | |||||
glooxwrapper::string m_Token; | |||||
}; | |||||
Done Inline Actions\n elexis: \n | |||||
#endif // STANZAEXTENSIONS_H | #endif // STANZAEXTENSIONS_H |
Wildfire Games · Phabricator
I have no clue why these four methods are all required by gloox or what that actually does and I didn't have time to learn this.