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