Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
JSInterface_Network.cpp File Reference
#include "precompiled.h"
#include "JSInterface_Network.h"
#include "lib/code_generation.h"
#include "lib/config2.h"
#include "lib/debug.h"
#include "lib/utf8.h"
#include "lobby/XmppClient.h"
#include "network/NetClient.h"
#include "network/NetMessage.h"
#include "network/NetServer.h"
#include "ps/CLogger.h"
#include "ps/CStr.h"
#include "ps/GUID.h"
#include "ps/Game.h"
#include "ps/Hashing.h"
#include "ps/Pyrogenesis.h"
#include "ps/SavedGame.h"
#include "scriptinterface/FunctionWrapper.h"
#include "scriptinterface/JSON.h"
#include "scriptinterface/Conversions.h"
#include "scriptinterface/Request.h"
#include "scriptinterface/StructuredClone.h"
#include <fmt/format.h>
#include <js/PropertyAndElement.h>
#include <js/RootingAPI.h>
#include <js/TypeDecls.h>
#include <js/Value.h>
#include <optional>
#include <set>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for JSInterface_Network.cpp:

Namespaces

namespace  Script
 Abstraction around a SpiderMonkey JSContext.
 
namespace  JSI_Network
 

Functions

std::uint16_t JSI_Network::GetDefaultPort ()
 
bool JSI_Network::IsNetController ()
 
bool JSI_Network::HasNetServer ()
 
bool JSI_Network::HasNetClient ()
 
void JSI_Network::StartNetworkHost (const CStrW &playerName, const std::uint16_t serverPort, const CStr &password, const bool continueSavedGame, bool storeReplay)
 
void JSI_Network::StartNetworkJoin (const CStrW &playerName, const CStr &serverAddress, std::uint16_t serverPort, bool storeReplay)
 
void JSI_Network::StartNetworkJoinLobby (const CStrW &playerName, const CStr &hostJID, const CStr &password)
 Requires XmppClient to send iq request to the server to get server's ip and port based on passed password. More...
 
void JSI_Network::DisconnectNetworkGame ()
 
CStr JSI_Network::GetPlayerGUID ()
 
JS::Value JSI_Network::PollNetworkClient (const Script::Interface &guiInterface)
 
void JSI_Network::SendGameSetupMessage (const Script::Interface &scriptInterface, JS::HandleValue attribs1)
 
void JSI_Network::AssignNetworkPlayer (int playerID, const CStr &guid)
 
void JSI_Network::KickPlayer (const CStrW &playerName, bool ban)
 
void JSI_Network::SendNetworkChat (const Script::Request &rq, const CStrW &message, JS::HandleValue handle)
 
void JSI_Network::SendNetworkReady (int message)
 
void JSI_Network::ClearAllPlayerReady ()
 
void JSI_Network::StartNetworkGame (const Script::Interface &scriptInterface, JS::HandleValue savegame, JS::HandleValue attribs1)
 
void JSI_Network::SetTurnLength (int length)
 
void JSI_Network::SendNetworkFlare (JS::HandleValue position)
 
void JSI_Network::RegisterScriptFunctions (const Script::Request &rq)