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.
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 content file does not have a title, this method returns the filename without the extension.
932 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
934 * @remarks The @a title should be released using free().
936 * @param[in] media The handle to the media info
937 * @param[out] title The title of the content file
939 * @return @c 0 on success,
940 * otherwise a negative error value
942 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
943 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
944 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
946 int media_info_get_title(media_info_h media, char **title);
949 * @deprecated Deprecated since 4.0.
950 * @brief Gets the category of content file which User set.
951 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
953 * @remarks The @a category should be released using free().
955 * @param[in] media The handle to the media info
956 * @param[out] category The category of the content file
958 * @return @c 0 on success,
959 * otherwise a negative error value
961 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
962 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
963 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
966 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
969 * @deprecated Deprecated since 4.0.
970 * @brief Gets the location tag of content file which User set.
971 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
973 * @remarks The @a location_tag should be released using free().
975 * @param[in] media The handle to the media info
976 * @param[out] location_tag The location of the content file
978 * @return @c 0 on success,
979 * otherwise a negative error value
981 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
982 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
983 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
986 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
989 * @deprecated Deprecated since 4.0.
990 * @brief Gets the age_rating of content file which User set.
991 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
993 * @remarks The @a age_rating should be released using free().
995 * @param[in] media The handle to the media info
996 * @param[out] age_rating The age rating of the content file
998 * @return @c 0 on success,
999 * otherwise a negative error value
1001 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1002 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1003 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1006 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1009 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1010 * @brief Gets the keyword of content file which User set.
1011 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1013 * @remarks The @a keyword should be released using free().
1015 * @param[in] media The handle to the media info
1016 * @param[out] keyword The keyword of the content file
1018 * @return @c 0 on success,
1019 * otherwise a negative error value
1021 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1022 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1023 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1026 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1029 * @brief Gets the storage id of content file.
1030 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1032 * @remarks The @a storage_id should be released using free().
1034 * @param[in] media The handle to the media info
1035 * @param[out] storage_id The ID of the media storage
1037 * @return @c 0 on success,
1038 * otherwise a negative error value
1040 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1041 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1042 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1044 int media_info_get_storage_id(media_info_h media, char **storage_id);
1047 * @brief Checks whether the media is protected via DRM.
1048 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1050 * @param[in] media The handle to the media info
1051 * @param[out] is_drm @c true if media is DRM media,
1052 * otherwise @c false if media is not DRM media
1054 * @return @c 0 on success,
1055 * otherwise a negative error value
1057 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1058 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1060 int media_info_is_drm(media_info_h media, bool *is_drm);
1063 * @brief Checks whether the content file is 360 content.
1066 * @param[in] media The handle to the media info
1067 * @param[out] is_360 @c true if media is 360 content,
1068 * otherwise @c false if media is not 360 content
1070 * @return @c 0 on success,
1071 * otherwise a negative error value
1073 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1074 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1076 int media_info_is_360_content(media_info_h media, bool *is_360);
1079 * @brief Gets the storage type of content file.
1080 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1082 * @param[in] media The handle to the media info
1083 * @param[out] storage_type The storage type of the content file
1085 * @return @c 0 on success,
1086 * otherwise a negative error value
1088 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1089 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1091 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1094 * @deprecated Deprecated since 4.0. \n
1095 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1096 * @brief Gets number which represents how many times given content has been played.
1097 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1099 * @param[in] media The handle to the media info
1100 * @param[out] played_count The counter of content played
1102 * @return 0 on success,
1103 * otherwise a negative error value
1105 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1106 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1108 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1111 * @deprecated Deprecated since 4.0. \n
1112 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1113 * @brief Gets the content's played time parameter.
1114 * @details Function returns content's elapsed playback time parameter as period
1115 * starting from the beginning of the track.
1116 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1118 * @param[in] media The handle to the media info
1119 * @param[out] played_time The elapsed time of the content
1121 * @return 0 on success,
1122 * otherwise a negative error value
1124 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1125 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1127 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1130 * @brief Gets the media info from the media database.
1132 * @details This function creates a new media handle from the media database by the given @a media_id.
1133 * Media info will be created and filled with information.
1135 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1137 * @remarks The @a media should be released using media_info_destroy().
1139 * @param[in] media_id The media ID
1140 * @param[out] media The handle to the media info
1142 * @return @c 0 on success,
1143 * otherwise a negative error value
1145 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1146 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1147 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1148 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1149 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1151 * @pre This function requires opened connection to content service by media_content_connect().
1153 * @see media_content_connect()
1154 * @see media_info_destroy()
1156 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1159 * @deprecated Deprecated since 4.0. \n
1160 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1161 * @brief Increments the played count to content meta handle.
1162 * @details You can increase the played(opened) count of the content file.
1163 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1165 * @param[in] media The handle to the media info
1167 * @return 0 on success,
1168 * otherwise a negative error value
1170 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1171 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1173 * @post media_info_update_to_db()
1175 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1178 * @deprecated Deprecated since 4.0. \n
1179 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1180 * @brief Sets the played time to content meta handle.
1181 * @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.
1182 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1184 * @param[in] media The handle to the media info
1186 * @return 0 on success,
1187 * otherwise a negative error value
1189 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1190 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1192 * @post media_info_update_to_db()
1194 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1197 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1198 * @brief Sets the file name including the extension of the content file.
1199 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1201 * @param[in] media The handle to the media info
1202 * @param[in] display_name The file name including the extension of the content file.
1204 * @return @c 0 on success,
1205 * otherwise a negative error value
1207 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1208 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1209 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1211 * @post media_info_update_to_db().
1214 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1217 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1218 * @brief Sets the description of media info.
1219 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1221 * @param[in] media The handle to the media info
1222 * @param[in] description The description of the media info
1224 * @return @c 0 on success,
1225 * otherwise a negative error value
1227 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1228 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1229 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1231 * @post media_info_update_to_db().
1234 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1237 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1238 * @brief Sets the longitude of media info.
1239 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1241 * @param[in] media The handle to the media info
1242 * @param[in] longitude The longitude of the media info
1244 * @return @c 0 on success,
1245 * otherwise a negative error value
1247 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1248 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1250 * @post media_info_update_to_db().
1252 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1255 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1256 * @brief Sets the latitude of media info.
1257 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1259 * @param[in] media The handle to the media info
1260 * @param[in] latitude The latitude of the media info
1262 * @return @c 0 on success,
1263 * otherwise a negative error value
1265 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1266 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1268 * @post media_info_update_to_db().
1270 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1273 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1274 * @brief Sets the altitude of media info.
1275 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1277 * @param[in] media The handle to the media info
1278 * @param[in] altitude The altitude of the media info
1280 * @return @c 0 on success,
1281 * otherwise a negative error value
1283 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1284 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1286 * @post media_info_update_to_db().
1288 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1291 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1292 * @brief Sets the weather of media info.
1293 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1295 * @param[in] media The handle to the media info
1296 * @param[in] weather The weather of the media info
1298 * @return @c 0 on success,
1299 * otherwise a negative error value
1301 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1302 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1303 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1305 * @post media_info_update_to_db().
1308 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1311 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1312 * @brief Sets the rating of media info.
1313 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1315 * @param[in] media The handle to the media info
1316 * @param[in] rating The rating of the media info
1318 * @return @c 0 on success,
1319 * otherwise a negative error value
1321 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1322 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1324 * @post media_info_update_to_db().
1326 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1329 * @brief Sets the favorite of media info.
1330 * @details This function can mark favorite of the media. If set to @c true, this function record the time of the change moment. \n
1331 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1332 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1334 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1336 * @param[in] media The handle to the media info
1337 * @param[in] favorite Set @c true to set the media info as favorite,
1338 * otherwise set @c false to not set the media info as favorite
1340 * @return @c 0 on success,
1341 * otherwise a negative error value
1343 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1344 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1346 int media_info_set_favorite(media_info_h media, bool favorite);
1349 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1350 * @brief Sets the author of media info.
1351 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1353 * @param[in] media The handle to the media info
1354 * @param[in] author The author of the media info
1356 * @return @c 0 on success,
1357 * otherwise a negative error value
1359 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1360 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1361 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1363 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1366 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1367 * @brief Sets the provider of media info.
1368 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1370 * @param[in] media The handle to the media info
1371 * @param[in] provider The provider of the media info
1373 * @return @c 0 on success,
1374 * otherwise a negative error value
1376 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1377 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1378 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1380 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1383 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1384 * @brief Sets the content name of media info.
1385 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1387 * @param[in] media The handle to the media info
1388 * @param[in] content_name The content name of the media info
1390 * @return @c 0 on success,
1391 * otherwise a negative error value
1393 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1394 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1395 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1397 * @post media_info_update_to_db()
1399 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1402 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1403 * @brief Sets the category of media info.
1404 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1406 * @param[in] media The handle to the media info
1407 * @param[in] category The category of the media info
1409 * @return @c 0 on success,
1410 * otherwise a negative error value
1412 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1413 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1414 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1416 * @post media_info_update_to_db()
1418 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1421 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1422 * @brief Sets the location tag of media info.
1423 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1425 * @param[in] media The handle to the media info
1426 * @param[in] location_tag The location of the media info
1428 * @return @c 0 on success,
1429 * otherwise a negative error value
1431 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1432 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1433 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1435 * @post media_info_update_to_db()
1437 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1440 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1441 * @brief Sets the age rating of media info.
1442 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1444 * @param[in] media The handle to the media info
1445 * @param[in] age_rating The age rating of the media info
1447 * @return @c 0 on success,
1448 * otherwise a negative error value
1450 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1451 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1452 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1454 * @post media_info_update_to_db()
1456 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1459 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1460 * @brief Sets the keyword of media info.
1461 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1463 * @param[in] media The handle to the media info
1464 * @param[in] keyword The keyword of the media info
1466 * @return @c 0 on success,
1467 * otherwise a negative error value
1469 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1470 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1471 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1473 * @post media_info_update_to_db()
1475 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1478 * @brief Updates the media info to the media database.
1480 * @details The function updates the given media info in the media database.
1482 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1484 * @privilege %http://tizen.org/privilege/content.write
1486 * @remarks The function should be called after any change in media, to be updated to the media
1487 * database. For example, after using media_info_set_favorite()
1488 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1489 * the given media info attributes in the media database.
1491 * @param[in] media The handle to the media info
1493 * @return @c 0 on success,
1494 * otherwise a negative error value
1496 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1497 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1498 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1499 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1500 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1501 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1502 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1503 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1505 * @pre This function requires opened connection to content service by media_content_connect().
1507 * @see media_content_connect()
1508 * @see media_info_set_favorite()
1510 int media_info_update_to_db(media_info_h media);
1513 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1514 * @brief Refreshes the media metadata to the media database.
1515 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1518 * @privilege %http://tizen.org/privilege/content.write \n
1519 * %http://tizen.org/privilege/mediastorage \n
1520 * %http://tizen.org/privilege/externalstorage
1522 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1523 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1524 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1525 * If you can access both storage, you should add all privilege.
1527 * @param[in] media_id The media ID
1529 * @return @c 0 on success,
1530 * otherwise a negative error value
1532 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1533 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1534 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1535 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1536 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1537 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1538 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1539 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1541 * @pre This function requires opened connection to content service by media_content_connect().
1543 * @see media_content_connect()
1545 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1548 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1549 * @brief Sets the added time of media info.
1550 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1552 * @param[in] media The handle to the media info
1553 * @param[in] added_time The added time of the media info
1555 * @return @c 0 on success,
1556 * otherwise a negative error value
1558 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1559 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1560 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1562 * @post media_info_update_to_db()
1564 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1567 * @brief Moves the media info to the given destination path in the media database.
1568 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1569 * If the source path and destination path are the same, then this function does nothing.
1570 * If you want to refresh media information, you should use media_content_scan_file() function.
1572 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1575 * @privilege %http://tizen.org/privilege/content.write \n
1576 * %http://tizen.org/privilege/mediastorage \n
1577 * %http://tizen.org/privilege/externalstorage
1579 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1580 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1581 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1582 * If you can access both storage, you should add all privilege. \n
1583 * This function does not support USB storage. \n
1584 * Since 4.0, This function does not allow a symbolic link.
1586 * @param[in] media The handle to the media info
1587 * @param[in] dst_path The path of destination
1589 * @return @c 0 on success,
1590 * otherwise a negative error value
1592 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1593 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1594 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1595 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1596 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1597 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1598 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1599 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1601 * @pre This function requires opened connection to content service by media_content_connect().
1603 * @see media_content_connect()
1604 * @see media_content_scan_folder()
1606 int media_info_move_to_db(media_info_h media, const char* dst_path);
1609 * @brief Creates a thumbnail file for the given media, asynchronously.
1610 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1611 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1612 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1613 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1615 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1618 * @privilege %http://tizen.org/privilege/content.write \n
1619 * %http://tizen.org/privilege/mediastorage \n
1620 * %http://tizen.org/privilege/externalstorage
1622 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1623 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1624 * Items in external storage except MMC not supported.
1626 * @param[in] media The handle to the media info
1627 * @param[in] callback The callback function to be invoked
1628 * @param[in] user_data The user data to be passed to the callback function
1630 * @return @c 0 on success,
1631 * otherwise a negative error value
1633 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1634 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1635 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1636 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1637 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1638 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1639 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1640 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1642 * @pre This function requires opened connection to content service by media_content_connect().
1644 * @see media_content_connect()
1646 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1649 * @brief Cancels the creation of thumbnail file for the given media.
1650 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1653 * @privilege %http://tizen.org/privilege/content.write
1655 * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1657 * @param[in] media The handle to the media info
1659 * @return @c 0 on success,
1660 * otherwise a negative error value
1662 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1663 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1664 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1665 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1667 * @pre This function requires opened connection to content service by media_content_connect().
1668 * @see media_content_connect()
1670 int media_info_cancel_thumbnail(media_info_h media);
1673 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1674 * @brief Starts face detection for the given image, asynchronously.
1675 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1676 * The given callback function is called when the detection is completed. \n
1677 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1682 * @privilege %http://tizen.org/privilege/content.write \n
1683 * %http://tizen.org/privilege/mediastorage \n
1684 * %http://tizen.org/privilege/externalstorage
1686 * @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
1687 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1688 * Media items in external storage are not supported, with the exception of MMC items.
1690 * @param[in] media The handle to the media info
1691 * @param[in] callback The callback function to be invoked when detection is completed
1692 * @param[in] user_data The user data to be passed to the callback function
1694 * @return @c 0 on success,
1695 * otherwise a negative error value
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 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1707 * @pre This function requires opened connection to content service by media_content_connect().
1709 * @see media_content_connect()
1710 * @see media_info_cancel_face_detection()
1712 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1715 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1716 * @brief Cancels face detection of image for the given media.
1717 * @details This function cancels face detection for given media item. \n
1718 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1723 * @privilege %http://tizen.org/privilege/content.write
1725 * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1727 * @param[in] media The handle to the media info
1729 * @return @c 0 on success,
1730 * otherwise a negative error value
1732 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1733 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1734 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1735 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1737 * @pre This function requires opened connection to content service by media_content_connect().
1739 * @see media_content_connect()
1740 * @see media_info_start_face_detection()
1742 int media_info_cancel_face_detection(media_info_h media);
1745 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1746 * @brief Creates the media info handle.
1747 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1751 * @privilege %http://tizen.org/privilege/mediastorage \n
1752 * %http://tizen.org/privilege/externalstorage
1754 * @remarks The @a media should be released using media_info_destroy().
1755 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1756 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1757 * If you can access both storage, you must add all privilege.
1759 * @param[in] path The path to create the media info handle
1760 * @param[out] media The handle to the media info
1762 * @return @c 0 on success,
1763 * otherwise a negative error value
1765 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1766 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1767 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1768 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1769 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1771 * @see media_info_destroy()
1773 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1776 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1777 * @brief Inserts media info to database with media info data.
1781 * @privilege %http://tizen.org/privilege/content.write
1783 * @remarks The @a media should be released using media_info_destroy().
1785 * @param[in] media The handle to the media info
1787 * @return @c 0 on success,
1788 * otherwise a negative error value
1790 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1791 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1792 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1793 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1795 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1798 * @deprecated Deprecated since 4.0.
1799 * @brief Sets the title of media info handle.
1802 * @param[in] media The handle to the media info
1803 * @param[in] title The title of media info handle
1805 * @return @c 0 on success,
1806 * otherwise a negative error value
1808 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1809 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1810 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1812 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1815 * @deprecated Deprecated since 4.0.
1816 * @brief Sets the album of media info handle.
1819 * @param[in] media The handle to the media info
1820 * @param[in] album The album of the media
1822 * @return @c 0 on success,
1823 * otherwise a negative error value
1825 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1826 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1827 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1829 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1832 * @deprecated Deprecated since 4.0.
1833 * @brief Sets the artist of media info handle.
1836 * @param[in] media The handle to the media info
1837 * @param[in] artist The artist of media info handle
1839 * @return @c 0 on success,
1840 * otherwise a negative error value
1842 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1843 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1844 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1846 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1849 * @deprecated Deprecated since 4.0.
1850 * @brief Sets the genre of media info handle.
1853 * @param[in] media The handle to the media info
1854 * @param[in] genre The genre of media info handle
1856 * @return @c 0 on success,
1857 * otherwise a negative error value
1859 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1860 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1861 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1863 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1866 * @deprecated Deprecated since 4.0.
1867 * @brief Sets the recorded date of media info handle.
1870 * @param[in] media The handle to the media info
1871 * @param[in] recorded_date The recorded date of media info handle
1873 * @return @c 0 on success,
1874 * otherwise a negative error value
1876 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1877 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1878 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1880 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__ */