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.
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 function, you should add privilege http://tizen.org/privilege/mediastorage. \n
101 * Or if you want to access only external storage by using this function, 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 function 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 function, you should add privilege http://tizen.org/privilege/mediastorage. \n
147 * Or if you want to access only external storage with this function, 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 function 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() function instead of this function 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 handle to the media filter
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 handle to the media info
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 The @a dst should be released using media_info_destroy().
270 * @param[out] dst The destination handle to the media info
271 * @param[in] src The source handle to the 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 the media 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 handle to the media 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 media ID
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 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
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 media ID
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 media ID
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 The 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 filter in the given @a media_id 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 The 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 The @a image should be released using image_meta_destroy().
526 * @param[in] media The handle to the media info
527 * @param[out] image The handle to the 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 The @a video should be released using video_meta_destroy().
548 * @param[in] media The handle to the media info
549 * @param[out] video The handle to the video metadata
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 The @a audio should be released using audio_meta_destroy().
570 * @param[in] media The handle to the media info
571 * @param[out] audio The handle to the audio metadata
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
587 * @remarks The @a media_id should be released using free().
589 * @param[in] media The handle to the media info
590 * @param[out] media_id The media ID
592 * @return @c 0 on success,
593 * otherwise a negative error value
595 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
596 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
597 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
599 int media_info_get_media_id(media_info_h media, char **media_id);
602 * @brief Gets the full path of the content file.
603 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
605 * @remarks The @a path should be released using free().
607 * @param[in] media The handle to the media info
608 * @param[out] path The full path of the content file
610 * @return @c 0 on success,
611 * otherwise a negative error value
613 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
614 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
615 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
618 int media_info_get_file_path(media_info_h media, char **path);
621 * @brief Gets the file name including the extension of the content file.
622 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
624 * @remarks The @a name should be released using free().
626 * @param[in] media The handle to the media info
627 * @param[out] name The file name including the extension of the content file
629 * @return @c 0 on success,
630 * otherwise a negative error value
632 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
633 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
634 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
636 int media_info_get_display_name(media_info_h media, char **name);
639 * @brief Gets the content type of the content file.
640 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
642 * @param[in] media The handle to the media info
643 * @param[out] type The content type of the content file (#media_content_type_e)
645 * @return @c 0 on success,
646 * otherwise a negative error value
648 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
649 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
651 * @see #media_content_type_e
653 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
656 * @brief Gets the MIME type of the content file.
657 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
659 * @remarks The @a mime_type should be released using free().
661 * @param[in] media The handle to the media info
662 * @param[out] mime_type The MIME type of the content file
664 * @return @c 0 on success,
665 * otherwise a negative error value
667 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
668 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
669 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
671 int media_info_get_mime_type(media_info_h media, char **mime_type);
674 * @brief Gets the content file size.
675 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
677 * @param[in] media The handle to the media info
678 * @param[out] size The content file size
680 * @return @c 0 on success,
681 * otherwise a negative error value
683 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
684 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
686 int media_info_get_size(media_info_h media, unsigned long long *size);
689 * @brief Gets the added time of the content file.
690 * @details The added time refers to the time that content file was first added to media database.
691 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
693 * @param[in] media The handle to the media info
694 * @param[out] added_time The added time to the media database
696 * @return @c 0 on success,
697 * otherwise a negative error value
699 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
700 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
702 int media_info_get_added_time(media_info_h media, time_t *added_time);
705 * @brief Gets the modified time of the content file.
706 * @details The modified time refers to the last modification time provided by the file system.
707 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
709 * @param[in] media The handle to the media info
710 * @param[out] time The last modification time of the content file
712 * @return @c 0 on success,
713 * otherwise a negative error value
715 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
716 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
718 int media_info_get_modified_time(media_info_h media, time_t *time);
721 * @brief Gets the timeline of content file.
722 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
723 * Otherwise, timeline value is the same as modified time.
724 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
726 * @param[in] media The handle to the media info
727 * @param[out] time The timeline of content file
729 * @return @c 0 on success,
730 * otherwise a negative error value
732 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
733 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
735 int media_info_get_timeline(media_info_h media, time_t *time);
738 * @brief Gets the thumbnail path of content file.
739 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
741 * @remarks The @a path should be released using free(). \n
742 * 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
743 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
745 * @param[in] media The handle to the media info
746 * @param[out] path The thumbnail path
748 * @return @c 0 on success,
749 * otherwise a negative error value
751 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
752 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
753 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
755 int media_info_get_thumbnail_path(media_info_h media, char **path);
758 * @brief Gets the description of content file.
759 * @details If the value is an empty string, the method returns "Unknown". \n
760 * Since 3.0, if the media info has no description, the method returns empty string.
761 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
763 * @remarks The @a description should be released using free().
765 * @param[in] media The handle to the media info
766 * @param[out] description The description of the content file
768 * @return @c 0 on success,
769 * otherwise a negative error value
771 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
772 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
773 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
775 int media_info_get_description(media_info_h media, char **description);
778 * @brief Gets the longitude of content file.
779 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
781 * @param[in] media The handle to the media info
782 * @param[out] longitude The longitude of the content file
784 * @return @c 0 on success,
785 * otherwise a negative error value
787 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
788 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
790 int media_info_get_longitude(media_info_h media, double *longitude);
793 * @brief Gets the latitude of content file.
794 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
796 * @param[in] media The handle to the media info
797 * @param[out] latitude The latitude of the content file
799 * @return @c 0 on success,
800 * otherwise a negative error value
802 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
803 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
806 int media_info_get_latitude(media_info_h media, double* latitude);
809 * @brief Gets the altitude of content file.
810 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
812 * @param[in] media The handle to the media info
813 * @param[out] altitude The altitude of the content file
815 * @return @c 0 on success,
816 * otherwise a negative error value
818 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
819 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
821 int media_info_get_altitude(media_info_h media, double* altitude);
824 * @deprecated Deprecated since 4.0.
825 * @brief Gets the weather of content file.
826 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
827 * @remarks The @a weather should be released using free().
829 * @param[in] media The handle to the media info
830 * @param[out] weather The weather of the content file
832 * @return @c 0 on success,
833 * otherwise a negative error value
835 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
836 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
837 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
839 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
842 * @brief Gets the rating of content file.
843 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
845 * @param[in] media The handle to the media info
846 * @param[out] rating The rating of the content file
848 * @return @c 0 on success,
849 * otherwise a negative error value
851 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
852 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
854 int media_info_get_rating(media_info_h media, int *rating);
857 * @brief Gets the favorite status of content file which User set.
858 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
860 * @param[in] media The handle to the media info
861 * @param[out] favorite @c true if content file is set as favorite,
862 * otherwise @c false if content file is not set as favorite
864 * @return @c 0 on success,
865 * otherwise a negative error value
867 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
868 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
870 * @see media_info_set_favorite()
872 int media_info_get_favorite(media_info_h media, bool* favorite);
875 * @deprecated Deprecated since 4.0.
876 * @brief Gets the author of content file.
877 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
879 * @remarks The @a author should be released using free().
881 * @param[in] media The handle to the media info
882 * @param[out] author The author of the content file
884 * @return @c 0 on success,
885 * otherwise a negative error value
887 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
888 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
889 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
891 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
894 * @deprecated Deprecated since 4.0.
895 * @brief Gets the provider of content file which User set.
896 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
898 * @remarks The @a provider should be released using free().
900 * @param[in] media The handle to the media info
901 * @param[out] provider The provider of the content file
903 * @return @c 0 on success,
904 * otherwise a negative error value
906 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
907 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
908 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
911 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
914 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
915 * @brief Gets the content name of content file which User set.
916 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
918 * @remarks The @a content_name should be released using free().
920 * @param[in] media The handle to the media info
921 * @param[out] content_name The content name of the content file
923 * @return @c 0 on success,
924 * otherwise a negative error value
926 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
927 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
928 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
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 The @a title should be released using free().
941 * @param[in] media The handle to the media info
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 The @a category should be released using free().
960 * @param[in] media The handle to the media info
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
971 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
974 * @deprecated Deprecated since 4.0.
975 * @brief Gets the location tag of content file which User set.
976 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
978 * @remarks The @a location_tag should be released using free().
980 * @param[in] media The handle to the media info
981 * @param[out] location_tag The location of the content file
983 * @return @c 0 on success,
984 * otherwise a negative error value
986 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
987 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
988 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
991 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
994 * @deprecated Deprecated since 4.0.
995 * @brief Gets the age_rating of content file which User set.
996 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
998 * @remarks The @a age_rating should be released using free().
1000 * @param[in] media The handle to the media info
1001 * @param[out] age_rating The age rating of the content file
1003 * @return @c 0 on success,
1004 * otherwise a negative error value
1006 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1007 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1008 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1011 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1014 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1015 * @brief Gets the keyword of content file which User set.
1016 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1018 * @remarks The @a keyword should be released using free().
1020 * @param[in] media The handle to the media info
1021 * @param[out] keyword The keyword of the content file
1023 * @return @c 0 on success,
1024 * otherwise a negative error value
1026 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1027 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1028 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1031 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1034 * @brief Gets the storage id of content file.
1035 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1037 * @remarks The @a storage_id should be released using free().
1039 * @param[in] media The handle to the media info
1040 * @param[out] storage_id The ID of the media storage
1042 * @return @c 0 on success,
1043 * otherwise a negative error value
1045 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1046 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1047 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1049 int media_info_get_storage_id(media_info_h media, char **storage_id);
1052 * @brief Checks whether the media is protected via DRM.
1053 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1055 * @param[in] media The handle to the media info
1056 * @param[out] is_drm @c true if media is DRM media,
1057 * otherwise @c false if media is not DRM media
1059 * @return @c 0 on success,
1060 * otherwise a negative error value
1062 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1063 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1065 int media_info_is_drm(media_info_h media, bool *is_drm);
1068 * @brief Checks whether the content file is 360 content.
1071 * @param[in] media The handle to the media info
1072 * @param[out] is_360 @c true if media is 360 content,
1073 * otherwise @c false if media is not 360 content
1075 * @return @c 0 on success,
1076 * otherwise a negative error value
1078 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1079 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1081 int media_info_is_360_content(media_info_h media, bool *is_360);
1084 * @brief Gets the storage type of content file.
1085 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1087 * @param[in] media The handle to the media info
1088 * @param[out] storage_type The storage type of the content file
1090 * @return @c 0 on success,
1091 * otherwise a negative error value
1093 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1094 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1096 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1099 * @deprecated Deprecated since 4.0. \n
1100 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1101 * @brief Gets number which represents how many times given content has been played.
1102 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1104 * @param[in] media The handle to the media info
1105 * @param[out] played_count The counter of content played
1107 * @return 0 on success,
1108 * otherwise a negative error value
1110 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1111 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1113 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1116 * @deprecated Deprecated since 4.0. \n
1117 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1118 * @brief Gets the content's played time parameter.
1119 * @details Function returns content's elapsed playback time parameter as period
1120 * starting from the beginning of the track.
1121 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1123 * @param[in] media The handle to the media info
1124 * @param[out] played_time The elapsed time of the content
1126 * @return 0 on success,
1127 * otherwise a negative error value
1129 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1130 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1132 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1135 * @brief Gets the media info from the media database.
1137 * @details This function creates a new media handle from the media database by the given @a media_id.
1138 * Media info will be created and filled with information.
1140 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1142 * @remarks The @a media should be released using media_info_destroy().
1144 * @param[in] media_id The media ID
1145 * @param[out] media The handle to the media info
1147 * @return @c 0 on success,
1148 * otherwise a negative error value
1150 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1151 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1152 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1153 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1154 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1155 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1157 * @pre This function requires opened connection to content service by media_content_connect().
1159 * @see media_content_connect()
1160 * @see media_info_destroy()
1162 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1165 * @deprecated Deprecated since 4.0. \n
1166 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1167 * @brief Increments the played count to content meta handle.
1168 * @details You can increase the played(opened) count of the content file.
1169 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1171 * @param[in] media The handle to the media info
1173 * @return 0 on success,
1174 * otherwise a negative error value
1176 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1177 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1179 * @post media_info_update_to_db()
1181 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1184 * @deprecated Deprecated since 4.0. \n
1185 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1186 * @brief Sets the played time to content meta handle.
1187 * @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.
1188 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1190 * @param[in] media The handle to the media info
1192 * @return 0 on success,
1193 * otherwise a negative error value
1195 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1196 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1198 * @post media_info_update_to_db()
1200 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1203 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1204 * @brief Sets the file name including the extension of the content file.
1205 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1207 * @param[in] media The handle to the media info
1208 * @param[in] display_name The file name including the extension of the content file.
1210 * @return @c 0 on success,
1211 * otherwise a negative error value
1213 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1214 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1215 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1217 * @post media_info_update_to_db().
1220 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1223 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1224 * @brief Sets the description of media info.
1225 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1227 * @param[in] media The handle to the media info
1228 * @param[in] description The description of the media info
1230 * @return @c 0 on success,
1231 * otherwise a negative error value
1233 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1234 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1235 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1237 * @post media_info_update_to_db().
1240 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1243 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1244 * @brief Sets the longitude of media info.
1245 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1247 * @param[in] media The handle to the media info
1248 * @param[in] longitude The longitude of the media info
1250 * @return @c 0 on success,
1251 * otherwise a negative error value
1253 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1254 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1256 * @post media_info_update_to_db().
1258 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1261 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1262 * @brief Sets the latitude of media info.
1263 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1265 * @param[in] media The handle to the media info
1266 * @param[in] latitude The latitude of the media info
1268 * @return @c 0 on success,
1269 * otherwise a negative error value
1271 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1272 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1274 * @post media_info_update_to_db().
1276 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1279 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1280 * @brief Sets the altitude of media info.
1281 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1283 * @param[in] media The handle to the media info
1284 * @param[in] altitude The altitude of the media info
1286 * @return @c 0 on success,
1287 * otherwise a negative error value
1289 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1290 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1292 * @post media_info_update_to_db().
1294 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1297 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1298 * @brief Sets the weather of media info.
1299 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1301 * @param[in] media The handle to the media info
1302 * @param[in] weather The weather of the media info
1304 * @return @c 0 on success,
1305 * otherwise a negative error value
1307 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1308 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1309 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1311 * @post media_info_update_to_db().
1314 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1317 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1318 * @brief Sets the rating of media info.
1319 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1321 * @param[in] media The handle to the media info
1322 * @param[in] rating The rating of the media info
1324 * @return @c 0 on success,
1325 * otherwise a negative error value
1327 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1328 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1330 * @post media_info_update_to_db().
1332 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1335 * @brief Sets the favorite of media info.
1336 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1337 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1338 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1340 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1342 * @param[in] media The handle to the media info
1343 * @param[in] favorite Set @c true to set the media info as favorite,
1344 * otherwise set @c false to not set the media info as favorite
1346 * @return @c 0 on success,
1347 * otherwise a negative error value
1349 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1350 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1352 int media_info_set_favorite(media_info_h media, bool favorite);
1355 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1356 * @brief Sets the author of media info.
1357 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1359 * @param[in] media The handle to the media info
1360 * @param[in] author The author of the media info
1362 * @return @c 0 on success,
1363 * otherwise a negative error value
1365 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1366 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1367 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1369 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1372 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1373 * @brief Sets the provider of media info.
1374 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1376 * @param[in] media The handle to the media info
1377 * @param[in] provider The provider of the media info
1379 * @return @c 0 on success,
1380 * otherwise a negative error value
1382 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1383 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1384 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1386 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1389 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1390 * @brief Sets the content name of media info.
1391 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1393 * @param[in] media The handle to the media info
1394 * @param[in] content_name The content name of the media info
1396 * @return @c 0 on success,
1397 * otherwise a negative error value
1399 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1400 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1401 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1403 * @post media_info_update_to_db()
1405 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1408 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1409 * @brief Sets the category of media info.
1410 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1412 * @param[in] media The handle to the media info
1413 * @param[in] category The category of the media info
1415 * @return @c 0 on success,
1416 * otherwise a negative error value
1418 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1419 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1420 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1422 * @post media_info_update_to_db()
1424 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1427 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1428 * @brief Sets the location tag of media info.
1429 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1431 * @param[in] media The handle to the media info
1432 * @param[in] location_tag The location of the media info
1434 * @return @c 0 on success,
1435 * otherwise a negative error value
1437 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1438 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1439 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1441 * @post media_info_update_to_db()
1443 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1446 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1447 * @brief Sets the age rating of media info.
1448 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1450 * @param[in] media The handle to the media info
1451 * @param[in] age_rating The age rating of the media info
1453 * @return @c 0 on success,
1454 * otherwise a negative error value
1456 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1457 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1458 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1460 * @post media_info_update_to_db()
1462 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1465 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1466 * @brief Sets the keyword of media info.
1467 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1469 * @param[in] media The handle to the media info
1470 * @param[in] keyword The keyword of the media info
1472 * @return @c 0 on success,
1473 * otherwise a negative error value
1475 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1476 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1477 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1479 * @post media_info_update_to_db()
1481 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1484 * @brief Updates the media info to the media database.
1486 * @details The function updates the given media info in the media database.
1488 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1490 * @privilege %http://tizen.org/privilege/content.write
1492 * @remarks The function should be called after any change in media, to be updated to the media
1493 * database. For example, after using media_info_set_favorite()
1494 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1495 * the given media info attributes in the media database.
1497 * @param[in] media The handle to the media info
1499 * @return @c 0 on success,
1500 * otherwise a negative error value
1502 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1503 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1504 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1505 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1506 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1507 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1508 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1509 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1511 * @pre This function requires opened connection to content service by media_content_connect().
1513 * @see media_content_connect()
1514 * @see media_info_set_favorite()
1516 int media_info_update_to_db(media_info_h media);
1519 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1520 * @brief Refreshes the media metadata to the media database.
1521 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1524 * @privilege %http://tizen.org/privilege/content.write \n
1525 * %http://tizen.org/privilege/mediastorage \n
1526 * %http://tizen.org/privilege/externalstorage
1528 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1529 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1530 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1531 * If you can access both storage, you should add all privilege.
1533 * @param[in] media_id The media ID
1535 * @return @c 0 on success,
1536 * otherwise a negative error value
1538 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1539 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1540 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1541 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1542 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1543 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1544 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1545 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1547 * @pre This function requires opened connection to content service by media_content_connect().
1549 * @see media_content_connect()
1551 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1554 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1555 * @brief Sets the added time of media info.
1556 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1558 * @param[in] media The handle to the media info
1559 * @param[in] added_time The added time of the media info
1561 * @return @c 0 on success,
1562 * otherwise a negative error value
1564 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1565 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1566 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1568 * @post media_info_update_to_db()
1570 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1573 * @brief Moves the media info to the given destination path in the media database.
1574 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1575 * If the source path and destination path are the same, then this function does nothing.
1576 * If you want to refresh media information, you should use media_content_scan_file() function.
1578 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1581 * @privilege %http://tizen.org/privilege/content.write \n
1582 * %http://tizen.org/privilege/mediastorage \n
1583 * %http://tizen.org/privilege/externalstorage
1585 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1586 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1587 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1588 * If you can access both storage, you should add all privilege. \n
1589 * This function does not support USB storage.
1591 * @param[in] media The handle to the media info
1592 * @param[in] dst_path The path of destination
1594 * @return @c 0 on success,
1595 * otherwise a negative error value
1597 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1598 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1599 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1600 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1601 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1602 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1603 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1604 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1606 * @pre This function requires opened connection to content service by media_content_connect().
1608 * @see media_content_connect()
1609 * @see media_content_scan_folder()
1611 int media_info_move_to_db(media_info_h media, const char* dst_path);
1614 * @brief Creates a thumbnail file for the given media, asynchronously.
1615 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1616 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1617 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1618 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1620 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1623 * @privilege %http://tizen.org/privilege/content.write \n
1624 * %http://tizen.org/privilege/mediastorage \n
1625 * %http://tizen.org/privilege/externalstorage
1627 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1628 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1629 * Items in external storage except MMC not supported.
1631 * @param[in] media The handle to the media info
1632 * @param[in] callback The callback function to be invoked
1633 * @param[in] user_data The user data to be passed to the callback function
1635 * @return @c 0 on success,
1636 * otherwise a negative error value
1638 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1639 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1640 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1641 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1642 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1643 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1644 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1645 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1647 * @pre This function requires opened connection to content service by media_content_connect().
1649 * @see media_content_connect()
1651 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1654 * @brief Cancels the creation of thumbnail file for the given media.
1655 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1658 * @privilege %http://tizen.org/privilege/content.write
1660 * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1662 * @param[in] media The handle to the media info
1664 * @return @c 0 on success,
1665 * otherwise a negative error value
1667 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1668 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1669 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1670 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1672 * @pre This function requires opened connection to content service by media_content_connect().
1673 * @see media_content_connect()
1675 int media_info_cancel_thumbnail(media_info_h media);
1678 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1679 * @brief Starts face detection for the given image, asynchronously.
1680 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1681 * The given callback function is called when the detection is completed. \n
1682 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1687 * @privilege %http://tizen.org/privilege/content.write \n
1688 * %http://tizen.org/privilege/mediastorage \n
1689 * %http://tizen.org/privilege/externalstorage
1691 * @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
1692 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1693 * Media items in external storage are not supported, with the exception of MMC items.
1695 * @param[in] media The handle to the media info
1696 * @param[in] callback The callback function to be invoked when detection is completed
1697 * @param[in] user_data The user data to be passed to the callback function
1699 * @return @c 0 on success,
1700 * otherwise a negative error value
1702 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1703 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1704 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1705 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1706 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1707 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1708 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1709 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1710 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1712 * @pre This function requires opened connection to content service by media_content_connect().
1714 * @see media_content_connect()
1715 * @see media_info_cancel_face_detection()
1717 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1720 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1721 * @brief Cancels face detection of image for the given media.
1722 * @details This function cancels face detection for given media item. \n
1723 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1728 * @privilege %http://tizen.org/privilege/content.write
1730 * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1732 * @param[in] media The handle to the media info
1734 * @return @c 0 on success,
1735 * otherwise a negative error value
1737 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1738 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1739 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1740 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1742 * @pre This function requires opened connection to content service by media_content_connect().
1744 * @see media_content_connect()
1745 * @see media_info_start_face_detection()
1747 int media_info_cancel_face_detection(media_info_h media);
1750 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1751 * @brief Creates the media info handle.
1752 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1756 * @privilege %http://tizen.org/privilege/mediastorage \n
1757 * %http://tizen.org/privilege/externalstorage
1759 * @remarks The @a media should be released using media_info_destroy().
1760 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1761 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1762 * If you can access both storage, you must add all privilege.
1764 * @param[in] path The path to create the media info handle
1765 * @param[out] media The handle to the media info
1767 * @return @c 0 on success,
1768 * otherwise a negative error value
1770 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1771 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1772 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1773 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1774 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1776 * @see media_info_destroy()
1778 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1781 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1782 * @brief Inserts media info to database with media info data.
1786 * @privilege %http://tizen.org/privilege/content.write
1788 * @remarks The @a media should be released using media_info_destroy().
1790 * @param[in] media The handle to the media info
1792 * @return @c 0 on success,
1793 * otherwise a negative error value
1795 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1796 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1797 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1798 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1800 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1803 * @deprecated Deprecated since 4.0.
1804 * @brief Sets the title of media info handle.
1807 * @param[in] media The handle to the media info
1808 * @param[in] title The title of media info handle
1810 * @return @c 0 on success,
1811 * otherwise a negative error value
1813 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1814 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1815 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1817 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1820 * @deprecated Deprecated since 4.0.
1821 * @brief Sets the album of media info handle.
1824 * @param[in] media The handle to the media info
1825 * @param[in] album The album of the media
1827 * @return @c 0 on success,
1828 * otherwise a negative error value
1830 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1831 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1832 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1834 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1837 * @deprecated Deprecated since 4.0.
1838 * @brief Sets the artist of media info handle.
1841 * @param[in] media The handle to the media info
1842 * @param[in] artist The artist of media info handle
1844 * @return @c 0 on success,
1845 * otherwise a negative error value
1847 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1848 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1849 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1851 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1854 * @deprecated Deprecated since 4.0.
1855 * @brief Sets the genre of media info handle.
1858 * @param[in] media The handle to the media info
1859 * @param[in] genre The genre of media info handle
1861 * @return @c 0 on success,
1862 * otherwise a negative error value
1864 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1865 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1866 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1868 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1871 * @deprecated Deprecated since 4.0.
1872 * @brief Sets the recorded date of media info handle.
1875 * @param[in] media The handle to the media info
1876 * @param[in] recorded_date The recorded date of media info handle
1878 * @return @c 0 on success,
1879 * otherwise a negative error value
1881 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1882 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1883 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1885 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1893 #endif /* __cplusplus */
1895 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */