Changeset View
Changeset View
Standalone View
Standalone View
source/network/scripting/JSInterface_Network.h
Show All 18 Lines | |||||
#define INCLUDED_JSI_NETWORK | #define INCLUDED_JSI_NETWORK | ||||
#include "lib/types.h" | #include "lib/types.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
namespace JSI_Network | namespace JSI_Network | ||||
{ | { | ||||
u16 GetDefaultPort(ScriptInterface::CxPrivate* pCxPrivate); | u16 GetDefaultPort(); | ||||
bool HasNetServer(ScriptInterface::CxPrivate* pCxPrivate); | bool HasNetServer(); | ||||
bool HasNetClient(ScriptInterface::CxPrivate* pCxPrivate); | bool HasNetClient(); | ||||
void StartNetworkGame(ScriptInterface::CxPrivate* pCxPrivate); | void StartNetworkGame(); | ||||
void SetNetworkGameAttributes(ScriptInterface::CxPrivate* pCxPrivate, JS::HandleValue attribs1); | void SetNetworkGameAttributes(ScriptInterface::CxPrivate* pCxPrivate, JS::HandleValue attribs1); | ||||
void StartNetworkHost(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& playerName, const u16 serverPort, const CStr& hostLobbyName); | void StartNetworkHost(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& playerName, const u16 serverPort, const CStr& hostLobbyName); | ||||
void StartNetworkJoin(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& playerName, const CStr& serverAddress, u16 serverPort, bool useSTUN, const CStr& hostJID); | void StartNetworkJoin(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& playerName, const CStr& serverAddress, u16 serverPort, bool useSTUN, const CStr& hostJID); | ||||
JS::Value FindStunEndpoint(ScriptInterface::CxPrivate* pCxPrivate, int port); | JS::Value FindStunEndpoint(ScriptInterface::CxPrivate* pCxPrivate, int port); | ||||
void DisconnectNetworkGame(ScriptInterface::CxPrivate* pCxPrivate); | void DisconnectNetworkGame(); | ||||
JS::Value PollNetworkClient(ScriptInterface::CxPrivate* pCxPrivate); | JS::Value PollNetworkClient(ScriptInterface::CxPrivate* pCxPrivate); | ||||
CStr GetPlayerGUID(ScriptInterface::CxPrivate* pCxPrivate); | CStr GetPlayerGUID(); | ||||
void KickPlayer(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& playerName, bool ban); | void KickPlayer(const CStrW& playerName, bool ban); | ||||
void AssignNetworkPlayer(ScriptInterface::CxPrivate* pCxPrivate, int playerID, const CStr& guid); | void AssignNetworkPlayer(int playerID, const CStr& guid); | ||||
void ClearAllPlayerReady (ScriptInterface::CxPrivate* pCxPrivate); | void ClearAllPlayerReady (); | ||||
void SendNetworkChat(ScriptInterface::CxPrivate* pCxPrivate, const CStrW& message); | void SendNetworkChat(const CStrW& message); | ||||
void SendNetworkReady(ScriptInterface::CxPrivate* pCxPrivate, int message); | void SendNetworkReady(int message); | ||||
void SetTurnLength(ScriptInterface::CxPrivate* pCxPrivate, int length); | void SetTurnLength(int length); | ||||
void RegisterScriptFunctions(const ScriptInterface& scriptInterface); | void RegisterScriptFunctions(const ScriptInterface& scriptInterface); | ||||
} | } | ||||
#endif // INCLUDED_JSI_NETWORK | #endif // INCLUDED_JSI_NETWORK |
Wildfire Games · Phabricator