using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Model.Session;
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 all connections.
///
/// All connections.
IEnumerable AllConnections { get; }
///
/// Gets the active connections.
///
/// The active connections.
IEnumerable RecentConnections { get; }
///
/// Logs the user activity.
///
/// Type of the client.
/// The device id.
/// Name of the device.
/// The user.
/// Task.
/// user
Task LogConnectionActivity(string clientType, string deviceId, string deviceName, User user);
///
/// Used to report that playback has started for an item
///
/// The user.
/// The item.
/// Type of the client.
/// The device id.
/// Name of the device.
///
void OnPlaybackStart(User user, BaseItem item, string clientType, string deviceId, string deviceName);
///
/// Used to report playback progress for an item
///
/// The user.
/// The item.
/// The position ticks.
/// Type of the client.
/// The device id.
/// Name of the device.
/// Task.
///
Task OnPlaybackProgress(User user, BaseItem item, long? positionTicks, string clientType, string deviceId, string deviceName);
///
/// Used to report that playback has ended for an item
///
/// The user.
/// The item.
/// The position ticks.
/// Type of the client.
/// The device id.
/// Name of the device.
/// Task.
///
Task OnPlaybackStopped(User user, BaseItem item, long? positionTicks, string clientType, string deviceId, string deviceName);
}
}