26namespace Script {
class Interface; }
27namespace Script {
class Request; }
33 const std::string& password,
const std::string& room,
const std::string& nick,
34 const int historyRequestSize = 0,
bool regOpt =
false);
46 const std::string& clientSalt,
bool localIP);
50 void SetNick(
const std::string& nick);
55 void kick(
const std::string& nick,
const std::string& reason);
56 void ban(
const std::string& nick,
const std::string& reason);
58 const char*
GetPresence(
const std::string& nickname);
59 const char*
GetRole(
const std::string& nickname);
60 std::wstring
GetRating(
const std::string& nickname);
81 void AddBuddy(
const std::string& nick);
99 bool IsBuddy(
const std::string& nick)
const;
XmppClient * g_XmppClient
Definition: Globals.cpp:22
bool g_rankedGame
Definition: Globals.cpp:23
Definition: Interface.h:93
Definition: XmppClient.cpp:137
Definition: XmppClient.h:30
std::wstring GetRating(const std::string &nickname)
Get the most recent received rating of the given nick.
Definition: XmppClient.cpp:1479
void RemoveBuddy(const std::string &nick)
Remove the given nickname from the buddies of the current user.
Definition: XmppClient.cpp:1606
bool isConnected()
Definition: XmppClient.cpp:416
bool IsBuddy(const std::string &nick) const
Whether the given nickname is a buddy of the current user.
Definition: XmppClient.cpp:1619
JS::Value GuiPollHistoricMessages(const Script::Interface &guiInterface)
Definition: XmppClient.cpp:958
void recv()
Definition: XmppClient.cpp:421
void ban(const std::string &nick, const std::string &reason)
Ban a player from the current room.
Definition: XmppClient.cpp:1426
void SendIqGetBoardList()
Request the leaderboard data from the server.
Definition: XmppClient.cpp:518
void SendIqChangeStateGame(const std::string &nbp, const std::string &players)
Send a request to change the state of a registered game on the server.
Definition: XmppClient.cpp:678
const char * GetRole(const std::string &nickname)
Get the current xmpp role of the given nick.
Definition: XmppClient.cpp:1465
const std::unique_ptr< Impl > m_Impl
Definition: XmppClient.h:110
std::string GetNick() const
Get current MUC nickname.
Definition: XmppClient.cpp:1378
void SendIqLobbyAuth(const std::string &to, const std::string &token)
Send lobby authentication token.
Definition: XmppClient.cpp:703
JS::Value GUIGetProfile(const Script::Request &rq)
Handle requests from the GUI for profile data.
Definition: XmppClient.cpp:843
void SendMUCMessage(const std::string &message)
Send a standard MUC textual message.
Definition: XmppClient.cpp:981
void kick(const std::string &nick, const std::string &reason)
Kick a player from the current room.
Definition: XmppClient.cpp:1415
std::set< std::string > GetBuddies() const
Get the nicknames of all buddies of the current user.
Definition: XmppClient.cpp:1624
JS::Value GUIGetPlayerList(const Script::Request &rq)
Handle requests from the GUI for the list of players.
Definition: XmppClient.cpp:764
void SetPresence(const std::string &presence)
Change the xmpp presence of the client.
Definition: XmppClient.cpp:1436
const char * GetPresence(const std::string &nickname)
Get the current xmpp presence of the given nick.
Definition: XmppClient.cpp:1452
XmppClient(const Script::Interface *scriptInterface, const std::string &username, const std::string &password, const std::string &room, const std::string &nick, const int historyRequestSize=0, bool regOpt=false)
Construct the XMPP client.
Definition: XmppClient.cpp:310
void SendIqGameReport(const Script::Request &rq, JS::HandleValue data)
Send game report containing numerous game properties to the server.
Definition: XmppClient.cpp:571
void SendIqUnregisterGame()
Send a request to unregister a game to the server.
Definition: XmppClient.cpp:656
void SendIqGetConnectionData(const std::string &jid, const std::string &password, const std::string &clientSalt, bool localIP)
Request the Connection data (ip, port...) from the server.
Definition: XmppClient.cpp:550
void AddBuddy(const std::string &nick)
Add the given nickname to the buddies of the current user.
Definition: XmppClient.cpp:1593
const std::wstring & GetSubject()
Get current subject.
Definition: XmppClient.cpp:1360
std::string GetJID()
Definition: XmppClient.cpp:1383
void SetNick(const std::string &nick)
Request MUC nick change, real change via mucRoomHandler.
Definition: XmppClient.cpp:1370
void SendStunEndpointToHost(const std::string &ip, std::uint16_t port, const std::string &hostJID)
Definition: XmppClient.cpp:1493
~XmppClient()
Destroy the xmpp client.
Definition: XmppClient.cpp:394
std::string GetUsername() const
Get the XMPP username.
Definition: XmppClient.cpp:1394
JS::Value GUIGetGameList(const Script::Request &rq)
Handle requests from the GUI for the list of all active games.
Definition: XmppClient.cpp:791
JS::Value GUIGetBoardList(const Script::Request &rq)
Handle requests from the GUI for leaderboard data.
Definition: XmppClient.cpp:818
void disconnect()
Definition: XmppClient.cpp:411
JS::Value GuiPollNewMessages(const Script::Interface &guiInterface)
Definition: XmppClient.cpp:916
void ChangePassword(const std::string &newPassword)
Change password for authenticated user.
Definition: XmppClient.cpp:1404
void connect()
Network.
Definition: XmppClient.cpp:405
void SendIqRegisterGame(const Script::Request &rq, JS::HandleValue data)
Send a request to register a game to the server.
Definition: XmppClient.cpp:614
void SendIqGetProfile(const std::string &player)
Request the profile data from the server.
Definition: XmppClient.cpp:534
bool GuiPollHasPlayerListUpdate()
Definition: XmppClient.cpp:906
Abstraction around a SpiderMonkey JSContext.
Definition: DapInterface.h:32