using System;
using System.Collections.Generic;
using System.Threading;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.SyncPlay;
namespace MediaBrowser.Controller.SyncPlay
{
///
/// Interface ISyncPlayManager.
///
public interface ISyncPlayManager
{
///
/// Creates a new group.
///
/// The session that's creating the group.
/// The request.
/// The cancellation token.
void NewGroup(SessionInfo session, NewGroupRequest request, CancellationToken cancellationToken);
///
/// Adds the session to a group.
///
/// The session.
/// The group identifier.
/// The request.
/// The cancellation token.
void JoinGroup(SessionInfo session, Guid groupId, JoinGroupRequest request, CancellationToken cancellationToken);
///
/// Removes the session from a group.
///
/// The session.
/// The cancellation token.
void LeaveGroup(SessionInfo session, CancellationToken cancellationToken);
///
/// Gets list of available groups for a session.
///
/// The session.
/// The list of available groups.
List ListGroups(SessionInfo session);
///
/// Handle a request by a session in a group.
///
/// The session.
/// The request.
/// The cancellation token.
void HandleRequest(SessionInfo session, IPlaybackGroupRequest request, CancellationToken cancellationToken);
///
/// Maps a session to a group.
///
/// The session.
/// The group.
/// Thrown when the user is in another group already.
void AddSessionToGroup(SessionInfo session, ISyncPlayGroupController group);
///
/// Unmaps a session from a group.
///
/// The session.
/// The group.
/// Thrown when the user is not found in the specified group.
void RemoveSessionFromGroup(SessionInfo session, ISyncPlayGroupController group);
}
}