using System; using System.Threading; using Jellyfin.Data.Entities; using MediaBrowser.Controller.Session; using MediaBrowser.Model.SyncPlay; namespace MediaBrowser.Controller.SyncPlay { /// /// Interface ISyncPlayGroupController. /// public interface ISyncPlayGroupController { /// /// Gets the group identifier. /// /// The group identifier. Guid GroupId { get; } /// /// Gets the play queue. /// /// The play queue. PlayQueueManager PlayQueue { get; } /// /// Checks if the group is empty. /// /// true if the group is empty, false otherwise bool IsGroupEmpty(); /// /// Initializes the group with the session's info. /// /// The session. /// The request. /// The cancellation token. void CreateGroup(SessionInfo session, NewGroupRequest request, CancellationToken cancellationToken); /// /// Adds the session to the group. /// /// The session. /// The request. /// The cancellation token. void SessionJoin(SessionInfo session, JoinGroupRequest request, CancellationToken cancellationToken); /// /// Restores the state of a session that already joined the group. /// /// The session. /// The request. /// The cancellation token. void SessionRestore(SessionInfo session, JoinGroupRequest request, CancellationToken cancellationToken); /// /// Removes the session from the group. /// /// The session. /// The cancellation token. void SessionLeave(SessionInfo session, CancellationToken cancellationToken); /// /// Handles the requested action by the session. /// /// The session. /// The requested action. /// The cancellation token. void HandleRequest(SessionInfo session, IPlaybackGroupRequest request, CancellationToken cancellationToken); /// /// Gets the info about the group for the clients. /// /// The group info for the clients. GroupInfoDto GetInfo(); /// /// Checks if a user has access to all content in the play queue. /// /// The user. /// true if the user can access the play queue; false otherwise. bool HasAccessToPlayQueue(User user); } }