2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.Runtime.InteropServices;
20 using Tizen.Content.MediaContent;
22 internal static partial class Interop
24 internal static partial class Storage
26 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_storage_info_from_db")]
27 internal static extern MediaContentError GetStorageInfoFromDb(string storage_id, out IntPtr storage);
29 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_storage_count_from_db")]
30 internal static extern MediaContentError GetStorageCountFromDb(IntPtr filter, out int storage_count);
32 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_media_count_from_db")]
33 internal static extern MediaContentError GetMediaCountFromDb(string storage_id, IntPtr filter, out int media_count);
35 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_destroy")]
36 internal static extern MediaContentError Destroy(IntPtr storage);
38 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_clone")]
39 internal static extern MediaContentError Clone(out IntPtr dst, IntPtr src);
41 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_id")]
42 internal static extern MediaContentError GetId(IntPtr storage, out IntPtr storage_id);
44 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_name")]
45 internal static extern MediaContentError GetName(IntPtr storage, out IntPtr storage_name);
47 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_path")]
48 internal static extern MediaContentError GetPath(IntPtr storage, out IntPtr storage_path);
50 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_get_type")]
51 internal static extern MediaContentError GetType(IntPtr storage, out ContentStorageType storage_type);
54 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
55 internal delegate bool MediaStorageCallback(IntPtr mediaStorageHandle, IntPtr data);
57 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
58 internal delegate bool MediaInfoCallback(IntPtr mediaInformation, IntPtr data);
60 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_foreach_storage_from_db")]
61 internal static extern MediaContentError ForeachStorageFromDb(IntPtr filter, MediaStorageCallback callback, IntPtr user_data);
63 [DllImport(Libraries.MediaContent, EntryPoint = "media_storage_foreach_media_from_db")]
64 internal static extern MediaContentError ForeachMediaFromDb(string storage_id, IntPtr filter, MediaInfoCallback callback, IntPtr user_data);