From 536c05bd42f8c519aa6b29717d81351d1e9d0e31 Mon Sep 17 00:00:00 2001 From: hsgwon Date: Wed, 2 Oct 2019 17:06:55 +0900 Subject: [PATCH] [MediaController] Add capability method for subtitle, 360 mode (#1048) * [MediaController] Add capability method for subtitle, 360 mode --- .../MediaController/MediaControlServer.cs | 38 ++++++++++++++++++++ .../MediaController/MediaController.cs | 42 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs index 4b788b8..1c1dca6 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs @@ -621,6 +621,44 @@ namespace Tizen.Multimedia.Remoting } /// + /// Sets the indicating whether 360 mode is supported or not. + /// + /// A value indicating whether the 360 mode is supported or not. + /// + /// The server is not running .
+ /// -or-
+ /// An internal error occurs. + ///
+ /// is invalid. + /// 6 + public static void SetMode360Capability(MediaControlCapabilitySupport support) + { + ValidationUtil.ValidateEnum(typeof(MediaControlCapabilitySupport), support, nameof(support)); + + Native.SetSimpleCapability(Handle, MediaControlNativeCapabilityCategory.Mode360, support). + ThrowIfError("Failed to set 360 mode capability."); + } + + /// + /// Sets the indicating whether subtitle mode is supported or not. + /// + /// A value indicating whether the subtitle mode is supported or not. + /// + /// The server is not running .
+ /// -or-
+ /// An internal error occurs. + ///
+ /// is invalid. + /// 6 + public static void SetSubtitleModeCapability(MediaControlCapabilitySupport support) + { + ValidationUtil.ValidateEnum(typeof(MediaControlCapabilitySupport), support, nameof(support)); + + Native.SetSimpleCapability(Handle, MediaControlNativeCapabilityCategory.Subtitle, support). + ThrowIfError("Failed to set subtitle mode capability."); + } + + /// /// Sets the supported list of . /// /// diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaController.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaController.cs index 2f3e6d8..c60bdad 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaController.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaController.cs @@ -638,6 +638,48 @@ namespace Tizen.Multimedia.Remoting } /// + /// Gets the value whether the 360 mode is supported or not. + /// + /// A . + /// + /// The server has already been stopped.
+ /// -or-
+ /// An internal error occurs. + ///
+ /// The has already been disposed. + /// 6 + public MediaControlCapabilitySupport GetMode360Capability() + { + ThrowIfStopped(); + + Native.GetSimpleCapability(Manager.Handle, ServerAppId, MediaControlNativeCapabilityCategory.Mode360, out MediaControlCapabilitySupport support). + ThrowIfError("Failed to get 360 mode capability"); + + return support; + } + + /// + /// Gets the value whether the subtitle mode is supported or not. + /// + /// A . + /// + /// The server has already been stopped.
+ /// -or-
+ /// An internal error occurs. + ///
+ /// The has already been disposed. + /// 6 + public MediaControlCapabilitySupport GetSubtitleModeCapability() + { + ThrowIfStopped(); + + Native.GetSimpleCapability(Manager.Handle, ServerAppId, MediaControlNativeCapabilityCategory.Subtitle, out MediaControlCapabilitySupport support). + ThrowIfError("Failed to get subtitle mode capability"); + + return support; + } + + /// /// Gets the value whether the repeat mode is supported or not. /// /// -- 2.7.4