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