18 #ifndef XXXMPPCLIENT_H 19 #define XXXMPPCLIENT_H 57 XmppClient(
const std::string& sUsername,
const std::string& sPassword,
const std::string& sRoom,
const std::string& sNick,
const int historyRequestSize = 0,
const bool regOpt =
false);
64 void SendIqGetGameList();
65 void SendIqGetBoardList();
66 void SendIqGetRatingList();
67 void SendIqGetProfile(
const std::string& player);
68 void SendIqGameReport(
ScriptInterface& scriptInterface, JS::HandleValue data);
69 void SendIqRegisterGame(
ScriptInterface& scriptInterface, JS::HandleValue data);
70 void SendIqUnregisterGame();
71 void SendIqChangeStateGame(
const std::string& nbp,
const std::string& players);
72 void SetNick(
const std::string& nick);
73 void GetNick(std::string& nick);
74 void kick(
const std::string& nick,
const std::string& reason);
75 void ban(
const std::string& nick,
const std::string& reason);
76 void SetPresence(
const std::string& presence);
77 void GetPresence(
const std::string& nickname, std::string& presence);
78 void GetRole(
const std::string& nickname, std::string& role);
79 void GetSubject(std::string& subject);
81 void GUIGetPlayerList(
ScriptInterface& scriptInterface, JS::MutableHandleValue ret);
82 void GUIGetGameList(
ScriptInterface& scriptInterface, JS::MutableHandleValue ret);
83 void GUIGetBoardList(
ScriptInterface& scriptInterface, JS::MutableHandleValue ret);
84 void GUIGetProfile(
ScriptInterface& scriptInterface, JS::MutableHandleValue ret);
103 virtual void handleLog(gloox::LogLevel level, gloox::LogArea area,
const std::string& message);
106 virtual void onConnect();
107 virtual void onDisconnect(gloox::ConnectionError e);
116 virtual void handleRegistrationResult(
const glooxwrapper::JID& , gloox::RegistrationResult result);
118 virtual void handleDataForm(
const glooxwrapper::JID& ,
const glooxwrapper::DataForm& );
122 virtual void handleMessage(
const glooxwrapper::Message& msg, glooxwrapper::MessageSession * session);
125 void GetPresenceString(
const gloox::Presence::PresenceType p, std::string& presence)
const;
126 void GetRoleString(
const gloox::MUCRoomRole r, std::string& role)
const;
127 std::string StanzaErrorToString(gloox::StanzaError err)
const;
128 std::string ConnectionErrorToString(gloox::ConnectionError err)
const;
129 std::string RegistrationResultToString(gloox::RegistrationResult res)
const;
143 void GuiPollMessage(
ScriptInterface& scriptInterface, JS::MutableHandleValue ret);
144 void SendMUCMessage(
const std::string& message);
145 void ClearPresenceUpdates();
146 int GetMucMessageCount();
149 void CreateGUIMessage(
const std::string& type,
const std::string& level,
const std::string& text =
"",
const std::string& data =
"");
166 #endif // XMPPCLIENT_H #define NONCOPYABLE(className)
Indicates that a class is noncopyable (usually due to const or reference members, or because the clas...
Definition: code_annotation.h:217
Definition: glooxwrapper.h:347
bool m_initialLoadComplete
Definition: XmppClient.h:53
std::map< std::string, std::vector< std::string > > m_PlayerMap
Map of players.
Definition: XmppClient.h:153
std::string m_username
Definition: XmppClient.h:47
std::wstring message
Definition: XmppClient.h:140
Definition: glooxwrapper.h:298
std::wstring data
Definition: XmppClient.h:138
Definition: glooxwrapper.h:497
Definition: glooxwrapper.h:459
Definition: glooxwrapper.h:517
Definition: IXmppClient.h:25
Definition: glooxwrapper.h:479
Definition: glooxwrapper.h:525
glooxwrapper::Registration * m_registration
Definition: XmppClient.h:44
glooxwrapper::Client * m_client
Definition: XmppClient.h:42
Definition: glooxwrapper.h:330
std::wstring type
Definition: XmppClient.h:135
Definition: glooxwrapper.h:374
std::string m_password
Definition: XmppClient.h:48
Definition: glooxwrapper.h:337
std::wstring level
Definition: XmppClient.h:136
std::vector< const glooxwrapper::Tag * > m_BoardList
List of rankings.
Definition: XmppClient.h:157
Definition: glooxwrapper.h:108
std::vector< const glooxwrapper::Tag * > m_GameList
List of games.
Definition: XmppClient.h:155
Definition: XmppClient.h:133
Definition: XmppClient.h:36
std::string m_xpartamuppId
Definition: XmppClient.h:50
std::string m_nick
Definition: XmppClient.h:49
Definition: glooxwrapper.h:264
std::string m_Subject
Current room subject/topic.
Definition: XmppClient.h:163
std::vector< const glooxwrapper::Tag * > m_Profile
Profile data.
Definition: XmppClient.h:159
Definition: glooxwrapper.h:322
virtual void handleIqID(const glooxwrapper::IQ &, int)
Definition: XmppClient.h:112
std::string datetime
Definition: XmppClient.h:141
Abstraction around a SpiderMonkey JSContext.
Definition: ScriptInterface.h:71
std::deque< GUIMessage > m_GuiMessageQueue
Queue of messages for the GUI.
Definition: XmppClient.h:161
Definition: glooxwrapper.h:431
Definition: glooxwrapper.h:313
Definition: glooxwrapper.cpp:45
std::wstring text
Definition: XmppClient.h:137
glooxwrapper::MUCRoom * m_mucRoom
Definition: XmppClient.h:43
std::wstring from
Definition: XmppClient.h:139