mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
support more kinds of remote control besides web socket
This commit is contained in:
@@ -165,6 +165,7 @@
|
||||
<Compile Include="Kernel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Providers\BaseMetadataProvider.cs" />
|
||||
<Compile Include="Session\ISessionRemoteController.cs" />
|
||||
<Compile Include="Session\PlaybackInfo.cs" />
|
||||
<Compile Include="Session\SessionInfo.cs" />
|
||||
<Compile Include="Sorting\IBaseItemComparer.cs" />
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
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
|
||||
@@ -11,6 +13,12 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
public interface ISessionManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the parts.
|
||||
/// </summary>
|
||||
/// <param name="remoteControllers">The remote controllers.</param>
|
||||
void AddParts(IEnumerable<ISessionRemoteController> remoteControllers);
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when [playback start].
|
||||
/// </summary>
|
||||
@@ -72,5 +80,14 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
Task OnPlaybackStopped(BaseItem item, long? positionTicks, Guid sessionId);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the system command.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session id.</param>
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendSystemCommand(Guid sessionId, SystemCommand command, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
25
MediaBrowser.Controller/Session/ISessionRemoteController.cs
Normal file
25
MediaBrowser.Controller/Session/ISessionRemoteController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using MediaBrowser.Model.Session;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
public interface ISessionRemoteController
|
||||
{
|
||||
/// <summary>
|
||||
/// Supportses the specified session.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||
bool Supports(SessionInfo session);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the system command.
|
||||
/// </summary>
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendSystemCommand(SessionInfo session, SystemCommand command, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user