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