204b80c315233278b3d105ab1991ceb0b9648ab8
[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  * @deprecated Deprecated since 8.0.
254  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
255  * @brief The structure type for the Media face handle.
256  * @since_tizen 3.0
257  */
258 typedef void *media_face_h;
259
260 /**
261  * @ingroup CAPI_MEDIA_CONTENT_MODULE
262  * @brief The structure type for the Media content noti handle.
263  * @since_tizen 3.0
264  */
265 typedef void *media_content_noti_h;
266
267 /**
268  * @ingroup CAPI_MEDIA_CONTENT_MODULE
269  * @brief Called when the media scanning is finished.
270  * @details The following error codes can be received: \n
271  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
272  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
273  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
274  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
275  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
276  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
277  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
278  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
279  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
280  * @remarks The callback is called in a separate thread(not in the main loop).
281  *
282  * @param[in] error The error code
283  * @param[in] user_data The user data passed from the foreach function
284  *
285  * @pre media_content_scan_folder().
286  * @see media_content_scan_folder()
287  */
288 typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user_data);
289
290 /**
291  * @ingroup CAPI_MEDIA_CONTENT_MODULE
292  * @brief Called when the notification of the media DB change is subscribed.
293  * @details The following error codes can be received: \n
294  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
295  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
296  *
297  * @remarks The callback is called in a separate thread(not in the main loop).
298  *
299  * @param[in] error The error code
300  * @param[in] pid The PID which publishes notification
301  * @param[in] update_item The update item of notification
302  * @param[in] update_type The update type of notification
303  * @param[in] media_type The type of the media content (#media_content_type_e)
304  * @param[in] id The ID of media or directory, which is updated
305  * @param[in] path The path of the media or directory
306  * @param[in] mime_type The MIME of the media info
307  * @param[in] user_data The user data passed from the foreach function
308  *
309  * @pre media_content_add_db_updated_cb().
310  * @see media_content_add_db_updated_cb()
311  */
312 typedef void (*media_content_db_update_cb)(
313                                 media_content_error_e error,
314                                 int pid,
315                                 media_content_db_update_item_type_e update_item,
316                                 media_content_db_update_type_e update_type,
317                                 media_content_type_e media_type,
318                                 char *id,
319                                 char *path,
320                                 char *mime_type,
321                                 void *user_data);
322
323
324 /**
325  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
326  * @brief Called for every available media info.
327  * @details Iterates over a list of media info.
328  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
329  *
330  * @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n
331  *                  The callback is called in the main loop.
332  *
333  * @param[in] media The handle to the media info
334  * @param[in] user_data The user data passed from the foreach function
335  *
336  * @return @c true to continue with the next iteration of the loop,
337  *         otherwise @c false to break out of the loop
338  *
339  * @pre media_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(),
340  *      media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function.
341  *
342  * @see media_info_clone()
343  * @see media_album_foreach_media_from_db()
344  * @see media_playlist_foreach_media_from_db()
345  * @see media_tag_foreach_media_from_db()
346  * @see media_info_foreach_media_from_db()
347  * @see media_folder_foreach_media_from_db()
348  */
349 typedef bool (*media_info_cb)(media_info_h media, void *user_data);
350
351
352 /**
353  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
354  * @brief Called when media items are inserted completely.
355  * @details The following error codes can be received: \n
356  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
357  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
358  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
359  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
360  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
361  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
362  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
363  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
364  *             #MEDIA_CONTENT_ERROR_NOT_SUPPORTED : Not supported \n
365  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
366  *
367  * @remarks The callback is called in a separate thread(not in the main loop).
368  *
369  * @param[in] error The error code
370  * @param[in] user_data The user data passed from the foreach function
371  *
372  * @pre media_info_insert_batch_to_db()
373  * @see media_info_insert_batch_to_db()
374  */
375 typedef void (*media_insert_completed_cb)(media_content_error_e error, void * user_data);
376
377 /**
378  * @deprecated Deprecated since 8.0.
379  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
380  * @brief Called when face detection on the image is completed.
381  *
382  * @details The following error codes can be delivered. \n
383  *         #MEDIA_CONTENT_ERROR_NONE, \n
384  *         #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, \n
385  *         #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n
386  *         #MEDIA_CONTENT_ERROR_DB_FAILED, \n
387  *         #MEDIA_CONTENT_ERROR_DB_BUSY, \n
388  *         #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT
389  *
390  * @since_tizen 3.0
391  *
392  * @remarks The callback is called in a separate thread(not in the main loop).
393  *
394  * @param[in] error The error code
395  * @param[in] face_count The number of all detected faces
396  * @param[in] user_data The user data passed from the foreach function
397  *
398  * @pre media_info_start_face_detection()
399  * @see media_info_start_face_detection()
400  */
401 typedef void (*media_face_detection_completed_cb)(media_content_error_e error, const int face_count, void *user_data);
402
403
404 /**
405  * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
406  * @brief Called for every available media folder.
407  * @details Iterates over a list of folders.
408  *
409  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
410  *
411  * @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n
412  *                  The callback is called in the main loop.
413  *
414  * @param[in] folder The handle to the media folder
415  * @param[in] user_data The user data passed from the foreach function
416  *
417  * @return @c true to continue with the next iteration of the loop,
418  *         otherwise @c false to break out of the loop
419  *
420  * @pre media_folder_foreach_folder_from_db() will invoke this function.
421  * @see media_folder_clone()
422  * @see media_folder_foreach_folder_from_db()
423  */
424 typedef bool (*media_folder_cb)(media_folder_h folder, void *user_data);
425
426 /**
427  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
428  * @brief Called for every playlist in the obtained list of playlists.
429  * @details Iterates over a playlist list.
430  *
431  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
432  *
433  * @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n
434  *                  The callback is called in the main loop.
435  *
436  * @param[in] playlist The handle to the media playlist
437  * @param[in] user_data The user data passed from the foreach function
438  *
439  * @return @c true to continue with the next iteration of the loop,
440  *         otherwise @c false to break out of the loop
441  *
442  * @pre media_playlist_foreach_playlist_from_db() will invoke this function.
443  *
444  * @see media_playlist_clone()
445  * @see media_playlist_foreach_playlist_from_db()
446  */
447 typedef bool (*media_playlist_cb)(media_playlist_h playlist, void *user_data);
448
449 /**
450  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
451  * @brief Called for every media info with playlist member ID in the obtained list of media info.
452  * @details Iterates over playlist members.
453  *
454  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
455  *
456  * @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n
457  *                  The callback is called in the main loop.
458  *
459  * @param[in] playlist_member_id The ID of the playlist member
460  * @param[in] media The handle to the media info
461  * @param[in] user_data The user data passed from the foreach function
462  *
463  * @return @c true to continue with the next iteration of the loop,
464  *         otherwise @c false to break out of the loop
465  *
466  * @pre media_playlist_foreach_media_from_db() will invoke this function.
467  *
468  * @see media_info_clone()
469  * @see media_playlist_foreach_media_from_db()
470  */
471 typedef bool (*playlist_member_cb)(int playlist_member_id, media_info_h media, void *user_data);
472
473 /**
474  * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
475  * @brief Called for every tag in the obtained list of tags.
476  * @details Iterates over a list of tags.
477  *
478  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
479  *
480  * @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n
481  *                  The callback is called in the main loop.
482  *
483  * @param[in] tag The handle to the media tag
484  * @param[in] user_data The user data passed from the foreach function
485  *
486  * @return @c true to continue with the next iteration of the loop,
487  *         otherwise @c false to break out of the loop
488  *
489  * @pre media_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function.
490  *
491  * @see media_tag_clone()
492  * @see media_tag_foreach_tag_from_db()
493  * @see media_info_foreach_tag_from_db()
494  */
495 typedef bool (*media_tag_cb)(media_tag_h tag, void *user_data);
496
497 /**
498  * @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE
499  * @brief Called for every bookmark in the obtained list of bookmarks.
500  * @details Iterates over a bookmark list.
501  *
502  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
503  *
504  * @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n
505  *                  The callback is called in the main loop.
506  *
507  * @param[in] bookmark The handle to the media bookmark
508  * @param[in] user_data The user data passed from the foreach function
509  *
510  * @return @c true to continue with the next iteration of the loop,
511  *         otherwise @c false to break out of the loop
512  *
513  * @pre media_info_foreach_bookmark_from_db() will invoke this function.
514  * @see media_info_foreach_bookmark_from_db()
515  */
516 typedef bool (*media_bookmark_cb)(media_bookmark_h bookmark, void *user_data);
517
518 /**
519  * @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE
520  * @brief Called for every album in the obtained list of groups.
521  * @details Iterates over an album list.
522  *
523  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
524  *
525  * @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n
526  *                  The callback is called in the main loop.
527  *
528  * @param[in] album The handle to the media album
529  * @param[in] user_data The user data passed from the foreach function
530  *
531  * @return @c true to continue with the next iteration of the loop,
532  *         otherwise @c false to break out of the loop
533  *
534  * @pre media_album_foreach_album_from_db() will invoke this function.
535  *
536  * @see media_album_clone()
537  * @see media_album_foreach_album_from_db()
538  */
539 typedef bool (*media_album_cb)(media_album_h album, void *user_data);
540
541 /**
542  * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
543  * @brief Called for every group in the obtained list of groups.
544  * @details Iterates over a media group list.
545  *
546  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
547  *
548  * @remarks You should not free @a group_name returned by this function. \n
549  *                  The callback is called in the main loop.
550  *
551  * @param[in] group_name The name of the media group
552  * @param[in] user_data The user data passed from the foreach function
553  *
554  * @return @c true to continue with the next iteration of the loop,
555  *         otherwise @c false to break out of the loop
556  *
557  * @pre media_group_foreach_group_from_db() will invoke this function.
558  * @see media_group_foreach_group_from_db()
559  */
560 typedef bool (*media_group_cb)(const char *group_name, void *user_data);
561
562 /**
563  * @deprecated Deprecated since 8.0.
564  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
565  * @brief Called for every face in the obtained list of face.
566  * @details Iterates over a media face list.
567  *
568  * @since_tizen 3.0
569  *
570  * @remarks You should not destroy @a face returned by this function. \n
571  *                  The callback is called in the main loop.
572  *
573  * @param[in] face The handle of the media face
574  * @param[in] user_data The user data passed from the foreach function
575  *
576  * @return @c true to continue with the next iteration of the loop,
577  *         otherwise @c false to break out of the loop
578  *
579  * @pre media_info_foreach_face_from_db() will invoke this function.
580  * @see media_info_foreach_face_from_db()
581  */
582 typedef bool (*media_face_cb)(media_face_h face, void *user_data);
583
584 /**
585  * @}
586  */
587
588 /**
589  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_MODULE
590  * @{
591  */
592
593  /**
594  * @brief Media ID.
595  * @details You can use above define to set the condition of media filter and order keyword.
596  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
597  *
598  */
599 #define MEDIA_ID "MEDIA_ID"
600
601 /**
602  * @brief Media full path.
603  * @details You can use above define to set the condition of media filter and order keyword.
604  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
605  *
606  */
607 #define MEDIA_PATH "MEDIA_PATH"
608
609 /**
610  * @brief The file name including the extension.
611  * @details You can use above define to set the condition of media filter and order keyword.
612  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
613  *
614  */
615 #define MEDIA_DISPLAY_NAME "MEDIA_DISPLAY_NAME"
616
617 /**
618  * @brief Media type.
619  * @details There are 5 media types:\n
620  *               0-image, 1-video, 2-sound, 3-music, 4-other\n
621  *               You can use above define to set the condition of media filter and order keyword.
622  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
623  *
624  */
625 #define MEDIA_TYPE "MEDIA_TYPE"
626
627 /**
628  * @brief Media MIME type.
629  * @details You can use above define to set the condition of media filter and order keyword.
630  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
631  *
632  */
633 #define MEDIA_MIME_TYPE "MEDIA_MIME_TYPE"
634
635
636 /**
637  * @brief Media file size.
638  * @details You can use above define to set the condition of media filter and order keyword.
639  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
640  *
641  */
642 #define MEDIA_SIZE "MEDIA_SIZE"
643
644 /**
645  * @brief The time that content file was first added to media database.
646  * @details You can use above define to set the condition of media filter and order keyword.
647  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
648  *
649  */
650 #define MEDIA_ADDED_TIME "MEDIA_ADDED_TIME"
651
652 /**
653  * @brief The last modification time provided by the file system.
654  * @details You can use above define to set the condition of media filter and order keyword.
655  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
656  *
657  */
658 #define MEDIA_MODIFIED_TIME "MEDIA_MODIFIED_TIME"
659
660 /**
661  * @brief  Media created time.
662  * @details You can use above define to set the condition of media filter and order keyword.
663  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
664  *
665  */
666 #define MEDIA_TIMELINE "MEDIA_TIMELINE"
667
668 /**
669  * @brief Media thumbnail path.
670  * @details You can use above define to set the condition of media filter and order keyword.
671  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
672  *
673  */
674 #define MEDIA_THUMBNAIL_PATH "MEDIA_THUMBNAIL_PATH"
675
676 /**
677  * @brief Media title get from tag or file name.
678  * @details You can use above define to set the condition of media filter and order keyword.
679  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
680  *
681  */
682 #define MEDIA_TITLE "MEDIA_TITLE"
683
684 /**
685  * @brief Media album name.
686  * @details You can use above define to set the condition of media filter and order keyword.
687  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
688  *
689  */
690 #define MEDIA_ALBUM "MEDIA_ALBUM"
691
692 /**
693  * @brief Media artist.
694  * @details You can use above define to set the condition of media filter and order keyword.
695  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
696  *
697  */
698 #define MEDIA_ARTIST "MEDIA_ARTIST"
699
700 /**
701  * @brief Media album artist.
702  * @details You can use above define to set the condition of media filter and order keyword.
703  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
704  *
705  */
706 #define MEDIA_ALBUM_ARTIST "MEDIA_ALBUM_ARTIST"
707
708 /**
709  * @brief Media genre.
710  * @details You can use above define to set the condition of media filter and order keyword.
711  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
712  *
713  */
714 #define MEDIA_GENRE "MEDIA_GENRE"
715
716 /**
717  * @brief Media composer.
718  * @details You can use above define to set the condition of media filter and order keyword.
719  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
720  *
721  */
722 #define MEDIA_COMPOSER "MEDIA_COMPOSER"
723
724 /**
725  * @brief Media year.
726  * @details You can use above define to set the condition of media filter and order keyword.
727  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
728  *
729  */
730 #define MEDIA_YEAR "MEDIA_YEAR"
731
732 /**
733  * @brief Media recorded date.
734  * @details You can use above define to set the condition of media filter and order keyword.
735  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
736  *
737  */
738 #define MEDIA_RECORDED_DATE "MEDIA_RECORDED_DATE"
739
740 /**
741  * @brief Media track number.
742  * @details You can use above define to set the condition of media filter and order keyword.
743  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
744  *
745  */
746 #define MEDIA_TRACK_NUM "MEDIA_TRACK_NUM"
747
748 /**
749  * @brief Media duration.
750  * @details You can use above define to set the condition of media filter and order keyword.
751  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
752  *
753  */
754 #define MEDIA_DURATION "MEDIA_DURATION"
755
756 /**
757  * @brief Media longitude.
758  * @details You can use above define to set the condition of media filter and order keyword.
759  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
760  *
761  */
762 #define MEDIA_LONGITUDE "MEDIA_LONGITUDE"
763
764 /**
765  * @brief Media latitude.
766  * @details You can use above define to set the condition of media filter and order keyword.
767  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
768  *
769  */
770 #define MEDIA_LATITUDE "MEDIA_LATITUDE"
771
772 /**
773  * @brief Media altitude.
774  * @details You can use above define to set the condition of media filter and order keyword.
775  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
776  *
777  */
778 #define MEDIA_ALTITUDE "MEDIA_ALTITUDE"
779
780 /**
781  * @brief Media width.
782  * @details You can use above define to set the condition of media filter and order keyword.
783  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
784  *
785  */
786 #define MEDIA_WIDTH "MEDIA_WIDTH"
787
788 /**
789  * @brief Media height.
790  * @details You can use above define to set the condition of media filter and order keyword.
791  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
792  *
793  */
794 #define MEDIA_HEIGHT "MEDIA_HEIGHT"
795
796 /**
797  * @brief Media datetaken.
798  * @details You can use above define to set the condition of media filter and order keyword.
799  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
800  *
801  */
802 #define MEDIA_DATETAKEN "MEDIA_DATETAKEN"
803
804 /**
805  * @brief The time to register favourite.
806  * @details You can use above define to set the condition of media filter and order keyword.
807  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
808  *
809  */
810 #define MEDIA_FAVOURITE "MEDIA_FAVOURITE"
811
812 /**
813  * @brief Is DRM.
814  * @details There are 2 types:\n
815  *               0-not drm, 1-drm\n
816  *               You can use above define to set the condition of media filter and order keyword.
817  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
818  *
819  */
820 #define MEDIA_IS_DRM "MEDIA_IS_DRM"
821
822 /**
823  * @deprecated Deprecated since 7.0.
824  * @brief Media file name pinyin.
825  * @details You can use above define to set the condition of media filter and order keyword.
826  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
827  * @remarks Since 4.0, this keyword is related to the following feature:\n
828  *          - %http://tizen.org/feature/content.filter.pinyin\n
829  *             If this feature is not supported on the device, PINYIN search does not work.
830  *
831  */
832 #define MEDIA_FILE_NAME_PINYIN "MEDIA_FILE_NAME_PINYIN"
833
834 /**
835  * @deprecated Deprecated since 7.0.
836  * @brief Media title pinyin.
837  * @details You can use above define to set the condition of media filter and order keyword.
838  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
839  * @remarks Since 4.0, this keyword is related to the following feature:\n
840  *          - %http://tizen.org/feature/content.filter.pinyin\n
841  *             If this feature is not supported on the device, PINYIN search does not work.
842  *
843  */
844 #define MEDIA_TITLE_PINYIN "MEDIA_TITLE_PINYIN"
845
846 /**
847  * @deprecated Deprecated since 7.0.
848  * @brief Media album pinyin.
849  * @details You can use above define to set the condition of media filter and order keyword.
850  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
851  * @remarks Since 4.0, this keyword is related to the following feature:\n
852  *          - %http://tizen.org/feature/content.filter.pinyin\n
853  *            If this feature is not supported on the device, PINYIN search does not work.
854  *
855  */
856 #define MEDIA_ALBUM_PINYIN "MEDIA_ALBUM_PINYIN"
857
858 /**
859  * @deprecated Deprecated since 7.0.
860  * @brief Media artist pinyin.
861  * @details You can use above define to set the condition of media filter and order keyword.
862  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
863  * @remarks Since 4.0, this keyword is related to the following feature:\n
864  *          - %http://tizen.org/feature/content.filter.pinyin\n
865  *             If this feature is not supported on the device, PINYIN search does not work.
866  *
867  */
868 #define MEDIA_ARTIST_PINYIN "MEDIA_ARTIST_PINYIN"
869
870 /**
871  * @deprecated Deprecated since 7.0.
872  * @brief Media album artist pinyin.
873  * @details You can use above define to set the condition of media filter and order keyword.
874  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
875  * @remarks Since 4.0, this keyword is related to the following feature:\n
876  *          - %http://tizen.org/feature/content.filter.pinyin\n
877  *            If this feature is not supported on the device, PINYIN search does not work.
878  *
879  */
880 #define MEDIA_ALBUM_ARTIST_PINYIN "MEDIA_ALBUM_ARTIST_PINYIN"
881
882 /**
883  * @deprecated Deprecated since 7.0.
884  * @brief Media genre pinyin.
885  * @details You can use above define to set the condition of media filter and order keyword.
886  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
887  * @remarks Since 4.0, this keyword is related to the following feature:\n
888  *          - %http://tizen.org/feature/content.filter.pinyin\n
889  *            If this feature is not supported on the device, PINYIN search does not work.
890  *
891  */
892 #define MEDIA_GENRE_PINYIN "MEDIA_GENRE_PINYIN"
893
894 /**
895  * @deprecated Deprecated since 7.0.
896  * @brief Media composer pinyin.
897  * @details You can use above define to set the condition of media filter and order keyword.
898  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
899  * @remarks Since 4.0, this keyword is related to the following feature:\n
900  *          - %http://tizen.org/feature/content.filter.pinyin\n
901  *            If this feature is not supported on the device, PINYIN search does not work.
902  *
903  */
904 #define MEDIA_COMPOSER_PINYIN "MEDIA_COMPOSER_PINYIN"
905
906 /**
907  * @brief Virtual Reality content.
908  * @details You can use above define to set the condition of media filter and order keyword.
909  * @since_tizen 3.0
910  *
911  */
912 #define MEDIA_360 "MEDIA_360"
913
914  /**
915  * @brief Folder ID.
916  * @details You can use above define to set the condition of folder filter and order keyword.
917  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
918  */
919 #define FOLDER_ID "FOLDER_ID"
920
921 /**
922  * @brief Folder full path.
923  * @details You can use above define to set the condition of folder filter and order keyword.
924  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
925  */
926 #define FOLDER_PATH "FOLDER_PATH"
927
928 /**
929  * @brief Folder base name.
930  * @details You can use above define to set the condition of folder filter and order keyword.
931  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
932  */
933 #define FOLDER_NAME "FOLDER_NAME"
934
935 /**
936  * @deprecated Deprecated since 7.0.
937  * @brief Folder base name pinyin.
938  * @details You can use above define to set the condition of folder filter and order keyword.
939  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
940  * @remarks Since 4.0, this keyword is related to the following feature:\n
941  *          - %http://tizen.org/feature/content.filter.pinyin\n
942  *            If this feature is not supported on the device, PINYIN search does not work.
943  */
944 #define FOLDER_NAME_PINYIN "FOLDER_NAME_PINYIN"
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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 @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
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__*/