|
|
@ -83,6 +83,7 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// <param name="deviceName">Name of the device.</param>
|
|
|
|
/// <param name="deviceName">Name of the device.</param>
|
|
|
|
/// <param name="remoteEndPoint">The remote end point.</param>
|
|
|
|
/// <param name="remoteEndPoint">The remote end point.</param>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
|
|
|
|
/// <returns>Session information.</returns>
|
|
|
|
SessionInfo LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, Jellyfin.Data.Entities.User user);
|
|
|
|
SessionInfo LogSessionActivity(string appName, string appVersion, string deviceId, string deviceName, string remoteEndPoint, Jellyfin.Data.Entities.User user);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -105,7 +106,7 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="info">The info.</param>
|
|
|
|
/// <param name="info">The info.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <exception cref="ArgumentNullException"></exception>
|
|
|
|
/// <exception cref="ArgumentNullException">Throws if an argument is null.</exception>
|
|
|
|
Task OnPlaybackProgress(PlaybackProgressInfo info);
|
|
|
|
Task OnPlaybackProgress(PlaybackProgressInfo info);
|
|
|
|
|
|
|
|
|
|
|
|
Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated);
|
|
|
|
Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated);
|
|
|
@ -115,14 +116,13 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="info">The info.</param>
|
|
|
|
/// <param name="info">The info.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <exception cref="ArgumentNullException"></exception>
|
|
|
|
/// <exception cref="ArgumentNullException">Throws if an argument is null.</exception>
|
|
|
|
Task OnPlaybackStopped(PlaybackStopInfo info);
|
|
|
|
Task OnPlaybackStopped(PlaybackStopInfo info);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Reports the session ended.
|
|
|
|
/// Reports the session ended.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="sessionId">The session identifier.</param>
|
|
|
|
/// <param name="sessionId">The session identifier.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
|
|
|
void ReportSessionEnded(string sessionId);
|
|
|
|
void ReportSessionEnded(string sessionId);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -170,6 +170,7 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// <param name="session">The session.</param>
|
|
|
|
/// <param name="session">The session.</param>
|
|
|
|
/// <param name="command">The group update.</param>
|
|
|
|
/// <param name="command">The group update.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
|
|
/// <typeparam name="T">Type of group.</typeparam>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task SendSyncPlayGroupUpdate<T>(SessionInfo session, GroupUpdate<T> command, CancellationToken cancellationToken);
|
|
|
|
Task SendSyncPlayGroupUpdate<T>(SessionInfo session, GroupUpdate<T> command, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
@ -196,8 +197,8 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Sends the message to admin sessions.
|
|
|
|
/// Sends the message to admin sessions.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
/// <typeparam name="T">Type of data.</typeparam>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <param name="name">Message type name.</param>
|
|
|
|
/// <param name="data">The data.</param>
|
|
|
|
/// <param name="data">The data.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
@ -206,18 +207,31 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Sends the message to user sessions.
|
|
|
|
/// Sends the message to user sessions.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
/// <typeparam name="T">Type of data.</typeparam>
|
|
|
|
|
|
|
|
/// <param name="userIds">Users to send messages to.</param>
|
|
|
|
|
|
|
|
/// <param name="name">Message type name.</param>
|
|
|
|
|
|
|
|
/// <param name="data">The data.</param>
|
|
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken);
|
|
|
|
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Sends the message to user sessions.
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <typeparam name="T">Type of data.</typeparam>
|
|
|
|
|
|
|
|
/// <param name="userIds">Users to send messages to.</param>
|
|
|
|
|
|
|
|
/// <param name="name">Message type name.</param>
|
|
|
|
|
|
|
|
/// <param name="dataFn">Data function.</param>
|
|
|
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken);
|
|
|
|
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Sends the message to user device sessions.
|
|
|
|
/// Sends the message to user device sessions.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
/// <typeparam name="T">Type of data.</typeparam>
|
|
|
|
/// <param name="deviceId">The device identifier.</param>
|
|
|
|
/// <param name="deviceId">The device identifier.</param>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <param name="name">Message type name.</param>
|
|
|
|
/// <param name="data">The data.</param>
|
|
|
|
/// <param name="data">The data.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
@ -353,6 +367,8 @@ namespace MediaBrowser.Controller.Session
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Revokes the user tokens.
|
|
|
|
/// Revokes the user tokens.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="userId">User ID.</param>
|
|
|
|
|
|
|
|
/// <param name="currentAccessToken">Current access token.</param>
|
|
|
|
void RevokeUserTokens(Guid userId, string currentAccessToken);
|
|
|
|
void RevokeUserTokens(Guid userId, string currentAccessToken);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|