Fix Doxygen mistakes
[platform/core/api/media-content.git] / include_product / media_info.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_INFO_H__
19 #define __TIZEN_CONTENT_MEDIA_INFO_H__
20
21 #include <media_content_type.h>
22
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 /**
30  * @file media_info.h
31  * @brief This file contains the media info function and related functions to proceed with it. \n
32  *        You can use the functions to insert, delete, count and get list of content files from media database. \n
33  *        You can get properties of content file such as size, mime_type, modified_time etc. And you can set properties such as provider, favorite etc. \n
34  *        And you can get bookmark, face, tag info related the content file.
35  */
36
37
38 /**
39  * @addtogroup CAPI_CONTENT_MEDIA_INFO_MODULE
40  * @{
41  */
42
43 /**
44  * @brief  Inserts the content file into the media database.
45  * @details In general, you can use this function to insert content files into the media database. \n
46  *                You can use media_content_scan_file()/media_content_scan_folder() function instead of this function.
47  *
48  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
49  *
50  * @privlevel public
51  * @privilege %http://tizen.org/privilege/content.write \n
52  *                   %http://tizen.org/privilege/mediastorage \n
53  *                   %http://tizen.org/privilege/externalstorage
54  *
55  * @remarks The @a info should be released using media_info_destroy(). \n
56  *                   You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
57  *                   If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
58  *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
59  *                   If you can access both storage, you must add all privilege.
60  * @remarks Since 4.0, this function is related to the following feature:\n
61  *              %http://tizen.org/feature/content.scanning.others\n
62  *              If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
63  *
64  * @param[in] path The path of the content file to add
65  * @param[out] info The handle of the inserted content file
66  *
67  * @return @c 0 on success,
68  *         otherwise a negative error value
69  *
70  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
71  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
72  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
73  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
74  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
75  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
76  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
77  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
78  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
79  *
80  * @pre This function requires opened connection to content service by media_content_connect().
81  *
82  * @see media_content_connect()
83  * @see media_content_scan_file()
84  * @see media_content_scan_folder()
85  */
86 int media_info_insert_to_db(const char *path, media_info_h *info);
87
88 /**
89  * @brief Inserts content files into the media database, asynchronously.
90  * @details This function can insert multiple content files into the media database.
91  *
92  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
93  *
94  * @privlevel public
95  * @privilege %http://tizen.org/privilege/content.write \n
96  *                   %http://tizen.org/privilege/mediastorage \n
97  *                   %http://tizen.org/privilege/externalstorage
98  *
99  * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
100  *                   If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
101  *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
102  *                   If you can access both storage, you must add all privilege.
103  * @remarks Since 4.0, this function is related to the following feature:\n
104  *              %http://tizen.org/feature/content.scanning.others\n
105  *              If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
106  *
107  * @param[in] path_array The path array of the content files to add
108  * @param[in] array_length The length of the array
109  * @param[in] callback The callback function to be invoked when media items inserted completely
110  * @param[in] user_data The user data to be passed to the callback function
111  *
112  * @return @c 0 on success,
113  *         otherwise a negative error value
114  *
115  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
116  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
117  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
118  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
119  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
120  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
121  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
122  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
123  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
124  *
125  * @pre This function requires opened connection to content service by media_content_connect().
126  *
127  * @see media_content_connect()
128  * @see media_insert_completed_cb()
129  */
130 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
131
132 /**
133  * @deprecated Deprecated since 4.0.
134  * @brief Inserts the burst shot images into the media database, asynchronously.
135  * @details This function inserts burst images into the media database.
136  *          media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.
137  *
138  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
139  *
140  * @privlevel public
141  * @privilege %http://tizen.org/privilege/content.write \n
142  *                   %http://tizen.org/privilege/mediastorage \n
143  *                   %http://tizen.org/privilege/externalstorage
144  *
145  * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
146  *                   If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
147  *                   Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
148  *                   If you can access both storage, you must add all privilege.
149  *
150  * @param[in] path_array The path array of the burst shot images to add
151  * @param[in] array_length The length of the array
152  * @param[in] callback The callback function to be invoked when the images are inserted completely
153  * @param[in] user_data The user data to be passed to the callback function
154  *
155  * @return @c 0 on success,
156  *         otherwise a negative error value
157  *
158  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
159  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
160  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
161  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
162  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
163  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
164  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
165  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
166  *
167  * @pre This function requires opened connection to content service by media_content_connect().
168  *
169  * @see media_content_connect()
170  * @see media_insert_burst_shot_completed_cb()
171  */
172 int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
173
174 /**
175  * @brief Deletes the media information from the media database.
176  * @details This function only remove media information in the media database. \n
177  *               You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if file is removed from the file system.
178  *
179  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
180  *
181  * @privlevel public
182  * @privilege %http://tizen.org/privilege/content.write
183  *
184  * @param[in] media_id The media ID. It can get from media info handle.
185  *
186  * @return @c 0 on success,
187  *         otherwise a negative error value
188  *
189  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
190  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
191  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
192  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
193  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
194  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
195  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
196  *
197  * @pre This function requires opened connection to content service by media_content_connect().
198  *
199  * @see media_content_connect()
200  * @see media_content_scan_file()
201  * @see media_content_scan_folder()
202  */
203 int media_info_delete_from_db(const char *media_id);
204
205 /**
206  * @deprecated Deprecated since 4.0.
207  * @brief Deletes media information that meets the conditions of the filter from the media database.
208  * @details This function can delete multiple media information from the media database.
209  *
210  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
211  *
212  * @privlevel public
213  * @privilege %http://tizen.org/privilege/content.write
214  *
215  * @param[in] filter The handle to the media filter
216  *
217  * @return @c 0 on success,
218  *         otherwise a negative error value
219  *
220  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
221  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
222  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
223  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
224  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
225  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
226  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
227  *
228  * @pre This function requires opened connection to content service by media_content_connect().
229  *
230  * @see media_content_connect()
231  * @see media_filter_create()
232  */
233 int media_info_delete_batch_from_db(filter_h filter) TIZEN_DEPRECATED_API;
234
235
236 /**
237  * @brief Destroys media info.
238  * @details The function frees all resources related to the media info handle. This handle
239  *          can no longer be used to perform any operation. New media info handle has to
240  *          be created before the next usage.
241  *
242  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
243  *
244  * @param[in] media The handle to the media info
245  *
246  * @return @c 0 on success,
247  *         otherwise a negative error value
248  *
249  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
250  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
251  *
252  * @pre Get copy of media_info handle by calling media_info_clone().
253  *
254  * @see media_info_clone()
255  */
256 int media_info_destroy(media_info_h media);
257
258 /**
259  * @brief Clones the media info handle.
260  *
261  * @details This function copies the media info handle from a source to the destination.
262  *          There is no media_info_create() function. The media_info_h is created internally and
263  *          available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
264  *          To use this handle outside of these foreach functions, use this function.
265  *
266  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
267  *
268  * @remarks The @a dst should be released using media_info_destroy().
269  *
270  * @param[out] dst The destination handle to the media info
271  * @param[in] src The source handle to the media info
272  *
273  * @return @c 0 on success,
274  *         otherwise a negative error value
275  *
276  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
277  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
278  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
279  *
280  * @see media_info_destroy()
281  * @see media_album_foreach_media_from_db()
282  * @see media_playlist_foreach_media_from_db()
283  * @see media_group_foreach_media_from_db()
284  * @see media_tag_foreach_media_from_db()
285  * @see media_info_foreach_media_from_db()
286  * @see media_info_insert_to_db()
287  * @see media_folder_foreach_media_from_db()
288  */
289 int media_info_clone(media_info_h *dst, media_info_h src);
290
291 /**
292  * @brief Gets the count of media info for the passed @a filter from the media database.
293  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
294  *
295  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
296  *
297  *
298  * @param[in] filter The handle to the media filter
299  * @param[out] media_count The count of media
300  *
301  * @return @c 0 on success,
302  *         otherwise a negative error value
303  *
304  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
305  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
306  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
307  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
308  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
309  *
310  * @pre This function requires opened connection to content service by media_content_connect().
311  *
312  * @see media_content_connect()
313  * @see media_filter_create()
314  */
315 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
316
317 /**
318  * @brief Iterates through media info from the media database.
319  * @details This function gets all media info handles meeting the given @a filter.
320  *          The @a callback function will be invoked for every retrieved media info.
321  *          If @c NULL is passed to the @a filter, then no filtering is applied.
322  *
323  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
324  *
325  * @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db()  in your callback function,
326  *                   your callback function is invoked as inline function.
327  *                   So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
328  *                   We do not recommend you call updating DB function in callback of foreach function.
329  *
330  * @param[in] filter The handle to the media filter
331  * @param[in] callback The callback function to be invoked
332  * @param[in] user_data The user data to be passed to the callback function
333  *
334  * @return @c 0 on success,
335  *         otherwise a negative error value
336  *
337  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
338  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
339  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
340  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
341  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
342  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
343  *
344  * @pre  This function requires opened connection to content service by media_content_connect().
345  * @post This function invokes media_info_cb().
346  *
347  * @see media_content_connect()
348  * @see #media_info_cb
349  * @see media_filter_create()
350  */
351 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
352
353 /**
354  * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
355  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
356  *
357  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
358  *
359  * @param[in] media_id The media ID
360  * @param[in] filter The handle to the media filter
361  * @param[out] tag_count The count of the media tag
362  *
363  * @return @c 0 on success,
364  *         otherwise a negative error value
365  *
366  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
367  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
368  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
369  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
370  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
371  *
372  * @pre This function requires opened connection to content service by media_content_connect().
373  *
374  * @see media_content_connect()
375  * @see media_filter_create()
376  */
377 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
378
379 /**
380  * @brief Iterates through the media tag in the given media info from the media database.
381  * @details This function gets all the media tags associated with the given @a media_id and calls @a callback for every retrieved media tag. \n
382  *               If @c NULL is passed to the @a filter, then no filtering is applied.
383  *
384  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
385  *
386  * @param[in] media_id The media ID
387  * @param[in] filter The handle to the media filter
388  * @param[in] callback The callback function to be invoked
389  * @param[in] user_data The user data to be passed to the callback function
390  *
391  * @return @c 0 on success,
392  *         otherwise a negative error value
393  *
394  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
395  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
396  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
397  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
398  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
399  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
400  *
401  * @pre  This function requires opened connection to content service by media_content_connect().
402  * @post This function invokes media_tag_cb().
403  *
404  * @see media_content_connect()
405  * @see #media_tag_cb
406  * @see media_filter_create()
407  */
408 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
409
410 /**
411  * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
412  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
413  *
414  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
415  *
416  * @param[in] media_id The media ID
417  * @param[in] filter The handle to the media filter
418  * @param[out] bookmark_count The count of the media tag
419  *
420  * @return @c 0 on success,
421  *         otherwise a negative error value
422  *
423  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
424  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
425  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
426  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
427  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
428  *
429  * @pre This function requires opened connection to content service by media_content_connect().
430  *
431  * @see media_content_connect()
432  * @see media_filter_create()
433  */
434 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
435
436 /**
437  * @brief Iterates through the media bookmark in the given media info from the media database.
438  * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
439  *                If @c NULL is passed to the @a filter, then no filtering is applied.
440  *
441  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
442  *
443  * @param[in] media_id The media ID
444  * @param[in] filter The handle to the media filter
445  * @param[in] callback The callback function to be invoked
446  * @param[in] user_data The user data to be passed to the callback function
447  *
448  * @return @c 0 on success,
449  *         otherwise a negative error value
450  *
451  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
452  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
453  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
454  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
455  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
456  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
457  *
458  * @pre  This function requires opened connection to content service by media_content_connect().
459  * @post This function invokes media_bookmark_cb().
460  *
461  * @see media_content_connect()
462  * @see media_bookmark_cb()
463  * @see media_filter_create()
464  */
465 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
466
467 /**
468  * @brief Gets the number of face for the passed @a media_id from the media database.
469  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
470  *
471  * @since_tizen 3.0
472  *
473  * @param[in] media_id The media ID
474  * @param[in] filter The handle to the media filter
475  * @param[out] face_count The count of media face
476  *
477  * @return 0 on success, otherwise a negative error value.
478  *
479  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
480  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
481  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
482  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
483  *
484  * @pre This function requires opened connection to content service by media_content_connect().
485  * @see media_content_connect()
486  * @see media_filter_create()
487  *
488  */
489 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
490
491 /**
492  * @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
493  * @details This function gets all media face info associated with the given media id and
494  * meeting desired filter option and calls @a callback for
495  * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
496  *
497  * @since_tizen 3.0
498  *
499  * @param[in] media_id The media ID
500  * @param[in] filter The handle to the media filter
501  * @param[in] callback The callback function to invoke
502  * @param[in] user_data The user data to be passed to the callback function
503  *
504  * @return 0 on success, otherwise a negative error value.
505  *
506  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
507  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
508  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
509  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
510  *
511  * @pre This function requires opened connection to content service by media_content_connect().
512  * @see media_content_connect()
513  * @see media_filter_create()
514  *
515  */
516 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
517
518 /**
519  * @brief Gets the image metadata handle for a given media info.
520  * @details This function returns an image metadata handle retrieved from the media info.
521  *
522  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
523  *
524  * @remarks The @a image should be released using image_meta_destroy().
525  *
526  * @param[in] media The handle to the media info
527  * @param[out] image The handle to the image metadata
528  *
529  * @return @c 0 on success,
530  *         otherwise a negative error value
531  *
532  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
533  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
534  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
535  *
536  * @see image_meta_destroy()
537  */
538 int media_info_get_image(media_info_h media, image_meta_h *image);
539
540 /**
541  * @brief Gets a video metadata handle for a given media info.
542  * @details This function returns a video metadata handle retrieved from the media info handle.
543  *
544  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
545  *
546  * @remarks The @a video should be released using video_meta_destroy().
547  *
548  * @param[in] media The handle to the media info
549  * @param[out] video The handle to the video metadata
550  *
551  * @return @c 0 on success,
552  *         otherwise a negative error value
553  *
554  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
555  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
556  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
557  *
558  * @see video_meta_destroy()
559  */
560 int media_info_get_video(media_info_h media, video_meta_h *video);
561
562 /**
563  * @brief Gets an audio metadata handle for a given media info.
564  * @details This function returns an audio metadata handle retrieved from the media info handle.
565  *
566  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
567  *
568  * @remarks The @a audio should be released using audio_meta_destroy().
569  *
570  * @param[in] media The handle to the media info
571  * @param[out] audio The handle to the audio metadata
572  *
573  * @return @c 0 on success,
574  *         otherwise a negative error value
575  *
576  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
577  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
578  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
579  *
580  * @see audio_meta_destroy()
581  */
582 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
583
584 /**
585  * @brief Gets the media ID.
586  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
587  * @remarks The @a media_id should be released using free().
588  *
589  * @param[in] media The handle to the media info
590  * @param[out] media_id The media ID
591  *
592  * @return @c 0 on success,
593  *         otherwise a negative error value
594  *
595  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
596  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
597  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
598  */
599 int media_info_get_media_id(media_info_h media, char **media_id);
600
601 /**
602  * @brief Gets the full path of the content file.
603  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
604  *
605  * @remarks The @a path should be released using free().
606  *
607  * @param[in] media The handle to the media info
608  * @param[out] path The full path of the content file
609  *
610  * @return @c 0 on success,
611  *         otherwise a negative error value
612  *
613  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
614  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
615  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
616  *
617  */
618 int media_info_get_file_path(media_info_h media, char **path);
619
620 /**
621  * @brief Gets the file name including the extension of the content file.
622  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
623  *
624  * @remarks The @a name should be released using free().
625  *
626  * @param[in] media The handle to the media info
627  * @param[out] name The file name including the extension of the content file
628  *
629  * @return @c 0 on success,
630  *         otherwise a negative error value
631  *
632  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
633  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
634  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
635  */
636 int media_info_get_display_name(media_info_h media, char **name);
637
638 /**
639  * @brief Gets the content type of the content file.
640  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
641  *
642  * @param[in] media The handle to the media info
643  * @param[out] type The content type of the content file (#media_content_type_e)
644  *
645  * @return @c 0 on success,
646  *         otherwise a negative error value
647  *
648  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
649  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
650  *
651  * @see #media_content_type_e
652  */
653 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
654
655 /**
656  * @brief Gets the MIME type of the content file.
657  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
658  *
659  * @remarks The @a mime_type should be released using free().
660  *
661  * @param[in] media The handle to the media info
662  * @param[out] mime_type The MIME type of the content file
663  *
664  * @return @c 0 on success,
665  *         otherwise a negative error value
666  *
667  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
668  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
669  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
670  */
671 int media_info_get_mime_type(media_info_h media, char **mime_type);
672
673 /**
674  * @brief Gets the content file size.
675  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
676  *
677  * @param[in] media The handle to the media info
678  * @param[out] size The content file size
679  *
680  * @return @c 0 on success,
681  *         otherwise a negative error value
682  *
683  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
684  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
685  */
686 int media_info_get_size(media_info_h media, unsigned long long *size);
687
688 /**
689  * @brief Gets the added time of the content file.
690  * @details The added time refers to the time that content file was first added to media database.
691  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
692  *
693  * @param[in] media The handle to the media info
694  * @param[out] added_time The added time to the media database
695  *
696  * @return @c 0 on success,
697  *         otherwise a negative error value
698  *
699  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
700  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
701  */
702 int media_info_get_added_time(media_info_h media, time_t *added_time);
703
704 /**
705  * @brief Gets the modified time of the content file.
706  * @details The modified time refers to the last modification time provided by the file system.
707  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
708  *
709  * @param[in] media The handle to the media info
710  * @param[out] time The last modification time of the content file
711  *
712  * @return @c 0 on success,
713  *         otherwise a negative error value
714  *
715  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
716  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
717  */
718 int media_info_get_modified_time(media_info_h media, time_t *time);
719
720 /**
721  * @brief Gets the timeline of content file.
722  * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
723  *               Otherwise, timeline value is the same as modified time.
724  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
725  *
726  * @param[in] media The handle to the media info
727  * @param[out] time The timeline of content file
728  *
729  * @return @c 0 on success,
730  *         otherwise a negative error value
731  *
732  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
733  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
734  */
735 int media_info_get_timeline(media_info_h media, time_t *time);
736
737 /**
738  * @brief Gets the thumbnail path of content file.
739  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
740  *
741  * @remarks The @a path should be released using free(). \n
742  *                   If the thumbnail extraction for the given media has not been requested yet, this function returns NULL. To create a thumbnail, you should use media_info_create_thumbnail() function. \n
743  *                   Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
744  *
745  * @param[in] media The handle to the media info
746  * @param[out] path The thumbnail path
747  *
748  * @return @c 0 on success,
749  *         otherwise a negative error value
750  *
751  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
752  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
753  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
754  */
755 int media_info_get_thumbnail_path(media_info_h media, char **path);
756
757 /**
758  * @brief Gets the description of content file.
759  * @details If the value is an empty string, the method returns "Unknown". \n
760  *                Since 3.0, if the media info has no description, the method returns empty string.
761  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
762  *
763  * @remarks The @a description should be released using free().
764  *
765  * @param[in] media The handle to the media info
766  * @param[out] description The description of the content file
767  *
768  * @return @c 0 on success,
769  *         otherwise a negative error value
770  *
771  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
772  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
773  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
774  */
775 int media_info_get_description(media_info_h media, char **description);
776
777 /**
778  * @brief Gets the longitude of content file.
779  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
780  *
781  * @param[in] media The handle to the media info
782  * @param[out] longitude The longitude of the content file
783  *
784  * @return @c 0 on success,
785  *         otherwise a negative error value
786  *
787  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
788  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
789  */
790 int media_info_get_longitude(media_info_h media, double *longitude);
791
792 /**
793  * @brief Gets the latitude of content file.
794  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
795  *
796  * @param[in] media The handle to the media info
797  * @param[out] latitude The latitude of the content file
798  *
799  * @return @c 0 on success,
800  *         otherwise a negative error value
801  *
802  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
803  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
804  *
805  */
806 int media_info_get_latitude(media_info_h media, double* latitude);
807
808 /**
809  * @brief Gets the altitude of content file.
810  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
811  *
812  * @param[in] media The handle to the media info
813  * @param[out] altitude The altitude of the content file
814  *
815  * @return @c 0 on success,
816  *         otherwise a negative error value
817  *
818  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
819  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
820  */
821 int media_info_get_altitude(media_info_h media, double* altitude);
822
823 /**
824  * @deprecated Deprecated since 4.0.
825  * @brief Gets the weather of content file.
826  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
827  * @remarks The @a weather should be released using free().
828  *
829  * @param[in] media The handle to the media info
830  * @param[out] weather The weather of the content file
831  *
832  * @return @c 0 on success,
833  *         otherwise a negative error value
834  *
835  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
836  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
837  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
838  */
839 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
840
841 /**
842  * @brief Gets the rating of content file.
843  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
844  *
845  * @param[in] media The handle to the media info
846  * @param[out] rating The rating of the content file
847  *
848  * @return @c 0 on success,
849  *         otherwise a negative error value
850  *
851  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
852  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
853  */
854 int media_info_get_rating(media_info_h media, int *rating);
855
856 /**
857  * @brief Gets the favorite status of content file which User set.
858  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
859  *
860  * @param[in] media The handle to the media info
861  * @param[out] favorite @c true if content file is set as favorite,
862  *                       otherwise @c false if content file is not set as favorite
863  *
864  * @return @c 0 on success,
865  *         otherwise a negative error value
866  *
867  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
868  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
869  *
870  * @see media_info_set_favorite()
871  */
872 int media_info_get_favorite(media_info_h media, bool* favorite);
873
874 /**
875  * @deprecated Deprecated since 4.0.
876  * @brief Gets the author of content file.
877  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
878  *
879  * @remarks The @a author should be released using free().
880  *
881  * @param[in] media The handle to the media info
882  * @param[out] author The author of the content file
883  *
884  * @return @c 0 on success,
885  *         otherwise a negative error value
886  *
887  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
888  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
889  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
890  */
891 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
892
893 /**
894  * @deprecated Deprecated since 4.0.
895  * @brief Gets the provider of content file which User set.
896  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
897  *
898  * @remarks The @a provider should be released using free().
899  *
900  * @param[in] media The handle to the media info
901  * @param[out] provider The provider of the content file
902  *
903  * @return @c 0 on success,
904  *         otherwise a negative error value
905  *
906  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
907  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
908  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
909  *
910  */
911 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
912
913 /**
914  * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
915  * @brief Gets the content name of content file which User set.
916  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
917  *
918  * @remarks The @a content_name should be released using free().
919  *
920  * @param[in] media The handle to the media info
921  * @param[out] content_name The content name of the content file
922  *
923  * @return @c 0 on success,
924  *         otherwise a negative error value
925  *
926  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
927  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
928  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
929  *
930  */
931 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
932
933 /**
934  * @brief Gets the title of content file.
935  * @details If the content file does not have a title, this method returns the filename without the extension.
936  *
937  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
938  *
939  * @remarks The @a title should be released using free().
940  *
941  * @param[in] media The handle to the media info
942  * @param[out] title The title of the content file
943  *
944  * @return @c 0 on success,
945  *         otherwise a negative error value
946  *
947  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
948  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
949  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
950  */
951 int media_info_get_title(media_info_h media, char **title);
952
953 /**
954  * @deprecated Deprecated since 4.0.
955  * @brief Gets the category of content file which User set.
956  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
957  *
958  * @remarks The @a category should be released using free().
959  *
960  * @param[in] media The handle to the media info
961  * @param[out] category The category of the content file
962  *
963  * @return @c 0 on success,
964  *         otherwise a negative error value
965  *
966  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
967  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
968  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
969  *
970  */
971 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
972
973 /**
974  * @deprecated Deprecated since 4.0.
975  * @brief Gets the location tag of content file which User set.
976  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
977  *
978  * @remarks The @a location_tag should be released using free().
979  *
980  * @param[in] media The handle to the media info
981  * @param[out] location_tag The location of the content file
982  *
983  * @return @c 0 on success,
984  *         otherwise a negative error value
985  *
986  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
987  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
988  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
989  *
990  */
991 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
992
993 /**
994  * @deprecated Deprecated since 4.0.
995  * @brief Gets the age_rating of content file which User set.
996  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
997  *
998  * @remarks The @a age_rating should be released using free().
999  *
1000  * @param[in] media The handle to the media info
1001  * @param[out] age_rating The age rating of the content file
1002  *
1003  * @return @c 0 on success,
1004  *         otherwise a negative error value
1005  *
1006  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1007  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1008  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1009  *
1010  */
1011 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1012
1013 /**
1014  * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1015  * @brief Gets the keyword of content file which User set.
1016  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1017  *
1018  * @remarks The @a keyword should be released using free().
1019  *
1020  * @param[in] media The handle to the media info
1021  * @param[out] keyword The keyword of the content file
1022  *
1023  * @return @c 0 on success,
1024  *         otherwise a negative error value
1025  *
1026  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1027  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1028  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1029  *
1030  */
1031 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1032
1033 /**
1034  * @brief Gets the storage id of content file.
1035  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1036  *
1037  * @remarks The @a storage_id should be released using free().
1038  *
1039  * @param[in] media The handle to the media info
1040  * @param[out] storage_id The ID of the media storage
1041  *
1042  * @return @c 0 on success,
1043  *         otherwise a negative error value
1044  *
1045  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1046  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1047  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1048  */
1049 int media_info_get_storage_id(media_info_h media, char **storage_id);
1050
1051 /**
1052  * @brief Checks whether the media is protected via DRM.
1053  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1054  *
1055  * @param[in] media The handle to the media info
1056  * @param[out] is_drm @c true if media is DRM media,
1057  *                    otherwise @c false if media is not DRM media
1058  *
1059  * @return @c 0 on success,
1060  *         otherwise a negative error value
1061  *
1062  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1063  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1064  */
1065 int media_info_is_drm(media_info_h media, bool *is_drm);
1066
1067 /**
1068  * @brief Checks whether the content file is 360 content.
1069  * @since_tizen 3.0
1070  *
1071  * @param[in] media The handle to the media info
1072  * @param[out] is_360 @c true if media is 360 content,
1073  *                    otherwise @c false if media is not 360 content
1074  *
1075  * @return @c 0 on success,
1076  *         otherwise a negative error value
1077  *
1078  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1079  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1080  */
1081 int media_info_is_360_content(media_info_h media, bool *is_360);
1082
1083 /**
1084  * @brief Gets the storage type of content file.
1085  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1086  *
1087  * @param[in] media The handle to the media info
1088  * @param[out] storage_type The storage type of the content file
1089  *
1090  * @return @c 0 on success,
1091  *         otherwise a negative error value
1092  *
1093  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1094  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1095  */
1096 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1097
1098 /**
1099  * @deprecated Deprecated since 4.0. \n
1100  *        This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1101  * @brief Gets number which represents how many times given content has been played.
1102  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1103  *
1104  * @param[in] media The handle to the media info
1105  * @param[out] played_count The counter of content played
1106  *
1107  * @return 0 on success,
1108  *         otherwise a negative error value
1109  *
1110  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1111  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1112  */
1113 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1114
1115 /**
1116  * @deprecated Deprecated since 4.0. \n
1117  *        This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1118  * @brief Gets the content's played time parameter.
1119  * @details Function returns content's elapsed playback time parameter as period
1120  *          starting from the beginning of the track.
1121  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1122  *
1123  * @param[in] media The handle to the media info
1124  * @param[out] played_time The elapsed time of the content
1125  *
1126  * @return 0 on success,
1127  *         otherwise a negative error value
1128  *
1129  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1130  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1131  */
1132 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1133
1134 /**
1135  * @brief Gets the media info from the media database.
1136  *
1137  * @details This function creates a new media handle from the media database by the given @a media_id.
1138  *          Media info will be created and filled with information.
1139  *
1140  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1141  *
1142  * @remarks The @a media should be released using media_info_destroy().
1143  *
1144  * @param[in] media_id The media ID
1145  * @param[out] media The handle to the media info
1146  *
1147  * @return @c 0 on success,
1148  *         otherwise a negative error value
1149  *
1150  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1151  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1152  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1153  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1154  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1155  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1156  *
1157  * @pre This function requires opened connection to content service by media_content_connect().
1158  *
1159  * @see media_content_connect()
1160  * @see media_info_destroy()
1161  */
1162 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1163
1164 /**
1165  * @deprecated Deprecated since 4.0. \n
1166  *        This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1167  * @brief Increments the played count to content meta handle.
1168  * @details You can increase the played(opened) count of the content file.
1169  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1170  *
1171  * @param[in] media The handle to the media info
1172  *
1173  * @return 0 on success,
1174  *         otherwise a negative error value
1175  *
1176  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1177  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1178  *
1179  * @post media_info_update_to_db()
1180  */
1181 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1182
1183 /**
1184  * @deprecated Deprecated since 4.0. \n
1185  *        This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1186  * @brief Sets the played time to content meta handle.
1187  * @details You can set the latest played(opened) time of the content file. the latest played time to be set the current time on the system.
1188  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1189  *
1190  * @param[in] media The handle to the media info
1191  *
1192  * @return 0 on success,
1193  *         otherwise a negative error value
1194  *
1195  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1196  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1197  *
1198  * @post media_info_update_to_db()
1199  */
1200 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1201
1202 /**
1203  * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1204  * @brief Sets the file name including the extension of the content file.
1205  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1206  *
1207  * @param[in] media The handle to the media info
1208  * @param[in] display_name The file name including the extension of the content file.
1209  *
1210  * @return @c 0 on success,
1211  *         otherwise a negative error value
1212  *
1213  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1214  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1215  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1216  *
1217  * @post media_info_update_to_db().
1218  *
1219  */
1220 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1221
1222 /**
1223  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1224  * @brief Sets the description of media info.
1225  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1226  *
1227  * @param[in] media The handle to the media info
1228  * @param[in] description The description of the media info
1229  *
1230  * @return @c 0 on success,
1231  *         otherwise a negative error value
1232  *
1233  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1234  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1235  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1236  *
1237  * @post media_info_update_to_db().
1238  *
1239  */
1240 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1241
1242 /**
1243  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1244  * @brief Sets the longitude of media info.
1245  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1246  *
1247  * @param[in] media The handle to the media info
1248  * @param[in] longitude The longitude of the media info
1249  *
1250  * @return @c 0 on success,
1251  *         otherwise a negative error value
1252  *
1253  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1254  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1255  *
1256  * @post media_info_update_to_db().
1257  */
1258 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1259
1260 /**
1261  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1262  * @brief Sets the latitude of media info.
1263  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1264  *
1265  * @param[in] media The handle to the media info
1266  * @param[in] latitude The latitude of the media info
1267  *
1268  * @return @c 0 on success,
1269  *         otherwise a negative error value
1270  *
1271  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1272  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1273  *
1274  * @post media_info_update_to_db().
1275  */
1276 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1277
1278 /**
1279  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1280  * @brief Sets the altitude of media info.
1281  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1282  *
1283  * @param[in] media The handle to the media info
1284  * @param[in] altitude The altitude of the media info
1285  *
1286  * @return @c 0 on success,
1287  *         otherwise a negative error value
1288  *
1289  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1290  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1291  *
1292  * @post media_info_update_to_db().
1293  */
1294 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1295
1296 /**
1297  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1298  * @brief Sets the weather of media info.
1299  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1300  *
1301  * @param[in] media The handle to the media info
1302  * @param[in] weather The weather of the media info
1303  *
1304  * @return @c 0 on success,
1305  *         otherwise a negative error value
1306  *
1307  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1308  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1309  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1310  *
1311  * @post media_info_update_to_db().
1312  *
1313  */
1314 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1315
1316 /**
1317  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1318  * @brief Sets the rating of media info.
1319  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1320  *
1321  * @param[in] media The handle to the media info
1322  * @param[in] rating The rating of the media info
1323  *
1324  * @return @c 0 on success,
1325  *         otherwise a negative error value
1326  *
1327  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1328  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1329  *
1330  * @post media_info_update_to_db().
1331  */
1332 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1333
1334 /**
1335  * @brief Sets the favorite of media info.
1336  * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1337  *                So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1338  *                Or, if you use it in condition parameter, you can get the result of the favorite media.
1339  *
1340  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1341  *
1342  * @param[in] media The handle to the media info
1343  * @param[in] favorite Set @c true to set the media info as favorite,
1344  *                     otherwise set @c false to not set the media info as favorite
1345  *
1346  * @return @c 0 on success,
1347  *         otherwise a negative error value
1348  *
1349  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1350  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1351  */
1352 int media_info_set_favorite(media_info_h media, bool favorite);
1353
1354 /**
1355  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1356  * @brief Sets the author of media info.
1357  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1358  *
1359  * @param[in] media The handle to the media info
1360  * @param[in] author The author of the media info
1361  *
1362  * @return @c 0 on success,
1363  *         otherwise a negative error value
1364  *
1365  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1366  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1367  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1368  */
1369 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1370
1371 /**
1372  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1373  * @brief Sets the provider of media info.
1374  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1375  *
1376  * @param[in] media The handle to the media info
1377  * @param[in] provider The provider of the media info
1378  *
1379  * @return @c 0 on success,
1380  *         otherwise a negative error value
1381  *
1382  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1383  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1384  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1385  */
1386 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1387
1388 /**
1389  * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1390  * @brief Sets the content name of media info.
1391  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1392  *
1393  * @param[in] media The handle to the media info
1394  * @param[in] content_name The content name of the media info
1395  *
1396  * @return @c 0 on success,
1397  *         otherwise a negative error value
1398  *
1399  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1400  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1401  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1402  *
1403  * @post media_info_update_to_db()
1404  */
1405 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1406
1407 /**
1408  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1409  * @brief Sets the category of media info.
1410  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1411  *
1412  * @param[in] media The handle to the media info
1413  * @param[in] category The category of the media info
1414  *
1415  * @return @c 0 on success,
1416  *         otherwise a negative error value
1417  *
1418  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1419  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1420  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1421  *
1422  * @post media_info_update_to_db()
1423  */
1424 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1425
1426 /**
1427  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1428  * @brief Sets the location tag of media info.
1429  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1430  *
1431  * @param[in] media The handle to the media info
1432  * @param[in] location_tag The location of the media info
1433  *
1434  * @return @c 0 on success,
1435  *         otherwise a negative error value
1436  *
1437  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1438  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1439  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1440  *
1441  * @post media_info_update_to_db()
1442  */
1443 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1444
1445 /**
1446  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1447  * @brief Sets the age rating of media info.
1448  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1449  *
1450  * @param[in] media The handle to the media info
1451  * @param[in] age_rating The age rating of the media info
1452  *
1453  * @return @c 0 on success,
1454  *         otherwise a negative error value
1455  *
1456  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1457  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1458  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1459  *
1460  * @post media_info_update_to_db()
1461  */
1462 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1463
1464 /**
1465  * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1466  * @brief Sets the keyword of media info.
1467  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1468  *
1469  * @param[in] media The handle to the media info
1470  * @param[in] keyword The keyword of the media info
1471  *
1472  * @return @c 0 on success,
1473  *         otherwise a negative error value
1474  *
1475  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1476  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1477  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1478  *
1479  * @post media_info_update_to_db()
1480  */
1481 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1482
1483 /**
1484  * @brief Updates the media info to the media database.
1485  *
1486  * @details The function updates the given media info in the media database.
1487  *
1488  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1489  * @privlevel public
1490  * @privilege %http://tizen.org/privilege/content.write
1491  *
1492  * @remarks The function should be called after any change in media, to be updated to the media
1493  *          database. For example, after using media_info_set_favorite()
1494  *          for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1495  *          the given media info attributes in the media database.
1496  *
1497  * @param[in] media The handle to the media info
1498  *
1499  * @return @c 0 on success,
1500  *         otherwise a negative error value
1501  *
1502  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1503  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1504  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1505  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1506  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1507  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1508  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1509  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1510  *
1511  * @pre This function requires opened connection to content service by media_content_connect().
1512  *
1513  * @see media_content_connect()
1514  * @see media_info_set_favorite()
1515  */
1516 int media_info_update_to_db(media_info_h media);
1517
1518 /**
1519  * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1520  * @brief Refreshes the media metadata to the media database.
1521  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1522  *
1523  * @privlevel public
1524  * @privilege %http://tizen.org/privilege/content.write \n
1525  *                   %http://tizen.org/privilege/mediastorage \n
1526  *                   %http://tizen.org/privilege/externalstorage
1527  *
1528  * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1529  *                   If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1530  *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1531  *                   If you can access both storage, you should add all privilege.
1532  *
1533  * @param[in] media_id The media ID
1534  *
1535  * @return @c 0 on success,
1536  *         otherwise a negative error value
1537  *
1538  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1539  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1540  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1541  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1542  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1543  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1544  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1545  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1546  *
1547  * @pre This function requires opened connection to content service by media_content_connect().
1548  *
1549  * @see media_content_connect()
1550  */
1551 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1552
1553 /**
1554  * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1555  * @brief Sets the added time of media info.
1556  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1557  *
1558  * @param[in] media The handle to the media info
1559  * @param[in] added_time The added time of the media info
1560  *
1561  * @return @c 0 on success,
1562  *         otherwise a negative error value
1563  *
1564  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1565  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1566  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1567  *
1568  * @post media_info_update_to_db()
1569  */
1570 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1571
1572 /**
1573  * @brief Moves the media info to the given destination path in the media database.
1574  * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1575  *               If the source path and destination path are the same, then this function does nothing.
1576  *               If you want to refresh media information, you should use media_content_scan_file() function.
1577  *
1578  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1579  *
1580  * @privlevel public
1581  * @privilege %http://tizen.org/privilege/content.write \n
1582  *                   %http://tizen.org/privilege/mediastorage \n
1583  *                   %http://tizen.org/privilege/externalstorage
1584  *
1585  * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1586  *                   If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1587  *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1588  *                   If you can access both storage, you should add all privilege. \n
1589  *                   This function does not support USB storage.
1590  *
1591  * @param[in] media The handle to the media info
1592  * @param[in] dst_path The path of destination
1593  *
1594  * @return @c 0 on success,
1595  *         otherwise a negative error value
1596  *
1597  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1598  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1599  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1600  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1601  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1602  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1603  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1604  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1605  *
1606  * @pre This function requires opened connection to content service by media_content_connect().
1607  *
1608  * @see media_content_connect()
1609  * @see media_content_scan_folder()
1610  */
1611 int media_info_move_to_db(media_info_h media, const char* dst_path);
1612
1613 /**
1614  * @brief Creates a thumbnail file for the given media, asynchronously.
1615  * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1616  *          If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1617  *          Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1618  *          Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1619  *
1620  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1621  *
1622  * @privlevel public
1623  * @privilege %http://tizen.org/privilege/content.write \n
1624  *                   %http://tizen.org/privilege/mediastorage \n
1625  *                   %http://tizen.org/privilege/externalstorage
1626  *
1627  * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1628  *          Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1629  *          Items in external storage except MMC not supported.
1630  *
1631  * @param[in] media The handle to the media info
1632  * @param[in] callback The callback function to be invoked
1633  * @param[in] user_data The user data to be passed to the callback function
1634  *
1635  * @return @c 0 on success,
1636  *         otherwise a negative error value
1637  *
1638  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1639  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1640  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1641  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1642  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1643  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1644  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1645  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1646  *
1647  * @pre This function requires opened connection to content service by media_content_connect().
1648  *
1649  * @see media_content_connect()
1650  */
1651 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1652
1653 /**
1654  * @brief Cancels the creation of thumbnail file for the given media.
1655  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1656  *
1657  * @privlevel public
1658  * @privilege %http://tizen.org/privilege/content.write
1659  *
1660  * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1661  *
1662  * @param[in] media The handle to the media info
1663  *
1664  * @return @c 0 on success,
1665  *         otherwise a negative error value
1666  *
1667  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1668  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1669  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1670  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1671  *
1672  * @pre This function requires opened connection to content service by media_content_connect().
1673  * @see media_content_connect()
1674  */
1675 int media_info_cancel_thumbnail(media_info_h media);
1676
1677 /**
1678  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1679  * @brief Starts face detection for the given image, asynchronously.
1680  * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1681  *          The given callback function is called when the detection is completed. \n
1682  *          To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1683  *
1684  * @since_tizen 3.0
1685  *
1686  * @privlevel public
1687  * @privilege %http://tizen.org/privilege/content.write \n
1688  *                   %http://tizen.org/privilege/mediastorage \n
1689  *                   %http://tizen.org/privilege/externalstorage
1690  *
1691  * @remarks If you want to destroy the media handle before callback invoked, you must cancel the face detection request by using media_info_cancel_face_detection(). \n
1692  *          If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1693  *          Media items in external storage are not supported, with the exception of MMC items.
1694  *
1695  * @param[in] media The handle to the media info
1696  * @param[in] callback The callback function to be invoked when detection is completed
1697  * @param[in] user_data The user data to be passed to the callback function
1698  *
1699  * @return @c 0 on success,
1700  *         otherwise a negative error value
1701  *
1702  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1703  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1704  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1705  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1706  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1707  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1708  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1709  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1710  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
1711  *
1712  * @pre This function requires opened connection to content service by media_content_connect().
1713  *
1714  * @see media_content_connect()
1715  * @see media_info_cancel_face_detection()
1716  */
1717 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1718
1719 /**
1720  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1721  * @brief Cancels face detection of image for the given media.
1722  * @details This function cancels face detection for given media item. \n
1723  *          If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1724  *
1725  * @since_tizen 3.0
1726  *
1727  * @privlevel public
1728  * @privilege %http://tizen.org/privilege/content.write
1729  *
1730  * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1731  *
1732  * @param[in] media The handle to the media info
1733  *
1734  * @return @c 0 on success,
1735  *         otherwise a negative error value
1736  *
1737  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1738  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1739  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1740  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1741  *
1742  * @pre This function requires opened connection to content service by media_content_connect().
1743  *
1744  * @see media_content_connect()
1745  * @see media_info_start_face_detection()
1746  */
1747 int media_info_cancel_face_detection(media_info_h media);
1748
1749 /**
1750  * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1751  * @brief Creates the media info handle.
1752  * @details If the information about the file that is already known, you can use this function to generate empty handler.
1753  * @since_tizen 3.0
1754  *
1755  *
1756  * @privilege %http://tizen.org/privilege/mediastorage \n
1757  *               %http://tizen.org/privilege/externalstorage
1758  *
1759  * @remarks The @a media should be released using media_info_destroy().
1760  * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1761  *                   Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1762  *                   If you can access both storage, you must add all privilege.
1763  *
1764  * @param[in] path The path to create the media info handle
1765  * @param[out] media The handle to the media info
1766  *
1767  * @return @c 0 on success,
1768  *           otherwise a negative error value
1769  *
1770  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1771  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1772  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1773  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1774  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1775  *
1776  * @see media_info_destroy()
1777  */
1778 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1779
1780 /**
1781  * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1782  * @brief Inserts media info to database with media info data.
1783  * @since_tizen 3.0
1784  *
1785  * @privlevel public
1786  * @privilege %http://tizen.org/privilege/content.write
1787  *
1788  * @remarks The @a media should be released using media_info_destroy().
1789  *
1790  * @param[in] media The handle to the media info
1791  *
1792  * @return @c 0 on success,
1793  *           otherwise a negative error value
1794  *
1795  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1796  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1797  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1798  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1799  */
1800 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1801
1802 /**
1803  * @deprecated Deprecated since 4.0.
1804  * @brief Sets the title of media info handle.
1805  * @since_tizen 3.0
1806  *
1807  * @param[in] media The handle to the media info
1808  * @param[in] title The title of media info handle
1809  *
1810  * @return @c 0 on success,
1811  *           otherwise a negative error value
1812  *
1813  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1814  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1815  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1816  */
1817 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1818
1819 /**
1820  * @deprecated Deprecated since 4.0.
1821  * @brief Sets the album of media info handle.
1822  * @since_tizen 3.0
1823  *
1824  * @param[in] media The handle to the media info
1825  * @param[in] album The album of the media
1826  *
1827  * @return @c 0 on success,
1828  *           otherwise a negative error value
1829  *
1830  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1831  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1832  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1833  */
1834 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1835
1836 /**
1837  * @deprecated Deprecated since 4.0.
1838  * @brief Sets the artist of media info handle.
1839  * @since_tizen 3.0
1840  *
1841  * @param[in] media The handle to the media info
1842  * @param[in] artist The artist of media info handle
1843  *
1844  * @return @c 0 on success,
1845  *           otherwise a negative error value
1846  *
1847  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1848  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1849  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1850  */
1851 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1852
1853 /**
1854  * @deprecated Deprecated since 4.0.
1855  * @brief Sets the genre of media info handle.
1856  * @since_tizen 3.0
1857  *
1858  * @param[in] media The handle to the media info
1859  * @param[in] genre The genre of media info handle
1860  *
1861  * @return @c 0 on success,
1862  *           otherwise a negative error value
1863  *
1864  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1865  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1866  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1867  */
1868 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1869
1870 /**
1871  * @deprecated Deprecated since 4.0.
1872  * @brief Sets the recorded date of media info handle.
1873  * @since_tizen 3.0
1874  *
1875  * @param[in] media The handle to the media info
1876  * @param[in] recorded_date The recorded date of media info handle
1877  *
1878  * @return @c 0 on success,
1879  *           otherwise a negative error value
1880  *
1881  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1882  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1883  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1884  */
1885 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1886
1887 /**
1888  * @}
1889  */
1890
1891 #ifdef __cplusplus
1892 }
1893 #endif /* __cplusplus */
1894
1895 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */