using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Session;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Session
{
///
/// Interface ISessionManager
///
public interface ISessionManager
{
///
/// Adds the parts.
///
/// The remote controllers.
void AddParts(IEnumerable remoteControllers);
///
/// Occurs when [playback start].
///
event EventHandler PlaybackStart;
///
/// Occurs when [playback progress].
///
event EventHandler PlaybackProgress;
///
/// Occurs when [playback stopped].
///
event EventHandler PlaybackStopped;
///
/// Gets the sessions.
///
/// The sessions.
IEnumerable Sessions { get; }
///
/// Logs the user activity.
///
/// Type of the client.
/// The app version.
/// The device id.
/// Name of the device.
/// The user.
/// Task.
/// user
Task LogConnectionActivity(string clientType, string appVersion, string deviceId, string deviceName, User user);
///
/// Used to report that playback has started for an item
///
/// The info.
/// Task.
Task OnPlaybackStart(PlaybackInfo info);
///
/// Used to report playback progress for an item
///
/// The info.
/// Task.
///
Task OnPlaybackProgress(PlaybackProgressInfo info);
///
/// Used to report that playback has ended for an item
///
/// The info.
/// Task.
///
Task OnPlaybackStopped(PlaybackStopInfo info);
///
/// Sends the system command.
///
/// The session id.
/// The command.
/// The cancellation token.
/// Task.
Task SendSystemCommand(Guid sessionId, SystemCommand command, CancellationToken cancellationToken);
///
/// Sends the message command.
///
/// The session id.
/// The command.
/// The cancellation token.
/// Task.
Task SendMessageCommand(Guid sessionId, MessageCommand command, CancellationToken cancellationToken);
///
/// Sends the play command.
///
/// The session id.
/// The command.
/// The cancellation token.
/// Task.
Task SendPlayCommand(Guid sessionId, PlayRequest command, CancellationToken cancellationToken);
///
/// Sends the browse command.
///
/// The session id.
/// The command.
/// The cancellation token.
/// Task.
Task SendBrowseCommand(Guid sessionId, BrowseRequest command, CancellationToken cancellationToken);
///
/// Sends the playstate command.
///
/// The session id.
/// The command.
/// The cancellation token.
/// Task.
Task SendPlaystateCommand(Guid sessionId, PlaystateRequest command, CancellationToken cancellationToken);
}
}