[MediaContent] Removed BurstShort related apis 87/154387/3
authorcoderhyme <jhyo.kim@samsung.com>
Tue, 10 Oct 2017 06:57:30 +0000 (15:57 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 11 Oct 2017 08:45:27 +0000 (08:45 +0000)
Change-Id: I46157379d51b6261b9c4fa51413b117e1ae9f581
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Content.MediaContent/Interop/Interop.ImageInfo.cs
src/Tizen.Content.MediaContent/Interop/Interop.MediaInfo.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ImageInfo.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaDatabase.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoColumnKey.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs

index c7d5ff8..ce8caf6 100644 (file)
@@ -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);
 
index 244e98a..296c9a9 100644 (file)
@@ -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));
index e6050de..135fa38 100644 (file)
@@ -390,16 +390,6 @@ namespace Tizen.Content.MediaContent
         public static string Orientation => "MEDIA_ORIENTATION";
 
         /// <summary>
-        /// Gets the column name for the burst ID of media.
-        /// </summary>
-        /// <value>The column name for the burst ID of media.</value>
-        /// <remarks>
-        /// The value type is string.
-        /// </remarks>
-        /// <seealso cref="ImageInfo.BurstId"/>
-        public static string BurstId => "BURST_ID";
-
-        /// <summary>
         /// Gets the column name for the rating of media.
         /// </summary>
         /// <value>The column name for the rating of media.</value>
@@ -439,7 +429,6 @@ namespace Tizen.Content.MediaContent
         /// <seealso cref="MediaInfo.Category"/>
         public static string Category => "MEDIA_CATEGORY";
 
-
         /// <summary>
         /// Gets the column name for the location tag of media.
         /// </summary>
@@ -532,7 +521,6 @@ namespace Tizen.Content.MediaContent
         public static string Model => "MEDIA_MODEL";
     }
 
-
     /// <summary>
     /// Provides the folder column names that can be used for Select and Count commands.
     /// </summary>
index 0a60625..8562b23 100644 (file)
@@ -40,7 +40,6 @@ namespace Tizen.Content.MediaContent
                 Orientation = InteropHelper.GetValue<Orientation>(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<double>(imageHandle, Interop.ImageInfo.GetFNumber);
@@ -48,8 +47,6 @@ namespace Tizen.Content.MediaContent
 
                 Model = InteropHelper.GetString(imageHandle, Interop.ImageInfo.GetModel);
 
-                IsBurstShot = InteropHelper.GetValue<bool>(imageHandle, Interop.ImageInfo.IsBurstShot);
-
             }
             finally
             {
@@ -82,13 +79,6 @@ namespace Tizen.Content.MediaContent
         public string DateTaken { get; }
 
         /// <summary>
-        /// Gets the burst shot ID.
-        /// </summary>
-        /// <value>The burst shot ID if it is a burst shot, otherwise an empty string.</value>
-        /// <seealso cref="IsBurstShot"/>
-        public string BurstId { get; }
-
-        /// <summary>
         /// Gets the exposure time from EXIF.
         /// </summary>
         /// <value>The exposure time from EXIF.</value>
@@ -97,7 +87,7 @@ namespace Tizen.Content.MediaContent
         /// <summary>
         /// Gets the FNumber from EXIF.
         /// </summary>
-        /// <value>The FNumber from exif.</value>
+        /// <value>The FNumber from EXIF.</value>
         public double FNumber { get; }
 
         /// <summary>
@@ -111,11 +101,5 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The model from EXIF.</value>
         public string Model { get; }
-
-        /// <summary>
-        /// Gets the value indicating whether the media is a burst shot image.
-        /// </summary>
-        /// <value>true if the media is a burst shot image, otherwise false.</value>
-        public bool IsBurstShot { get; }
     }
 }
index 72031a5..b373d7f 100644 (file)
@@ -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 _) =>
index 12f5364..ff1ba55 100644 (file)
@@ -98,10 +98,6 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         Altitude,
         /// <summary>
-        /// Burst shot.
-        /// </summary>
-        BurstImage,
-        /// <summary>
         /// Rating.
         /// </summary>
         Rating = 20,
index f0a5fb3..7850a28 100644 (file)
@@ -109,7 +109,6 @@ namespace Tizen.Content.MediaContent
                 Bookmark.FromHandle);
         }
 
-
         /// <summary>
         /// Retrieves the number of the face information added to or detected from the media.
         /// </summary>
@@ -252,7 +251,6 @@ namespace Tizen.Content.MediaContent
                 Tag.FromHandle);
         }
 
-
         /// <summary>
         /// Retrieves the number of the media information.
         /// </summary>
@@ -624,64 +622,6 @@ namespace Tizen.Content.MediaContent
             }
         }
 
-        /// <summary>
-        /// Adds burst shot images into the media database.
-        /// </summary>
-        /// <param name="paths">The paths of the burst shot images to add.</param>
-        /// <returns>A task that represents the asynchronous add operation.</returns>
-        /// <remarks>
-        ///     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.
-        /// </remarks>
-        /// <privilege>http://tizen.org/privilege/content.write</privilege>
-        /// <privilege>http://tizen.org/privilege/mediastorage</privilege>
-        /// <privilege>http://tizen.org/privilege/externalstorage</privilege>
-        /// <exception cref="InvalidOperationException">The <see cref="MediaDatabase"/> is disconnected.</exception>
-        /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
-        /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
-        /// <exception cref="ArgumentNullException"><paramref name="paths"/> is null.</exception>
-        /// <exception cref="ArgumentException">
-        ///     <paramref name="paths"/> contains null.\n
-        ///     -or-\n
-        ///     <paramref name="paths"/> contains the invalid path.\n
-        ///     -or-\n
-        ///     The number of <paramref name="paths"/> is 300 or more items.
-        /// </exception>
-        /// <exception cref="FileNotFoundException"><paramref name="paths"/> contains a path that does not exist.</exception>
-        /// <exception cref="UnauthorizedAccessException">The caller has no required privilege.</exception>
-        public async Task AddBurstShotImagesAsync(IEnumerable<string> paths)
-        {
-            ValidateDatabase();
-
-            ValidatePaths(paths);
-
-            var tcs = new TaskCompletionSource<bool>(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<T>(Interop.MediaInfoHandle handle, T value,
             Func<Interop.MediaInfoHandle, T, MediaContentError> func)
         {
@@ -691,7 +631,6 @@ namespace Tizen.Content.MediaContent
             }
         }
 
-
         private static void SetUpdateValue<T>(Interop.MediaInfoHandle handle, Nullable<T> value,
             Func<Interop.MediaInfoHandle, T, MediaContentError> func) where T : struct
         {