[ACR-1820] Deprecate low usability fields
[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 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_e;
57
58 /**
59  * @ingroup CAPI_MEDIA_CONTENT_MODULE
60  * @brief Enumeration for media content DB update items.
61  * @since_tizen 2.3
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 2.3
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 2.3
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 2.3
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 2.3
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 2.3
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 2.3
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 2.3
150  */
151 typedef enum {
152         MEDIA_CONTENT_GROUP_DISPLAY_NAME = 0,    /**< @deprecated Media group ID for display name. Deprecated since 9.0*/
153         MEDIA_CONTENT_GROUP_TYPE,                /**< @deprecated Media group ID for a media type. Deprecated since 9.0*/
154         MEDIA_CONTENT_GROUP_MIME_TYPE,           /**< @deprecated Media group ID for a mime type. Deprecated since 9.0*/
155         MEDIA_CONTENT_GROUP_SIZE,                /**< @deprecated Media group ID for content size. Deprecated since 9.0*/
156         MEDIA_CONTENT_GROUP_ADDED_TIME,          /**< @deprecated Media group ID for the added time. Deprecated since 9.0*/
157         MEDIA_CONTENT_GROUP_MODIFIED_TIME,       /**< @deprecated Media group ID for the modified time. Deprecated since 9.0*/
158         MEDIA_CONTENT_GROUP_TITLE,               /**< @deprecated Media group ID for a content title. Deprecated since 9.0*/
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,            /**< @deprecated Media group ID for a composer. Deprecated since 9.0*/
163         MEDIA_CONTENT_GROUP_YEAR,                /**< Media group ID for a year*/
164         MEDIA_CONTENT_GROUP_RECORDED_DATE,       /**< @deprecated Media group ID for the recorded date. Deprecated since 9.0*/
165         MEDIA_CONTENT_GROUP_COPYRIGHT,           /**< @deprecated Media group ID for the copyright. Deprecated since 9.0*/
166         MEDIA_CONTENT_GROUP_TRACK_NUM,           /**< @deprecated Media group ID for a track number. Deprecated since 9.0*/
167         MEDIA_CONTENT_GROUP_DESCRIPTION,         /**< @deprecated Media group ID for a description. Deprecated since 9.0*/
168         MEDIA_CONTENT_GROUP_LONGITUDE,           /**< @deprecated Media group ID for the longitude. Deprecated since 9.0*/
169         MEDIA_CONTENT_GROUP_LATITUDE,            /**< @deprecated Media group ID for the latitude. Deprecated since 9.0*/
170         MEDIA_CONTENT_GROUP_ALTITUDE,            /**< @deprecated Media group ID for the altitude. Deprecated since 9.0*/
171         MEDIA_CONTENT_GROUP_RATING = 20,         /**< @deprecated Media group ID for a rating. Deprecated since 9.0*/
172         MEDIA_CONTENT_GROUP_MAX = 29             /**< @deprecated Invalid media group ID. Deprecated since 9.0*/
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 2.3
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 2.3
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 2.3
193  */
194 typedef struct media_playlist_s *media_playlist_h;
195
196 /**
197  * @deprecated Deprecated since 9.0.
198  * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
199  * @brief The structure type for the Media tag handle.
200  * @since_tizen 2.3
201  */
202 typedef struct media_tag_s *media_tag_h;
203
204 /**
205  * @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE
206  * @brief The structure type for the Media bookmark handle.
207  * @since_tizen 2.3
208  */
209 typedef struct media_bookmark_s *media_bookmark_h;
210
211 /**
212  * @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE
213  * @brief The structure type for the Media album handle.
214  * @since_tizen 2.3
215  */
216 typedef struct media_album_s *media_album_h;
217
218 /**
219  * @ingroup CAPI_CONTENT_MEDIA_IMAGE_META_MODULE
220  * @brief The structure type for the Image metadata handle.
221  * @since_tizen 2.3
222  */
223 typedef struct image_meta_s *image_meta_h;
224
225 /**
226  * @deprecated Deprecated since 9.0.
227  * @ingroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE
228  * @brief The structure type for the Video metadata handle.
229  * @since_tizen 2.3
230  */
231 typedef struct video_meta_s *video_meta_h;
232
233 /**
234  * @ingroup CAPI_CONTENT_MEDIA_AUDIO_META_MODULE
235  * @brief The structure type for the Audio metadata handle.
236  * @since_tizen 2.3
237  */
238 typedef struct audio_meta_s *audio_meta_h;
239
240 /**
241  * @ingroup CAPI_CONTENT_MEDIA_BOOK_META_MODULE
242  * @brief The structure type for the Book metadata handle.
243  * @since_tizen 6.5
244  */
245 typedef struct book_meta_s *book_meta_h;
246
247 /**
248  * @ingroup CAPI_CONTENT_MEDIA_FILTER_MODULE
249  * @brief The structure type for the Media filter handle.
250  * @since_tizen 2.3
251  */
252 typedef struct filter_s *filter_h;
253
254 /**
255  * @deprecated Deprecated since 8.0.
256  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
257  * @brief The structure type for the Media face handle.
258  * @since_tizen 3.0
259  */
260 typedef void *media_face_h;
261
262 /**
263  * @ingroup CAPI_MEDIA_CONTENT_MODULE
264  * @brief The structure type for the Media content noti handle.
265  * @since_tizen 3.0
266  */
267 typedef void *media_content_noti_h;
268
269 /**
270  * @ingroup CAPI_MEDIA_CONTENT_MODULE
271  * @brief Called when the media scanning is finished.
272  * @details The following error codes can be received: \n
273  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
274  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
275  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
276  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
277  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
278  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
279  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
280  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
281  * @since_tizen 2.3
282  * @remarks The callback is called in a separate thread(not in the main loop).
283  *
284  * @param[in] error The error code
285  * @param[in] user_data The user data passed from the foreach function
286  *
287  * @pre media_content_scan_folder().
288  * @see media_content_scan_folder()
289  */
290 typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user_data);
291
292 /**
293  * @ingroup CAPI_MEDIA_CONTENT_MODULE
294  * @brief Called when the notification of the media DB change is subscribed.
295  * @details The following error codes can be received: \n
296  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
297  * @since_tizen 2.3
298  *
299  * @remarks The callback is called in a separate thread(not in the main loop).
300  *
301  * @param[in] error The error code
302  * @param[in] pid The PID which publishes notification
303  * @param[in] update_item The update item of notification
304  * @param[in] update_type The update type of notification
305  * @param[in] media_type The type of the media content (#media_content_type_e)
306  * @param[in] id The ID of media or directory, which is updated
307  * @param[in] path The path of the media or directory
308  * @param[in] mime_type The MIME of the media info
309  * @param[in] user_data The user data passed from the foreach function
310  *
311  * @pre media_content_add_db_updated_cb().
312  * @see media_content_add_db_updated_cb()
313  */
314 typedef void (*media_content_db_update_cb)(
315                                 media_content_error_e error,
316                                 int pid,
317                                 media_content_db_update_item_type_e update_item,
318                                 media_content_db_update_type_e update_type,
319                                 media_content_type_e media_type,
320                                 char *id,
321                                 char *path,
322                                 char *mime_type,
323                                 void *user_data);
324
325
326 /**
327  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
328  * @brief Called for every available media info.
329  * @details Iterates over a list of media info.
330  * @since_tizen 2.3
331  *
332  * @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n
333  *                  The callback is called in the main loop.
334  *
335  * @param[in] media The handle to the media info
336  * @param[in] user_data The user data passed from the foreach function
337  *
338  * @return @c true to continue with the next iteration of the loop,
339  *         otherwise @c false to break out of the loop
340  *
341  * @pre media_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(),
342  *      media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function.
343  *
344  * @see media_info_clone()
345  * @see media_album_foreach_media_from_db()
346  * @see media_playlist_foreach_media_from_db()
347  * @see media_tag_foreach_media_from_db()
348  * @see media_info_foreach_media_from_db()
349  * @see media_folder_foreach_media_from_db()
350  */
351 typedef bool (*media_info_cb)(media_info_h media, void *user_data);
352
353
354 /**
355  * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
356  * @brief Called when media items are inserted completely.
357  * @details The following error codes can be received: \n
358  *             #MEDIA_CONTENT_ERROR_NONE : Success \n
359  *             #MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter \n
360  *             #MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation \n
361  *             #MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied \n
362  *             #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory \n
363  *             #MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed \n
364  *             #MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy \n
365  *             #MEDIA_CONTENT_ERROR_NETWORK : Network fail \n
366  *             #MEDIA_CONTENT_ERROR_NOT_SUPPORTED : Not supported \n
367  * @since_tizen 2.3
368  *
369  * @remarks The callback is called in a separate thread(not in the main loop).
370  *
371  * @param[in] error The error code
372  * @param[in] user_data The user data passed from the foreach function
373  *
374  * @pre media_info_insert_batch_to_db()
375  * @see media_info_insert_batch_to_db()
376  */
377 typedef void (*media_insert_completed_cb)(media_content_error_e error, void * user_data);
378
379 /**
380  * @deprecated Deprecated since 8.0.
381  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
382  * @brief Called when face detection on the image is completed.
383  *
384  * @details The following error codes can be delivered. \n
385  *         #MEDIA_CONTENT_ERROR_NONE, \n
386  *         #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, \n
387  *         #MEDIA_CONTENT_ERROR_INVALID_OPERATION, \n
388  *         #MEDIA_CONTENT_ERROR_DB_FAILED, \n
389  *         #MEDIA_CONTENT_ERROR_DB_BUSY, \n
390  *         #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT
391  *
392  * @since_tizen 3.0
393  *
394  * @remarks The callback is called in a separate thread(not in the main loop).
395  *
396  * @param[in] error The error code
397  * @param[in] face_count The number of all detected faces
398  * @param[in] user_data The user data passed from the foreach function
399  *
400  * @pre media_info_start_face_detection()
401  * @see media_info_start_face_detection()
402  */
403 typedef void (*media_face_detection_completed_cb)(media_content_error_e error, const int face_count, void *user_data);
404
405
406 /**
407  * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
408  * @brief Called for every available media folder.
409  * @details Iterates over a list of folders.
410  *
411  * @since_tizen 2.3
412  *
413  * @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n
414  *                  The callback is called in the main loop.
415  *
416  * @param[in] folder The handle to the media folder
417  * @param[in] user_data The user data passed from the foreach function
418  *
419  * @return @c true to continue with the next iteration of the loop,
420  *         otherwise @c false to break out of the loop
421  *
422  * @pre media_folder_foreach_folder_from_db() will invoke this function.
423  * @see media_folder_clone()
424  * @see media_folder_foreach_folder_from_db()
425  */
426 typedef bool (*media_folder_cb)(media_folder_h folder, void *user_data);
427
428 /**
429  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
430  * @brief Called for every playlist in the obtained list of playlists.
431  * @details Iterates over a playlist list.
432  *
433  * @since_tizen 2.3
434  *
435  * @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n
436  *                  The callback is called in the main loop.
437  *
438  * @param[in] playlist The handle to the media playlist
439  * @param[in] user_data The user data passed from the foreach function
440  *
441  * @return @c true to continue with the next iteration of the loop,
442  *         otherwise @c false to break out of the loop
443  *
444  * @pre media_playlist_foreach_playlist_from_db() will invoke this function.
445  *
446  * @see media_playlist_clone()
447  * @see media_playlist_foreach_playlist_from_db()
448  */
449 typedef bool (*media_playlist_cb)(media_playlist_h playlist, void *user_data);
450
451 /**
452  * @ingroup CAPI_CONTENT_MEDIA_PLAYLIST_MODULE
453  * @brief Called for every media info with playlist member ID in the obtained list of media info.
454  * @details Iterates over playlist members.
455  *
456  * @since_tizen 2.3
457  *
458  * @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n
459  *                  The callback is called in the main loop.
460  *
461  * @param[in] playlist_member_id The ID of the playlist member
462  * @param[in] media The handle to the media info
463  * @param[in] user_data The user data passed from the foreach function
464  *
465  * @return @c true to continue with the next iteration of the loop,
466  *         otherwise @c false to break out of the loop
467  *
468  * @pre media_playlist_foreach_media_from_db() will invoke this function.
469  *
470  * @see media_info_clone()
471  * @see media_playlist_foreach_media_from_db()
472  */
473 typedef bool (*playlist_member_cb)(int playlist_member_id, media_info_h media, void *user_data);
474
475 /**
476  * @deprecated Deprecated since 9.0.
477  * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
478  * @brief Called for every tag in the obtained list of tags.
479  * @details Iterates over a list of tags.
480  *
481  * @since_tizen 2.3
482  *
483  * @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n
484  *                  The callback is called in the main loop.
485  *
486  * @param[in] tag The handle to the media tag
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_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function.
493  *
494  * @see media_tag_clone()
495  * @see media_tag_foreach_tag_from_db()
496  * @see media_info_foreach_tag_from_db()
497  */
498 typedef bool (*media_tag_cb)(media_tag_h tag, void *user_data);
499
500 /**
501  * @ingroup CAPI_CONTENT_MEDIA_BOOKMARK_MODULE
502  * @brief Called for every bookmark in the obtained list of bookmarks.
503  * @details Iterates over a bookmark list.
504  *
505  * @since_tizen 2.3
506  *
507  * @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n
508  *                  The callback is called in the main loop.
509  *
510  * @param[in] bookmark The handle to the media bookmark
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_info_foreach_bookmark_from_db() will invoke this function.
517  * @see media_info_foreach_bookmark_from_db()
518  */
519 typedef bool (*media_bookmark_cb)(media_bookmark_h bookmark, void *user_data);
520
521 /**
522  * @ingroup CAPI_CONTENT_MEDIA_ALBUM_MODULE
523  * @brief Called for every album in the obtained list of groups.
524  * @details Iterates over an album list.
525  *
526  * @since_tizen 2.3
527  *
528  * @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n
529  *                  The callback is called in the main loop.
530  *
531  * @param[in] album The handle to the media album
532  * @param[in] user_data The user data passed from the foreach function
533  *
534  * @return @c true to continue with the next iteration of the loop,
535  *         otherwise @c false to break out of the loop
536  *
537  * @pre media_album_foreach_album_from_db() will invoke this function.
538  *
539  * @see media_album_clone()
540  * @see media_album_foreach_album_from_db()
541  */
542 typedef bool (*media_album_cb)(media_album_h album, void *user_data);
543
544 /**
545  * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
546  * @brief Called for every group in the obtained list of groups.
547  * @details Iterates over a media group list.
548  *
549  * @since_tizen 2.3
550  *
551  * @remarks You should not free @a group_name returned by this function. \n
552  *                  The callback is called in the main loop.
553  *
554  * @param[in] group_name The name of the media group
555  * @param[in] user_data The user data passed from the foreach function
556  *
557  * @return @c true to continue with the next iteration of the loop,
558  *         otherwise @c false to break out of the loop
559  *
560  * @pre media_group_foreach_group_from_db() will invoke this function.
561  * @see media_group_foreach_group_from_db()
562  */
563 typedef bool (*media_group_cb)(const char *group_name, void *user_data);
564
565 /**
566  * @deprecated Deprecated since 8.0.
567  * @ingroup CAPI_CONTENT_MEDIA_FACE_MODULE
568  * @brief Called for every face in the obtained list of face.
569  * @details Iterates over a media face list.
570  *
571  * @since_tizen 3.0
572  *
573  * @remarks You should not destroy @a face returned by this function. \n
574  *                  The callback is called in the main loop.
575  *
576  * @param[in] face The handle of the media face
577  * @param[in] user_data The user data passed from the foreach function
578  *
579  * @return @c true to continue with the next iteration of the loop,
580  *         otherwise @c false to break out of the loop
581  *
582  * @pre media_info_foreach_face_from_db() will invoke this function.
583  * @see media_info_foreach_face_from_db()
584  */
585 typedef bool (*media_face_cb)(media_face_h face, void *user_data);
586
587 /**
588  * @}
589  */
590
591 /**
592  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_MODULE
593  * @{
594  */
595
596  /**
597  * @brief Media ID.
598  * @details You can use above define to set the condition of media filter and order keyword.
599  * @since_tizen 2.3
600  *
601  */
602 #define MEDIA_ID "MEDIA_ID"
603
604 /**
605  * @brief Media full path.
606  * @details You can use above define to set the condition of media filter and order keyword.
607  * @since_tizen 2.3
608  *
609  */
610 #define MEDIA_PATH "MEDIA_PATH"
611
612 /**
613  * @brief The file name including the extension.
614  * @details You can use above define to set the condition of media filter and order keyword.
615  * @since_tizen 2.3
616  *
617  */
618 #define MEDIA_DISPLAY_NAME "MEDIA_DISPLAY_NAME"
619
620 /**
621  * @brief Media type.
622  * @details There are 5 media types:\n
623  *               0-image, 1-video, 2-sound, 3-music, 4-other\n
624  *               You can use above define to set the condition of media filter and order keyword.
625  * @since_tizen 2.3
626  *
627  */
628 #define MEDIA_TYPE "MEDIA_TYPE"
629
630 /**
631  * @brief Media MIME type.
632  * @details You can use above define to set the condition of media filter and order keyword.
633  * @since_tizen 2.3
634  *
635  */
636 #define MEDIA_MIME_TYPE "MEDIA_MIME_TYPE"
637
638
639 /**
640  * @brief Media file size.
641  * @details You can use above define to set the condition of media filter and order keyword.
642  * @since_tizen 2.3
643  *
644  */
645 #define MEDIA_SIZE "MEDIA_SIZE"
646
647 /**
648  * @brief The time that content file was first added to media database.
649  * @details You can use above define to set the condition of media filter and order keyword.
650  * @since_tizen 2.3
651  *
652  */
653 #define MEDIA_ADDED_TIME "MEDIA_ADDED_TIME"
654
655 /**
656  * @brief The last modification time provided by the file system.
657  * @details You can use above define to set the condition of media filter and order keyword.
658  * @since_tizen 2.3
659  *
660  */
661 #define MEDIA_MODIFIED_TIME "MEDIA_MODIFIED_TIME"
662
663 /**
664  * @deprecated Deprecated since 9.0.
665  * @brief  Media created time.
666  * @details You can use above define to set the condition of media filter and order keyword.
667  * @since_tizen 2.3
668  *
669  */
670 #define MEDIA_TIMELINE "MEDIA_TIMELINE"
671
672 /**
673  * @brief Media thumbnail path.
674  * @details You can use above define to set the condition of media filter and order keyword.
675  * @since_tizen 2.3
676  *
677  */
678 #define MEDIA_THUMBNAIL_PATH "MEDIA_THUMBNAIL_PATH"
679
680 /**
681  * @brief Media title get from tag or file name.
682  * @details You can use above define to set the condition of media filter and order keyword.
683  * @since_tizen 2.3
684  *
685  */
686 #define MEDIA_TITLE "MEDIA_TITLE"
687
688 /**
689  * @brief Media album name.
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_ALBUM "MEDIA_ALBUM"
695
696 /**
697  * @brief Media artist.
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_ARTIST "MEDIA_ARTIST"
703
704 /**
705  * @brief Media album artist.
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_ALBUM_ARTIST "MEDIA_ALBUM_ARTIST"
711
712 /**
713  * @brief Media genre.
714  * @details You can use above define to set the condition of media filter and order keyword.
715  * @since_tizen 2.3
716  *
717  */
718 #define MEDIA_GENRE "MEDIA_GENRE"
719
720 /**
721  * @deprecated Deprecated since 9.0.
722  * @brief Media composer.
723  * @details You can use above define to set the condition of media filter and order keyword.
724  * @since_tizen 2.3
725  *
726  */
727 #define MEDIA_COMPOSER "MEDIA_COMPOSER"
728
729 /**
730  * @brief Media year.
731  * @details You can use above define to set the condition of media filter and order keyword.
732  * @since_tizen 2.3
733  *
734  */
735 #define MEDIA_YEAR "MEDIA_YEAR"
736
737 /**
738  * @deprecated Deprecated since 9.0.
739  * @brief Media recorded date.
740  * @details You can use above define to set the condition of media filter and order keyword.
741  * @since_tizen 2.3
742  *
743  */
744 #define MEDIA_RECORDED_DATE "MEDIA_RECORDED_DATE"
745
746 /**
747  * @brief Media track number.
748  * @details You can use above define to set the condition of media filter and order keyword.
749  * @since_tizen 2.3
750  *
751  */
752 #define MEDIA_TRACK_NUM "MEDIA_TRACK_NUM"
753
754 /**
755  * @deprecated Deprecated since 9.0.
756  * @brief Media duration.
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_DURATION "MEDIA_DURATION"
762
763 /**
764  * @deprecated Deprecated since 9.0.
765  * @brief Media longitude.
766  * @details You can use above define to set the condition of media filter and order keyword.
767  * @since_tizen 2.3
768  *
769  */
770 #define MEDIA_LONGITUDE "MEDIA_LONGITUDE"
771
772 /**
773  * @deprecated Deprecated since 9.0.
774  * @brief Media latitude.
775  * @details You can use above define to set the condition of media filter and order keyword.
776  * @since_tizen 2.3
777  *
778  */
779 #define MEDIA_LATITUDE "MEDIA_LATITUDE"
780
781 /**
782  * @deprecated Deprecated since 9.0.
783  * @brief Media altitude.
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_ALTITUDE "MEDIA_ALTITUDE"
789
790 /**
791  * @brief Media width.
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_WIDTH "MEDIA_WIDTH"
797
798 /**
799  * @brief Media height.
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_HEIGHT "MEDIA_HEIGHT"
805
806 /**
807  * @brief Media datetaken.
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_DATETAKEN "MEDIA_DATETAKEN"
813
814 /**
815  * @deprecated Deprecated since 9.0.
816  * @brief The time to register favourite.
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_FAVOURITE "MEDIA_FAVOURITE"
822
823 /**
824  * @deprecated Deprecated since 9.0.
825  * @brief Is DRM.
826  * @details There are 2 types:\n
827  *               0-not drm, 1-drm\n
828  *               You can use above define to set the condition of media filter and order keyword.
829  * @since_tizen 2.3
830  *
831  */
832 #define MEDIA_IS_DRM "MEDIA_IS_DRM"
833
834 /**
835  * @deprecated Deprecated since 9.0.
836  * @brief Virtual Reality content.
837  * @details You can use above define to set the condition of media filter and order keyword.
838  * @since_tizen 3.0
839  *
840  */
841 #define MEDIA_360 "MEDIA_360"
842
843  /**
844  * @brief Folder ID.
845  * @details You can use above define to set the condition of folder filter and order keyword.
846  * @since_tizen 2.3
847  */
848 #define FOLDER_ID "FOLDER_ID"
849
850 /**
851  * @brief Folder full path.
852  * @details You can use above define to set the condition of folder filter and order keyword.
853  * @since_tizen 2.3
854  */
855 #define FOLDER_PATH "FOLDER_PATH"
856
857 /**
858  * @brief Folder base name.
859  * @details You can use above define to set the condition of folder filter and order keyword.
860  * @since_tizen 2.3
861  */
862 #define FOLDER_NAME "FOLDER_NAME"
863
864 /**
865  * @brief Playlist name.
866  * @details You can use above define to set the condition of playlist filter and order keyword.
867  * @since_tizen 2.3
868  */
869 #define PLAYLIST_NAME "PLAYLIST_NAME"
870
871 /**
872  * @brief Playlist id.
873  * @details You can use above define to set the condition of playlist filter and order keyword.
874  * @since_tizen 4.0
875  */
876 #define MEDIA_PLAYLIST_ID "PLAYLIST_ID"
877
878 /**
879  * @brief Playlist member order.
880  * @details You can use above define to set the condition of playlist filter and order keyword.
881  * @since_tizen 2.3
882  */
883 #define PLAYLIST_MEMBER_ORDER "PLAYLIST_MEMBER_ORDER"
884
885 /**
886  * @brief Media count in playlist.
887  * @details You can use above define to set the condition of playlist filter and order keyword.
888  * @since_tizen 2.3
889  */
890 #define PLAYLIST_MEDIA_COUNT "PLAYLIST_MEDIA_COUNT"
891
892 /**
893  * @deprecated Deprecated since 9.0.
894  * @brief Tag name.
895  * @details You can use above define to set the condition of tag filter and order keyword.
896  * @since_tizen 2.3
897  */
898 #define TAG_NAME "TAG_NAME"
899
900 /**
901  * @deprecated Deprecated since 9.0.
902  * @brief Tag id.
903  * @details You can use above define to set the condition of tag filter and order keyword.
904  * @since_tizen 4.0
905  */
906 #define MEDIA_TAG_ID "TAG_ID"
907
908 /**
909  * @deprecated Deprecated since 9.0.
910  * @brief Media count in tag.
911  * @details You can use above define to set the condition of tag filter and order keyword.
912  * @since_tizen 2.3
913  */
914 #define TAG_MEDIA_COUNT "TAG_MEDIA_COUNT"
915
916 /**
917  * @brief Bookmark marked time.
918  * @details You can use above define to set the condition of bookmark filter and order keyword.
919  * @since_tizen 2.3
920  */
921 #define BOOKMARK_MARKED_TIME "BOOKMARK_MARKED_TIME"
922
923 /**
924  * @brief Bookmark id.
925  * @details You can use above define to set the condition of bookmark filter and order keyword.
926  * @since_tizen 4.0
927  */
928 #define MEDIA_BOOKMARK_ID "BOOKMARK_ID"
929
930 /**
931  * @brief Bookmark name.
932  * @details You can use above define to set the condition of bookmark filter and order keyword.
933  * @since_tizen 4.0
934  */
935 #define BOOKMARK_NAME "BOOKMARK_NAME"
936
937 /**
938  * @deprecated Deprecated since 8.0.
939  * @brief Face tag.
940  * @details You can use above define to set the condition of face filter and order keyword.
941  * @since_tizen 3.0
942  */
943 #define MEDIA_FACE_TAG  "MEDIA_FACE_TAG"
944
945 /**
946  * @deprecated Deprecated since 8.0.
947  * @brief Face id.
948  * @details You can use above define to set the condition of face filter and order keyword.
949  * @since_tizen 4.0
950  */
951 #define MEDIA_FACE_ID   "MEDIA_FACE_ID"
952
953 /**
954  * @}
955  */
956
957
958 #ifdef __cplusplus
959 }
960 #endif /* __cplusplus */
961
962
963 #endif /*__TIZEN_CONTENT_MEDIA_CONTENT_TYPE_H__*/