Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/lobby/XmppClient.h
/* Copyright (C) 2020 Wildfire Games. | /* Copyright (C) 2021 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 40 Lines | private: | ||||
std::string m_username; | std::string m_username; | ||||
std::string m_password; | std::string m_password; | ||||
std::string m_server; | std::string m_server; | ||||
std::string m_room; | std::string m_room; | ||||
std::string m_nick; | std::string m_nick; | ||||
std::string m_xpartamuppId; | std::string m_xpartamuppId; | ||||
std::string m_echelonId; | std::string m_echelonId; | ||||
// Security | |||||
std::string m_connectionDataJid; | |||||
std::string m_connectionDataIqId; | |||||
// State | // State | ||||
gloox::CertStatus m_certStatus; | gloox::CertStatus m_certStatus; | ||||
bool m_initialLoadComplete; | bool m_initialLoadComplete; | ||||
bool m_isConnected; | bool m_isConnected; | ||||
public: | public: | ||||
// Basic | // Basic | ||||
XmppClient(const ScriptInterface* scriptInterface, const std::string& sUsername, const std::string& sPassword, const std::string& sRoom, const std::string& sNick, const int historyRequestSize = 0, const bool regOpt = false); | XmppClient(const ScriptInterface* scriptInterface, const std::string& sUsername, const std::string& sPassword, const std::string& sRoom, const std::string& sNick, const int historyRequestSize = 0, const bool regOpt = false); | ||||
Show All 11 Lines | public: | ||||
void connect(); | void connect(); | ||||
void disconnect(); | void disconnect(); | ||||
bool isConnected(); | bool isConnected(); | ||||
void recv(); | void recv(); | ||||
void SendIqGetBoardList(); | void SendIqGetBoardList(); | ||||
void SendIqGetProfile(const std::string& player); | void SendIqGetProfile(const std::string& player); | ||||
void SendIqGameReport(const ScriptInterface& scriptInterface, JS::HandleValue data); | void SendIqGameReport(const ScriptInterface& scriptInterface, JS::HandleValue data); | ||||
void SendIqRegisterGame(const ScriptInterface& scriptInterface, JS::HandleValue data); | void SendIqRegisterGame(const ScriptInterface& scriptInterface, JS::HandleValue data); | ||||
void SendIqGetConnectionData(const std::string& jid, const std::string& password); | |||||
void SendIqUnregisterGame(); | void SendIqUnregisterGame(); | ||||
void SendIqChangeStateGame(const std::string& nbp, const std::string& players); | void SendIqChangeStateGame(const std::string& nbp, const std::string& players); | ||||
void SendIqLobbyAuth(const std::string& to, const std::string& token); | void SendIqLobbyAuth(const std::string& to, const std::string& token); | ||||
void SetNick(const std::string& nick); | void SetNick(const std::string& nick); | ||||
void GetNick(std::string& nick); | void GetNick(std::string& nick); | ||||
void kick(const std::string& nick, const std::string& reason); | void kick(const std::string& nick, const std::string& reason); | ||||
void ban(const std::string& nick, const std::string& reason); | void ban(const std::string& nick, const std::string& reason); | ||||
void SetPresence(const std::string& presence); | void SetPresence(const std::string& presence); | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator