From: Haesu Gwon Date: Mon, 8 Jan 2024 06:20:21 +0000 (+0900) Subject: [MediaContent] Deprecate underutilized fields (#5850) X-Git-Tag: submit/tizen/20240108.150946~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db8426f47c1dac8bd46d3efde380bcec867909bd;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [MediaContent] Deprecate underutilized fields (#5850) --- diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.AudioInfo.cs b/src/Tizen.Content.MediaContent/Interop/Interop.AudioInfo.cs index f61f13451..d0764d18f 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.AudioInfo.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.AudioInfo.cs @@ -38,33 +38,33 @@ internal static partial class Interop internal static extern MediaContentError GetGenre(IntPtr handle, out IntPtr genreName); [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_composer", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetComposer(IntPtr handle, out IntPtr composerName); + internal static extern MediaContentError GetComposer(IntPtr handle, out IntPtr composerName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_year", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetYear(IntPtr handle, out IntPtr year); [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_recorded_date", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetRecordedDate(IntPtr handle, out IntPtr recordedDate); + internal static extern MediaContentError GetRecordedDate(IntPtr handle, out IntPtr recordedDate); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_copyright", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetCopyright(IntPtr handle, out IntPtr copyright); + internal static extern MediaContentError GetCopyright(IntPtr handle, out IntPtr copyright); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_track_num", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetTrackNum(IntPtr handle, out IntPtr trackNum); [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_bit_rate", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetBitRate(IntPtr handle, out int bitRate); + internal static extern MediaContentError GetBitRate(IntPtr handle, out int bitRate); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_bitpersample", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetBitPerSample(IntPtr handle, out int bitPerSample); + internal static extern MediaContentError GetBitPerSample(IntPtr handle, out int bitPerSample); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_sample_rate", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetSampleRate(IntPtr handle, out int sampleRate); + internal static extern MediaContentError GetSampleRate(IntPtr handle, out int sampleRate); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_channel", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetChannel(IntPtr handle, out int channel); + internal static extern MediaContentError GetChannel(IntPtr handle, out int channel); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "audio_meta_get_duration", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetDuration(IntPtr handle, out int duration); + internal static extern MediaContentError GetDuration(IntPtr handle, out int duration); // Deprecated since API12 } } diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs b/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs index 18db380f8..b5778b402 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs @@ -47,11 +47,11 @@ internal static partial class Interop IntPtr userData = default); [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_tag_count_from_db")] - internal static extern MediaContentError GetTagCount(string mediaId, FilterHandle filter, out int tagCount); + internal static extern MediaContentError GetTagCount(string mediaId, FilterHandle filter, out int tagCount); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_foreach_tag_from_db")] internal static extern MediaContentError ForeachTags(string mediaId, FilterHandle filter, - Common.ItemCallback callback, IntPtr userData = default); + Common.ItemCallback callback, IntPtr userData = default); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_bookmark_count_from_db")] internal static extern MediaContentError GetBookmarkCount(string mediaId, FilterHandle filter, out int bookmarkCount); @@ -104,43 +104,43 @@ internal static partial class Interop internal static extern MediaContentError GetModifiedTime(MediaInfoHandle handle, out IntPtr posixTime); [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_timeline")] - internal static extern MediaContentError GetTimeline(MediaInfoHandle handle, out IntPtr posixTime); + internal static extern MediaContentError GetTimeline(MediaInfoHandle handle, out IntPtr posixTime); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_thumbnail_path")] internal static extern MediaContentError GetThumbnailPath(MediaInfoHandle mediaInformationHandle, out IntPtr filePath); [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_description")] - internal static extern MediaContentError GetDescription(MediaInfoHandle mediaInformationHandle, out IntPtr description); + internal static extern MediaContentError GetDescription(MediaInfoHandle mediaInformationHandle, out IntPtr description); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_longitude")] - internal static extern MediaContentError GetLongitude(MediaInfoHandle mediaInformationHandle, out double longitude); + internal static extern MediaContentError GetLongitude(MediaInfoHandle mediaInformationHandle, out double longitude); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_latitude")] - internal static extern MediaContentError GetLatitude(MediaInfoHandle mediaInformationHandle, out double latitude); + internal static extern MediaContentError GetLatitude(MediaInfoHandle mediaInformationHandle, out double latitude); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_altitude")] - internal static extern MediaContentError GetAltitude(MediaInfoHandle mediaInformationHandle, out double altitude); + internal static extern MediaContentError GetAltitude(MediaInfoHandle mediaInformationHandle, out double altitude); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_rating")] - internal static extern MediaContentError GetRating(MediaInfoHandle mediaInformationHandle, out int rating); + internal static extern MediaContentError GetRating(MediaInfoHandle mediaInformationHandle, out int rating); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_favorite")] - internal static extern MediaContentError GetFavorite(MediaInfoHandle mediaInformationHandle, out bool favorite); + internal static extern MediaContentError GetFavorite(MediaInfoHandle mediaInformationHandle, out bool favorite); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_title")] internal static extern MediaContentError GetTitle(MediaInfoHandle mediaInformationHandle, out IntPtr title); [DllImport(Libraries.MediaContent, EntryPoint = "media_info_is_drm")] - internal static extern MediaContentError IsDrm(MediaInfoHandle mediaInformationHandle, out bool isDrm); + internal static extern MediaContentError IsDrm(MediaInfoHandle mediaInformationHandle, out bool isDrm); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_get_media_from_db")] internal static extern MediaContentError GetMediaFromDB(string mediaId, out MediaInfoHandle handle); [DllImport(Libraries.MediaContent, EntryPoint = "media_info_set_favorite")] - internal static extern MediaContentError SetFavorite(MediaInfoHandle mediaInformationHandle, bool favorite); + internal static extern MediaContentError SetFavorite(MediaInfoHandle mediaInformationHandle, bool favorite); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_update_to_db")] - internal static extern MediaContentError UpdateToDB(MediaInfoHandle mediaInformationHandle); + internal static extern MediaContentError UpdateToDB(MediaInfoHandle mediaInformationHandle); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_info_move_to_db")] internal static extern MediaContentError MoveToDB(MediaInfoHandle mediaInformationHandle, string dstPath); diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.Tag.cs b/src/Tizen.Content.MediaContent/Interop/Interop.Tag.cs index 596ec9469..5452f8acb 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.Tag.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.Tag.cs @@ -26,47 +26,47 @@ internal static partial class Interop internal static extern MediaContentError Create(out IntPtr handle); [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_insert_to_db")] - internal static extern MediaContentError Insert(string name, out IntPtr handle); + internal static extern MediaContentError Insert(string name, out IntPtr handle); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_delete_from_db")] - internal static extern MediaContentError Delete(int tagId); + internal static extern MediaContentError Delete(int tagId); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_update_to_db_v2")] - internal static extern MediaContentError Update(int tagId, IntPtr tag); + internal static extern MediaContentError Update(int tagId, IntPtr tag); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_get_tag_from_db")] - internal static extern MediaContentError GetTagFromDb(int tagId, out IntPtr tag); + internal static extern MediaContentError GetTagFromDb(int tagId, out IntPtr tag); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_get_tag_count_from_db")] - internal static extern MediaContentError GetTagCount(FilterHandle filter, out int count); + internal static extern MediaContentError GetTagCount(FilterHandle filter, out int count); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_get_media_count_from_db")] - internal static extern MediaContentError GetMediaCount(int tagId, FilterHandle filter, out int count); + internal static extern MediaContentError GetMediaCount(int tagId, FilterHandle filter, out int count); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_destroy")] - internal static extern MediaContentError Destroy(IntPtr tag); + internal static extern MediaContentError Destroy(IntPtr tag); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_get_tag_id")] - internal static extern MediaContentError GetId(IntPtr tag, out int value); + internal static extern MediaContentError GetId(IntPtr tag, out int value); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_get_name")] - internal static extern MediaContentError GetName(IntPtr tag, out IntPtr value); + internal static extern MediaContentError GetName(IntPtr tag, out IntPtr value); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_set_name")] - internal static extern MediaContentError SetName(IntPtr tag, string value); + internal static extern MediaContentError SetName(IntPtr tag, string value); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_add_media")] - internal static extern MediaContentError AddMedia(IntPtr tag, string mediaId); + internal static extern MediaContentError AddMedia(IntPtr tag, string mediaId); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_remove_media")] - internal static extern MediaContentError RemoveMedia(IntPtr tag, string mediaId); + internal static extern MediaContentError RemoveMedia(IntPtr tag, string mediaId); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_foreach_tag_from_db")] internal static extern MediaContentError ForeachTagFromDb(FilterHandle filter, - Common.ItemCallback callback, IntPtr userData = default(IntPtr)); + Common.ItemCallback callback, IntPtr userData = default(IntPtr)); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "media_tag_foreach_media_from_db")] internal static extern MediaContentError ForeachMediaFromDb(int tagId, FilterHandle filter, - Common.ItemCallback callback, IntPtr userData = default(IntPtr)); + Common.ItemCallback callback, IntPtr userData = default(IntPtr)); // Deprecated since API12 } } diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.VideoInfo.cs b/src/Tizen.Content.MediaContent/Interop/Interop.VideoInfo.cs index 4fc7f9486..e1a78f629 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.VideoInfo.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.VideoInfo.cs @@ -26,37 +26,37 @@ internal static partial class Interop internal static extern MediaContentError Destroy(IntPtr handle); [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_album", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetAlbum(IntPtr handle, out IntPtr albumName); + internal static extern MediaContentError GetAlbum(IntPtr handle, out IntPtr albumName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_artist", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetArtist(IntPtr handle, out IntPtr artistName); + internal static extern MediaContentError GetArtist(IntPtr handle, out IntPtr artistName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_album_artist", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetAlbumArtist(IntPtr handle, out IntPtr albumArtistName); + internal static extern MediaContentError GetAlbumArtist(IntPtr handle, out IntPtr albumArtistName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_genre", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetGenre(IntPtr handle, out IntPtr genreName); + internal static extern MediaContentError GetGenre(IntPtr handle, out IntPtr genreName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_composer", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetComposer(IntPtr handle, out IntPtr composerName); + internal static extern MediaContentError GetComposer(IntPtr handle, out IntPtr composerName); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_year", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetYear(IntPtr handle, out IntPtr year); + internal static extern MediaContentError GetYear(IntPtr handle, out IntPtr year); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_recorded_date", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetRecordedDate(IntPtr handle, out IntPtr recordedDate); + internal static extern MediaContentError GetRecordedDate(IntPtr handle, out IntPtr recordedDate); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_copyright", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetCopyright(IntPtr handle, out IntPtr copyright); + internal static extern MediaContentError GetCopyright(IntPtr handle, out IntPtr copyright); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_track_num", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetTrackNum(IntPtr handle, out IntPtr trackNum); + internal static extern MediaContentError GetTrackNum(IntPtr handle, out IntPtr trackNum); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_bit_rate", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetBitRate(IntPtr handle, out int bitRate); + internal static extern MediaContentError GetBitRate(IntPtr handle, out int bitRate); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_duration", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetDuration(IntPtr handle, out int duration); + internal static extern MediaContentError GetDuration(IntPtr handle, out int duration); // Deprecated since API12 [DllImport(Libraries.MediaContent, EntryPoint = "video_meta_get_width", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetWidth(IntPtr handle, out int width); diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/AudioInfo.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/AudioInfo.cs index 6e1bd0007..87f0d629f 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/AudioInfo.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/AudioInfo.cs @@ -39,18 +39,18 @@ namespace Tizen.Content.MediaContent Artist = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetArtist); AlbumArtist = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetAlbumArtist); Genre = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetGenre); - Composer = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetComposer); + Composer = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetComposer); // Deprecated since API12 Year = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetYear); - DateRecorded = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetRecordedDate); - Copyright = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetCopyright); + DateRecorded = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetRecordedDate); // Deprecated since API12 + Copyright = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetCopyright); // Deprecated since API12 TrackNumber = InteropHelper.GetString(audioHandle, Interop.AudioInfo.GetTrackNum); - BitRate = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetBitRate); - BitPerSample = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetBitPerSample); - SampleRate = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetSampleRate); - Channels = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetChannel); + BitRate = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetBitRate); // Deprecated since API12 + BitPerSample = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetBitPerSample); // Deprecated since API12 + SampleRate = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetSampleRate); // Deprecated since API12 + Channels = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetChannel); // Deprecated since API12 - Duration = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetDuration); + Duration = InteropHelper.GetValue(audioHandle, Interop.AudioInfo.GetDuration); // Deprecated since API12 } finally { @@ -91,6 +91,7 @@ namespace Tizen.Content.MediaContent /// /// The composer from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Composer { get; } /// @@ -105,6 +106,7 @@ namespace Tizen.Content.MediaContent /// /// The recorded date from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string DateRecorded { get; } /// @@ -112,6 +114,7 @@ namespace Tizen.Content.MediaContent /// /// The copyright from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Copyright { get; } /// @@ -126,6 +129,7 @@ namespace Tizen.Content.MediaContent /// /// The bit rate in bit per second. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int BitRate { get; } /// @@ -133,6 +137,7 @@ namespace Tizen.Content.MediaContent /// /// The bit per sample. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int BitPerSample { get; } /// @@ -140,6 +145,7 @@ namespace Tizen.Content.MediaContent /// /// The sample rate in hertz. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int SampleRate { get; } /// @@ -147,6 +153,7 @@ namespace Tizen.Content.MediaContent /// /// The number of channels. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Channels { get; } /// @@ -154,6 +161,7 @@ namespace Tizen.Content.MediaContent /// /// The track duration in milliseconds. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Duration { get; } } } diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs index 17cf03c81..6cd5534df 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs @@ -143,6 +143,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Timeline => "MEDIA_TIMELINE"; /// @@ -224,6 +225,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Composer => "MEDIA_COMPOSER"; /// @@ -248,6 +250,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string DateRecorded => "MEDIA_RECORDED_DATE"; /// @@ -272,6 +275,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Duration => "MEDIA_DURATION"; /// @@ -283,6 +287,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Longitude => "MEDIA_LONGITUDE"; /// @@ -294,6 +299,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Latitude => "MEDIA_LATITUDE"; /// @@ -305,6 +311,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Altitude => "MEDIA_ALTITUDE"; /// @@ -351,6 +358,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Favorite => "MEDIA_FAVOURITE"; /// @@ -362,6 +370,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string IsDrm => "MEDIA_IS_DRM"; } @@ -529,6 +538,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Name => "TAG_NAME"; /// @@ -541,6 +551,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Count => "TAG_MEDIA_COUNT"; /// @@ -552,6 +563,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public static string Id => "TAG_ID"; } diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs index 1aa2c453c..a7c6e1d1b 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs @@ -41,19 +41,19 @@ namespace Tizen.Content.MediaContent DateAdded = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetAddedTime); DateModified = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetModifiedTime); - Timeline = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetTimeline); + Timeline = InteropHelper.GetDateTime(handle, Interop.MediaInfo.GetTimeline); // Deprecated since API12 ThumbnailPath = InteropHelper.GetString(handle, Interop.MediaInfo.GetThumbnailPath, true); - Description = InteropHelper.GetString(handle, Interop.MediaInfo.GetDescription); + Description = InteropHelper.GetString(handle, Interop.MediaInfo.GetDescription); // Deprecated since API12 - Longitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetLongitude); - Latitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetLatitude); - Altitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetAltitude); + Longitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetLongitude); // Deprecated since API12 + Latitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetLatitude); // Deprecated since API12 + Altitude = InteropHelper.GetValue(handle, Interop.MediaInfo.GetAltitude); // Deprecated since API12 - Rating = InteropHelper.GetValue(handle, Interop.MediaInfo.GetRating); - IsFavorite = InteropHelper.GetValue(handle, Interop.MediaInfo.GetFavorite); + Rating = InteropHelper.GetValue(handle, Interop.MediaInfo.GetRating); // Deprecated since API12 + IsFavorite = InteropHelper.GetValue(handle, Interop.MediaInfo.GetFavorite); // Deprecated since API12 Title = InteropHelper.GetString(handle, Interop.MediaInfo.GetTitle); - IsDrm = InteropHelper.GetValue(handle, Interop.MediaInfo.IsDrm); + IsDrm = InteropHelper.GetValue(handle, Interop.MediaInfo.IsDrm); // Deprecated since API12 } /// @@ -120,6 +120,7 @@ namespace Tizen.Content.MediaContent /// otherwise the modified date. /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public DateTimeOffset Timeline { get; } /// @@ -134,6 +135,7 @@ namespace Tizen.Content.MediaContent /// /// The description from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Description { get; } /// @@ -141,6 +143,7 @@ namespace Tizen.Content.MediaContent /// /// The longitude. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public double Longitude { get; } /// @@ -148,6 +151,7 @@ namespace Tizen.Content.MediaContent /// /// The latitude. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public double Latitude { get; } /// @@ -155,6 +159,7 @@ namespace Tizen.Content.MediaContent /// /// The altitude. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public double Altitude { get; } /// @@ -162,6 +167,7 @@ namespace Tizen.Content.MediaContent /// /// The rating from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Rating { get; } /// @@ -169,6 +175,7 @@ namespace Tizen.Content.MediaContent /// /// true if media is set as favorite, otherwise false. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool IsFavorite { get; } /// @@ -183,6 +190,7 @@ namespace Tizen.Content.MediaContent /// /// A bool value indicating whether the media is DRM-protected. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool IsDrm { get; } /// diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs index 708b9bdb1..77ac6d15d 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs @@ -223,6 +223,7 @@ namespace Tizen.Content.MediaContent /// is null. /// is a zero-length string, contains only white space. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int CountTag(string mediaId, CountArguments arguments) { ValidateDatabase(); @@ -243,6 +244,7 @@ namespace Tizen.Content.MediaContent /// is null. /// is a zero-length string, contains only white space. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader SelectTag(string mediaId) { return SelectTag(mediaId, null); @@ -260,6 +262,7 @@ namespace Tizen.Content.MediaContent /// is null. /// is a zero-length string, contains only white space. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader SelectTag(string mediaId, SelectArguments filter) { ValidateDatabase(); @@ -745,6 +748,7 @@ namespace Tizen.Content.MediaContent /// is a zero-length string, contains only white space. /// The caller has no required privilege. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool UpdateFavorite(string mediaId, bool value) { ValidateDatabase(); diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Tag.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Tag.cs index 6b4c500aa..2c3168c7b 100755 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Tag.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Tag.cs @@ -24,6 +24,7 @@ namespace Tizen.Content.MediaContent /// a simplified and faster way of accessing media items. /// /// 3 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public class Tag { internal Tag(IntPtr handle) @@ -37,6 +38,7 @@ namespace Tizen.Content.MediaContent /// /// The unique ID of the tag. /// 3 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Id { get; } /// @@ -44,6 +46,7 @@ namespace Tizen.Content.MediaContent /// /// The name of the tag. /// 3 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Name { get; } internal static Tag FromHandle(IntPtr handle) => new Tag(handle); @@ -53,6 +56,7 @@ namespace Tizen.Content.MediaContent /// /// A string representation of the current tag. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public override string ToString() => $"Id={Id}, Name={Name}"; } diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/TagCommand.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/TagCommand.cs index 25ebe802b..35eada252 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/TagCommand.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/TagCommand.cs @@ -25,6 +25,7 @@ namespace Tizen.Content.MediaContent /// /// /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public class TagCommand : MediaCommand { /// @@ -34,6 +35,7 @@ namespace Tizen.Content.MediaContent /// is null. /// has already been disposed. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public TagCommand(MediaDatabase database) : base(database) { } @@ -46,6 +48,7 @@ namespace Tizen.Content.MediaContent /// The has already been disposed. /// An error occurred while executing the command. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Count() { return Count(arguments: null); @@ -60,6 +63,7 @@ namespace Tizen.Content.MediaContent /// The has already been disposed. /// An error occurred while executing the command. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Count(CountArguments arguments) { ValidateDatabase(); @@ -80,6 +84,7 @@ namespace Tizen.Content.MediaContent /// is less than or equal to zero. /// The caller has no required privilege. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool Delete(int tagId) { ValidateDatabase(); @@ -112,6 +117,7 @@ namespace Tizen.Content.MediaContent /// is null. /// The caller has no required privilege. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public Tag Insert(string name) { ValidateDatabase(); @@ -152,6 +158,7 @@ namespace Tizen.Content.MediaContent /// is less than or equal to zero. /// The caller has no required privilege. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool UpdateName(int tagId, string name) { ValidateDatabase(); @@ -197,6 +204,7 @@ namespace Tizen.Content.MediaContent /// An error occurred while executing the command. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public Tag Select(int tagId) { ValidateDatabase(); @@ -238,6 +246,7 @@ namespace Tizen.Content.MediaContent /// The has already been disposed. /// An error occurred while executing the command. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader Select() { return Select(arguments: null); @@ -252,6 +261,7 @@ namespace Tizen.Content.MediaContent /// The has already been disposed. /// An error occurred while executing the command. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader Select(SelectArguments arguments) { ValidateDatabase(); @@ -269,6 +279,7 @@ namespace Tizen.Content.MediaContent /// An error occurred while executing the command. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int CountMedia(int tagId) { return CountMedia(tagId, null); @@ -285,6 +296,7 @@ namespace Tizen.Content.MediaContent /// An error occurred while executing the command. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int CountMedia(int tagId, CountArguments arguments) { ValidateDatabase(); @@ -308,6 +320,7 @@ namespace Tizen.Content.MediaContent /// An error occurred while executing the command. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader SelectMedia(int tagId) { return SelectMedia(tagId, null); @@ -324,6 +337,7 @@ namespace Tizen.Content.MediaContent /// An error occurred while executing the command. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public MediaDataReader SelectMedia(int tagId, SelectArguments filter) { ValidateDatabase(); @@ -409,6 +423,7 @@ namespace Tizen.Content.MediaContent /// is a zero-length string, contains only white space. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool AddMedia(int tagId, string mediaId) { ValidationUtil.ValidateNotNullOrEmpty(mediaId, nameof(mediaId)); @@ -436,6 +451,7 @@ namespace Tizen.Content.MediaContent /// /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool AddMedia(int tagId, IEnumerable mediaIds) { return UpdateMember(tagId, mediaIds, Interop.Tag.AddMedia); @@ -455,6 +471,7 @@ namespace Tizen.Content.MediaContent /// is a zero-length string, contains only white space. /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool RemoveMedia(int tagId, string mediaId) { ValidationUtil.ValidateNotNullOrEmpty(mediaId, nameof(mediaId)); @@ -482,6 +499,7 @@ namespace Tizen.Content.MediaContent /// /// is less than or equal to zero. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public bool RemoveMedia(int tagId, IEnumerable mediaIds) { return UpdateMember(tagId, mediaIds, Interop.Tag.RemoveMedia); diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/VideoInfo.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/VideoInfo.cs index fbb6ad92b..69ac8cb6d 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/VideoInfo.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/VideoInfo.cs @@ -35,18 +35,18 @@ namespace Tizen.Content.MediaContent Debug.Assert(videoHandle != IntPtr.Zero); - Album = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetAlbum); - Artist = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetArtist); - AlbumArtist = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetAlbumArtist); - Genre = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetGenre); - Composer = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetComposer); - Year = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetYear); - DateRecorded = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetRecordedDate); - Copyright = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetCopyright); - TrackNumber = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetTrackNum); - - BitRate = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetBitRate); - Duration = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetDuration); + Album = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetAlbum); // Deprecated since API12 + Artist = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetArtist); // Deprecated since API12 + AlbumArtist = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetAlbumArtist); // Deprecated since API12 + Genre = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetGenre); // Deprecated since API12 + Composer = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetComposer); // Deprecated since API12 + Year = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetYear); // Deprecated since API12 + DateRecorded = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetRecordedDate); // Deprecated since API12 + Copyright = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetCopyright); // Deprecated since API12 + TrackNumber = InteropHelper.GetString(videoHandle, Interop.VideoInfo.GetTrackNum); // Deprecated since API12 + + BitRate = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetBitRate); // Deprecated since API12 + Duration = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetDuration); // Deprecated since API12 Width = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetWidth); Height = InteropHelper.GetValue(videoHandle, Interop.VideoInfo.GetHeight); } @@ -61,6 +61,7 @@ namespace Tizen.Content.MediaContent /// /// The album name from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Album { get; } /// @@ -68,6 +69,7 @@ namespace Tizen.Content.MediaContent /// /// The artist name from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Artist { get; } /// @@ -75,6 +77,7 @@ namespace Tizen.Content.MediaContent /// /// The album artist name from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string AlbumArtist { get; } /// @@ -82,6 +85,7 @@ namespace Tizen.Content.MediaContent /// /// The genre name from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Genre { get; } /// @@ -89,6 +93,7 @@ namespace Tizen.Content.MediaContent /// /// The composer name from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Composer { get; } /// @@ -96,6 +101,7 @@ namespace Tizen.Content.MediaContent /// /// The year from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Year { get; } /// @@ -103,6 +109,7 @@ namespace Tizen.Content.MediaContent /// /// The recorded date information from the metadata if exists; otherwise, the modified date of the file. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string DateRecorded { get; } /// @@ -110,6 +117,7 @@ namespace Tizen.Content.MediaContent /// /// The copyright notice from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string Copyright { get; } /// @@ -117,6 +125,7 @@ namespace Tizen.Content.MediaContent /// /// The track number from the metadata. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public string TrackNumber { get; } /// @@ -124,6 +133,7 @@ namespace Tizen.Content.MediaContent /// /// The bit rate of the video. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int BitRate { get; } /// @@ -131,6 +141,7 @@ namespace Tizen.Content.MediaContent /// /// The track duration of the video in milliseconds. /// 4 + [Obsolete("Deprecated since API12; Will be removed in API14.")] public int Duration { get; } ///