diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-24 11:42:30 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-24 11:42:30 -0400 |
| commit | c61cc4a304978a59f66c86c3618f8f6dd8ccca7b (patch) | |
| tree | b42db241185bac265c315998a880a24d24b56b04 /MediaBrowser.Controller/Session | |
| parent | 04319900f9ac6ebac0668927ddb38212f37477d0 (diff) | |
support more kinds of remote control besides web socket
Diffstat (limited to 'MediaBrowser.Controller/Session')
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionManager.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionRemoteController.cs | 25 |
2 files changed, 42 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index fba1d26e8b..f8f7ded2b7 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.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 @@ -12,6 +14,12 @@ namespace MediaBrowser.Controller.Session 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> event EventHandler<PlaybackProgressEventArgs> PlaybackStart; @@ -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); } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Session/ISessionRemoteController.cs b/MediaBrowser.Controller/Session/ISessionRemoteController.cs new file mode 100644 index 0000000000..1f6faeb9c2 --- /dev/null +++ b/MediaBrowser.Controller/Session/ISessionRemoteController.cs @@ -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); + } +} |
