2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __TIZEN_CONTENT_MEDIA_INFO_H__
19 #define __TIZEN_CONTENT_MEDIA_INFO_H__
21 #include <media_content_type.h>
27 #endif /* __cplusplus */
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.
39 * @addtogroup CAPI_CONTENT_MEDIA_INFO_MODULE
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.
48 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
51 * @privilege %http://tizen.org/privilege/content.write \n
52 * %http://tizen.org/privilege/mediastorage \n
53 * %http://tizen.org/privilege/externalstorage
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.
65 * @param[in] path The path of the content file to add
66 * @param[out] info The handle of the inserted content file
68 * @return @c 0 on success,
69 * otherwise a negative error value
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
81 * @pre This function requires opened connection to content service by media_content_connect().
83 * @see media_content_connect()
84 * @see media_content_scan_file()
85 * @see media_content_scan_folder()
87 int media_info_insert_to_db(const char *path, media_info_h *info);
90 * @brief Inserts content files into the media database, asynchronously.
91 * @details This function can insert multiple content files into the media database.
93 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
96 * @privilege %http://tizen.org/privilege/content.write \n
97 * %http://tizen.org/privilege/mediastorage \n
98 * %http://tizen.org/privilege/externalstorage
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.
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
114 * @return @c 0 on success,
115 * otherwise a negative error value
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
127 * @pre This function requires opened connection to content service by media_content_connect().
129 * @see media_content_connect()
130 * @see media_insert_completed_cb()
132 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
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.
140 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
143 * @privilege %http://tizen.org/privilege/content.write \n
144 * %http://tizen.org/privilege/mediastorage \n
145 * %http://tizen.org/privilege/externalstorage
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
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
158 * @return @c 0 on success,
159 * otherwise a negative error value
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
170 * @pre This function requires opened connection to content service by media_content_connect().
172 * @see media_content_connect()
173 * @see media_insert_burst_shot_completed_cb()
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;
178 * @brief Deletes the media information from the media database.
179 * @details This function only remove media information in the media database. \n
180 * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if file is removed from the file system.
182 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
185 * @privilege %http://tizen.org/privilege/content.write
187 * @param[in] media_id The media ID. It can get from media info handle.
189 * @return @c 0 on success,
190 * otherwise a negative error value
192 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
193 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
194 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
195 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
196 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
197 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
198 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
200 * @pre This function requires opened connection to content service by media_content_connect().
202 * @see media_content_connect()
203 * @see media_content_scan_file()
204 * @see media_content_scan_folder()
206 int media_info_delete_from_db(const char *media_id);
209 * @deprecated Deprecated since 4.0. Use media_content_scan_folder() or media_info_delete_from_db() instead.
210 * @brief Deletes media information that meets the conditions of the filter from the media database.
211 * @details This function can delete multiple media information from the media database.
213 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
216 * @privilege %http://tizen.org/privilege/content.write
218 * @param[in] filter The handle to the media filter
220 * @return @c 0 on success,
221 * otherwise a negative error value
223 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
224 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
225 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
226 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
227 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
228 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
229 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
231 * @pre This function requires opened connection to content service by media_content_connect().
233 * @see media_content_connect()
234 * @see media_filter_create()
236 int media_info_delete_batch_from_db(filter_h filter) TIZEN_DEPRECATED_API;
240 * @brief Destroys media info.
241 * @details The function frees all resources related to the media info handle. This handle
242 * can no longer be used to perform any operation. New media info handle has to
243 * be created before the next usage.
245 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
247 * @param[in] media The handle to the media info
249 * @return @c 0 on success,
250 * otherwise a negative error value
252 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
253 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
255 * @pre Get copy of media_info handle by calling media_info_clone().
257 * @see media_info_clone()
259 int media_info_destroy(media_info_h media);
262 * @brief Clones the media info handle.
264 * @details This function copies the media info handle from a source to the destination.
265 * There is no media_info_create() function. The media_info_h is created internally and
266 * available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
267 * To use this handle outside of these foreach functions, use this function.
269 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
271 * @remarks The @a dst should be released using media_info_destroy().
273 * @param[out] dst The destination handle to the media info
274 * @param[in] src The source handle to the media info
276 * @return @c 0 on success,
277 * otherwise a negative error value
279 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
280 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
281 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
283 * @see media_info_destroy()
284 * @see media_album_foreach_media_from_db()
285 * @see media_playlist_foreach_media_from_db()
286 * @see media_group_foreach_media_from_db()
287 * @see media_tag_foreach_media_from_db()
288 * @see media_info_foreach_media_from_db()
289 * @see media_info_insert_to_db()
290 * @see media_folder_foreach_media_from_db()
292 int media_info_clone(media_info_h *dst, media_info_h src);
295 * @brief Gets the count of media info for the passed @a filter from the media database.
296 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
298 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
301 * @param[in] filter The handle to the media filter
302 * @param[out] media_count The count of media
304 * @return @c 0 on success,
305 * otherwise a negative error value
307 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
308 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
309 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
310 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
312 * @pre This function requires opened connection to content service by media_content_connect().
314 * @see media_content_connect()
315 * @see media_filter_create()
317 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
320 * @brief Iterates through media info from the media database.
321 * @details This function gets all media info handles meeting the given @a filter.
322 * The @a callback function will be invoked for every retrieved media info.
323 * If @c NULL is passed to the @a filter, then no filtering is applied.
325 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
327 * @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,
328 * your callback function is invoked as inline function.
329 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
330 * We do not recommend you call updating DB function in callback of foreach function.
332 * @param[in] filter The handle to the media filter
333 * @param[in] callback The callback function to be invoked
334 * @param[in] user_data The user data to be passed to the callback function
336 * @return @c 0 on success,
337 * otherwise a negative error value
339 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
340 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
341 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
342 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
343 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
345 * @pre This function requires opened connection to content service by media_content_connect().
346 * @post This function invokes media_info_cb().
348 * @see media_content_connect()
349 * @see #media_info_cb
350 * @see media_filter_create()
352 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
355 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
356 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
358 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
360 * @param[in] media_id The media ID
361 * @param[in] filter The handle to the media filter
362 * @param[out] tag_count The count of the media tag
364 * @return @c 0 on success,
365 * otherwise a negative error value
367 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
368 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
369 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
370 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
372 * @pre This function requires opened connection to content service by media_content_connect().
374 * @see media_content_connect()
375 * @see media_filter_create()
377 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
380 * @brief Iterates through the media tag in the given media info from the media database.
381 * @details This function gets all the media tags associated with the given @a media_id and calls @a callback for every retrieved media tag. \n
382 * If @c NULL is passed to the @a filter, then no filtering is applied.
384 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
386 * @param[in] media_id The media ID
387 * @param[in] filter The handle to the media filter
388 * @param[in] callback The callback function to be invoked
389 * @param[in] user_data The user data to be passed to the callback function
391 * @return @c 0 on success,
392 * otherwise a negative error value
394 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
395 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
396 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
397 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
398 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
400 * @pre This function requires opened connection to content service by media_content_connect().
401 * @post This function invokes media_tag_cb().
403 * @see media_content_connect()
405 * @see media_filter_create()
407 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
410 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
411 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
413 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
415 * @param[in] media_id The media ID
416 * @param[in] filter The handle to the media filter
417 * @param[out] bookmark_count The count of the media tag
419 * @return @c 0 on success,
420 * otherwise a negative error value
422 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
423 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
424 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
425 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
427 * @pre This function requires opened connection to content service by media_content_connect().
429 * @see media_content_connect()
430 * @see media_filter_create()
432 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
435 * @brief Iterates through the media bookmark in the given media info from the media database.
436 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
437 * If @c NULL is passed to the @a filter, then no filtering is applied.
439 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
441 * @param[in] media_id The media ID
442 * @param[in] filter The handle to the media filter
443 * @param[in] callback The callback function to be invoked
444 * @param[in] user_data The user data to be passed to the callback function
446 * @return @c 0 on success,
447 * otherwise a negative error value
449 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
450 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
451 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
452 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
453 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
455 * @pre This function requires opened connection to content service by media_content_connect().
456 * @post This function invokes media_bookmark_cb().
458 * @see media_content_connect()
459 * @see media_bookmark_cb()
460 * @see media_filter_create()
462 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
465 * @brief Gets the number of face for the passed @a media_id from the media database.
466 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
470 * @param[in] media_id The media ID
471 * @param[in] filter The handle to the media filter
472 * @param[out] face_count The count of media face
474 * @return 0 on success, otherwise a negative error value.
476 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
477 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
478 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
480 * @pre This function requires opened connection to content service by media_content_connect().
481 * @see media_content_connect()
482 * @see media_filter_create()
485 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
488 * @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
489 * @details This function gets all media face info associated with the given media id and
490 * meeting desired filter option and calls @a callback for
491 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
495 * @param[in] media_id The media ID
496 * @param[in] filter The handle to the media filter
497 * @param[in] callback The callback function to invoke
498 * @param[in] user_data The user data to be passed to the callback function
500 * @return 0 on success, otherwise a negative error value.
502 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
503 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
504 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
506 * @pre This function requires opened connection to content service by media_content_connect().
507 * @see media_content_connect()
508 * @see media_filter_create()
511 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
514 * @brief Gets the image metadata handle for a given media info.
515 * @details This function returns an image metadata handle retrieved from the media info.
517 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
519 * @remarks The @a image should be released using image_meta_destroy().
521 * @param[in] media The handle to the media info
522 * @param[out] image The handle to the image metadata
524 * @return @c 0 on success,
525 * otherwise a negative error value
527 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
528 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
529 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
531 * @see image_meta_destroy()
533 int media_info_get_image(media_info_h media, image_meta_h *image);
536 * @brief Gets a video metadata handle for a given media info.
537 * @details This function returns a video metadata handle retrieved from the media info handle.
539 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
541 * @remarks The @a video should be released using video_meta_destroy().
543 * @param[in] media The handle to the media info
544 * @param[out] video The handle to the video metadata
546 * @return @c 0 on success,
547 * otherwise a negative error value
549 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
550 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
551 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
553 * @see video_meta_destroy()
555 int media_info_get_video(media_info_h media, video_meta_h *video);
558 * @brief Gets an audio metadata handle for a given media info.
559 * @details This function returns an audio metadata handle retrieved from the media info handle.
561 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
563 * @remarks The @a audio should be released using audio_meta_destroy().
565 * @param[in] media The handle to the media info
566 * @param[out] audio The handle to the audio metadata
568 * @return @c 0 on success,
569 * otherwise a negative error value
571 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
572 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
573 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
575 * @see audio_meta_destroy()
577 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
580 * @brief Gets the media ID.
581 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
582 * @remarks The @a media_id should be released using free().
584 * @param[in] media The handle to the media info
585 * @param[out] media_id The media ID
587 * @return @c 0 on success,
588 * otherwise a negative error value
590 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
591 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
592 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
594 int media_info_get_media_id(media_info_h media, char **media_id);
597 * @brief Gets the full path of the content file.
598 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
600 * @remarks The @a path should be released using free().
602 * @param[in] media The handle to the media info
603 * @param[out] path The full path of the content file
605 * @return @c 0 on success,
606 * otherwise a negative error value
608 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
609 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
610 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
613 int media_info_get_file_path(media_info_h media, char **path);
616 * @brief Gets the file name including the extension of the content file.
617 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
619 * @remarks The @a name should be released using free().
621 * @param[in] media The handle to the media info
622 * @param[out] name The file name including the extension of the content file
624 * @return @c 0 on success,
625 * otherwise a negative error value
627 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
628 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
629 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
631 int media_info_get_display_name(media_info_h media, char **name);
634 * @brief Gets the content type of the content file.
635 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
637 * @param[in] media The handle to the media info
638 * @param[out] type The content type of the content file (#media_content_type_e)
640 * @return @c 0 on success,
641 * otherwise a negative error value
643 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
644 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
646 * @see #media_content_type_e
648 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
651 * @brief Gets the MIME type of the content file.
652 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
654 * @remarks The @a mime_type should be released using free().
656 * @param[in] media The handle to the media info
657 * @param[out] mime_type The MIME type of the content file
659 * @return @c 0 on success,
660 * otherwise a negative error value
662 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
663 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
664 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
666 int media_info_get_mime_type(media_info_h media, char **mime_type);
669 * @brief Gets the content file size.
670 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
672 * @param[in] media The handle to the media info
673 * @param[out] size The content file size
675 * @return @c 0 on success,
676 * otherwise a negative error value
678 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
679 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
681 int media_info_get_size(media_info_h media, unsigned long long *size);
684 * @brief Gets the added time of the content file.
685 * @details The added time refers to the time that content file was first added to media database.
686 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
688 * @param[in] media The handle to the media info
689 * @param[out] added_time The added time to the media database
691 * @return @c 0 on success,
692 * otherwise a negative error value
694 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
695 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
697 int media_info_get_added_time(media_info_h media, time_t *added_time);
700 * @brief Gets the modified time of the content file.
701 * @details The modified time refers to the last modification time provided by the file system.
702 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
704 * @param[in] media The handle to the media info
705 * @param[out] time The last modification time of the content file
707 * @return @c 0 on success,
708 * otherwise a negative error value
710 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
711 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
713 int media_info_get_modified_time(media_info_h media, time_t *time);
716 * @brief Gets the timeline of content file.
717 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
718 * Otherwise, timeline value is the same as modified time.
719 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
721 * @param[in] media The handle to the media info
722 * @param[out] time The timeline of content file
724 * @return @c 0 on success,
725 * otherwise a negative error value
727 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
728 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
730 int media_info_get_timeline(media_info_h media, time_t *time);
733 * @brief Gets the thumbnail path of content file.
734 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
736 * @remarks The @a path should be released using free(). \n
737 * If the thumbnail extraction for the given media has not been requested yet, this function returns NULL. To create a thumbnail, you should use media_info_create_thumbnail() function. \n
738 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
740 * @param[in] media The handle to the media info
741 * @param[out] path The thumbnail path
743 * @return @c 0 on success,
744 * otherwise a negative error value
746 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
747 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
748 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
750 int media_info_get_thumbnail_path(media_info_h media, char **path);
753 * @brief Gets the description of content file.
754 * @details If the value is an empty string, the method returns "Unknown". \n
755 * Since 3.0, if the media info has no description, the method returns empty string.
756 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
758 * @remarks The @a description should be released using free().
760 * @param[in] media The handle to the media info
761 * @param[out] description The description of the content file
763 * @return @c 0 on success,
764 * otherwise a negative error value
766 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
767 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
768 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
770 int media_info_get_description(media_info_h media, char **description);
773 * @brief Gets the longitude of content file.
774 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
776 * @param[in] media The handle to the media info
777 * @param[out] longitude The longitude of the content file
779 * @return @c 0 on success,
780 * otherwise a negative error value
782 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
783 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
785 int media_info_get_longitude(media_info_h media, double *longitude);
788 * @brief Gets the latitude of content file.
789 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
791 * @param[in] media The handle to the media info
792 * @param[out] latitude The latitude of the content file
794 * @return @c 0 on success,
795 * otherwise a negative error value
797 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
798 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
801 int media_info_get_latitude(media_info_h media, double* latitude);
804 * @brief Gets the altitude of content file.
805 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
807 * @param[in] media The handle to the media info
808 * @param[out] altitude The altitude of the content file
810 * @return @c 0 on success,
811 * otherwise a negative error value
813 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
814 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
816 int media_info_get_altitude(media_info_h media, double* altitude);
819 * @deprecated Deprecated since 4.0.
820 * @brief Gets the weather of content file.
821 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
822 * @remarks The @a weather should be released using free().
824 * @param[in] media The handle to the media info
825 * @param[out] weather The weather of the content file
827 * @return @c 0 on success,
828 * otherwise a negative error value
830 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
831 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
832 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
834 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
837 * @brief Gets the rating of content file.
838 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
840 * @param[in] media The handle to the media info
841 * @param[out] rating The rating of the content file
843 * @return @c 0 on success,
844 * otherwise a negative error value
846 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
847 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
849 int media_info_get_rating(media_info_h media, int *rating);
852 * @brief Gets the favorite status of content file which User set.
853 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
855 * @param[in] media The handle to the media info
856 * @param[out] favorite @c true if content file is set as favorite,
857 * otherwise @c false if content file is not set as favorite
859 * @return @c 0 on success,
860 * otherwise a negative error value
862 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
863 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
865 * @see media_info_set_favorite()
867 int media_info_get_favorite(media_info_h media, bool* favorite);
870 * @deprecated Deprecated since 4.0.
871 * @brief Gets the author of content file.
872 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
874 * @remarks The @a author should be released using free().
876 * @param[in] media The handle to the media info
877 * @param[out] author The author of the content file
879 * @return @c 0 on success,
880 * otherwise a negative error value
882 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
883 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
884 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
886 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
889 * @deprecated Deprecated since 4.0.
890 * @brief Gets the provider of content file which User set.
891 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
893 * @remarks The @a provider should be released using free().
895 * @param[in] media The handle to the media info
896 * @param[out] provider The provider of the content file
898 * @return @c 0 on success,
899 * otherwise a negative error value
901 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
902 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
903 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
906 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
909 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
910 * @brief Gets the content name of content file which User set.
911 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
913 * @remarks The @a content_name should be released using free().
915 * @param[in] media The handle to the media info
916 * @param[out] content_name The content name of the content file
918 * @return @c 0 on success,
919 * otherwise a negative error value
921 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
922 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
923 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
926 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
929 * @brief Gets the title of content file.
930 * @details If the value is an empty string, the method returns "Unknown". \n
931 * Since 3.0, if the content file has no title, the method returns empty string.
933 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
935 * @remarks The @a title should be released using free().
937 * @param[in] media The handle to the media info
938 * @param[out] title The title of the content file
940 * @return @c 0 on success,
941 * otherwise a negative error value
943 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
944 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
945 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
947 int media_info_get_title(media_info_h media, char **title);
950 * @deprecated Deprecated since 4.0.
951 * @brief Gets the category of content file which User set.
952 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
954 * @remarks The @a category should be released using free().
956 * @param[in] media The handle to the media info
957 * @param[out] category The category of the content file
959 * @return @c 0 on success,
960 * otherwise a negative error value
962 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
963 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
964 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
967 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
970 * @deprecated Deprecated since 4.0.
971 * @brief Gets the location tag of content file which User set.
972 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
974 * @remarks The @a location_tag should be released using free().
976 * @param[in] media The handle to the media info
977 * @param[out] location_tag The location of the content file
979 * @return @c 0 on success,
980 * otherwise a negative error value
982 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
983 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
984 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
987 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
990 * @deprecated Deprecated since 4.0.
991 * @brief Gets the age_rating of content file which User set.
992 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
994 * @remarks The @a age_rating should be released using free().
996 * @param[in] media The handle to the media info
997 * @param[out] age_rating The age rating of the content file
999 * @return @c 0 on success,
1000 * otherwise a negative error value
1002 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1003 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1004 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1007 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
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
1014 * @remarks The @a keyword should be released using free().
1016 * @param[in] media The handle to the media info
1017 * @param[out] keyword The keyword of the content file
1019 * @return @c 0 on success,
1020 * otherwise a negative error value
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
1027 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1030 * @brief Gets the storage id of content file.
1031 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1033 * @remarks The @a storage_id should be released using free().
1035 * @param[in] media The handle to the media info
1036 * @param[out] storage_id The ID of the media storage
1038 * @return @c 0 on success,
1039 * otherwise a negative error value
1041 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1042 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1043 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1045 int media_info_get_storage_id(media_info_h media, char **storage_id);
1048 * @brief Checks whether the media is protected via DRM.
1049 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1051 * @param[in] media The handle to the media info
1052 * @param[out] is_drm @c true if media is DRM media,
1053 * otherwise @c false if media is not DRM media
1055 * @return @c 0 on success,
1056 * otherwise a negative error value
1058 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1059 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1061 int media_info_is_drm(media_info_h media, bool *is_drm);
1064 * @brief Checks whether the content file is 360 content.
1067 * @param[in] media The handle to the media info
1068 * @param[out] is_360 @c true if media is 360 content,
1069 * otherwise @c false if media is not 360 content
1071 * @return @c 0 on success,
1072 * otherwise a negative error value
1074 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1075 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1077 int media_info_is_360_content(media_info_h media, bool *is_360);
1080 * @brief Gets the storage type of content file.
1081 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1083 * @param[in] media The handle to the media info
1084 * @param[out] storage_type The storage type of the content file
1086 * @return @c 0 on success,
1087 * otherwise a negative error value
1089 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1090 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1092 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1095 * @deprecated Deprecated since 4.0. \n
1096 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1097 * @brief Gets number which represents how many times given content has been played.
1098 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1100 * @param[in] media The handle to the media info
1101 * @param[out] played_count The counter of content played
1103 * @return 0 on success,
1104 * otherwise a negative error value
1106 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1107 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1109 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1112 * @deprecated Deprecated since 4.0. \n
1113 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1114 * @brief Gets the content's played time parameter.
1115 * @details Function returns content's elapsed playback time parameter as period
1116 * starting from the beginning of the track.
1117 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1119 * @param[in] media The handle to the media info
1120 * @param[out] played_time The elapsed time of the content
1122 * @return 0 on success,
1123 * otherwise a negative error value
1125 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1126 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1128 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1131 * @brief Gets the media info from the media database.
1133 * @details This function creates a new media handle from the media database by the given @a media_id.
1134 * Media info will be created and filled with information.
1136 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1138 * @remarks The @a media should be released using media_info_destroy().
1140 * @param[in] media_id The media ID
1141 * @param[out] media The handle to the media info
1143 * @return @c 0 on success,
1144 * otherwise a negative error value
1146 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1147 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1148 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1149 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1150 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1152 * @pre This function requires opened connection to content service by media_content_connect().
1154 * @see media_content_connect()
1155 * @see media_info_destroy()
1157 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1160 * @deprecated Deprecated since 4.0. \n
1161 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1162 * @brief Increments the played count to content meta handle.
1163 * @details You can increase the played(opened) count of the content file.
1164 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1166 * @param[in] media The handle to the media info
1168 * @return 0 on success,
1169 * otherwise a negative error value
1171 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1172 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1174 * @post media_info_update_to_db()
1176 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1179 * @deprecated Deprecated since 4.0. \n
1180 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1181 * @brief Sets the played time to content meta handle.
1182 * @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.
1183 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1185 * @param[in] media The handle to the media info
1187 * @return 0 on success,
1188 * otherwise a negative error value
1190 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1191 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1193 * @post media_info_update_to_db()
1195 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1198 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1199 * @brief Sets the file name including the extension of the content file.
1200 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1202 * @param[in] media The handle to the media info
1203 * @param[in] display_name The file name including the extension of the content file.
1205 * @return @c 0 on success,
1206 * otherwise a negative error value
1208 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1209 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1210 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1212 * @post media_info_update_to_db().
1215 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1218 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1219 * @brief Sets the description of media info.
1220 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1222 * @param[in] media The handle to the media info
1223 * @param[in] description The description of the media info
1225 * @return @c 0 on success,
1226 * otherwise a negative error value
1228 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1229 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1230 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1232 * @post media_info_update_to_db().
1235 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1238 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1239 * @brief Sets the longitude of media info.
1240 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1242 * @param[in] media The handle to the media info
1243 * @param[in] longitude The longitude of the media info
1245 * @return @c 0 on success,
1246 * otherwise a negative error value
1248 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1249 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1251 * @post media_info_update_to_db().
1253 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1256 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1257 * @brief Sets the latitude of media info.
1258 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1260 * @param[in] media The handle to the media info
1261 * @param[in] latitude The latitude of the media info
1263 * @return @c 0 on success,
1264 * otherwise a negative error value
1266 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1267 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1269 * @post media_info_update_to_db().
1271 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1274 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1275 * @brief Sets the altitude of media info.
1276 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1278 * @param[in] media The handle to the media info
1279 * @param[in] altitude The altitude of the media info
1281 * @return @c 0 on success,
1282 * otherwise a negative error value
1284 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1285 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1287 * @post media_info_update_to_db().
1289 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1292 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1293 * @brief Sets the weather of media info.
1294 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1296 * @param[in] media The handle to the media info
1297 * @param[in] weather The weather of the media info
1299 * @return @c 0 on success,
1300 * otherwise a negative error value
1302 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1303 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1304 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1306 * @post media_info_update_to_db().
1309 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1312 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1313 * @brief Sets the rating of media info.
1314 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1316 * @param[in] media The handle to the media info
1317 * @param[in] rating The rating of the media info
1319 * @return @c 0 on success,
1320 * otherwise a negative error value
1322 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1323 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1325 * @post media_info_update_to_db().
1327 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1330 * @brief Sets the favorite of media info.
1331 * @details This function can mark favorite of the media. If set to @c true, this function record the time of the change moment. \n
1332 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1333 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1335 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1337 * @param[in] media The handle to the media info
1338 * @param[in] favorite Set @c true to set the media info as favorite,
1339 * otherwise set @c false to not set the media info as favorite
1341 * @return @c 0 on success,
1342 * otherwise a negative error value
1344 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1345 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1347 int media_info_set_favorite(media_info_h media, bool favorite);
1350 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1351 * @brief Sets the author of media info.
1352 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1354 * @param[in] media The handle to the media info
1355 * @param[in] author The author of the media info
1357 * @return @c 0 on success,
1358 * otherwise a negative error value
1360 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1361 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1362 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1364 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1367 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1368 * @brief Sets the provider of media info.
1369 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1371 * @param[in] media The handle to the media info
1372 * @param[in] provider The provider of the media info
1374 * @return @c 0 on success,
1375 * otherwise a negative error value
1377 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1378 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1379 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1381 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1384 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1385 * @brief Sets the content name of media info.
1386 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1388 * @param[in] media The handle to the media info
1389 * @param[in] content_name The content name of the media info
1391 * @return @c 0 on success,
1392 * otherwise a negative error value
1394 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1395 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1396 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1398 * @post media_info_update_to_db()
1400 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1403 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1404 * @brief Sets the category of media info.
1405 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1407 * @param[in] media The handle to the media info
1408 * @param[in] category The category of the media info
1410 * @return @c 0 on success,
1411 * otherwise a negative error value
1413 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1414 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1415 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1417 * @post media_info_update_to_db()
1419 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1422 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1423 * @brief Sets the location tag of media info.
1424 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1426 * @param[in] media The handle to the media info
1427 * @param[in] location_tag The location of the media info
1429 * @return @c 0 on success,
1430 * otherwise a negative error value
1432 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1433 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1434 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1436 * @post media_info_update_to_db()
1438 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1441 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1442 * @brief Sets the age rating of media info.
1443 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1445 * @param[in] media The handle to the media info
1446 * @param[in] age_rating The age rating of the media info
1448 * @return @c 0 on success,
1449 * otherwise a negative error value
1451 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1452 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1453 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1455 * @post media_info_update_to_db()
1457 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1460 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1461 * @brief Sets the keyword of media info.
1462 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1464 * @param[in] media The handle to the media info
1465 * @param[in] keyword The keyword of the media info
1467 * @return @c 0 on success,
1468 * otherwise a negative error value
1470 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1471 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1472 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1474 * @post media_info_update_to_db()
1476 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1479 * @brief Updates the media info to the media database.
1481 * @details The function updates the given media info in the media database.
1483 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1485 * @privilege %http://tizen.org/privilege/content.write
1487 * @remarks The function should be called after any change in media, to be updated to the media
1488 * database. For example, after using media_info_set_favorite()
1489 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1490 * the given media info attributes in the media database.
1492 * @param[in] media The handle to the media info
1494 * @return @c 0 on success,
1495 * otherwise a negative error value
1497 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1498 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1499 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1500 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1501 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1502 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1503 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1504 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1506 * @pre This function requires opened connection to content service by media_content_connect().
1508 * @see media_content_connect()
1509 * @see media_info_set_favorite()
1511 int media_info_update_to_db(media_info_h media);
1514 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1515 * @brief Refreshes the media metadata to the media database.
1516 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1519 * @privilege %http://tizen.org/privilege/content.write \n
1520 * %http://tizen.org/privilege/mediastorage \n
1521 * %http://tizen.org/privilege/externalstorage
1523 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1524 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1525 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1526 * If you can access both storage, you should add all privilege.
1528 * @param[in] media_id The media ID
1530 * @return @c 0 on success,
1531 * otherwise a negative error value
1533 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1534 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1535 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1536 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1537 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1538 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1539 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1540 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1542 * @pre This function requires opened connection to content service by media_content_connect().
1544 * @see media_content_connect()
1546 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1549 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1550 * @brief Sets the added time of media info.
1551 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1553 * @param[in] media The handle to the media info
1554 * @param[in] added_time The added time of the media info
1556 * @return @c 0 on success,
1557 * otherwise a negative error value
1559 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1560 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1561 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1563 * @post media_info_update_to_db()
1565 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1568 * @brief Moves the media info to the given destination path in the media database.
1569 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1570 * If the source path and destination path are the same, then this function does nothing.
1571 * If you want to refresh media information, you should use media_content_scan_file() function.
1573 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1576 * @privilege %http://tizen.org/privilege/content.write \n
1577 * %http://tizen.org/privilege/mediastorage \n
1578 * %http://tizen.org/privilege/externalstorage
1580 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1581 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1582 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1583 * If you can access both storage, you should add all privilege. \n
1584 * This function does not support USB storage. \n
1585 * Since 4.0, This function does not allow a symbolic link.
1587 * @param[in] media The handle to the media info
1588 * @param[in] dst_path The path of destination
1590 * @return @c 0 on success,
1591 * otherwise a negative error value
1593 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1594 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1595 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1596 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1597 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1598 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1599 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1600 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1602 * @pre This function requires opened connection to content service by media_content_connect().
1604 * @see media_content_connect()
1605 * @see media_content_scan_folder()
1607 int media_info_move_to_db(media_info_h media, const char* dst_path);
1610 * @brief Creates a thumbnail file for the given media, asynchronously.
1611 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1612 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1613 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1614 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1616 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1619 * @privilege %http://tizen.org/privilege/content.write
1621 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1622 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1623 * Items in external storage except MMC not supported.
1625 * @param[in] media The handle to the media info
1626 * @param[in] callback The callback function to be invoked
1627 * @param[in] user_data The user data to be passed to the callback function
1629 * @return @c 0 on success,
1630 * otherwise a negative error value
1632 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1633 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1634 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1635 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1636 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1637 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1638 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1639 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1641 * @pre This function requires opened connection to content service by media_content_connect().
1643 * @see media_content_connect()
1645 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1648 * @brief Cancels the creation of thumbnail file for the given media.
1649 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1652 * @privilege %http://tizen.org/privilege/content.write
1654 * @remarks If you request cancel for the already thumbnail created media, this function returns #MEDIA_CONTENT_ERROR_INVALID_OPERATION
1656 * @param[in] media The handle to the media info
1658 * @return @c 0 on success,
1659 * otherwise a negative error value
1661 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1662 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1663 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1664 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1666 * @pre This function requires opened connection to content service by media_content_connect().
1667 * @see media_content_connect()
1669 int media_info_cancel_thumbnail(media_info_h media);
1672 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1673 * @brief Starts face detection for the given image, asynchronously.
1674 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1675 * The given callback function is called when the detection is completed. \n
1676 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1681 * @privilege %http://tizen.org/privilege/content.write \n
1682 * %http://tizen.org/privilege/mediastorage
1684 * @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
1685 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1686 * Media items in external storage are not supported, with the exception of MMC items.
1688 * @param[in] media The handle to the media info
1689 * @param[in] callback The callback function to be invoked when detection is completed
1690 * @param[in] user_data The user data to be passed to the callback function
1692 * @return @c 0 on success,
1693 * otherwise a negative error value
1695 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1696 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1697 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1698 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1699 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1700 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1701 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1702 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1703 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1705 * @pre This function requires opened connection to content service by media_content_connect().
1707 * @see media_content_connect()
1708 * @see media_info_cancel_face_detection()
1710 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1713 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1714 * @brief Cancels face detection of image for the given media.
1715 * @details This function cancels face detection for given media item. \n
1716 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1721 * @privilege %http://tizen.org/privilege/content.write
1723 * @remarks If face detection is already done when you request the cancellation, this function returns #MEDIA_CONTENT_ERROR_INVALID_OPERATION
1725 * @param[in] media The handle to the media info
1727 * @return @c 0 on success,
1728 * otherwise a negative error value
1730 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1731 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1732 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1733 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1735 * @pre This function requires opened connection to content service by media_content_connect().
1737 * @see media_content_connect()
1738 * @see media_info_start_face_detection()
1740 int media_info_cancel_face_detection(media_info_h media);
1743 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1744 * @brief Creates the media info handle.
1745 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1749 * @privilege %http://tizen.org/privilege/mediastorage \n
1750 * %http://tizen.org/privilege/externalstorage
1752 * @remarks The @a media should be released using media_info_destroy().
1753 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1754 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1755 * If you can access both storage, you must add all privilege.
1757 * @param[in] path The path to create the media info handle
1758 * @param[out] media The handle to the media info
1760 * @return @c 0 on success,
1761 * otherwise a negative error value
1763 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1764 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1765 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1766 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1767 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1769 * @see media_info_destroy()
1771 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1774 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1775 * @brief Inserts media info to database with media info data.
1779 * @privilege %http://tizen.org/privilege/content.write
1781 * @remarks The @a media should be released using media_info_destroy().
1783 * @param[in] media The handle to the media info
1785 * @return @c 0 on success,
1786 * otherwise a negative error value
1788 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1789 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1790 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1791 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1793 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1796 * @deprecated Deprecated since 4.0.
1797 * @brief Sets the title of media info handle.
1800 * @param[in] media The handle to the media info
1801 * @param[in] title The title of media info handle
1803 * @return @c 0 on success,
1804 * otherwise a negative error value
1806 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1807 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1808 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1810 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1813 * @deprecated Deprecated since 4.0.
1814 * @brief Sets the album of media info handle.
1817 * @param[in] media The handle to the media info
1818 * @param[in] album The album of the media
1820 * @return @c 0 on success,
1821 * otherwise a negative error value
1823 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1824 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1825 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1827 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1830 * @deprecated Deprecated since 4.0.
1831 * @brief Sets the artist of media info handle.
1834 * @param[in] media The handle to the media info
1835 * @param[in] artist The artist of media info handle
1837 * @return @c 0 on success,
1838 * otherwise a negative error value
1840 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1841 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1842 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1844 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1847 * @deprecated Deprecated since 4.0.
1848 * @brief Sets the genre of media info handle.
1851 * @param[in] media The handle to the media info
1852 * @param[in] genre The genre of media info handle
1854 * @return @c 0 on success,
1855 * otherwise a negative error value
1857 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1858 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1859 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1861 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1864 * @deprecated Deprecated since 4.0.
1865 * @brief Sets the recorded date of media info handle.
1868 * @param[in] media The handle to the media info
1869 * @param[in] recorded_date The recorded date of media info handle
1871 * @return @c 0 on success,
1872 * otherwise a negative error value
1874 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1875 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1876 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1878 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1888 #endif /* __cplusplus */
1890 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */