LCOV - code coverage report
Current view: top level - source/lobby - StanzaExtensions.h (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 0 15 0.0 %
Date: 2023-01-19 00:18:29 Functions: 0 12 0.0 %

          Line data    Source code
       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             : 
      20             : #include "glooxwrapper/glooxwrapper.h"
      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             : 
      47           0 : class ConnectionData : public glooxwrapper::StanzaExtension
      48             : {
      49             : public:
      50             :     ConnectionData(const glooxwrapper::Tag* tag = 0);
      51             : 
      52             :     // Following four methods are all required by gloox
      53           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
      54             :     {
      55           0 :         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             : 
      61             :     glooxwrapper::string m_Ip;
      62             :     glooxwrapper::string m_Port;
      63             :     glooxwrapper::string m_IsLocalIP;
      64             :     glooxwrapper::string m_UseSTUN;
      65             :     glooxwrapper::string m_Password;
      66             :     glooxwrapper::string m_ClientSalt;
      67             :     glooxwrapper::string m_Error;
      68             : };
      69             : 
      70           0 : class GameReport : public glooxwrapper::StanzaExtension
      71             : {
      72             : public:
      73             :     GameReport(const glooxwrapper::Tag* tag = 0);
      74             : 
      75             :     // Following four methods are all required by gloox
      76           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
      77             :     {
      78           0 :         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             : 
      87             : class GameListQuery : public glooxwrapper::StanzaExtension
      88             : {
      89             : public:
      90             :     GameListQuery(const glooxwrapper::Tag* tag = 0);
      91             : 
      92             :     // Following four methods are all required by gloox
      93           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
      94             :     {
      95           0 :         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             : 
     101             :     ~GameListQuery();
     102             : 
     103             :     glooxwrapper::string m_Command;
     104             :     std::vector<const glooxwrapper::Tag*> m_GameList;
     105             : };
     106             : 
     107             : class BoardListQuery : public glooxwrapper::StanzaExtension
     108             : {
     109             : public:
     110             :     BoardListQuery(const glooxwrapper::Tag* tag = 0);
     111             : 
     112             :     // Following four methods are all required by gloox
     113           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
     114             :     {
     115           0 :         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             : 
     121             :     ~BoardListQuery();
     122             : 
     123             :     glooxwrapper::string m_Command;
     124             :     std::vector<const glooxwrapper::Tag*> m_StanzaBoardList;
     125             : };
     126             : 
     127             : class ProfileQuery : public glooxwrapper::StanzaExtension
     128             : {
     129             : public:
     130             :     ProfileQuery(const glooxwrapper::Tag* tag = 0);
     131             : 
     132             :     // Following four methods are all required by gloox
     133           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
     134             :     {
     135           0 :         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             : 
     141             :     ~ProfileQuery();
     142             : 
     143             :     glooxwrapper::string m_Command;
     144             :     std::vector<const glooxwrapper::Tag*> m_StanzaProfile;
     145             : };
     146             : 
     147           0 : class LobbyAuth : public glooxwrapper::StanzaExtension
     148             : {
     149             : public:
     150             :     LobbyAuth(const glooxwrapper::Tag* tag = 0);
     151             : 
     152             :     // Following four methods are all required by gloox
     153           0 :     virtual StanzaExtension* newInstance(const glooxwrapper::Tag* tag) const
     154             :     {
     155           0 :         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             : 
     161             :     glooxwrapper::string m_Token;
     162             : };
     163             : #endif // STANZAEXTENSIONS_H

Generated by: LCOV version 1.13