TrackManiaControl/core/Communication/CommunicationMethods.php

191 lines
4.9 KiB
PHP
Raw Permalink Normal View History

2015-06-21 22:24:10 +02:00
<?php
namespace ManiaControl\Communication;
2015-06-21 22:24:10 +02:00
/**
* Communication Methods Interface
*
* @author ManiaControl Team <mail@maniacontrol.com>
2020-01-22 10:39:35 +01:00
* @copyright 2014-2020 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
interface CommunicationMethods {
2020-04-24 18:51:38 +02:00
/** Reboots Mania Control
2015-07-11 15:54:15 +02:00
* Optional Params
* - message
*/
2020-04-24 18:51:38 +02:00
const REBOOT_MANIA_CONTROL = "ManiaControl.Reboot";
/** @deprecated */
const RESTART_MANIA_CONTROL = "ManiaControl.Restart";
2017-05-13 23:52:51 +02:00
/** Update the ManiaControl Core */
const UPDATE_MANIA_CONTROL_CORE = "UpdateManager.CoreUpdate";
2015-07-11 15:54:15 +02:00
/** Grands an Authentication Level on a Player
* Required Parameters
* - login (login of the player)
* - level (integer, 0-3 possible, @see AuthenticationManager)
*/
const GRANT_AUTH_LEVEL = "AuthenticationManager.GrandLevel";
/** Revokes an Authentication Level on a Player
* Required Parameters
* - login (login of the player)
*/
const REVOKE_AUTH_LEVEL = "AuthenticationManager.RevokeLevel";
2015-07-11 15:18:44 +02:00
/** Provides the Server Options
* no Parameters
*/
const GET_SERVER_OPTIONS = "ServerOptions.GetServerOptions";
/** Set Server Options
* Required Parameter
2017-05-25 16:31:24 +02:00
* - serverOptions (array(optionName1 => value1, optionName2 => value2...))
2015-07-11 15:18:44 +02:00
*/
const SET_SERVER_OPTIONS = "ServerOptions.SetServerOptions";
2020-04-28 17:52:17 +02:00
/** Provides the GameModeSettings
* no Parameters
*/
const GET_GAMEMODE_SETTINGS = "GameModeSettings.GetGameModeSettings";
/** Set GameModeSettings
* Required Parameter
* - gameModeSettings (array(settingName1 => value1, settingName2 => value2...))
*/
const SET_GAMEMODE_SETTINGS = "GameModeSettings.SetGameModeSettings";
/** @deprecated
* Provides the ModeScriptSettings
* no Parameters
*/
const GET_SCRIPT_SETTINGS = "ScriptSettings.GetScriptSettings";
2020-04-28 17:52:17 +02:00
/** @deprecated
* Set ModeScriptSettings
* Required Parameter
2015-07-11 15:18:44 +02:00
* - scriptSettings (array(settingName1 => value1, settingName2 => value2...))
*/
const SET_SCRIPT_SETTINGS = "ScriptSettings.SetScriptSettings";
2015-07-11 15:18:44 +02:00
/** Restarts the Current Map
* no Parameters
*/
const RESTART_MAP = "MapActions.RestartMap";
/** Skips the Current Map
* no Parameters
*/
const SKIP_MAP = "MapActions.SkipMap";
/** Skips to a Specific Map by MxId or MapUid
* Required Parameters
2015-07-11 14:10:28 +02:00
* - mxId (integer)
* OR
2015-07-11 14:10:28 +02:00
* - mapUid (string)
*/
const SKIP_TO_MAP = "MapActions.SkipToMap";
2015-07-11 13:04:34 +02:00
/** Adds a Map from Mania Exchange to the Server
* Required Parameters
2015-07-11 14:10:28 +02:00
* - mxId (integer)
2015-07-11 13:04:34 +02:00
* (no success returning yet because of asynchronously of adding)
*/
const ADD_MAP = "MapManager.AddMap";
/** Removes a Map from the Server
* Required Parameters
2015-07-11 14:10:28 +02:00
* - mapUid (string)
2015-07-11 13:04:34 +02:00
* Optional Parameters
* - displayMessage (default true)
* - eraseMapFile (default false)
*/
const REMOVE_MAP = "MapManager.RemoveMap";
/** Updates a Map over Mania Exchange
* Required Parameters
* - mapUid
* (no success returning yet because of asynchronously of adding)
*/
const UPDATE_MAP = "MapManager.UpdateMap";
/** Gets the current Map
2017-05-25 16:31:24 +02:00
* no Parameters
2015-07-11 13:04:34 +02:00
*/
const GET_CURRENT_MAP = "MapManager.GetCurrentMap";
/** Gets the specific Map
2017-05-25 16:31:24 +02:00
* Required Parameters
* - mxId (integer)
* OR
* - mapUid (string)
2015-07-11 13:04:34 +02:00
*/
const GET_MAP = "MapManager.GetMap";
/** Gets the current Map List
* no Parameters
*/
const GET_MAP_LIST = "MapManager.GetMapList";
2015-06-23 21:20:44 +02:00
/** Gets Mania Control PlayerList
* no Parameters
*/
const GET_PLAYER_LIST = "PlayerManager.GetPlayerList";
/** Warns a Player
* Required Params
* - login
*/
const WARN_PLAYER = "PlayerActions.WarnPlayer";
/** Mutes a Player
* Required Params
* - login
*/
const MUTE_PLAYER = "PlayerActions.MutePlayer";
/** UnMutes a Player
* Required Params
* - login
*/
const UNMUTE_PLAYER = "PlayerActions.UnMutePlayer";
/** UnMutes a Player
* Required Params
* - login
* Optional Params
* - message
*/
const KICK_PLAYER = "PlayerActions.KickPlayer";
2015-06-26 13:06:05 +02:00
/** Forces a player to Spectator
* Required Params
* - login
*/
2015-06-23 21:20:44 +02:00
const FORCE_PLAYER_TO_SPEC = "PlayerActions.ForcePlayerToSpec";
2015-06-26 13:06:05 +02:00
/** Forces a player to Spectator
* Required Params
* - login
* Optional Params
2015-07-11 14:10:28 +02:00
* - teamId (integer, id of the team the player should get forced into it)
2015-06-26 13:06:05 +02:00
*/
2015-06-23 21:20:44 +02:00
const FORCE_PLAYER_TO_PLAY = "PlayerActions.ForcePlayerToPlay";
/** Returns the last 200 lines of the chat (inclusive player logins and nicknames)
* No Params
*/
2015-06-21 22:24:10 +02:00
const GET_SERVER_CHAT = "Chat.GetServerChat";
/** Sends a ChatMessage to the Server
* Required Params:
* - message
* Optional Params
* - prefix (use custom prefix or false for no prefix)
* - login (login of a receiver if the message don't get sent to all)
* - adminLevel (minimum Admin Level if the Message should get sent to an Admin)
* - type (type of the message (information, error, success or usage)
*/
const SEND_CHAT_MESSAGE = "Chat.SendChatMessage";
2015-06-21 22:24:10 +02:00
}