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_MEDIA_INFORMATION_H__
19 #define __TIZEN_MEDIA_INFORMATION_H__
21 #include <media_content_type.h>
27 #endif /* __cplusplus */
31 * @brief This file contains the media info API and related functions to proceed with it. \n
32 * You can use the functions to insert, delete, count and get list of content files from media database. \n
33 * You can get properties of content file such as size, mime_type, modified_time etc. And you can set properties such as provider, favorite etc. \n
34 * And you can get bookmark, face, tag info related the content file.
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 API to insert content files into the media database. \n
46 * You can use media_content_scan_file()/media_content_scan_folder() API instead of this API.
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 You must release the handle using media_info_destroy(). \n
56 * You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
57 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
58 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
59 * If you can access both storage, you must add all privilege.
60 * @remarks Since 4.0, this function is related to the following feature:\n
61 * %http://tizen.org/feature/content.scanning.others\n
62 * If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
64 * @param[in] path The path of the content file to add
65 * @param[out] info The handle of the inserted content file
67 * @return @c 0 on success,
68 * otherwise a negative error value
70 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
71 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
72 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
73 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
74 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
75 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
76 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
77 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
78 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
80 * @pre This function requires opened connection to content service by media_content_connect().
82 * @see media_content_connect()
83 * @see media_content_scan_file()
84 * @see media_content_scan_folder()
86 int media_info_insert_to_db(const char *path, media_info_h *info);
89 * @brief Inserts content files into the media database, asynchronously.
90 * @details This function can insert multiple content files into the media database.
92 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
95 * @privilege %http://tizen.org/privilege/content.write \n
96 * %http://tizen.org/privilege/mediastorage \n
97 * %http://tizen.org/privilege/externalstorage
99 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
100 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
101 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
102 * If you can access both storage, you must add all privilege.
103 * @remarks Since 4.0, this function is related to the following feature:\n
104 * %http://tizen.org/feature/content.scanning.others\n
105 * If this feature is not suppported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
107 * @param[in] path_array The path array of the content files to add
108 * @param[in] array_length The length of the array
109 * @param[in] callback The callback to be invoked when media items inserted completely
110 * @param[in] user_data The user data to be passed to the callback function
112 * @return @c 0 on success,
113 * otherwise a negative error value
115 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
116 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
117 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
118 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
119 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
120 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
121 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
122 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
123 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
125 * @pre This function requires opened connection to content service by media_content_connect().
127 * @see media_content_connect()
128 * @see media_insert_completed_cb()
130 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
133 * @deprecated Deprecated since 4.0.
134 * @brief Inserts the burst shot images into the media database, asynchronously.
135 * @details This function inserts burst images into the media database.
136 * media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.
138 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
141 * @privilege %http://tizen.org/privilege/content.write \n
142 * %http://tizen.org/privilege/mediastorage \n
143 * %http://tizen.org/privilege/externalstorage
145 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
146 * If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
147 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
148 * If you can access both storage, you must add all privilege.
150 * @param[in] path_array The path array of the burst shot images to add
151 * @param[in] array_length The length of the array
152 * @param[in] callback The callback to be invoked when the images are inserted completely
153 * @param[in] user_data The user data to be passed to the callback function
155 * @return @c 0 on success,
156 * otherwise a negative error value
158 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
159 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
160 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
161 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
162 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
163 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
164 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
165 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
167 * @pre This function requires opened connection to content service by media_content_connect().
169 * @see media_content_connect()
170 * @see media_insert_burst_shot_completed_cb()
172 int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
175 * @brief Deletes the media information from the media database.
176 * @details This function only remove media information in the media database. \n
177 * You can use media_content_scan_file()/media_content_scan_folder() API instead of this API if file is removed from the file system.
179 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
182 * @privilege %http://tizen.org/privilege/content.write
184 * @param[in] media_id The media ID. It can get from media info handle.
186 * @return @c 0 on success,
187 * otherwise a negative error value
189 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
190 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
191 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
192 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
193 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
194 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
195 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
197 * @pre This function requires opened connection to content service by media_content_connect().
199 * @see media_content_connect()
200 * @see media_content_scan_file()
201 * @see media_content_scan_folder()
203 int media_info_delete_from_db(const char *media_id);
206 * @deprecated Deprecated since 4.0.
207 * @brief Deletes media information that meets the conditions of the filter from the media database.
208 * @details This function can delete multiple media information from the media database.
210 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
213 * @privilege %http://tizen.org/privilege/content.write
215 * @param[in] filter The filter handle
217 * @return @c 0 on success,
218 * otherwise a negative error value
220 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
221 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
222 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
223 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
224 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
225 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
226 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
228 * @pre This function requires opened connection to content service by media_content_connect().
230 * @see media_content_connect()
231 * @see media_filter_create()
233 int media_info_delete_batch_from_db(filter_h filter) TIZEN_DEPRECATED_API;
237 * @brief Destroys media info.
238 * @details The function frees all resources related to the media info handle. This handle
239 * can no longer be used to perform any operation. New media info handle has to
240 * be created before the next usage.
242 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
244 * @param[in] media The media info handle
246 * @return @c 0 on success,
247 * otherwise a negative error value
249 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
250 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
252 * @pre Get copy of media_info handle by calling media_info_clone().
254 * @see media_info_clone()
256 int media_info_destroy(media_info_h media);
259 * @brief Clones the media info handle.
261 * @details This function copies the media info handle from a source to the destination.
262 * There is no media_info_create() function. The media_info_h is created internally and
263 * available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
264 * To use this handle outside of these foreach functions, use this function.
266 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
268 * @remarks You must release the destination handle using media_info_destroy().
270 * @param[out] dst The destination handle to the media info
271 * @param[in] src The source handle to media info
273 * @return @c 0 on success,
274 * otherwise a negative error value
276 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
277 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
278 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
280 * @see media_info_destroy()
281 * @see media_album_foreach_media_from_db()
282 * @see media_playlist_foreach_media_from_db()
283 * @see media_group_foreach_media_from_db()
284 * @see media_tag_foreach_media_from_db()
285 * @see media_info_foreach_media_from_db()
286 * @see media_info_insert_to_db()
287 * @see media_folder_foreach_media_from_db()
289 int media_info_clone(media_info_h *dst, media_info_h src);
292 * @brief Gets the count of media info for the passed @a filter from the media database.
293 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
295 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
298 * @param[in] filter The handle to filter
299 * @param[out] media_count The count of media
301 * @return @c 0 on success,
302 * otherwise a negative error value
304 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
305 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
306 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
307 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
308 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
310 * @pre This function requires opened connection to content service by media_content_connect().
312 * @see media_content_connect()
313 * @see media_filter_create()
315 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
318 * @brief Iterates through media info from the media database.
319 * @details This function gets all media info handles meeting the given @a filter.
320 * The @a callback function will be invoked for every retrieved media info.
321 * If @c NULL is passed to the @a filter, then no filtering is applied.
323 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
325 * @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function,
326 * your callback function is invoked as inline function.
327 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
328 * We do not recommend you call updating DB function in callback of foreach function.
330 * @param[in] filter The media info handle filter
331 * @param[in] callback The callback function to be invoked
332 * @param[in] user_data The user data to be passed to the callback function
334 * @return @c 0 on success,
335 * otherwise a negative error value
337 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
338 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
339 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
340 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
341 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
342 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
344 * @pre This function requires opened connection to content service by media_content_connect().
345 * @post This function invokes media_info_cb().
347 * @see media_content_connect()
348 * @see #media_info_cb
349 * @see media_filter_create()
351 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
354 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
355 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
357 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
359 * @param[in] media_id The ID of the media info
360 * @param[in] filter The handle to the media filter
361 * @param[out] tag_count The count of the media tag
363 * @return @c 0 on success,
364 * otherwise a negative error value
366 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
367 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
368 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
369 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
370 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
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 ID of the media info
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
399 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
401 * @pre This function requires opened connection to content service by media_content_connect().
402 * @post This function invokes media_tag_cb().
404 * @see media_content_connect()
406 * @see media_filter_create()
408 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
411 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
412 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
414 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
416 * @param[in] media_id The ID of the media info
417 * @param[in] filter The handle to the media filter
418 * @param[out] bookmark_count The count of the media tag
420 * @return @c 0 on success,
421 * otherwise a negative error value
423 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
424 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
425 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
426 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
427 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
429 * @pre This function requires opened connection to content service by media_content_connect().
431 * @see media_content_connect()
432 * @see media_filter_create()
434 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
437 * @brief Iterates through the media bookmark in the given media info from the media database.
438 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
439 * If @c NULL is passed to the @a filter, then no filtering is applied.
441 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
443 * @param[in] media_id The ID of the media info
444 * @param[in] filter The handle to the media filter
445 * @param[in] callback The callback function to be invoked
446 * @param[in] user_data The user data to be passed to the callback function
448 * @return @c 0 on success,
449 * otherwise a negative error value
451 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
452 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
453 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
454 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
455 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
456 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
458 * @pre This function requires opened connection to content service by media_content_connect().
459 * @post This function invokes media_bookmark_cb().
461 * @see media_content_connect()
462 * @see media_bookmark_cb()
463 * @see media_filter_create()
465 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
468 * @brief Gets the number of face for the passed @a media_id from the media database.
469 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
473 * @param[in] media_id media id
474 * @param[in] filter The handle to the media filter
475 * @param[out] face_count The count of media face
477 * @return 0 on success, otherwise a negative error value.
479 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
480 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
481 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
482 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
484 * @pre This function requires opened connection to content service by media_content_connect().
485 * @see media_content_connect()
486 * @see media_filter_create()
489 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
492 * @brief Iterates through the media files with optional @a media_id in the given @a face @a face from the media database.
493 * @details This function gets all media face info associated with the given media id and
494 * meeting desired filter option and calls @a callback for
495 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
499 * @param [in] media_id media id
500 * @param[in] filter The handle to the media filter
501 * @param [in] callback The callback function to invoke
502 * @param [in] user_data The user data to be passed to the callback function
504 * @return 0 on success, otherwise a negative error value.
506 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
507 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
508 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
509 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
511 * @pre This function requires opened connection to content service by media_content_connect().
512 * @see media_content_connect()
513 * @see media_filter_create()
516 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
519 * @brief Gets the image metadata handle for a given media info
520 * @details This function returns an image metadata handle retrieved from the media info.
522 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
524 * @remarks You must release the @a image handle using image_meta_destroy().
526 * @param[in] media The media info handle
527 * @param[out] image A handle to image metadata
529 * @return @c 0 on success,
530 * otherwise a negative error value
532 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
533 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
534 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
536 * @see image_meta_destroy()
538 int media_info_get_image(media_info_h media, image_meta_h *image);
541 * @brief Gets a video metadata handle for a given media info.
542 * @details This function returns a video metadata handle retrieved from the media info handle.
544 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
546 * @remarks You must release the @a video handle using video_meta_destroy().
548 * @param[in] media The media info handle
549 * @param[out] video A handle to the video meta
551 * @return @c 0 on success,
552 * otherwise a negative error value
554 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
555 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
556 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
558 * @see video_meta_destroy()
560 int media_info_get_video(media_info_h media, video_meta_h *video);
563 * @brief Gets an audio metadata handle for a given media info.
564 * @details This function returns an audio metadata handle retrieved from the media info handle.
566 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
568 * @remarks You must release the @a audio handle using audio_meta_destroy().
570 * @param[in] media The media info handle
571 * @param[out] audio A handle to the audio meta
573 * @return @c 0 on success,
574 * otherwise a negative error value
576 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
577 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
578 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
580 * @see audio_meta_destroy()
582 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
585 * @brief Gets the media ID
586 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
588 * @param[in] media The media info handle
589 * @param[out] media_id The media ID
591 * @return @c 0 on success,
592 * otherwise a negative error value
594 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
595 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
596 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
598 int media_info_get_media_id(media_info_h media, char **media_id);
601 * @brief Gets the full path of the content file.
602 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
604 * @remarks You must release @a path using free().
606 * @param[in] media The media info handle
607 * @param[out] path The full path of the content file
609 * @return @c 0 on success,
610 * otherwise a negative error value
612 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
613 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
614 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
617 int media_info_get_file_path(media_info_h media, char **path);
620 * @brief Gets the file name including the extension of the content file.
621 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
623 * @remarks You must release @a name using free().
625 * @param[in] media The media info handle
626 * @param[out] name The file name including the extension of the content file
628 * @return @c 0 on success,
629 * otherwise a negative error value
631 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
632 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
633 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
635 int media_info_get_display_name(media_info_h media, char **name);
638 * @brief Gets the content type of the content file.
639 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
641 * @param[in] media The media info handle
642 * @param[out] type The content type of the content file (#media_content_type_e)
644 * @return @c 0 on success,
645 * otherwise a negative error value
647 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
648 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
650 * @see #media_content_type_e
652 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
655 * @brief Gets the MIME type of the content file.
656 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
658 * @remarks You must release @a mime_type using free().
660 * @param[in] media The media info handle
661 * @param[out] mime_type The MIME type of the content file
663 * @return @c 0 on success,
664 * otherwise a negative error value
666 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
667 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
668 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
670 int media_info_get_mime_type(media_info_h media, char **mime_type);
673 * @brief Gets the content file size.
674 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
676 * @param[in] media The media info handle
677 * @param[out] size The content file size
679 * @return @c 0 on success,
680 * otherwise a negative error value
682 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
683 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
685 int media_info_get_size(media_info_h media, unsigned long long *size);
688 * @brief Gets the added time of the content file.
689 * @details The added time refers to the time that content file was first added to media database.
690 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
692 * @param[in] media The media info handle
693 * @param[out] added_time The added time to the media database
695 * @return @c 0 on success,
696 * otherwise a negative error value
698 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
699 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
701 int media_info_get_added_time(media_info_h media, time_t *added_time);
704 * @brief Gets the modified time of the content file.
705 * @details The modified time refers to the last modification time provided by the file system.
706 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
708 * @param[in] media The media info handle
709 * @param[out] time The last modification time of the content file
711 * @return @c 0 on success,
712 * otherwise a negative error value
714 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
715 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
717 int media_info_get_modified_time(media_info_h media, time_t *time);
720 * @brief Gets the timeline of content file.
721 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
722 * Otherwise, timeline value is the same as modified time.
723 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
725 * @param[in] media The media info handle
726 * @param[out] time The timeline of content file
728 * @return @c 0 on success,
729 * otherwise a negative error value
731 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
732 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
734 int media_info_get_timeline(media_info_h media, time_t *time);
737 * @brief Gets the thumbnail path of content file.
738 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
740 * @remarks You must release @a path using free(). \n
741 * If the thumbnail extraction for the given media has not been requested yet, this API returns NULL. To create a thumbnail, you should use media_info_create_thumbnail() API. \n
742 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
744 * @param[in] media The media info handle
745 * @param[out] path The thumbnail path
747 * @return @c 0 on success,
748 * otherwise a negative error value
750 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
751 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
752 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
754 int media_info_get_thumbnail_path(media_info_h media, char **path);
757 * @brief Gets the description of content file.
758 * @details If the value is an empty string, the method returns "Unknown". \n
759 * Since 3.0, if the media info has no description, the method returns empty string.
760 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
762 * @remarks You must release @a description using free().
764 * @param[in] media The media info handle
765 * @param[out] description The description of the content file
767 * @return @c 0 on success,
768 * otherwise a negative error value
770 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
771 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
772 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
774 int media_info_get_description(media_info_h media, char **description);
777 * @brief Gets the longitude of content file.
778 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
780 * @param[in] media The media info handle
781 * @param[out] longitude The longitude of the content file
783 * @return @c 0 on success,
784 * otherwise a negative error value
786 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
787 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
789 int media_info_get_longitude(media_info_h media, double *longitude);
792 * @brief Gets the latitude of content file.
793 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
795 * @param[in] media The media info handle
796 * @param[out] latitude The latitude of the content file
798 * @return @c 0 on success,
799 * otherwise a negative error value
801 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
802 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
805 int media_info_get_latitude(media_info_h media, double* latitude);
808 * @brief Gets the altitude of content file.
809 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
811 * @param[in] media The media info handle
812 * @param[out] altitude The altitude of the content file
814 * @return @c 0 on success,
815 * otherwise a negative error value
817 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
818 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
820 int media_info_get_altitude(media_info_h media, double* altitude);
823 * @deprecated Deprecated since 4.0.
824 * @brief Gets the weather of content file.
825 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
827 * @param[in] media The media info handle
828 * @param[out] weather The weather of the content file
830 * @return @c 0 on success,
831 * otherwise a negative error value
833 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
834 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
835 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
837 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
840 * @brief Gets the rating of content file.
841 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
843 * @param[in] media The media info handle
844 * @param[out] rating The rating of the content file
846 * @return @c 0 on success,
847 * otherwise a negative error value
849 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
850 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
852 int media_info_get_rating(media_info_h media, int *rating);
855 * @brief Gets the favorite status of content file which User set.
856 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
858 * @param[in] media The media info handle
859 * @param[out] favorite @c true if content file is set as favorite,
860 * otherwise @c false if content file is not set as favorite
862 * @return @c 0 on success,
863 * otherwise a negative error value
865 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
866 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
868 * @see media_info_set_favorite()
870 int media_info_get_favorite(media_info_h media, bool* favorite);
873 * @deprecated Deprecated since 4.0.
874 * @brief Gets the author of content file.
875 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
877 * @remarks You must release @a author using free().
879 * @param[in] media The media info handle
880 * @param[out] author The author of the content file
882 * @return @c 0 on success,
883 * otherwise a negative error value
885 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
886 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
887 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
889 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
892 * @deprecated Deprecated since 4.0.
893 * @brief Gets the provider of content file which User set.
894 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
896 * @remarks You must release @a provider using free().
898 * @param[in] media The media info handle
899 * @param[out] provider The provider of the content file
901 * @return @c 0 on success,
902 * otherwise a negative error value
904 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
905 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
906 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
908 * @see media_info_set_provider()
910 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
913 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
914 * @brief Gets the content name of content file which User set.
915 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
917 * @remarks You must release @a content_name using free().
919 * @param[in] media The media info handle
920 * @param[out] content_name The content name of the content file
922 * @return @c 0 on success,
923 * otherwise a negative error value
925 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
926 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
927 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
929 * @see media_info_set_content_name()
931 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
934 * @brief Gets the title of content file.
935 * @details If the content file does not have a title, this method returns the filename without the extension.
937 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
939 * @remarks You must release @a title using free().
941 * @param[in] media The media info handle
942 * @param[out] title The title of the content file
944 * @return @c 0 on success,
945 * otherwise a negative error value
947 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
948 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
949 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
951 int media_info_get_title(media_info_h media, char **title);
954 * @deprecated Deprecated since 4.0.
955 * @brief Gets the category of content file which User set.
956 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
958 * @remarks You must release @a category using free().
960 * @param[in] media The media info handle
961 * @param[out] category The category of the content file
963 * @return @c 0 on success,
964 * otherwise a negative error value
966 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
967 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
968 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
970 * @see media_info_set_category()
972 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
975 * @deprecated Deprecated since 4.0.
976 * @brief Gets the location tag of content file which User set.
977 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
979 * @remarks You must release @a location_tag using free().
981 * @param[in] media The media info handle
982 * @param[out] location_tag The location of the content file
984 * @return @c 0 on success,
985 * otherwise a negative error value
987 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
988 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
989 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
991 * @see media_info_set_location_tag()
993 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
996 * @deprecated Deprecated since 4.0.
997 * @brief Gets the age_rating of content file which User set.
998 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1000 * @remarks You must release @a age_rating using free().
1002 * @param[in] media The media info handle
1003 * @param[out] age_rating The age rating of the content file
1005 * @return @c 0 on success,
1006 * otherwise a negative error value
1008 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1009 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1010 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1012 * @see media_info_set_age_rating()
1014 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1017 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1018 * @brief Gets the keyword of content file which User set.
1019 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1021 * @remarks You must release @a keyword using free().
1023 * @param[in] media The media info handle
1024 * @param[out] keyword The keyword of the content file
1026 * @return @c 0 on success,
1027 * otherwise a negative error value
1029 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1030 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1031 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1033 * @see media_info_set_keyword()
1035 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1038 * @brief Gets the storage id of content file.
1039 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1041 * @remarks You must release @a storage_id using free().
1043 * @param[in] media The media info handle
1044 * @param[out] storage_id The storage id of the content file
1046 * @return @c 0 on success,
1047 * otherwise a negative error value
1049 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1050 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1051 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1053 int media_info_get_storage_id(media_info_h media, char **storage_id);
1056 * @brief Checks whether the media is protected via DRM.
1057 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1059 * @param[in] media The media info handle
1060 * @param[out] is_drm @c true if media is DRM media,
1061 * otherwise @c false if media is not DRM media
1063 * @return @c 0 on success,
1064 * otherwise a negative error value
1066 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1067 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1069 int media_info_is_drm(media_info_h media, bool *is_drm);
1072 * @brief Checks whether the content file is 360 content.
1075 * @param[in] media The media info handle
1076 * @param[out] is_360 @c true if media is 360 content,
1077 * otherwise @c false if media is not 360 content
1079 * @return @c 0 on success,
1080 * otherwise a negative error value
1082 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1083 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1085 int media_info_is_360_content(media_info_h media, bool *is_360);
1088 * @brief Gets the storage type of content file.
1089 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1091 * @param[in] media The media info handle
1092 * @param[out] storage_type The storage type of the content file
1094 * @return @c 0 on success,
1095 * otherwise a negative error value
1097 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1098 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1100 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1103 * @deprecated Deprecated since 4.0. \n
1104 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1105 * @brief Gets number which represents how many times given content has been played.
1106 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1108 * @param [in] media The handle to media info
1109 * @param [out] played_count The counter of content played
1111 * @return 0 on success,
1112 * otherwise a negative error value
1114 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1115 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1117 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1120 * @deprecated Deprecated since 4.0. \n
1121 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1122 * @brief Gets the content's played time parameter.
1123 * @details Function returns content's elapsed playback time parameter as period
1124 * starting from the beginning of the track.
1125 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1127 * @param [in] media The handle to media info
1128 * @param [out] played_time The elapsed time of the content
1130 * @return 0 on success,
1131 * otherwise a negative error value
1133 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1134 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1136 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1139 * @brief Gets the media info from the media database.
1141 * @details This function creates a new media handle from the media database by the given @a media_id.
1142 * Media info will be created and filled with information.
1144 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1146 * @remarks You must release @a media using media_tag_destroy().
1148 * @param[in] media_id The ID of media info
1149 * @param[out] media The media handle associated with the media ID
1151 * @return @c 0 on success,
1152 * otherwise a negative error value
1154 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1155 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1156 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1157 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1158 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1159 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1161 * @pre This function requires opened connection to content service by media_content_connect().
1163 * @see media_content_connect()
1164 * @see media_info_destroy()
1166 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1169 * @deprecated Deprecated since 4.0. \n
1170 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1171 * @brief Increments the played count to content meta handle.
1172 * @details You can increase the played(opened) count of the content file.
1173 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1175 * @param [in] media The handle to media info
1177 * @return 0 on success,
1178 * otherwise a negative error value
1180 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1181 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1183 * @post media_info_update_to_db()
1185 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1188 * @deprecated Deprecated since 4.0. \n
1189 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1190 * @brief Sets the played time to content meta handle.
1191 * @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.
1192 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1194 * @param [in] media The handle to media info
1196 * @return 0 on success,
1197 * otherwise a negative error value
1199 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1200 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1202 * @post media_info_update_to_db()
1204 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1207 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1208 * @brief Sets the file name including the extension of the content file.
1209 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1211 * @param[in] media The media info handle
1212 * @param[in] display_name The file name including the extension of the content file.
1214 * @return @c 0 on success,
1215 * otherwise a negative error value
1217 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1218 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1219 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1221 * @post media_info_update_to_db().
1224 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1227 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1228 * @brief Sets the description of media info.
1229 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1231 * @param[in] media The media info handle
1232 * @param[in] description The description of the media info
1234 * @return @c 0 on success,
1235 * otherwise a negative error value
1237 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1238 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1239 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1241 * @post media_info_update_to_db().
1244 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1247 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1248 * @brief Sets the longitude of media info.
1249 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1251 * @param[in] media The media info handle
1252 * @param[in] longitude The longitude of the media info
1254 * @return @c 0 on success,
1255 * otherwise a negative error value
1257 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1258 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1260 * @post media_info_update_to_db().
1262 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1265 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1266 * @brief Sets the latitude of media info.
1267 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1269 * @param[in] media The media info handle
1270 * @param[in] latitude The latitude of the media info
1272 * @return @c 0 on success,
1273 * otherwise a negative error value
1275 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1276 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1278 * @post media_info_update_to_db().
1280 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1283 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1284 * @brief Sets the altitude of media info.
1285 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1287 * @param[in] media The media info handle
1288 * @param[in] altitude The altitude of the media info
1290 * @return @c 0 on success,
1291 * otherwise a negative error value
1293 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1294 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1296 * @post media_info_update_to_db().
1298 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1301 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1302 * @brief Sets the weather of media info.
1303 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1305 * @param[in] media The media info handle
1306 * @param[in] weather The weather of the media info
1308 * @return @c 0 on success,
1309 * otherwise a negative error value
1311 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1312 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1313 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1315 * @post media_info_update_to_db().
1318 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1321 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1322 * @brief Sets the rating of media info.
1323 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1325 * @param[in] media The media info handle
1326 * @param[in] rating The rating of the media info
1328 * @return @c 0 on success,
1329 * otherwise a negative error value
1331 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1332 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1334 * @post media_info_update_to_db().
1336 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1339 * @brief Sets the favorite of media info.
1340 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1341 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1342 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1344 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1346 * @param[in] media The media info handle
1347 * @param[in] favorite Set @c true to set the media info as favorite,
1348 * otherwise set @c false to not set the media info as favorite
1350 * @return @c 0 on success,
1351 * otherwise a negative error value
1353 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1354 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1356 int media_info_set_favorite(media_info_h media, bool favorite);
1359 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1360 * @brief Sets the author of media info.
1361 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1363 * @param[in] media The media info handle
1364 * @param[in] author The author of the media info
1366 * @return @c 0 on success,
1367 * otherwise a negative error value
1369 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1370 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1371 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1373 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1376 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1377 * @brief Sets the provider of media info.
1378 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1380 * @param[in] media The media info handle
1381 * @param[in] provider The provider of the media info
1383 * @return @c 0 on success,
1384 * otherwise a negative error value
1386 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1387 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1388 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1390 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1393 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1394 * @brief Sets the content name of media info.
1395 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1397 * @param[in] media The media info handle
1398 * @param[in] content_name The content name of the media info
1400 * @return @c 0 on success,
1401 * otherwise a negative error value
1403 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1404 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1405 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1407 * @post media_info_update_to_db()
1409 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1412 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1413 * @brief Sets the category of media info.
1414 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1416 * @param[in] media The media info handle
1417 * @param[in] category The category of the media info
1419 * @return @c 0 on success,
1420 * otherwise a negative error value
1422 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1423 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1424 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1426 * @post media_info_update_to_db()
1428 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1431 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1432 * @brief Sets the location tag of media info.
1433 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1435 * @param[in] media The media info handle
1436 * @param[in] location_tag The location of the media info
1438 * @return @c 0 on success,
1439 * otherwise a negative error value
1441 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1442 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1443 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1445 * @post media_info_update_to_db()
1447 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1450 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1451 * @brief Sets the age rating of media info.
1452 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1454 * @param[in] media The media info handle
1455 * @param[in] age_rating The age rating of the media info
1457 * @return @c 0 on success,
1458 * otherwise a negative error value
1460 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1461 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1462 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1464 * @post media_info_update_to_db()
1466 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1469 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1470 * @brief Sets the keyword of media info.
1471 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1473 * @param[in] media The media info handle
1474 * @param[in] keyword The keyword of the media info
1476 * @return @c 0 on success,
1477 * otherwise a negative error value
1479 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1480 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1481 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1483 * @post media_info_update_to_db()
1485 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1488 * @brief Updates the media info to the media database.
1490 * @details The function updates the given media info in the media database.
1492 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1494 * @privilege %http://tizen.org/privilege/content.write
1496 * @remarks The function should be called after any change in media, to be updated to the media
1497 * database. For example, after using media_info_set_favorite()
1498 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1499 * the given media info attributes in the media database.
1501 * @param[in] media The media info handle
1503 * @return @c 0 on success,
1504 * otherwise a negative error value
1506 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1507 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1508 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1509 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1510 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1511 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1512 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1513 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1515 * @pre This function requires opened connection to content service by media_content_connect().
1517 * @see media_content_connect()
1518 * @see media_info_set_favorite()
1519 * @see media_info_set_provider()
1520 * @see media_info_set_category()
1521 * @see media_info_set_location_tag()
1522 * @see media_info_set_age_rating()
1524 int media_info_update_to_db(media_info_h media);
1527 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1528 * @brief Refreshes the media metadata to the media database.
1529 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1532 * @privilege %http://tizen.org/privilege/content.write \n
1533 * %http://tizen.org/privilege/mediastorage \n
1534 * %http://tizen.org/privilege/externalstorage
1536 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1537 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1538 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1539 * If you can access both storage, you should add all privilege.
1541 * @param[in] media_id The ID of the media info
1543 * @return @c 0 on success,
1544 * otherwise a negative error value
1546 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1547 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1548 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1549 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1550 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1551 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1552 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1553 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1555 * @pre This function requires opened connection to content service by media_content_connect().
1557 * @see media_content_connect()
1559 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1562 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1563 * @brief Sets the added time of media info.
1564 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1566 * @param[in] media The media info handle
1567 * @param[in] added_time The added time of the media info
1569 * @return @c 0 on success,
1570 * otherwise a negative error value
1572 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1573 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1574 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1576 * @post media_info_update_to_db()
1578 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1581 * @brief Moves the media info to the given destination path in the media database.
1582 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1583 * If the source path and destination path are the same, then this API does nothing.
1584 * If you want to refresh media information, you should use media_content_scan_file() API.
1586 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1589 * @privilege %http://tizen.org/privilege/content.write \n
1590 * %http://tizen.org/privilege/mediastorage \n
1591 * %http://tizen.org/privilege/externalstorage
1593 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1594 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1595 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1596 * If you can access both storage, you should add all privilege. \n
1597 * This API does not support USB storage.
1599 * @param[in] media The media info handle
1600 * @param[in] dst_path The path of destination
1602 * @return @c 0 on success,
1603 * otherwise a negative error value
1605 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1606 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1607 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1608 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1609 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1610 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1611 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1612 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1614 * @pre This function requires opened connection to content service by media_content_connect().
1616 * @see media_content_connect()
1617 * @see media_content_scan_folder()
1619 int media_info_move_to_db(media_info_h media, const char* dst_path);
1622 * @brief Creates a thumbnail file for the given media, asynchronously.
1623 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1624 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1625 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1626 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1628 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1631 * @privilege %http://tizen.org/privilege/content.write \n
1632 * %http://tizen.org/privilege/mediastorage \n
1633 * %http://tizen.org/privilege/externalstorage
1635 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1636 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1637 * Items in external storage except MMC not supported.
1639 * @param[in] media The media info handle
1640 * @param[in] callback The callback function to be invoked
1641 * @param[in] user_data The user data to be passed to the callback function
1643 * @return @c 0 on success,
1644 * otherwise a negative error value
1646 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1647 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1648 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1649 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1650 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1651 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1652 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1653 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1655 * @pre This function requires opened connection to content service by media_content_connect().
1657 * @see media_content_connect()
1659 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1662 * @brief Cancels the creation of thumbnail file for the given media.
1663 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1666 * @privilege %http://tizen.org/privilege/content.write
1668 * @remarks If you request cancel for the already thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1670 * @param[in] media The media info handle
1672 * @return @c 0 on success,
1673 * otherwise a negative error value
1675 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1676 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1677 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1678 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1680 * @pre This function requires opened connection to content service by media_content_connect().
1681 * @see media_content_connect()
1683 int media_info_cancel_thumbnail(media_info_h media);
1686 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1687 * @brief Starts face detection for the given image, asynchronously.
1688 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1689 * The given callback function is called when the detection is completed. \n
1690 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1695 * @privilege %http://tizen.org/privilege/content.write \n
1696 * %http://tizen.org/privilege/mediastorage \n
1697 * %http://tizen.org/privilege/externalstorage
1699 * @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
1700 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1701 * Media items in external storage are not supported, with the exception of MMC items.
1703 * @param[in] media The media info handle
1704 * @param[in] callback The callback function to be invoked when detection is completed
1705 * @param[in] user_data The user data to be passed to the callback function
1707 * @return @c 0 on success,
1708 * otherwise a negative error value
1710 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1711 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1712 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1713 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1714 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1715 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1716 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1717 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1718 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1720 * @pre This function requires opened connection to content service by media_content_connect().
1722 * @see media_content_connect()
1723 * @see media_info_cancel_face_detection()
1725 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1728 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1729 * @brief Cancels face detection of image for the given media.
1730 * @details This function cancels face detection for given media item. \n
1731 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() API will not be invoked.
1736 * @privilege %http://tizen.org/privilege/content.write
1738 * @remarks If face detection is already done when you request the cancellation, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1740 * @param[in] media The media info handle
1742 * @return @c 0 on success,
1743 * otherwise a negative error value
1745 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1746 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1747 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1748 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1750 * @pre This function requires opened connection to content service by media_content_connect().
1752 * @see media_content_connect()
1753 * @see media_info_start_face_detection()
1755 int media_info_cancel_face_detection(media_info_h media);
1758 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1759 * @brief Creates the media info handle.
1760 * @details If the information about the file that is already known, you can use this API to generate empty handler.
1764 * @privilege %http://tizen.org/privilege/mediastorage \n
1765 * %http://tizen.org/privilege/externalstorage
1767 * @remarks If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1768 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1769 * If you can access both storage, you must add all privilege.
1771 * @param[in] path The path to create the media info handle
1772 * @param[out] media The media info handle
1774 * @return @c 0 on success,
1775 * otherwise a negative error value
1777 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1778 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1779 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1780 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1781 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1783 * @see media_info_destroy()
1785 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1788 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1789 * @brief Inserts media info to database with media info data.
1792 * @remarks You must release @a info using media_info_destroy().
1795 * @privilege %http://tizen.org/privilege/content.write
1797 * @param[in] media The media info handle to be inserted
1799 * @return @c 0 on success,
1800 * otherwise a negative error value
1802 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1803 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1804 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1805 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1807 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1810 * @deprecated Deprecated since 4.0.
1811 * @brief Sets the title of media info handle.
1814 * @param[in] media The media info handle
1815 * @param[in] title The title of media info handle
1817 * @return @c 0 on success,
1818 * otherwise a negative error value
1820 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1821 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1822 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1824 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1827 * @deprecated Deprecated since 4.0.
1828 * @brief Sets the album of media info handle.
1831 * @param[in] media The media info handle
1832 * @param[in] album The album of media info handle
1834 * @return @c 0 on success,
1835 * otherwise a negative error value
1837 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1838 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1839 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1841 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1844 * @deprecated Deprecated since 4.0.
1845 * @brief Sets the artist of media info handle.
1848 * @param[in] media The media info handle
1849 * @param[in] artist The artist of media info handle
1851 * @return @c 0 on success,
1852 * otherwise a negative error value
1854 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1855 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1856 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1858 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1861 * @deprecated Deprecated since 4.0.
1862 * @brief Sets the genre of media info handle.
1865 * @param[in] media The media info handle
1866 * @param[in] genre The genre of media info handle
1868 * @return @c 0 on success,
1869 * otherwise a negative error value
1871 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1872 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1873 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1875 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1878 * @deprecated Deprecated since 4.0.
1879 * @brief Sets the recorded date of media info handle.
1882 * @param[in] media The media info handle
1883 * @param[in] recorded_date The recorded date of media info handle
1885 * @return @c 0 on success,
1886 * otherwise a negative error value
1888 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1889 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1890 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1892 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1900 #endif /* __cplusplus */
1902 #endif /* __TIZEN_MEDIA_INFORMATION_H__ */