// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Threading.Tasks; namespace osu.Game.Online.Multiplayer { /// /// Interface for an in-room multiplayer server. /// public interface IMultiplayerRoomServer { /// /// Request to leave the currently joined room. /// /// If the user is not in a 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. /// A user other than the current host is attempting to transfer host. /// If the user is not in a room. Task TransferHost(int userId); /// /// As the host, update the settings of the currently joined room. /// /// The new settings to apply. /// A user other than the current host is attempting to transfer host. /// If the user is not in a room. 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. /// If the user is not in a room. Task ChangeState(MultiplayerUserState newState); /// /// As the host of a room, start the match. /// /// A user other than the current host is attempting to start the game. /// If the user is not in a room. /// If an attempt to start the game occurs when the game's (or users') state disallows it. Task StartMatch(); } }