From 57623886b25cd2104f326d5974ff8375ba4964f6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 28 Mar 2014 15:58:18 -0400 Subject: added generic remote control commands --- MediaBrowser.Model/Session/GenericCommand.cs | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 MediaBrowser.Model/Session/GenericCommand.cs (limited to 'MediaBrowser.Model/Session/GenericCommand.cs') diff --git a/MediaBrowser.Model/Session/GenericCommand.cs b/MediaBrowser.Model/Session/GenericCommand.cs new file mode 100644 index 000000000..3d5e503ef --- /dev/null +++ b/MediaBrowser.Model/Session/GenericCommand.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Session +{ + public class GenericCommand + { + public string Name { get; set; } + + public Dictionary Arguments { get; set; } + + public GenericCommand() + { + Arguments = new Dictionary(StringComparer.OrdinalIgnoreCase); + } + } + + public enum CoreGenericCommand + { + MoveUp = 0, + MoveDown = 1, + MoveLeft = 2, + MoveRight = 3, + PageUp = 4, + PageDown = 5, + PreviousLetter = 6, + NextLetter = 7, + ToggleOsd = 8, + ToggleContextMenu = 9, + Select = 10, + Back = 11, + TakeScreenshot = 12, + SendKey = 13, + SendString = 14, + GoHome = 15, + GoToSettings = 16, + VolumeUp = 17, + VolumeDown = 18, + Mute = 19, + Unmute = 20, + ToggleMute = 21 + } +} -- cgit v1.2.3 From 5e5b1f180c2a13152c8f318f045547c6508c5b3e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 28 Mar 2014 16:36:29 -0400 Subject: updated nuget --- MediaBrowser.Model/ApiClient/IApiClient.cs | 8 ++++++++ MediaBrowser.Model/Session/GenericCommand.cs | 5 +++++ Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 5 files changed, 18 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Model/Session/GenericCommand.cs') diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 8de54f34a..28c5822e9 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -589,6 +589,14 @@ namespace MediaBrowser.Model.ApiClient /// request Task SendPlayCommandAsync(string sessionId, PlayRequest request); + /// + /// Sends the command asynchronous. + /// + /// The session identifier. + /// The request. + /// Task. + Task SendCommandAsync(string sessionId, GenericCommand request); + /// /// Sends a system command to the client /// diff --git a/MediaBrowser.Model/Session/GenericCommand.cs b/MediaBrowser.Model/Session/GenericCommand.cs index 3d5e503ef..f7ea0a84a 100644 --- a/MediaBrowser.Model/Session/GenericCommand.cs +++ b/MediaBrowser.Model/Session/GenericCommand.cs @@ -7,6 +7,8 @@ namespace MediaBrowser.Model.Session { public string Name { get; set; } + public string ControllingUserId { get; set; } + public Dictionary Arguments { get; set; } public GenericCommand() @@ -15,6 +17,9 @@ namespace MediaBrowser.Model.Session } } + /// + /// This exists simply to identify a set of known commands. + /// public enum CoreGenericCommand { MoveUp = 0, diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index c550b350c..a3b4533dd 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.345 + 3.0.346 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index a6fa5c152..b80f673e3 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.345 + 3.0.346 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index cc87b0030..eccfcccd2 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.345 + 3.0.346 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - + -- cgit v1.2.3