Fix wrong csapi
authorMinje Ahn <minje.ahn@samsung.com>
Wed, 29 Mar 2017 23:51:40 +0000 (08:51 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Wed, 29 Mar 2017 23:51:40 +0000 (08:51 +0900)
Change RemoveMediaInformationBatchAsync -> RemoveMediaInformationBatch
Remove Task(this api is not async function)

Change-Id: I19fc1067e412a41d8ec2c9c055e1749f36ae7057
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/csapi-media-content.spec
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ContentManager.cs

index 94bc7fe..4830e91 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-media-content
 Summary:    Tizen Media Content API for C#
-Version:    1.0.13
+Version:    1.0.14
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 84539aa..6e8f3d7 100755 (executable)
@@ -254,15 +254,12 @@ namespace Tizen.Content.MediaContent
         /// without calling this function.This function is only called when the media server is busy and user needs to get quick result of deleting.
         /// </summary>
         /// <param name="filter">The content filter to which media will be matched</param>
-        /// <returns>Task with the removal result </returns>
-        public static Task RemoveMediaInformationBatchAsync(ContentFilter filter)
+        public static void RemoveMediaInformationBatch(ContentFilter filter)
         {
             Database.ConnectToDB();
-            var task = new TaskCompletionSource<int>();
             IntPtr handle = (filter != null) ? filter.Handle : IntPtr.Zero;
-            MediaContentError res = Interop.MediaInformation.BatchDelete(handle);
-            task.SetResult((int)res);
-            return task.Task;
+            MediaContentValidator.ThrowIfError(
+                Interop.MediaInformation.BatchDelete(handle), "Failed to remove items");
         }
     }
 }