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