Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
StanzaExtensions.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Wildfire Games.
2 * This file is part of 0 A.D.
3 *
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef STANZAEXTENSIONS_H
18#define STANZAEXTENSIONS_H
19
21
22#include <vector>
23
24/// Global Gamelist Extension
25#define EXTGAMELISTQUERY 1403
26#define XMLNS_GAMELIST "jabber:iq:gamelist"
27
28/// Global Boardlist Extension
29#define EXTBOARDLISTQUERY 1404
30#define XMLNS_BOARDLIST "jabber:iq:boardlist"
31
32/// Global Gamereport Extension
33#define EXTGAMEREPORT 1405
34#define XMLNS_GAMEREPORT "jabber:iq:gamereport"
35
36/// Global Profile Extension
37#define EXTPROFILEQUERY 1406
38#define XMLNS_PROFILE "jabber:iq:profile"
39
40/// Global Lobby Authentication Extension
41#define EXTLOBBYAUTH 1407
42#define XMLNS_LOBBYAUTH "jabber:iq:lobbyauth"
43
44#define EXTCONNECTIONDATA 1408
45#define XMLNS_CONNECTIONDATA "jabber:iq:connectiondata"
46
48{
49public:
51
52 // Following four methods are all required by gloox
54 {
55 return new ConnectionData(tag);
56 }
57 virtual const glooxwrapper::string& filterString() const;
58 virtual glooxwrapper::Tag* tag() const;
59 virtual glooxwrapper::StanzaExtension* clone() const;
60
68};
69
71{
72public:
74
75 // Following four methods are all required by gloox
77 {
78 return new GameReport(tag);
79 }
80 virtual const glooxwrapper::string& filterString() const;
81 virtual glooxwrapper::Tag* tag() const;
82 virtual glooxwrapper::StanzaExtension* clone() const;
83
84 std::vector<const glooxwrapper::Tag*> m_GameReport;
85};
86
88{
89public:
91
92 // Following four methods are all required by gloox
94 {
95 return new GameListQuery(tag);
96 }
97 virtual const glooxwrapper::string& filterString() const;
98 virtual glooxwrapper::Tag* tag() const;
99 virtual glooxwrapper::StanzaExtension* clone() const;
100
102
104 std::vector<const glooxwrapper::Tag*> m_GameList;
105};
106
108{
109public:
111
112 // Following four methods are all required by gloox
114 {
115 return new BoardListQuery(tag);
116 }
117 virtual const glooxwrapper::string& filterString() const;
118 virtual glooxwrapper::Tag* tag() const;
119 virtual glooxwrapper::StanzaExtension* clone() const;
120
122
124 std::vector<const glooxwrapper::Tag*> m_StanzaBoardList;
125};
126
128{
129public:
131
132 // Following four methods are all required by gloox
134 {
135 return new ProfileQuery(tag);
136 }
137 virtual const glooxwrapper::string& filterString() const;
138 virtual glooxwrapper::Tag* tag() const;
139 virtual glooxwrapper::StanzaExtension* clone() const;
140
142
144 std::vector<const glooxwrapper::Tag*> m_StanzaProfile;
145};
146
148{
149public:
150 LobbyAuth(const glooxwrapper::Tag* tag = 0);
151
152 // Following four methods are all required by gloox
154 {
155 return new LobbyAuth(tag);
156 }
157 virtual const glooxwrapper::string& filterString() const;
158 virtual glooxwrapper::Tag* tag() const;
159 virtual glooxwrapper::StanzaExtension* clone() const;
160
162};
163#endif // STANZAEXTENSIONS_H
Definition: StanzaExtensions.h:108
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:113
std::vector< const glooxwrapper::Tag * > m_StanzaBoardList
Definition: StanzaExtensions.h:124
glooxwrapper::string m_Command
Definition: StanzaExtensions.h:123
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the BoardList request into XML for sending.
Definition: StanzaExtensions.cpp:93
~BoardListQuery()
Definition: StanzaExtensions.cpp:114
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the BoardList element in a received IQ.
Definition: StanzaExtensions.cpp:84
BoardListQuery(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:67
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:108
Definition: StanzaExtensions.h:48
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the auth object into XML for sending.
Definition: StanzaExtensions.cpp:340
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:53
glooxwrapper::string m_Port
Definition: StanzaExtensions.h:62
ConnectionData(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:291
glooxwrapper::string m_ClientSalt
Definition: StanzaExtensions.h:66
glooxwrapper::string m_Error
Definition: StanzaExtensions.h:67
glooxwrapper::string m_IsLocalIP
Definition: StanzaExtensions.h:63
glooxwrapper::string m_UseSTUN
Definition: StanzaExtensions.h:64
glooxwrapper::string m_Password
Definition: StanzaExtensions.h:65
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the LobbyAuth element in a received IQ.
Definition: StanzaExtensions.cpp:331
glooxwrapper::string m_Ip
Definition: StanzaExtensions.h:61
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:362
Definition: StanzaExtensions.h:88
glooxwrapper::string m_Command
Definition: StanzaExtensions.h:103
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the game object into XML for sending.
Definition: StanzaExtensions.cpp:153
std::vector< const glooxwrapper::Tag * > m_GameList
Definition: StanzaExtensions.h:104
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the GameList element in a received IQ.
Definition: StanzaExtensions.cpp:144
GameListQuery(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:126
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:168
~GameListQuery()
Definition: StanzaExtensions.cpp:174
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:93
Definition: StanzaExtensions.h:71
std::vector< const glooxwrapper::Tag * > m_GameReport
Definition: StanzaExtensions.h:84
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the GameReport into XML for sending.
Definition: StanzaExtensions.cpp:35
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:55
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the GameReport element in a recived IQ.
Definition: StanzaExtensions.cpp:49
GameReport(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:24
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:76
Definition: StanzaExtensions.h:148
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the LobbyAuth element in a received IQ.
Definition: StanzaExtensions.cpp:262
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:153
glooxwrapper::string m_Token
Definition: StanzaExtensions.h:161
LobbyAuth(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:246
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the auth object into XML for sending.
Definition: StanzaExtensions.cpp:271
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:282
Definition: StanzaExtensions.h:128
virtual glooxwrapper::Tag * tag() const
Required by gloox, used to serialize the Profile request into XML for sending.
Definition: StanzaExtensions.cpp:215
virtual glooxwrapper::StanzaExtension * clone() const
Definition: StanzaExtensions.cpp:229
ProfileQuery(const glooxwrapper::Tag *tag=0)
Definition: StanzaExtensions.cpp:188
virtual StanzaExtension * newInstance(const glooxwrapper::Tag *tag) const
Definition: StanzaExtensions.h:133
glooxwrapper::string m_Command
Definition: StanzaExtensions.h:143
virtual const glooxwrapper::string & filterString() const
Required by gloox, used to find the Profile element in a received IQ.
Definition: StanzaExtensions.cpp:206
std::vector< const glooxwrapper::Tag * > m_StanzaProfile
Definition: StanzaExtensions.h:144
~ProfileQuery()
Definition: StanzaExtensions.cpp:235
Definition: glooxwrapper.h:390
StanzaExtension(int type)
Definition: glooxwrapper.h:392
Definition: glooxwrapper.h:580
Definition: glooxwrapper.h:120