Changeset View
Changeset View
Standalone View
Standalone View
source/network/scripting/JSInterface_Network.h
/* Copyright (C) 2018 Wildfire Games. | /* Copyright (C) 2018 Wildfire Games. | ||||
Stan: Year | |||||
* 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 16 Lines | |||||
{ | { | ||||
u16 GetDefaultPort(ScriptInterface::CmptPrivate* pCmptPrivate); | u16 GetDefaultPort(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
bool HasNetServer(ScriptInterface::CmptPrivate* pCmptPrivate); | bool HasNetServer(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
bool HasNetClient(ScriptInterface::CmptPrivate* pCmptPrivate); | bool HasNetClient(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
void StartNetworkGame(ScriptInterface::CmptPrivate* pCmptPrivate); | void StartNetworkGame(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
void SetNetworkGameAttributes(ScriptInterface::CmptPrivate* pCmptPrivate, JS::HandleValue attribs1); | void SetNetworkGameAttributes(ScriptInterface::CmptPrivate* pCmptPrivate, JS::HandleValue attribs1); | ||||
void StartNetworkHost(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, const u16 serverPort, const CStr& hostLobbyName); | void StartNetworkHost(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, const u16 serverPort, const CStr& hostLobbyName); | ||||
void StartNetworkJoin(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, const CStr& serverAddress, u16 serverPort, bool useSTUN, const CStr& hostJID); | void StartNetworkJoin(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, const CStr& serverAddress, u16 serverPort, bool useSTUN, const CStr& hostJID); | ||||
void StartNetworkJoinSafe(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, u16 serverPort, bool useSTUN, const CStr& hostJID); | |||||
bbUnsubmitted Done Inline ActionsA review should check whether we need this additional function (probably has todo with direct joins) and might care about naming (what is "safe"?) bb: A review should check whether we need this additional function (probably has todo with direct… | |||||
SilierAuthorUnsubmitted Done Inline Actionsyes we do need one with ip for direct connection, I dont know about name, it just needed something quick Silier: yes we do need one with ip for direct connection, I dont know about name, it just needed… | |||||
JS::Value FindStunEndpoint(ScriptInterface::CmptPrivate* pCmptPrivate, int port); | JS::Value FindStunEndpoint(ScriptInterface::CmptPrivate* pCmptPrivate, int port); | ||||
void DisconnectNetworkGame(ScriptInterface::CmptPrivate* pCmptPrivate); | void DisconnectNetworkGame(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
JS::Value PollNetworkClient(ScriptInterface::CmptPrivate* pCmptPrivate); | JS::Value PollNetworkClient(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
CStr GetPlayerGUID(ScriptInterface::CmptPrivate* pCmptPrivate); | CStr GetPlayerGUID(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
void KickPlayer(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, bool ban); | void KickPlayer(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& playerName, bool ban); | ||||
void AssignNetworkPlayer(ScriptInterface::CmptPrivate* pCmptPrivate, int playerID, const CStr& guid); | void AssignNetworkPlayer(ScriptInterface::CmptPrivate* pCmptPrivate, int playerID, const CStr& guid); | ||||
void ClearAllPlayerReady (ScriptInterface::CmptPrivate* pCmptPrivate); | void ClearAllPlayerReady (ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
void SendNetworkChat(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& message); | void SendNetworkChat(ScriptInterface::CmptPrivate* pCmptPrivate, const CStrW& message); | ||||
void SendNetworkReady(ScriptInterface::CmptPrivate* pCmptPrivate, int message); | void SendNetworkReady(ScriptInterface::CmptPrivate* pCmptPrivate, int message); | ||||
void SetTurnLength(ScriptInterface::CmptPrivate* pCmptPrivate, int length); | void SetTurnLength(ScriptInterface::CmptPrivate* pCmptPrivate, int length); | ||||
void RegisterScriptFunctions(const ScriptInterface& scriptInterface); | void RegisterScriptFunctions(const ScriptInterface& scriptInterface); | ||||
Done Inline Actions8? Stan: 8? | |||||
} | } | ||||
#endif // INCLUDED_JSI_NETWORK | #endif // INCLUDED_JSI_NETWORK |
Wildfire Games · Phabricator
Year