Update description
[platform/core/api/media-content.git] / include / media_content_type.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17
18 #ifndef __TIZEN_CONTENT_MEDIA_CONTENT_TYPE_H__
19 #define __TIZEN_CONTENT_MEDIA_CONTENT_TYPE_H__
20
21 #include <time.h>
22 #include <tizen.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27
28 /**
29  * @file media_content_type.h
30  * @brief This file contains API related to media-content enumerations for media data types, groups, orientations, \n
31  *        classes of errors and definitions of media-data. \n
32  *        Listed APIs are called when iterating over lists of album, group, bookmark and other media,  \n
33  *        when media items are inserted completely and when notification of media DB change is subscribed.
34  */
35
36 /**
37 * @addtogroup CAPI_MEDIA_CONTENT_MODULE
38  * @{
39  */
40
41 /**
42  * @ingroup CAPI_MEDIA_CONTENT_MODULE
43  * @brief Enumeration for the media file format.
44  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
45  * @remarks Since 4.0, #MEDIA_CONTENT_TYPE_OTHERS is related to the following feature:\n
46  *          %http://tizen.org/feature/content.scanning.others\n
47  *          If this feature is not supported on the device, #MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
48  */
49 typedef enum {
50         MEDIA_CONTENT_TYPE_IMAGE        = 0,    /**<The type of an image */
51         MEDIA_CONTENT_TYPE_VIDEO        = 1,    /**<The type of a video */
52         MEDIA_CONTENT_TYPE_SOUND        = 2,    /**<The type of sound */
53         MEDIA_CONTENT_TYPE_MUSIC        = 3,    /**<The type of music */
54         MEDIA_CONTENT_TYPE_OTHERS       = 4,    /**<The type of other */
55         MEDIA_CONTENT_TYPE_BOOK         = 5,    /**<The type of book (Since 6.5)*/
56 } media_content_type_e;
57
58 /**
59  * @ingroup CAPI_MEDIA_CONTENT_MODULE
60  * @brief Enumeration for media content DB update items.
61  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
62  */
63 typedef enum {
64         MEDIA_ITEM_FILE         = 0,            /**< File type, an item updated to DB */
65         MEDIA_ITEM_DIRECTORY    = 1,            /**< Directory type, an item updated to DB */
66 } media_content_db_update_item_type_e;
67
68 /**
69  * @ingroup CAPI_MEDIA_CONTENT_MODULE
70  * @brief Enumeration for media content DB update types.
71  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
72  */
73 typedef enum {
74         MEDIA_CONTENT_INSERT            = 0,            /**< Insert, the type of DB update */
75         MEDIA_CONTENT_DELETE            = 1,            /**< Delete, The type of DB update */
76         MEDIA_CONTENT_UPDATE    = 2,            /**< Update, The type of DB update */
77 } media_content_db_update_type_e;
78
79 /**
80  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
81  * @brief Enumeration for orientation types.
82  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
83  */
84 typedef enum {
85         MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE  = 0,       /**< Not available*/
86         MEDIA_CONTENT_ORIENTATION_NORMAL         = 1,       /**< Normal*/
87         MEDIA_CONTENT_ORIENTATION_HFLIP          = 2,       /**< Flip horizontal*/
88         MEDIA_CONTENT_ORIENTATION_ROT_180        = 3,       /**< Rotate 180 degrees*/
89         MEDIA_CONTENT_ORIENTATION_VFLIP          = 4,       /**< Flip vertical*/
90         MEDIA_CONTENT_ORIENTATION_TRANSPOSE      = 5,       /**< Transpose*/
91         MEDIA_CONTENT_ORIENTATION_ROT_90         = 6,       /**< Rotate 90 degrees*/
92         MEDIA_CONTENT_ORIENTATION_TRANSVERSE     = 7,       /**< Transverse*/
93         MEDIA_CONTENT_ORIENTATION_ROT_270        = 8,       /**< Rotate 270 degrees*/
94 } media_content_orientation_e;
95
96 /**
97  * @ingroup CAPI_MEDIA_CONTENT_MODULE
98  * @brief Enumeration for ordering.
99  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
100  */
101 typedef enum {
102         MEDIA_CONTENT_ORDER_ASC   = 0,      /**< Ascending order*/
103         MEDIA_CONTENT_ORDER_DESC  = 1,      /**< Descending order*/
104         MEDIA_CONTENT_ORDER_OTHER = 2,          /**< order by order key**/
105 } media_content_order_e;
106
107 /**
108  * @ingroup CAPI_MEDIA_CONTENT_MODULE
109  * @brief Enumeration for collations.
110  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
111  */
112 typedef enum {
113         MEDIA_CONTENT_COLLATE_DEFAULT   = 0,        /**< Default collation BINARY */
114         MEDIA_CONTENT_COLLATE_NOCASE    = 1,        /**< Collation NOCASE, not case sensitive */
115         MEDIA_CONTENT_COLLATE_RTRIM     = 2,        /**< Collation RTRIM, trailing space characters are ignored */
116         MEDIA_CONTENT_COLLATE_LOCALIZED = 3,        /**< Collation LOCALIZATION, NOCASE also applied */
117 } media_content_collation_e;
118
119 /**
120 * @brief Error class.
121 * @details Class for Media Content error
122 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
123 *
124 */
125 #define MEDIA_CONTENT_ERROR_CLASS                               TIZEN_ERROR_MEDIA_CONTENT
126
127 /**
128  * @ingroup CAPI_MEDIA_CONTENT_MODULE
129  * @brief Enumeration for a media content error.
130  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
131  */
132 typedef enum {
133         MEDIA_CONTENT_ERROR_NONE                    = TIZEN_ERROR_NONE,                    /**< Successful */
134         MEDIA_CONTENT_ERROR_INVALID_PARAMETER       = TIZEN_ERROR_INVALID_PARAMETER,       /**< Invalid parameter */
135         MEDIA_CONTENT_ERROR_OUT_OF_MEMORY           = TIZEN_ERROR_OUT_OF_MEMORY,           /**< Out of memory */
136         MEDIA_CONTENT_ERROR_INVALID_OPERATION       = TIZEN_ERROR_INVALID_OPERATION,       /**< Invalid Operation */
137         MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE       = TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE, /**< No space left on device */
138         MEDIA_CONTENT_ERROR_PERMISSION_DENIED             = TIZEN_ERROR_PERMISSION_DENIED,                /**< Permission denied */
139         MEDIA_CONTENT_ERROR_DB_FAILED               = MEDIA_CONTENT_ERROR_CLASS | 0x01,    /**< DB operation failed */
140         MEDIA_CONTENT_ERROR_DB_BUSY                 = MEDIA_CONTENT_ERROR_CLASS | 0x02,    /**< DB operation BUSY */
141         MEDIA_CONTENT_ERROR_NETWORK                 = MEDIA_CONTENT_ERROR_CLASS | 0x03,    /**< Network Fail */
142         MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT     = MEDIA_CONTENT_ERROR_CLASS | 0x04,    /**< Unsupported Content */
143         MEDIA_CONTENT_ERROR_NOT_SUPPORTED           = TIZEN_ERROR_NOT_SUPPORTED,           /**< Not supported */
144 } media_content_error_e;
145
146 /**
147  * @ingroup CAPI_MEDIA_CONTENT_MODULE
148  * @brief Enumeration for a media group.
149  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
150  */
151 typedef enum {
152         MEDIA_CONTENT_GROUP_DISPLAY_NAME = 0,    /**< Media group ID for display name */
153         MEDIA_CONTENT_GROUP_TYPE,                /**< Media group ID for a media type */
154         MEDIA_CONTENT_GROUP_MIME_TYPE,           /**< Media group ID for a mime type */
155         MEDIA_CONTENT_GROUP_SIZE,                /**< Media group ID for content size */
156         MEDIA_CONTENT_GROUP_ADDED_TIME,          /**< Media group ID for the added time */
157         MEDIA_CONTENT_GROUP_MODIFIED_TIME,       /**< Media group ID for the modified time */
158         MEDIA_CONTENT_GROUP_TITLE,               /**< Media group ID for a content title */
159         MEDIA_CONTENT_GROUP_ARTIST,              /**< Media group ID for an artist*/
160         MEDIA_CONTENT_GROUP_ALBUM_ARTIST,        /**< Media group ID for an album artist */
161         MEDIA_CONTENT_GROUP_GENRE,               /**< Media group ID for a genre*/
162         MEDIA_CONTENT_GROUP_COMPOSER,            /**< Media group ID for a composer*/
163         MEDIA_CONTENT_GROUP_YEAR,                /**< Media group ID for a year*/
164         MEDIA_CONTENT_GROUP_RECORDED_DATE,       /**< Media group ID for the recorded date*/
165         MEDIA_CONTENT_GROUP_COPYRIGHT,           /**< Media group ID for the copyright*/
166         MEDIA_CONTENT_GROUP_TRACK_NUM,           /**< Media group ID for a track number*/
167         MEDIA_CONTENT_GROUP_DESCRIPTION,         /**< Media group ID for a description */
168         MEDIA_CONTENT_GROUP_LONGITUDE,           /**< Media group ID for the longitude*/
169         MEDIA_CONTENT_GROUP_LATITUDE,            /**< Media group ID for the latitude*/
170         MEDIA_CONTENT_GROUP_ALTITUDE,            /**< Media group ID for the altitude*/
171         MEDIA_CONTENT_GROUP_RATING = 20,         /**< Media group ID for a rating*/
172         MEDIA_CONTENT_GROUP_MAX = 29             /**< Invalid media group ID*/
173 } media_group_e;
174
175 /**
176  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
177  * @brief The structure type for the Media info handle.
178  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
179  */
180 typedef struct media_info_s *media_info_h;
181
182 /**
183  * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
184  * @brief The structure type for the Media folder handle.
185  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
186  */
187 typedef struct media_folder_s *media_folder_h;
188
189 /**
190  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
191  * @brief The structure type for the Media playlist handle.
192  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
193  */
194 typedef struct media_playlist_s *media_playlist_h;
195
196 /**
197  * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
198  * @brief The structure type for the Media tag handle.
199  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
200  */
201 typedef struct media_tag_s *media_tag_h;
202
203 /**
204  * @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE
205  * @brief The structure type for the Media bookmark handle.
206  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
207  */
208 typedef struct media_bookmark_s *media_bookmark_h;
209
210 /**
211  * @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE
212  * @brief The structure type for the Media album handle.
213  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
214  */
215 typedef struct media_album_s *media_album_h;
216
217 /**
218  * @ingroup CAPI_CONTENT_MEDIA_IMAGE_META_MODULE
219  * @brief The structure type for the Image metadata handle.
220  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
221  */
222 typedef struct image_meta_s *image_meta_h;
223
224 /**
225  * @ingroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE
226  * @brief The structure type for the Video metadata handle.
227  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
228  */
229 typedef struct video_meta_s *video_meta_h;
230
231 /**
232  * @ingroup CAPI_CONTENT_MEDIA_AUDIO_META_MODULE
233  * @brief The structure type for the Audio metadata handle.
234  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
235  */
236 typedef struct audio_meta_s *audio_meta_h;
237
238 /**
239  * @ingroup CAPI_CONTENT_MEDIA_BOOK_META_MODULE
240  * @brief The structure type for the Book metadata handle.
241  * @since_tizen 6.5
242  */
243 typedef struct book_meta_s *book_meta_h;
244
245 /**
246  * @ingroup CAPI_CONTENT_MEDIA_FILTER_MODULE
247  * @brief The structure type for the Media filter handle.
248  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
249  */
250 typedef struct filter_s *filter_h;
251
252 /**
253  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
254  * @brief The structure type for the Media face handle.
255  * @since_tizen 3.0
256  */
257 typedef void *media_face_h;
258
259 /**
260  * @ingroup CAPI_MEDIA_CONTENT_MODULE
261  * @brief The structure type for the Media content noti handle.
262  * @since_tizen 3.0
263  */
264 typedef void *media_content_noti_h;
265
266 /**
267  * @ingroup CAPI_MEDIA_CONTENT_MODULE
268  * @brief Called when the media scanning is finished.
269  * @details The following error codes can be received: \n
270  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
271  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
272  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
273  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
274  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
275  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
276  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
277  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
278  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
279  * @remarks The callback is called in a separate thread(not in the main loop).
280  *
281  * @param[in] error The error code
282  * @param[in] user_data The user data passed from the foreach function
283  *
284  * @pre media_content_scan_folder().
285  * @see media_content_scan_folder()
286  */
287 typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user_data);
288
289 /**
290  * @ingroup CAPI_MEDIA_CONTENT_MODULE
291  * @brief Called when the notification of the media DB change is subscribed.
292  * @details The following error codes can be received: \n
293  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
294  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
295  *
296  * @remarks The callback is called in a separate thread(not in the main loop).
297  *
298  * @param[in] error The error code
299  * @param[in] pid The PID which publishes notification
300  * @param[in] update_item The update item of notification
301  * @param[in] update_type The update type of notification
302  * @param[in] media_type The type of the media content (#media_content_type_e)
303  * @param[in] id The ID of media or directory, which is updated
304  * @param[in] path The path of the media or directory
305  * @param[in] mime_type The MIME of the media info
306  * @param[in] user_data The user data passed from the foreach function
307  *
308  * @pre media_content_add_db_updated_cb().
309  * @see media_content_add_db_updated_cb()
310  */
311 typedef void (*media_content_db_update_cb)(
312                                 media_content_error_e error,
313                                 int pid,
314                                 media_content_db_update_item_type_e update_item,
315                                 media_content_db_update_type_e update_type,
316                                 media_content_type_e media_type,
317                                 char *id,
318                                 char *path,
319                                 char *mime_type,
320                                 void *user_data);
321
322
323 /**
324  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
325  * @brief Called for every available media info.
326  * @details Iterates over a list of media info.
327  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
328  *
329  * @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n
330  *                  The callback is called in the main loop.
331  *
332  * @param[in] media The handle to the media info
333  * @param[in] user_data The user data passed from the foreach function
334  *
335  * @return @c true to continue with the next iteration of the loop,
336  *         otherwise @c false to break out of the loop
337  *
338  * @pre media_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(),
339  *      media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function.
340  *
341  * @see media_info_clone()
342  * @see media_album_foreach_media_from_db()
343  * @see media_playlist_foreach_media_from_db()
344  * @see media_tag_foreach_media_from_db()
345  * @see media_info_foreach_media_from_db()
346  * @see media_folder_foreach_media_from_db()
347  */
348 typedef bool (*media_info_cb)(media_info_h media, void *user_data);
349
350
351 /**
352  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
353  * @brief Called when media items are inserted completely.
354  * @details The following error codes can be received: \n
355  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
356  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
357  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
358  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
359  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
360  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
361  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
362  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
363  *             #MEDIA_CONTENT_ERROR_NOT_SUPPORTED : Not supported \n
364  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
365  *
366  * @remarks The callback is called in a separate thread(not in the main loop).
367  *
368  * @param[in] error The error code
369  * @param[in] user_data The user data passed from the foreach function
370  *
371  * @pre media_info_insert_batch_to_db()
372  * @see media_info_insert_batch_to_db()
373  */
374 typedef void (*media_insert_completed_cb)(media_content_error_e error, void * user_data);
375
376
377 /**
378  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
379  * @brief Called when face detection on the image is completed.
380  *
381  * @details The following error codes can be delivered. \n
382  *         #MEDIA_CONTENT_ERROR_NONE, \n
383  *         #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, \n
384  *         #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n
385  *         #MEDIA_CONTENT_ERROR_DB_FAILED, \n
386  *         #MEDIA_CONTENT_ERROR_DB_BUSY, \n
387  *         #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT
388  *
389  * @since_tizen 3.0
390  *
391  * @remarks The callback is called in a separate thread(not in the main loop).
392  *
393  * @param[in] error The error code
394  * @param[in] face_count The number of all detected faces
395  * @param[in] user_data The user data passed from the foreach function
396  *
397  * @pre media_info_start_face_detection()
398  * @see media_info_start_face_detection()
399  */
400 typedef void (*media_face_detection_completed_cb)(media_content_error_e error, const int face_count, void *user_data);
401
402
403 /**
404  * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
405  * @brief Called for every available media folder.
406  * @details Iterates over a list of folders.
407  *
408  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
409  *
410  * @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n
411  *                  The callback is called in the main loop.
412  *
413  * @param[in] folder The handle to the media folder
414  * @param[in] user_data The user data passed from the foreach function
415  *
416  * @return @c true to continue with the next iteration of the loop,
417  *         otherwise @c false to break out of the loop
418  *
419  * @pre media_folder_foreach_folder_from_db() will invoke this function.
420  * @see media_folder_clone()
421  * @see media_folder_foreach_folder_from_db()
422  */
423 typedef bool (*media_folder_cb)(media_folder_h folder, void *user_data);
424
425 /**
426  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
427  * @brief Called for every playlist in the obtained list of playlists.
428  * @details Iterates over a playlist list.
429  *
430  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
431  *
432  * @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n
433  *                  The callback is called in the main loop.
434  *
435  * @param[in] playlist The handle to the media playlist
436  * @param[in] user_data The user data passed from the foreach function
437  *
438  * @return @c true to continue with the next iteration of the loop,
439  *         otherwise @c false to break out of the loop
440  *
441  * @pre media_playlist_foreach_playlist_from_db() will invoke this function.
442  *
443  * @see media_playlist_clone()
444  * @see media_playlist_foreach_playlist_from_db()
445  */
446 typedef bool (*media_playlist_cb)(media_playlist_h playlist, void *user_data);
447
448 /**
449  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
450  * @brief Called for every media info with playlist member ID in the obtained list of media info.
451  * @details Iterates over playlist members.
452  *
453  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
454  *
455  * @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n
456  *                  The callback is called in the main loop.
457  *
458  * @param[in] playlist_member_id The ID of the playlist member
459  * @param[in] media The handle to the media info
460  * @param[in] user_data The user data passed from the foreach function
461  *
462  * @return @c true to continue with the next iteration of the loop,
463  *         otherwise @c false to break out of the loop
464  *
465  * @pre media_playlist_foreach_media_from_db() will invoke this function.
466  *
467  * @see media_info_clone()
468  * @see media_playlist_foreach_media_from_db()
469  */
470 typedef bool (*playlist_member_cb)(int playlist_member_id, media_info_h media, void *user_data);
471
472 /**
473  * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
474  * @brief Called for every tag in the obtained list of tags.
475  * @details Iterates over a list of tags.
476  *
477  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
478  *
479  * @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n
480  *                  The callback is called in the main loop.
481  *
482  * @param[in] tag The handle to the media tag
483  * @param[in] user_data The user data passed from the foreach function
484  *
485  * @return @c true to continue with the next iteration of the loop,
486  *         otherwise @c false to break out of the loop
487  *
488  * @pre media_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function.
489  *
490  * @see media_tag_clone()
491  * @see media_tag_foreach_tag_from_db()
492  * @see media_info_foreach_tag_from_db()
493  */
494 typedef bool (*media_tag_cb)(media_tag_h tag, void *user_data);
495
496 /**
497  * @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE
498  * @brief Called for every bookmark in the obtained list of bookmarks.
499  * @details Iterates over a bookmark list.
500  *
501  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
502  *
503  * @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n
504  *                  The callback is called in the main loop.
505  *
506  * @param[in] bookmark The handle to the media bookmark
507  * @param[in] user_data The user data passed from the foreach function
508  *
509  * @return @c true to continue with the next iteration of the loop,
510  *         otherwise @c false to break out of the loop
511  *
512  * @pre media_info_foreach_bookmark_from_db() will invoke this function.
513  * @see media_info_foreach_bookmark_from_db()
514  */
515 typedef bool (*media_bookmark_cb)(media_bookmark_h bookmark, void *user_data);
516
517 /**
518  * @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE
519  * @brief Called for every album in the obtained list of groups.
520  * @details Iterates over an album list.
521  *
522  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
523  *
524  * @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n
525  *                  The callback is called in the main loop.
526  *
527  * @param[in] album The handle to the media album
528  * @param[in] user_data The user data passed from the foreach function
529  *
530  * @return @c true to continue with the next iteration of the loop,
531  *         otherwise @c false to break out of the loop
532  *
533  * @pre media_album_foreach_album_from_db() will invoke this function.
534  *
535  * @see media_album_clone()
536  * @see media_album_foreach_album_from_db()
537  */
538 typedef bool (*media_album_cb)(media_album_h album, void *user_data);
539
540 /**
541  * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
542  * @brief Called for every group in the obtained list of groups.
543  * @details Iterates over a media group list.
544  *
545  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
546  *
547  * @remarks You should not free @a group_name returned by this function. \n
548  *                  The callback is called in the main loop.
549  *
550  * @param[in] group_name The name of the media group
551  * @param[in] user_data The user data passed from the foreach function
552  *
553  * @return @c true to continue with the next iteration of the loop,
554  *         otherwise @c false to break out of the loop
555  *
556  * @pre media_group_foreach_group_from_db() will invoke this function.
557  * @see media_group_foreach_group_from_db()
558  */
559 typedef bool (*media_group_cb)(const char *group_name, void *user_data);
560
561 /**
562  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
563  * @brief Called for every face in the obtained list of face.
564  * @details Iterates over a media face list.
565  *
566  * @since_tizen 3.0
567  *
568  * @remarks You should not destroy @a face returned by this function. \n
569  *                  The callback is called in the main loop.
570  *
571  * @param[in] face The handle of the media face
572  * @param[in] user_data The user data passed from the foreach function
573  *
574  * @return @c true to continue with the next iteration of the loop,
575  *         otherwise @c false to break out of the loop
576  *
577  * @pre media_info_foreach_face_from_db() will invoke this function.
578  * @see media_info_foreach_face_from_db()
579  */
580 typedef bool (*media_face_cb)(media_face_h face, void *user_data);
581
582 /**
583  * @}
584  */
585
586 /**
587  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_MODULE
588  * @{
589  */
590
591  /**
592  * @brief Media ID.
593  * @details You can use above define to set the condition of media filter and order keyword.
594  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
595  *
596  */
597 #define MEDIA_ID "MEDIA_ID"
598
599 /**
600  * @brief Media full path.
601  * @details You can use above define to set the condition of media filter and order keyword.
602  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
603  *
604  */
605 #define MEDIA_PATH "MEDIA_PATH"
606
607 /**
608  * @brief The file name including the extension.
609  * @details You can use above define to set the condition of media filter and order keyword.
610  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
611  *
612  */
613 #define MEDIA_DISPLAY_NAME "MEDIA_DISPLAY_NAME"
614
615 /**
616  * @brief Media type.
617  * @details There are 5 media types:\n
618  *               0-image, 1-video, 2-sound, 3-music, 4-other\n
619  *               You can use above define to set the condition of media filter and order keyword.
620  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
621  *
622  */
623 #define MEDIA_TYPE "MEDIA_TYPE"
624
625 /**
626  * @brief Media MIME type.
627  * @details You can use above define to set the condition of media filter and order keyword.
628  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
629  *
630  */
631 #define MEDIA_MIME_TYPE "MEDIA_MIME_TYPE"
632
633
634 /**
635  * @brief Media file size.
636  * @details You can use above define to set the condition of media filter and order keyword.
637  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
638  *
639  */
640 #define MEDIA_SIZE "MEDIA_SIZE"
641
642 /**
643  * @brief The time that content file was first added to media database.
644  * @details You can use above define to set the condition of media filter and order keyword.
645  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
646  *
647  */
648 #define MEDIA_ADDED_TIME "MEDIA_ADDED_TIME"
649
650 /**
651  * @brief The last modification time provided by the file system.
652  * @details You can use above define to set the condition of media filter and order keyword.
653  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
654  *
655  */
656 #define MEDIA_MODIFIED_TIME "MEDIA_MODIFIED_TIME"
657
658 /**
659  * @brief  Media created time.
660  * @details You can use above define to set the condition of media filter and order keyword.
661  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
662  *
663  */
664 #define MEDIA_TIMELINE "MEDIA_TIMELINE"
665
666 /**
667  * @brief Media thumbnail path.
668  * @details You can use above define to set the condition of media filter and order keyword.
669  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
670  *
671  */
672 #define MEDIA_THUMBNAIL_PATH "MEDIA_THUMBNAIL_PATH"
673
674 /**
675  * @brief Media title get from tag or file name.
676  * @details You can use above define to set the condition of media filter and order keyword.
677  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
678  *
679  */
680 #define MEDIA_TITLE "MEDIA_TITLE"
681
682 /**
683  * @brief Media album name.
684  * @details You can use above define to set the condition of media filter and order keyword.
685  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
686  *
687  */
688 #define MEDIA_ALBUM "MEDIA_ALBUM"
689
690 /**
691  * @brief Media artist.
692  * @details You can use above define to set the condition of media filter and order keyword.
693  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
694  *
695  */
696 #define MEDIA_ARTIST "MEDIA_ARTIST"
697
698 /**
699  * @brief Media album artist.
700  * @details You can use above define to set the condition of media filter and order keyword.
701  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
702  *
703  */
704 #define MEDIA_ALBUM_ARTIST "MEDIA_ALBUM_ARTIST"
705
706 /**
707  * @brief Media genre.
708  * @details You can use above define to set the condition of media filter and order keyword.
709  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
710  *
711  */
712 #define MEDIA_GENRE "MEDIA_GENRE"
713
714 /**
715  * @brief Media composer.
716  * @details You can use above define to set the condition of media filter and order keyword.
717  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
718  *
719  */
720 #define MEDIA_COMPOSER "MEDIA_COMPOSER"
721
722 /**
723  * @brief Media year.
724  * @details You can use above define to set the condition of media filter and order keyword.
725  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
726  *
727  */
728 #define MEDIA_YEAR "MEDIA_YEAR"
729
730 /**
731  * @brief Media recorded date.
732  * @details You can use above define to set the condition of media filter and order keyword.
733  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
734  *
735  */
736 #define MEDIA_RECORDED_DATE "MEDIA_RECORDED_DATE"
737
738 /**
739  * @brief Media track number.
740  * @details You can use above define to set the condition of media filter and order keyword.
741  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
742  *
743  */
744 #define MEDIA_TRACK_NUM "MEDIA_TRACK_NUM"
745
746 /**
747  * @brief Media duration.
748  * @details You can use above define to set the condition of media filter and order keyword.
749  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
750  *
751  */
752 #define MEDIA_DURATION "MEDIA_DURATION"
753
754 /**
755  * @brief Media longitude.
756  * @details You can use above define to set the condition of media filter and order keyword.
757  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
758  *
759  */
760 #define MEDIA_LONGITUDE "MEDIA_LONGITUDE"
761
762 /**
763  * @brief Media latitude.
764  * @details You can use above define to set the condition of media filter and order keyword.
765  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
766  *
767  */
768 #define MEDIA_LATITUDE "MEDIA_LATITUDE"
769
770 /**
771  * @brief Media altitude.
772  * @details You can use above define to set the condition of media filter and order keyword.
773  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
774  *
775  */
776 #define MEDIA_ALTITUDE "MEDIA_ALTITUDE"
777
778 /**
779  * @brief Media width.
780  * @details You can use above define to set the condition of media filter and order keyword.
781  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
782  *
783  */
784 #define MEDIA_WIDTH "MEDIA_WIDTH"
785
786 /**
787  * @brief Media height.
788  * @details You can use above define to set the condition of media filter and order keyword.
789  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
790  *
791  */
792 #define MEDIA_HEIGHT "MEDIA_HEIGHT"
793
794 /**
795  * @brief Media datetaken.
796  * @details You can use above define to set the condition of media filter and order keyword.
797  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
798  *
799  */
800 #define MEDIA_DATETAKEN "MEDIA_DATETAKEN"
801
802 /**
803  * @brief The time to register favourite.
804  * @details You can use above define to set the condition of media filter and order keyword.
805  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
806  *
807  */
808 #define MEDIA_FAVOURITE "MEDIA_FAVOURITE"
809
810 /**
811  * @brief Is DRM.
812  * @details There are 2 types:\n
813  *               0-not drm, 1-drm\n
814  *               You can use above define to set the condition of media filter and order keyword.
815  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
816  *
817  */
818 #define MEDIA_IS_DRM "MEDIA_IS_DRM"
819
820 /**
821  * @deprecated Deprecated since 7.0.
822  * @brief Media file name pinyin.
823  * @details You can use above define to set the condition of media filter and order keyword.
824  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
825  * @remarks Since 4.0, this keyword is related to the following feature:\n
826  *          - %http://tizen.org/feature/content.filter.pinyin\n
827  *             If this feature is not supported on the device, PINYIN search does not work.
828  *
829  */
830 #define MEDIA_FILE_NAME_PINYIN "MEDIA_FILE_NAME_PINYIN"
831
832 /**
833  * @deprecated Deprecated since 7.0.
834  * @brief Media title pinyin.
835  * @details You can use above define to set the condition of media filter and order keyword.
836  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
837  * @remarks Since 4.0, this keyword is related to the following feature:\n
838  *          - %http://tizen.org/feature/content.filter.pinyin\n
839  *             If this feature is not supported on the device, PINYIN search does not work.
840  *
841  */
842 #define MEDIA_TITLE_PINYIN "MEDIA_TITLE_PINYIN"
843
844 /**
845  * @deprecated Deprecated since 7.0.
846  * @brief Media album pinyin.
847  * @details You can use above define to set the condition of media filter and order keyword.
848  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
849  * @remarks Since 4.0, this keyword is related to the following feature:\n
850  *          - %http://tizen.org/feature/content.filter.pinyin\n
851  *            If this feature is not supported on the device, PINYIN search does not work.
852  *
853  */
854 #define MEDIA_ALBUM_PINYIN "MEDIA_ALBUM_PINYIN"
855
856 /**
857  * @deprecated Deprecated since 7.0.
858  * @brief Media artist pinyin.
859  * @details You can use above define to set the condition of media filter and order keyword.
860  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
861  * @remarks Since 4.0, this keyword is related to the following feature:\n
862  *          - %http://tizen.org/feature/content.filter.pinyin\n
863  *             If this feature is not supported on the device, PINYIN search does not work.
864  *
865  */
866 #define MEDIA_ARTIST_PINYIN "MEDIA_ARTIST_PINYIN"
867
868 /**
869  * @deprecated Deprecated since 7.0.
870  * @brief Media album artist pinyin.
871  * @details You can use above define to set the condition of media filter and order keyword.
872  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
873  * @remarks Since 4.0, this keyword is related to the following feature:\n
874  *          - %http://tizen.org/feature/content.filter.pinyin\n
875  *            If this feature is not supported on the device, PINYIN search does not work.
876  *
877  */
878 #define MEDIA_ALBUM_ARTIST_PINYIN "MEDIA_ALBUM_ARTIST_PINYIN"
879
880 /**
881  * @deprecated Deprecated since 7.0.
882  * @brief Media genre pinyin.
883  * @details You can use above define to set the condition of media filter and order keyword.
884  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
885  * @remarks Since 4.0, this keyword is related to the following feature:\n
886  *          - %http://tizen.org/feature/content.filter.pinyin\n
887  *            If this feature is not supported on the device, PINYIN search does not work.
888  *
889  */
890 #define MEDIA_GENRE_PINYIN "MEDIA_GENRE_PINYIN"
891
892 /**
893  * @deprecated Deprecated since 7.0.
894  * @brief Media composer pinyin.
895  * @details You can use above define to set the condition of media filter and order keyword.
896  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
897  * @remarks Since 4.0, this keyword is related to the following feature:\n
898  *          - %http://tizen.org/feature/content.filter.pinyin\n
899  *            If this feature is not supported on the device, PINYIN search does not work.
900  *
901  */
902 #define MEDIA_COMPOSER_PINYIN "MEDIA_COMPOSER_PINYIN"
903
904 /**
905  * @brief Virtual Reality content.
906  * @details You can use above define to set the condition of media filter and order keyword.
907  * @since_tizen 3.0
908  *
909  */
910 #define MEDIA_360 "MEDIA_360"
911
912  /**
913  * @brief Folder ID.
914  * @details You can use above define to set the condition of folder filter and order keyword.
915  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
916  */
917 #define FOLDER_ID "FOLDER_ID"
918
919 /**
920  * @brief Folder full path.
921  * @details You can use above define to set the condition of folder filter and order keyword.
922  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
923  */
924 #define FOLDER_PATH "FOLDER_PATH"
925
926 /**
927  * @brief Folder base name.
928  * @details You can use above define to set the condition of folder filter and order keyword.
929  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
930  */
931 #define FOLDER_NAME "FOLDER_NAME"
932
933 /**
934  * @deprecated Deprecated since 7.0.
935  * @brief Folder base name pinyin.
936  * @details You can use above define to set the condition of folder filter and order keyword.
937  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
938  * @remarks Since 4.0, this keyword is related to the following feature:\n
939  *          - %http://tizen.org/feature/content.filter.pinyin\n
940  *            If this feature is not supported on the device, PINYIN search does not work.
941  */
942 #define FOLDER_NAME_PINYIN "FOLDER_NAME_PINYIN"
943
944 /**
945  * @brief Playlist name.
946  * @details You can use above define to set the condition of playlist filter and order keyword.
947  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
948  */
949 #define PLAYLIST_NAME "PLAYLIST_NAME"
950
951 /**
952  * @brief Playlist id.
953  * @details You can use above define to set the condition of playlist filter and order keyword.
954  * @since_tizen 4.0
955  */
956 #define MEDIA_PLAYLIST_ID "PLAYLIST_ID"
957
958 /**
959  * @brief Playlist member order.
960  * @details You can use above define to set the condition of playlist filter and order keyword.
961  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
962  */
963 #define PLAYLIST_MEMBER_ORDER "PLAYLIST_MEMBER_ORDER"
964
965 /**
966  * @brief Media count in playlist.
967  * @details You can use above define to set the condition of playlist filter and order keyword.
968  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
969  */
970 #define PLAYLIST_MEDIA_COUNT "PLAYLIST_MEDIA_COUNT"
971
972 /**
973  * @brief Tag name.
974  * @details You can use above define to set the condition of tag filter and order keyword.
975  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
976  */
977 #define TAG_NAME "TAG_NAME"
978
979 /**
980  * @brief Tag id.
981  * @details You can use above define to set the condition of tag filter and order keyword.
982  * @since_tizen 4.0
983  */
984 #define MEDIA_TAG_ID "TAG_ID"
985
986 /**
987  * @brief Media count in tag.
988  * @details You can use above define to set the condition of tag filter and order keyword.
989  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
990  */
991 #define TAG_MEDIA_COUNT "TAG_MEDIA_COUNT"
992
993 /**
994  * @brief Bookmark marked time.
995  * @details You can use above define to set the condition of bookmark filter and order keyword.
996  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
997  */
998 #define BOOKMARK_MARKED_TIME "BOOKMARK_MARKED_TIME"
999
1000 /**
1001  * @brief Bookmark id.
1002  * @details You can use above define to set the condition of bookmark filter and order keyword.
1003  * @since_tizen 4.0
1004  */
1005 #define MEDIA_BOOKMARK_ID "BOOKMARK_ID"
1006
1007 /**
1008  * @brief Bookmark name.
1009  * @details You can use above define to set the condition of bookmark filter and order keyword.
1010  * @since_tizen 4.0
1011  */
1012 #define BOOKMARK_NAME "BOOKMARK_NAME"
1013
1014 /**
1015  * @brief Face tag.
1016  * @details You can use above define to set the condition of face filter and order keyword.
1017  * @since_tizen 3.0
1018  */
1019 #define MEDIA_FACE_TAG  "MEDIA_FACE_TAG"
1020
1021 /**
1022  * @brief Face id.
1023  * @details You can use above define to set the condition of face filter and order keyword.
1024  * @since_tizen 4.0
1025  */
1026 #define MEDIA_FACE_ID   "MEDIA_FACE_ID"
1027
1028 /**
1029  * @}
1030  */
1031
1032
1033 #ifdef __cplusplus
1034 }
1035 #endif /* __cplusplus */
1036
1037
1038 #endif /*__TIZEN_CONTENT_MEDIA_CONTENT_TYPE_H__*/