// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Game.Online.Multiplayer; namespace osu.Game.Screens.Multi { [Cached(typeof(IRoomManager))] public interface IRoomManager { /// /// Invoked when the s have been updated. /// event Action RoomsUpdated; /// /// Whether an initial listing of rooms has been received. /// Bindable InitialRoomsReceived { get; } /// /// All the active s. /// IBindableList Rooms { get; } /// /// Creates a new . /// /// The to create. /// An action to be invoked if the creation succeeds. /// An action to be invoked if an error occurred. void CreateRoom(Room room, Action onSuccess = null, Action onError = null); /// /// Joins a . /// /// The to join. must be populated. /// /// void JoinRoom(Room room, Action onSuccess = null, Action onError = null); /// /// Parts the currently-joined . /// void PartRoom(); } }