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 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 item.
/// The session id.
/// Task.
///
Task OnPlaybackStart(BaseItem item, Guid sessionId);
///
/// Used to report playback progress for an item
///
/// The item.
/// The position ticks.
/// if set to true [is paused].
/// The session id.
/// Task.
///
Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, Guid sessionId);
///
/// Used to report that playback has ended for an item
///
/// The item.
/// The position ticks.
/// The session id.
/// Task.
///
Task OnPlaybackStopped(BaseItem item, long? positionTicks, Guid sessionId);
}
}