using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using System;
using System.Collections.Generic;
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; }
///
/// 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.
/// if set to true [is paused].
/// Type of the client.
/// The device id.
/// Name of the device.
/// Task.
///
Task OnPlaybackProgress(User user, BaseItem item, long? positionTicks, bool isPaused, 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);
}
}