Changeset View
Changeset View
Standalone View
Standalone View
source/rdb/scripting/JSInterface_Rdb.h
/* Copyright (C) 2018 Wildfire Games. | |||||
* This file is part of 0 A.D. | |||||
* | |||||
* 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 | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* 0 A.D. is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#ifndef INCLUDED_JSI_RDB | |||||
#define INCLUDED_JSI_RDB | |||||
#include "lib/config2.h" | |||||
#include "scriptinterface/ScriptInterface.h" | |||||
#include "rdb/IRdbClient.h" | |||||
#include <string> | |||||
namespace JSI_Rdb | |||||
{ | |||||
void RegisterScriptFunctions(const ScriptInterface& scriptInterface); | |||||
bool HasClient(ScriptInterface::CxPrivate* pCxPrivate); | |||||
#if CONFIG2_RDB | |||||
int GetHandle(ScriptInterface::CxPrivate* pCxPrivate); | |||||
void StartClient(ScriptInterface::CxPrivate* pCxPrivate, int handle, const std::wstring& username, const std::wstring& password); | |||||
void StartRegisterClient(ScriptInterface::CxPrivate* pCxPrivate, int handle, const std::wstring& username, const std::wstring& password); | |||||
void StopClient(ScriptInterface::CxPrivate* pCxPrivate); | |||||
JS::Value GuiPollNewMsg(ScriptInterface::CxPrivate* pCxPrivate, int handle); | |||||
void QueryForReplayList(ScriptInterface::CxPrivate* pCxPrivate, int handle, JS::HandleValue attribs); | |||||
void QueryForReplayDatas(ScriptInterface::CxPrivate* pCxPrivate, int handle, JS::HandleValue attribs); | |||||
void QueryForUserDatas(ScriptInterface::CxPrivate* pCxPrivate, int handle, JS::HandleValue attribs); | |||||
#endif // CONFIG2_RDB | |||||
} | |||||
#endif // INCLUDED_JSI_LOBBY |
Wildfire Games · Phabricator