using System.Threading.Tasks; namespace osu.Game.Online.RealtimeMultiplayer { /// /// An interface defining the spectator server instance. /// public interface IMultiplayerServer { /// /// Request to join a multiplayer room. /// /// The databased room ID. /// If the user is already in the requested (or another) room. Task JoinRoom(long roomId); /// /// Request to leave the currently joined room. /// Task LeaveRoom(); /// /// Transfer the host of the currently joined room to another user in the room. /// /// The new user which is to become host. Task TransferHost(long userId); /// /// As the host, update the settings of the currently joined room. /// /// The new settings to apply. Task ChangeSettings(MultiplayerRoomSettings settings); /// /// Change the local user state in the currently joined room. /// /// The proposed new state. /// If the state change requested is not valid, given the previous state or room state. Task ChangeState(MultiplayerUserState newState); /// /// As the host of a room, start the match. /// Task StartMatch(); } }