using System.Threading;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.SyncPlay;
namespace MediaBrowser.Controller.SyncPlay
{
///
/// Interface IGroupState.
///
public interface IGroupState
{
///
/// Gets the group state type.
///
/// The group state type.
GroupStateType Type { get; }
///
/// Handles a session that joined the group.
///
/// The context of the state.
/// The previous state.
/// The session.
/// The cancellation token.
void SessionJoined(IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a session that is leaving the group.
///
/// The context of the state.
/// The previous state.
/// The session.
/// The cancellation token.
void SessionLeaving(IGroupStateContext context, GroupStateType prevState, SessionInfo session, CancellationToken cancellationToken);
///
/// Generic handler. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The generic request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, IGroupPlaybackRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a play request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The play request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PlayGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-playlist-item request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The set-playlist-item request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetPlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a remove-items request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The remove-items request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, RemoveFromPlaylistGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a move-playlist-item request from a session. Context's state should not change.
///
/// The context of the state.
/// The previous state.
/// The move-playlist-item request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, MovePlaylistItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a queue request from a session. Context's state should not change.
///
/// The context of the state.
/// The previous state.
/// The queue request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, QueueGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles an unpause request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The unpause request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, UnpauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a pause request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The pause request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PauseGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a stop request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The stop request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, StopGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a seek request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The seek request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, SeekGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a buffer request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The buffer request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, BufferGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a ready request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The ready request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a next-track request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The next-track request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a previous-track request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The previous-track request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-repeat-mode request from a session. Context's state should not change.
///
/// The context of the state.
/// The previous state.
/// The repeat-mode request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetRepeatModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a set-shuffle-mode request from a session. Context's state should not change.
///
/// The context of the state.
/// The previous state.
/// The shuffle-mode request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, SetShuffleModeGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Updates the ping of a session. Context's state should not change.
///
/// The context of the state.
/// The previous state.
/// The ping request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PingGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
///
/// Handles a ignore-wait request from a session. Context's state can change.
///
/// The context of the state.
/// The previous state.
/// The ignore-wait request.
/// The session.
/// The cancellation token.
void HandleRequest(IGroupStateContext context, GroupStateType prevState, IgnoreWaitGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
}
}