Changeset View
Changeset View
Standalone View
Standalone View
source/lobby/IXmppClient.h
Show All 14 Lines | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef IXMPPCLIENT_H | #ifndef IXMPPCLIENT_H | ||||
#define IXMPPCLIENT_H | #define IXMPPCLIENT_H | ||||
#include "scriptinterface/ScriptTypes.h" | #include "scriptinterface/ScriptTypes.h" | ||||
class ScriptInterface; | class ScriptRequest; | ||||
namespace StunClient { | namespace StunClient { | ||||
struct StunEndpoint; | struct StunEndpoint; | ||||
} | } | ||||
class IXmppClient | class IXmppClient | ||||
{ | { | ||||
public: | public: | ||||
static IXmppClient* create(const ScriptInterface* scriptInterface, const std::string& sUsername, const std::string& sPassword, const std::string& sRoom, const std::string& sNick, const int historyRequestSize = 0, bool regOpt = false); | static IXmppClient* create(const ScriptInterface* scriptInterface, const std::string& sUsername, const std::string& sPassword, const std::string& sRoom, const std::string& sNick, const int historyRequestSize = 0, bool regOpt = false); | ||||
Show All 20 Lines | public: | ||||
virtual const char* GetRole(const std::string& nickname) = 0; | virtual const char* GetRole(const std::string& nickname) = 0; | ||||
virtual std::wstring GetRating(const std::string& nickname) = 0; | virtual std::wstring GetRating(const std::string& nickname) = 0; | ||||
virtual const std::wstring& GetSubject() = 0; | virtual const std::wstring& GetSubject() = 0; | ||||
virtual JS::Value GUIGetPlayerList(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GUIGetPlayerList(const ScriptInterface& scriptInterface) = 0; | ||||
virtual JS::Value GUIGetGameList(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GUIGetGameList(const ScriptInterface& scriptInterface) = 0; | ||||
virtual JS::Value GUIGetBoardList(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GUIGetBoardList(const ScriptInterface& scriptInterface) = 0; | ||||
virtual JS::Value GUIGetProfile(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GUIGetProfile(const ScriptInterface& scriptInterface) = 0; | ||||
virtual JS::Value GuiPollNewMessages(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GuiPollNewMessages(const ScriptInterface& guiInterface) = 0; | ||||
virtual JS::Value GuiPollHistoricMessages(const ScriptInterface& scriptInterface) = 0; | virtual JS::Value GuiPollHistoricMessages(const ScriptInterface& guiInterface) = 0; | ||||
virtual bool GuiPollHasPlayerListUpdate() = 0; | virtual bool GuiPollHasPlayerListUpdate() = 0; | ||||
virtual void SendMUCMessage(const std::string& message) = 0; | virtual void SendMUCMessage(const std::string& message) = 0; | ||||
virtual void SendStunEndpointToHost(const StunClient::StunEndpoint& stunEndpoint, const std::string& hostJID) = 0; | virtual void SendStunEndpointToHost(const StunClient::StunEndpoint& stunEndpoint, const std::string& hostJID) = 0; | ||||
}; | }; | ||||
extern IXmppClient *g_XmppClient; | extern IXmppClient *g_XmppClient; | ||||
extern bool g_rankedGame; | extern bool g_rankedGame; | ||||
#endif // XMPPCLIENT_H | #endif // XMPPCLIENT_H |
Wildfire Games · Phabricator