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
{
///
/// 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; }
///
/// Adds the parts.
///
/// The session factories.
void AddParts(IEnumerable sessionFactories);
///
/// Logs the user activity.
///
/// Type of the client.
/// The app version.
/// The device id.
/// Name of the device.
/// The remote end point.
/// The user.
/// Task.
/// user
Task LogSessionActivity(string clientType, string appVersion, string deviceId, string deviceName, string remoteEndPoint, 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);
///
/// Sends the restart required message.
///
/// The cancellation token.
/// Task.
Task SendRestartRequiredNotification(CancellationToken cancellationToken);
///
/// Sends the server shutdown notification.
///
/// The cancellation token.
/// Task.
Task SendServerShutdownNotification(CancellationToken cancellationToken);
///
/// Sends the server restart notification.
///
/// The cancellation token.
/// Task.
Task SendServerRestartNotification(CancellationToken cancellationToken);
}
}