Skip to content

Commit

Permalink
[MediaController] Remove deprecated server API (#5942)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsgwon authored Feb 27, 2024
1 parent 5d2fff3 commit 4a6b77d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,31 +421,6 @@ public static void SetDisplayRotation(Rotation rotation)
{
Native.UpdateDisplayRotaton(Handle, rotation.ToNative()).ThrowIfError("Failed to set display rotation.");
}

/// <summary>
/// Sets the index of current playing media.
/// </summary>
/// <param name="index">The index of current playing media.</param>
/// <exception cref="ArgumentNullException"><paramref name="index"/> is null.</exception>
/// <exception cref="InvalidOperationException">
/// The server is not running .<br/>
/// -or-<br/>
/// An internal error occurs.
/// </exception>
/// <since_tizen> 5 </since_tizen>
[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


Expand Down

0 comments on commit 4a6b77d

Please sign in to comment.