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