From 5699af4a8950904be189332a1a28b5485f05c5b0 Mon Sep 17 00:00:00 2001 From: coderhyme Date: Tue, 10 Oct 2017 15:57:30 +0900 Subject: [PATCH] [MediaContent] Removed BurstShort related apis Change-Id: I46157379d51b6261b9c4fa51413b117e1ae9f581 Signed-off-by: coderhyme --- .../Interop/Interop.ImageInfo.cs | 6 --- .../Interop/Interop.MediaInfo.cs | 11 ---- .../Tizen.Content.MediaContent/Columns.cs | 12 ----- .../Tizen.Content.MediaContent/ImageInfo.cs | 18 +------ .../Tizen.Content.MediaContent/MediaDatabase.cs | 1 - .../MediaInfoColumnKey.cs | 4 -- .../Tizen.Content.MediaContent/MediaInfoCommand.cs | 61 ---------------------- 7 files changed, 1 insertion(+), 112 deletions(-) diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.ImageInfo.cs b/src/Tizen.Content.MediaContent/Interop/Interop.ImageInfo.cs index c7d5ff8..ce8caf6 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.ImageInfo.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.ImageInfo.cs @@ -31,9 +31,6 @@ internal static partial class Interop [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_date_taken", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetDateTaken(IntPtr handle, out IntPtr dateTaken); - [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_burst_id", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError GetBurstId(IntPtr handle, out IntPtr burstId); - [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_exposure_time", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetExposureTime(IntPtr handle, out IntPtr exposureTime); @@ -46,9 +43,6 @@ internal static partial class Interop [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_model", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetModel(IntPtr handle, out IntPtr model); - [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_is_burst_shot", CallingConvention = CallingConvention.Cdecl)] - internal static extern MediaContentError IsBurstShot(IntPtr handle, out bool isBurstShot); - [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_media_id", CallingConvention = CallingConvention.Cdecl)] internal static extern MediaContentError GetMediaId(IntPtr handle, out IntPtr mediaId); diff --git a/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs b/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs index 244e98a..296c9a9 100644 --- a/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs +++ b/src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs @@ -31,9 +31,6 @@ internal static partial class Interop [UnmanagedFunctionPointer(CallingConvention.Cdecl)] internal delegate void InsertCompletedCallback(MediaContentError error, IntPtr userData); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - internal delegate void InsertBurstShotCompletedCallback(MediaContentError error, IntPtr userData); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_insert_to_db")] internal static extern MediaContentError Insert(string filePath, out MediaInfoHandle info); @@ -41,16 +38,9 @@ internal static partial class Interop internal static extern MediaContentError BatchInsert(string[] filePathArray, int arrayLength, InsertCompletedCallback callback, IntPtr userData = default(IntPtr)); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_insert_burst_shot_to_db")] - internal static extern MediaContentError BurstShotInsert(string[] filePathArray, int arrayLength, - InsertBurstShotCompletedCallback callback, IntPtr userData = default(IntPtr)); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_delete_from_db")] internal static extern MediaContentError Delete(string mediaId); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_delete_batch_from_db")] - internal static extern MediaContentError BatchDelete(FilterHandle filter); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_destroy")] internal static extern MediaContentError Destroy(IntPtr handle); @@ -200,7 +190,6 @@ internal static partial class Interop [DllImport(Libraries.MediaContent, EntryPoint = "media_info_cancel_thumbnail")] internal static extern MediaContentError CancelThumbnail(MediaInfoHandle mediaInformationHandle); - [DllImport(Libraries.MediaContent, EntryPoint = "media_info_start_face_detection")] internal static extern MediaContentError StartFaceDetection(MediaInfoHandle handle, FaceDetectionCompletedCallback callback, IntPtr userData = default(IntPtr)); diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs index e6050de..135fa38 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs @@ -390,16 +390,6 @@ namespace Tizen.Content.MediaContent public static string Orientation => "MEDIA_ORIENTATION"; /// - /// Gets the column name for the burst ID of media. - /// - /// The column name for the burst ID of media. - /// - /// The value type is string. - /// - /// - public static string BurstId => "BURST_ID"; - - /// /// Gets the column name for the rating of media. /// /// The column name for the rating of media. @@ -439,7 +429,6 @@ namespace Tizen.Content.MediaContent /// public static string Category => "MEDIA_CATEGORY"; - /// /// Gets the column name for the location tag of media. /// @@ -532,7 +521,6 @@ namespace Tizen.Content.MediaContent public static string Model => "MEDIA_MODEL"; } - /// /// Provides the folder column names that can be used for Select and Count commands. /// diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ImageInfo.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ImageInfo.cs index 0a60625..8562b23 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ImageInfo.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ImageInfo.cs @@ -40,7 +40,6 @@ namespace Tizen.Content.MediaContent Orientation = InteropHelper.GetValue(imageHandle, Interop.ImageInfo.GetOrientation); DateTaken = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetDateTaken); - BurstId = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetBurstId); ExposureTime = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetExposureTime); FNumber = InteropHelper.GetValue(imageHandle, Interop.ImageInfo.GetFNumber); @@ -48,8 +47,6 @@ namespace Tizen.Content.MediaContent Model = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetModel); - IsBurstShot = InteropHelper.GetValue(imageHandle, Interop.ImageInfo.IsBurstShot); - } finally { @@ -82,13 +79,6 @@ namespace Tizen.Content.MediaContent public string DateTaken { get; } /// - /// Gets the burst shot ID. - /// - /// The burst shot ID if it is a burst shot, otherwise an empty string. - /// - public string BurstId { get; } - - /// /// Gets the exposure time from EXIF. /// /// The exposure time from EXIF. @@ -97,7 +87,7 @@ namespace Tizen.Content.MediaContent /// /// Gets the FNumber from EXIF. /// - /// The FNumber from exif. + /// The FNumber from EXIF. public double FNumber { get; } /// @@ -111,11 +101,5 @@ namespace Tizen.Content.MediaContent /// /// The model from EXIF. public string Model { get; } - - /// - /// Gets the value indicating whether the media is a burst shot image. - /// - /// true if the media is a burst shot image, otherwise false. - public bool IsBurstShot { get; } } } diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs index 72031a5..b373d7f 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs @@ -135,7 +135,6 @@ namespace Tizen.Content.MediaContent } } - private static readonly Interop.Content.MediaContentDBUpdatedCallback _folderUpdatedCb = ( MediaContentError error, int pid, ItemType updateItem, OperationType updateType, MediaType mediaType, string uuid, string filePath, string mimeType, IntPtr _) => diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoColumnKey.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoColumnKey.cs index 12f5364..ff1ba55 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoColumnKey.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoColumnKey.cs @@ -98,10 +98,6 @@ namespace Tizen.Content.MediaContent /// Altitude, /// - /// Burst shot. - /// - BurstImage, - /// /// Rating. /// Rating = 20, diff --git a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs index f0a5fb3..7850a28 100644 --- a/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs +++ b/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs @@ -109,7 +109,6 @@ namespace Tizen.Content.MediaContent Bookmark.FromHandle); } - /// /// Retrieves the number of the face information added to or detected from the media. /// @@ -252,7 +251,6 @@ namespace Tizen.Content.MediaContent Tag.FromHandle); } - /// /// Retrieves the number of the media information. /// @@ -624,64 +622,6 @@ namespace Tizen.Content.MediaContent } } - /// - /// Adds burst shot images into the media database. - /// - /// The paths of the burst shot images to add. - /// A task that represents the asynchronous add operation. - /// - /// The paths that already exist in the database.\n - /// At most 300 items can be added at once. - /// \n - /// If you want to access internal storage, you should add privilege http://tizen.org/privilege/mediastorage.\n - /// If you want to access external storage, you should add privilege http://tizen.org/privilege/externalstorage. - /// - /// http://tizen.org/privilege/content.write - /// http://tizen.org/privilege/mediastorage - /// http://tizen.org/privilege/externalstorage - /// The is disconnected. - /// The has already been disposed of. - /// An error occurred while executing the command. - /// is null. - /// - /// contains null.\n - /// -or-\n - /// contains the invalid path.\n - /// -or-\n - /// The number of is 300 or more items. - /// - /// contains a path that does not exist. - /// The caller has no required privilege. - public async Task AddBurstShotImagesAsync(IEnumerable paths) - { - ValidateDatabase(); - - ValidatePaths(paths); - - var tcs = new TaskCompletionSource(TaskContinuationOptions.RunContinuationsAsynchronously); - string[] pathArray = paths.ToArray(); - - Interop.MediaInfo.InsertBurstShotCompletedCallback callback = (error, _) => - { - if (error == MediaContentError.None) - { - tcs.TrySetResult(true); - } - else - { - tcs.TrySetException(error.AsException("Failed to add burst shot images")); - } - }; - - using (ObjectKeeper.Get(callback)) - { - Interop.MediaInfo.BurstShotInsert(pathArray, pathArray.Length, callback). - ThrowIfError("Failed to add burst shots to db"); - - await tcs.Task; - } - } - private static void SetUpdateValue(Interop.MediaInfoHandle handle, T value, Func func) { @@ -691,7 +631,6 @@ namespace Tizen.Content.MediaContent } } - private static void SetUpdateValue(Interop.MediaInfoHandle handle, Nullable value, Func func) where T : struct { -- 2.7.4