From bb5386bb3a8b71406728f8bd2249cf6e02a34ed2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 31 Mar 2014 17:04:22 -0400 Subject: added more remote control commands --- MediaBrowser.Model/ApiClient/IApiClient.cs | 10 +----- MediaBrowser.Model/ApiClient/IServerEvents.cs | 5 +-- MediaBrowser.Model/ApiClient/ServerEventArgs.cs | 4 +-- MediaBrowser.Model/MediaBrowser.Model.csproj | 3 +- MediaBrowser.Model/Session/GeneralCommand.cs | 48 +++++++++++++++++++++++++ MediaBrowser.Model/Session/GenericCommand.cs | 48 ------------------------- MediaBrowser.Model/Session/SystemCommand.cs | 14 -------- MediaBrowser.Model/System/SystemInfo.cs | 6 ++++ 8 files changed, 61 insertions(+), 77 deletions(-) create mode 100644 MediaBrowser.Model/Session/GeneralCommand.cs delete mode 100644 MediaBrowser.Model/Session/GenericCommand.cs delete mode 100644 MediaBrowser.Model/Session/SystemCommand.cs (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 28c5822e9..dc5e26be3 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -593,17 +593,9 @@ namespace MediaBrowser.Model.ApiClient /// Sends the command asynchronous. /// /// The session identifier. - /// The request. - /// Task. - Task SendCommandAsync(string sessionId, GenericCommand request); - - /// - /// Sends a system command to the client - /// - /// The session id. /// The command. /// Task. - Task SendSystemCommandAsync(string sessionId, SystemCommand command); + Task SendCommandAsync(string sessionId, GeneralCommand command); /// /// Instructs the client to display a message to the user diff --git a/MediaBrowser.Model/ApiClient/IServerEvents.cs b/MediaBrowser.Model/ApiClient/IServerEvents.cs index 0a38c63ad..63135baa2 100644 --- a/MediaBrowser.Model/ApiClient/IServerEvents.cs +++ b/MediaBrowser.Model/ApiClient/IServerEvents.cs @@ -1,4 +1,5 @@ -using System; +using MediaBrowser.Model.Session; +using System; namespace MediaBrowser.Model.ApiClient { @@ -66,7 +67,7 @@ namespace MediaBrowser.Model.ApiClient /// /// Occurs when [system command]. /// - event EventHandler SystemCommand; + event EventHandler GeneralCommand; /// /// Occurs when [notification added]. /// diff --git a/MediaBrowser.Model/ApiClient/ServerEventArgs.cs b/MediaBrowser.Model/ApiClient/ServerEventArgs.cs index d3212caf4..b7f709e95 100644 --- a/MediaBrowser.Model/ApiClient/ServerEventArgs.cs +++ b/MediaBrowser.Model/ApiClient/ServerEventArgs.cs @@ -152,13 +152,13 @@ namespace MediaBrowser.Model.ApiClient /// /// Class SystemCommandEventArgs /// - public class SystemCommandEventArgs : EventArgs + public class GeneralCommandEventArgs : EventArgs { /// /// Gets or sets the command. /// /// The command. - public SystemCommand Command { get; set; } + public GeneralCommand Command { get; set; } } /// diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 207543fe8..0859f6999 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -132,7 +132,7 @@ - + @@ -171,7 +171,6 @@ - diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs new file mode 100644 index 000000000..0de7d6dd8 --- /dev/null +++ b/MediaBrowser.Model/Session/GeneralCommand.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Session +{ + public class GeneralCommand + { + public string Name { get; set; } + + public string ControllingUserId { get; set; } + + public Dictionary Arguments { get; set; } + + public GeneralCommand() + { + Arguments = new Dictionary(StringComparer.OrdinalIgnoreCase); + } + } + + /// + /// This exists simply to identify a set of known commands. + /// + public enum GeneralCommandType + { + 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 + } +} diff --git a/MediaBrowser.Model/Session/GenericCommand.cs b/MediaBrowser.Model/Session/GenericCommand.cs deleted file mode 100644 index f7ea0a84a..000000000 --- a/MediaBrowser.Model/Session/GenericCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace MediaBrowser.Model.Session -{ - public class GenericCommand - { - public string Name { get; set; } - - public string ControllingUserId { get; set; } - - public Dictionary Arguments { get; set; } - - public GenericCommand() - { - Arguments = new Dictionary(StringComparer.OrdinalIgnoreCase); - } - } - - /// - /// This exists simply to identify a set of known commands. - /// - 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 - } -} diff --git a/MediaBrowser.Model/Session/SystemCommand.cs b/MediaBrowser.Model/Session/SystemCommand.cs deleted file mode 100644 index 2fcaef6e3..000000000 --- a/MediaBrowser.Model/Session/SystemCommand.cs +++ /dev/null @@ -1,14 +0,0 @@ - -namespace MediaBrowser.Model.Session -{ - public enum SystemCommand - { - GoHome, - GoToSettings, - VolumeUp, - VolumeDown, - Mute, - Unmute, - ToggleMute - } -} diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index ec31c5529..5b1e7d6bb 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -116,6 +116,12 @@ namespace MediaBrowser.Model.System /// The log path. public string LogPath { get; set; } + /// + /// Gets or sets the internal metadata path. + /// + /// The internal metadata path. + public string InternalMetadataPath { get; set; } + /// /// Gets or sets the transcoding temporary path. /// -- cgit v1.2.3