From 4a6b77d9dd76165d512b0602191bdb3eec13b078 Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Tue, 27 Feb 2024 11:30:40 +0900 Subject: [PATCH] [MediaController] Remove deprecated server API (#5942) --- .../Interop.MediaControllerPlaylist.cs | 24 ------------------ .../Interop/Interop.MediaControllerServer.cs | 3 --- .../MediaController/MediaControlServer.cs | 25 ------------------- 3 files changed, 52 deletions(-) diff --git a/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerPlaylist.cs b/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerPlaylist.cs index 6feb12ede94..5ded6edf453 100644 --- a/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerPlaylist.cs +++ b/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerPlaylist.cs @@ -121,30 +121,6 @@ internal static extern MediaControllerError UpdatePlaylist(IntPtr handle, string [DllImport(Libraries.MediaController, EntryPoint = "mc_playlist_get_playlist")] internal static extern MediaControllerError GetPlaylistHandle(string serverName, string playlistName, IntPtr handle); - [Obsolete("Please do not use! This will be deprecated in level 6. Please use ForeachPlaylist instead.")] - [DllImport(Libraries.MediaController, EntryPoint = "mc_client_foreach_server_playlist")] - internal static extern MediaControllerError ForeachServerPlaylist(MediaControllerClientHandle handle, - string serverName, PlaylistCallback callback, IntPtr userData); - - [DllImport(Libraries.MediaController, EntryPoint = "mc_client_get_playlist_item_index")] - private static extern MediaControllerError GetPlaylistIndex(IntPtr playbackHandle, out IntPtr index); - - [Obsolete("Please do not use! This will be deprecated. Please use GetPlaylistInfo instead.")] - internal static string GetPlaylistIndex(IntPtr playbackHandle) - { - IntPtr valuePtr = IntPtr.Zero; - - try - { - GetPlaylistIndex(playbackHandle, out valuePtr).ThrowIfError($"Failed to get playlist."); - return Marshal.PtrToStringAnsi(valuePtr); - } - finally - { - Marshal.FreeHGlobal(valuePtr); - } - } - [DllImport(Libraries.MediaController, EntryPoint = "mc_client_get_playlist_item_info")] internal static extern MediaControllerError GetPlaylistInfo(IntPtr playbackHandle, out IntPtr playlistName, out IntPtr index); diff --git a/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerServer.cs b/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerServer.cs index fce62d9681d..17a5b5077e2 100644 --- a/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerServer.cs +++ b/src/Tizen.Multimedia.Remoting/Interop/Interop.MediaControllerServer.cs @@ -228,9 +228,6 @@ internal static extern MediaControllerError SetSearchCommandReceivedCb(IntPtr ha [DllImport(Libraries.MediaController, EntryPoint = "mc_server_delete_playlist")] internal static extern MediaControllerError DeletePlaylist(IntPtr handle, IntPtr playlist); - [DllImport(Libraries.MediaController, EntryPoint = "mc_server_set_playlist_item_index")] - internal static extern MediaControllerError SetIndexOfCurrentPlayingMedia(IntPtr handle, string index); - [DllImport(Libraries.MediaController, EntryPoint = "mc_server_set_playlist_item_info")] internal static extern MediaControllerError SetInfoOfCurrentPlayingMedia(IntPtr handle, string name, string index); diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs index a3e24af2cd4..6b6b227517c 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlServer.cs @@ -421,31 +421,6 @@ public static void SetDisplayRotation(Rotation rotation) { Native.UpdateDisplayRotaton(Handle, rotation.ToNative()).ThrowIfError("Failed to set display rotation."); } - - /// - /// Sets the index of current playing media. - /// - /// The index of current playing media. - /// is null. - /// - /// The server is not running .
- /// -or-
- /// An internal error occurs. - ///
- /// 5 - [Obsolete("Please do not use! This will be deprecated. Please use SetInfoOfCurrentPlayingMedia instead.")] - public static void SetIndexOfCurrentPlayingMedia(string index) - { - if (index == null) - { - throw new ArgumentNullException(nameof(index)); - } - - Native.SetIndexOfCurrentPlayingMedia(Handle, index) - .ThrowIfError("Failed to set the index of current playing media"); - - Native.UpdatePlayback(Handle).ThrowIfError("Failed to set playback."); - } #endregion Set information