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
309 * @pre This function requires opened connection to content service by media_content_connect().
311 * @see media_content_connect()
312 * @see media_filter_create()
314 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
317 * @brief Iterates through media info from the media database.
318 * @details This function gets all media info handles meeting the given @a filter.
319 * The @a callback function will be invoked for every retrieved media info.
320 * If @c NULL is passed to the @a filter, then no filtering is applied.
322 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
324 * @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,
325 * your callback function is invoked as inline function.
326 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
327 * We do not recommend you call updating DB function in callback of foreach function.
329 * @param[in] filter The handle to the media filter
330 * @param[in] callback The callback function to be invoked
331 * @param[in] user_data The user data to be passed to the callback function
333 * @return @c 0 on success,
334 * otherwise a negative error value
336 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
337 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
338 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
339 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
340 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
342 * @pre This function requires opened connection to content service by media_content_connect().
343 * @post This function invokes media_info_cb().
345 * @see media_content_connect()
346 * @see #media_info_cb
347 * @see media_filter_create()
349 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
352 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
353 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
355 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
357 * @param[in] media_id The media ID
358 * @param[in] filter The handle to the media filter
359 * @param[out] tag_count The count of the media tag
361 * @return @c 0 on success,
362 * otherwise a negative error value
364 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
365 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
366 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
367 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
369 * @pre This function requires opened connection to content service by media_content_connect().
371 * @see media_content_connect()
372 * @see media_filter_create()
374 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
377 * @brief Iterates through the media tag in the given media info from the media database.
378 * @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
379 * If @c NULL is passed to the @a filter, then no filtering is applied.
381 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
383 * @param[in] media_id The media ID
384 * @param[in] filter The handle to the media filter
385 * @param[in] callback The callback function to be invoked
386 * @param[in] user_data The user data to be passed to the callback function
388 * @return @c 0 on success,
389 * otherwise a negative error value
391 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
392 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
393 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
394 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
395 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
397 * @pre This function requires opened connection to content service by media_content_connect().
398 * @post This function invokes media_tag_cb().
400 * @see media_content_connect()
402 * @see media_filter_create()
404 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
407 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
408 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
410 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
412 * @param[in] media_id The media ID
413 * @param[in] filter The handle to the media filter
414 * @param[out] bookmark_count The count of the media tag
416 * @return @c 0 on success,
417 * otherwise a negative error value
419 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
420 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
421 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
422 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
424 * @pre This function requires opened connection to content service by media_content_connect().
426 * @see media_content_connect()
427 * @see media_filter_create()
429 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
432 * @brief Iterates through the media bookmark in the given media info from the media database.
433 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
434 * If @c NULL is passed to the @a filter, then no filtering is applied.
436 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
438 * @param[in] media_id The media ID
439 * @param[in] filter The handle to the media filter
440 * @param[in] callback The callback function to be invoked
441 * @param[in] user_data The user data to be passed to the callback function
443 * @return @c 0 on success,
444 * otherwise a negative error value
446 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
447 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
448 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
449 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
450 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
452 * @pre This function requires opened connection to content service by media_content_connect().
453 * @post This function invokes media_bookmark_cb().
455 * @see media_content_connect()
456 * @see media_bookmark_cb()
457 * @see media_filter_create()
459 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
462 * @brief Gets the number of face for the passed @a media_id from the media database.
463 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
467 * @param[in] media_id The media ID
468 * @param[in] filter The handle to the media filter
469 * @param[out] face_count The count of media face
471 * @return 0 on success, otherwise a negative error value.
473 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
474 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
475 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
477 * @pre This function requires opened connection to content service by media_content_connect().
478 * @see media_content_connect()
479 * @see media_filter_create()
482 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
485 * @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
486 * @details This function gets all media face info associated with the given media id and
487 * meeting desired filter option and calls @a callback for
488 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
492 * @param[in] media_id The media ID
493 * @param[in] filter The handle to the media filter
494 * @param[in] callback The callback function to invoke
495 * @param[in] user_data The user data to be passed to the callback function
497 * @return 0 on success, otherwise a negative error value.
499 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
500 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
501 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
503 * @pre This function requires opened connection to content service by media_content_connect().
504 * @see media_content_connect()
505 * @see media_filter_create()
508 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
511 * @brief Gets the image metadata handle for a given media info.
512 * @details This function returns an image metadata handle retrieved from the media info.
514 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
516 * @remarks The @a image should be released using image_meta_destroy().
518 * @param[in] media The handle to the media info
519 * @param[out] image The handle to the image metadata
521 * @return @c 0 on success,
522 * otherwise a negative error value
524 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
525 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
526 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
528 * @see image_meta_destroy()
530 int media_info_get_image(media_info_h media, image_meta_h *image);
533 * @brief Gets a video metadata handle for a given media info.
534 * @details This function returns a video metadata handle retrieved from the media info handle.
536 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
538 * @remarks The @a video should be released using video_meta_destroy().
540 * @param[in] media The handle to the media info
541 * @param[out] video The handle to the video metadata
543 * @return @c 0 on success,
544 * otherwise a negative error value
546 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
547 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
548 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
550 * @see video_meta_destroy()
552 int media_info_get_video(media_info_h media, video_meta_h *video);
555 * @brief Gets an audio metadata handle for a given media info.
556 * @details This function returns an audio metadata handle retrieved from the media info handle.
558 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
560 * @remarks The @a audio should be released using audio_meta_destroy().
562 * @param[in] media The handle to the media info
563 * @param[out] audio The handle to the audio metadata
565 * @return @c 0 on success,
566 * otherwise a negative error value
568 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
569 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
570 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
572 * @see audio_meta_destroy()
574 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
577 * @brief Gets the media ID.
578 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
579 * @remarks The @a media_id should be released using free().
581 * @param[in] media The handle to the media info
582 * @param[out] media_id The media ID
584 * @return @c 0 on success,
585 * otherwise a negative error value
587 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
588 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
589 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
591 int media_info_get_media_id(media_info_h media, char **media_id);
594 * @brief Gets the full path of the content file.
595 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
597 * @remarks The @a path should be released using free().
599 * @param[in] media The handle to the media info
600 * @param[out] path The full path of the content file
602 * @return @c 0 on success,
603 * otherwise a negative error value
605 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
606 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
607 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
610 int media_info_get_file_path(media_info_h media, char **path);
613 * @brief Gets the file name including the extension of the content file.
614 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
616 * @remarks The @a name should be released using free().
618 * @param[in] media The handle to the media info
619 * @param[out] name The file name including the extension of the content file
621 * @return @c 0 on success,
622 * otherwise a negative error value
624 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
625 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
626 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
628 int media_info_get_display_name(media_info_h media, char **name);
631 * @brief Gets the content type of the content file.
632 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
634 * @param[in] media The handle to the media info
635 * @param[out] type The content type of the content file (#media_content_type_e)
637 * @return @c 0 on success,
638 * otherwise a negative error value
640 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
641 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
643 * @see #media_content_type_e
645 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
648 * @brief Gets the MIME type of the content file.
649 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
651 * @remarks The @a mime_type should be released using free().
653 * @param[in] media The handle to the media info
654 * @param[out] mime_type The MIME type of the content file
656 * @return @c 0 on success,
657 * otherwise a negative error value
659 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
660 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
661 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
663 int media_info_get_mime_type(media_info_h media, char **mime_type);
666 * @brief Gets the content file size.
667 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
669 * @param[in] media The handle to the media info
670 * @param[out] size The content file size
672 * @return @c 0 on success,
673 * otherwise a negative error value
675 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
676 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
678 int media_info_get_size(media_info_h media, unsigned long long *size);
681 * @brief Gets the added time of the content file.
682 * @details The added time refers to the time that content file was first added to media database.
683 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
685 * @param[in] media The handle to the media info
686 * @param[out] added_time The added time to the media database
688 * @return @c 0 on success,
689 * otherwise a negative error value
691 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
692 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
694 int media_info_get_added_time(media_info_h media, time_t *added_time);
697 * @brief Gets the modified time of the content file.
698 * @details The modified time refers to the last modification time provided by the file system.
699 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
701 * @param[in] media The handle to the media info
702 * @param[out] time The last modification time of the content file
704 * @return @c 0 on success,
705 * otherwise a negative error value
707 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
708 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
710 int media_info_get_modified_time(media_info_h media, time_t *time);
713 * @brief Gets the timeline of content file.
714 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
715 * Otherwise, timeline value is the same as modified time.
716 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
718 * @param[in] media The handle to the media info
719 * @param[out] time The timeline of content file
721 * @return @c 0 on success,
722 * otherwise a negative error value
724 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
725 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
727 int media_info_get_timeline(media_info_h media, time_t *time);
730 * @brief Gets the thumbnail path of content file.
731 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
733 * @remarks The @a path should be released using free(). \n
734 * 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
735 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
737 * @param[in] media The handle to the media info
738 * @param[out] path The thumbnail path
740 * @return @c 0 on success,
741 * otherwise a negative error value
743 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
744 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
745 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
747 int media_info_get_thumbnail_path(media_info_h media, char **path);
750 * @brief Gets the description of content file.
751 * @details If the value is an empty string, the method returns "Unknown". \n
752 * Since 3.0, if the media info has no description, the method returns empty string.
753 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
755 * @remarks The @a description should be released using free().
757 * @param[in] media The handle to the media info
758 * @param[out] description The description of the content file
760 * @return @c 0 on success,
761 * otherwise a negative error value
763 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
764 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
765 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
767 int media_info_get_description(media_info_h media, char **description);
770 * @brief Gets the longitude of content file.
771 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
773 * @param[in] media The handle to the media info
774 * @param[out] longitude The longitude of the content file
776 * @return @c 0 on success,
777 * otherwise a negative error value
779 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
780 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
782 int media_info_get_longitude(media_info_h media, double *longitude);
785 * @brief Gets the latitude of content file.
786 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
788 * @param[in] media The handle to the media info
789 * @param[out] latitude The latitude of the content file
791 * @return @c 0 on success,
792 * otherwise a negative error value
794 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
795 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
798 int media_info_get_latitude(media_info_h media, double* latitude);
801 * @brief Gets the altitude of content file.
802 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
804 * @param[in] media The handle to the media info
805 * @param[out] altitude The altitude of the content file
807 * @return @c 0 on success,
808 * otherwise a negative error value
810 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
811 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
813 int media_info_get_altitude(media_info_h media, double* altitude);
816 * @deprecated Deprecated since 4.0.
817 * @brief Gets the weather of content file.
818 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
819 * @remarks The @a weather should be released using free().
821 * @param[in] media The handle to the media info
822 * @param[out] weather The weather of the content file
824 * @return @c 0 on success,
825 * otherwise a negative error value
827 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
828 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
829 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
831 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
834 * @brief Gets the rating of content file.
835 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
837 * @param[in] media The handle to the media info
838 * @param[out] rating The rating of the content file
840 * @return @c 0 on success,
841 * otherwise a negative error value
843 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
844 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
846 int media_info_get_rating(media_info_h media, int *rating);
849 * @brief Gets the favorite status of content file which User set.
850 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
852 * @param[in] media The handle to the media info
853 * @param[out] favorite @c true if content file is set as favorite,
854 * otherwise @c false if content file is not set as favorite
856 * @return @c 0 on success,
857 * otherwise a negative error value
859 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
860 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
862 * @see media_info_set_favorite()
864 int media_info_get_favorite(media_info_h media, bool* favorite);
867 * @deprecated Deprecated since 4.0.
868 * @brief Gets the author of content file.
869 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
871 * @remarks The @a author should be released using free().
873 * @param[in] media The handle to the media info
874 * @param[out] author The author of the content file
876 * @return @c 0 on success,
877 * otherwise a negative error value
879 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
880 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
881 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
883 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
886 * @deprecated Deprecated since 4.0.
887 * @brief Gets the provider of content file which User set.
888 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
890 * @remarks The @a provider should be released using free().
892 * @param[in] media The handle to the media info
893 * @param[out] provider The provider of the content file
895 * @return @c 0 on success,
896 * otherwise a negative error value
898 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
899 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
900 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
903 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
906 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
907 * @brief Gets the content name of content file which User set.
908 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
910 * @remarks The @a content_name should be released using free().
912 * @param[in] media The handle to the media info
913 * @param[out] content_name The content name of the content file
915 * @return @c 0 on success,
916 * otherwise a negative error value
918 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
919 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
920 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
923 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
926 * @brief Gets the title of content file.
927 * @details If the content file does not have a title, this method returns the filename without the extension.
929 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
931 * @remarks The @a title should be released using free().
933 * @param[in] media The handle to the media info
934 * @param[out] title The title of the content file
936 * @return @c 0 on success,
937 * otherwise a negative error value
939 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
940 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
941 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
943 int media_info_get_title(media_info_h media, char **title);
946 * @deprecated Deprecated since 4.0.
947 * @brief Gets the category of content file which User set.
948 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
950 * @remarks The @a category should be released using free().
952 * @param[in] media The handle to the media info
953 * @param[out] category The category of the content file
955 * @return @c 0 on success,
956 * otherwise a negative error value
958 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
959 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
960 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
963 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
966 * @deprecated Deprecated since 4.0.
967 * @brief Gets the location tag of content file which User set.
968 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
970 * @remarks The @a location_tag should be released using free().
972 * @param[in] media The handle to the media info
973 * @param[out] location_tag The location of the content file
975 * @return @c 0 on success,
976 * otherwise a negative error value
978 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
979 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
980 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
983 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
986 * @deprecated Deprecated since 4.0.
987 * @brief Gets the age_rating of content file which User set.
988 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
990 * @remarks The @a age_rating should be released using free().
992 * @param[in] media The handle to the media info
993 * @param[out] age_rating The age rating of the content file
995 * @return @c 0 on success,
996 * otherwise a negative error value
998 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
999 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1000 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1003 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1006 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1007 * @brief Gets the keyword of content file which User set.
1008 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1010 * @remarks The @a keyword should be released using free().
1012 * @param[in] media The handle to the media info
1013 * @param[out] keyword The keyword of the content file
1015 * @return @c 0 on success,
1016 * otherwise a negative error value
1018 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1019 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1020 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1023 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1026 * @brief Gets the storage id of content file.
1027 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1029 * @remarks The @a storage_id should be released using free().
1031 * @param[in] media The handle to the media info
1032 * @param[out] storage_id The ID of the media storage
1034 * @return @c 0 on success,
1035 * otherwise a negative error value
1037 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1038 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1039 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1041 int media_info_get_storage_id(media_info_h media, char **storage_id);
1044 * @brief Checks whether the media is protected via DRM.
1045 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1047 * @param[in] media The handle to the media info
1048 * @param[out] is_drm @c true if media is DRM media,
1049 * otherwise @c false if media is not DRM media
1051 * @return @c 0 on success,
1052 * otherwise a negative error value
1054 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1055 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1057 int media_info_is_drm(media_info_h media, bool *is_drm);
1060 * @brief Checks whether the content file is 360 content.
1063 * @param[in] media The handle to the media info
1064 * @param[out] is_360 @c true if media is 360 content,
1065 * otherwise @c false if media is not 360 content
1067 * @return @c 0 on success,
1068 * otherwise a negative error value
1070 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1071 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1073 int media_info_is_360_content(media_info_h media, bool *is_360);
1076 * @brief Gets the storage type of content file.
1077 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1079 * @param[in] media The handle to the media info
1080 * @param[out] storage_type The storage type of the content file
1082 * @return @c 0 on success,
1083 * otherwise a negative error value
1085 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1086 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1088 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1091 * @deprecated Deprecated since 4.0. \n
1092 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1093 * @brief Gets number which represents how many times given content has been played.
1094 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1096 * @param[in] media The handle to the media info
1097 * @param[out] played_count The counter of content played
1099 * @return 0 on success,
1100 * otherwise a negative error value
1102 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1103 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1105 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1108 * @deprecated Deprecated since 4.0. \n
1109 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1110 * @brief Gets the content's played time parameter.
1111 * @details Function returns content's elapsed playback time parameter as period
1112 * starting from the beginning of the track.
1113 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1115 * @param[in] media The handle to the media info
1116 * @param[out] played_time The elapsed time of the content
1118 * @return 0 on success,
1119 * otherwise a negative error value
1121 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1122 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1124 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1127 * @brief Gets the media info from the media database.
1129 * @details This function creates a new media handle from the media database by the given @a media_id.
1130 * Media info will be created and filled with information.
1132 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1134 * @remarks The @a media should be released using media_info_destroy().
1136 * @param[in] media_id The media ID
1137 * @param[out] media The handle to the media info
1139 * @return @c 0 on success,
1140 * otherwise a negative error value
1142 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1143 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1144 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1145 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1146 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1148 * @pre This function requires opened connection to content service by media_content_connect().
1150 * @see media_content_connect()
1151 * @see media_info_destroy()
1153 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1156 * @deprecated Deprecated since 4.0. \n
1157 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1158 * @brief Increments the played count to content meta handle.
1159 * @details You can increase the played(opened) count of the content file.
1160 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1162 * @param[in] media The handle to the media info
1164 * @return 0 on success,
1165 * otherwise a negative error value
1167 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1168 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1170 * @post media_info_update_to_db()
1172 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1175 * @deprecated Deprecated since 4.0. \n
1176 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1177 * @brief Sets the played time to content meta handle.
1178 * @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.
1179 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1181 * @param[in] media The handle to the media info
1183 * @return 0 on success,
1184 * otherwise a negative error value
1186 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1187 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1189 * @post media_info_update_to_db()
1191 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1194 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1195 * @brief Sets the file name including the extension of the content file.
1196 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1198 * @param[in] media The handle to the media info
1199 * @param[in] display_name The file name including the extension of the content file.
1201 * @return @c 0 on success,
1202 * otherwise a negative error value
1204 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1205 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1206 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1208 * @post media_info_update_to_db().
1211 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1214 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1215 * @brief Sets the description of media info.
1216 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1218 * @param[in] media The handle to the media info
1219 * @param[in] description The description of the media info
1221 * @return @c 0 on success,
1222 * otherwise a negative error value
1224 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1225 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1226 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1228 * @post media_info_update_to_db().
1231 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1234 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1235 * @brief Sets the longitude of media info.
1236 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1238 * @param[in] media The handle to the media info
1239 * @param[in] longitude The longitude of the media info
1241 * @return @c 0 on success,
1242 * otherwise a negative error value
1244 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1245 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1247 * @post media_info_update_to_db().
1249 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1252 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1253 * @brief Sets the latitude of media info.
1254 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1256 * @param[in] media The handle to the media info
1257 * @param[in] latitude The latitude of the media info
1259 * @return @c 0 on success,
1260 * otherwise a negative error value
1262 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1263 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1265 * @post media_info_update_to_db().
1267 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1270 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1271 * @brief Sets the altitude of media info.
1272 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1274 * @param[in] media The handle to the media info
1275 * @param[in] altitude The altitude of the media info
1277 * @return @c 0 on success,
1278 * otherwise a negative error value
1280 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1281 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1283 * @post media_info_update_to_db().
1285 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1288 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1289 * @brief Sets the weather of media info.
1290 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1292 * @param[in] media The handle to the media info
1293 * @param[in] weather The weather of the media info
1295 * @return @c 0 on success,
1296 * otherwise a negative error value
1298 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1299 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1300 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1302 * @post media_info_update_to_db().
1305 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1308 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1309 * @brief Sets the rating of media info.
1310 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1312 * @param[in] media The handle to the media info
1313 * @param[in] rating The rating of the media info
1315 * @return @c 0 on success,
1316 * otherwise a negative error value
1318 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1319 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1321 * @post media_info_update_to_db().
1323 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1326 * @brief Sets the favorite of media info.
1327 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1328 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1329 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1331 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1333 * @param[in] media The handle to the media info
1334 * @param[in] favorite Set @c true to set the media info as favorite,
1335 * otherwise set @c false to not set the media info as favorite
1337 * @return @c 0 on success,
1338 * otherwise a negative error value
1340 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1341 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1343 int media_info_set_favorite(media_info_h media, bool favorite);
1346 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1347 * @brief Sets the author of media info.
1348 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1350 * @param[in] media The handle to the media info
1351 * @param[in] author The author of the media info
1353 * @return @c 0 on success,
1354 * otherwise a negative error value
1356 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1357 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1358 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1360 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1363 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1364 * @brief Sets the provider of media info.
1365 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1367 * @param[in] media The handle to the media info
1368 * @param[in] provider The provider of the media info
1370 * @return @c 0 on success,
1371 * otherwise a negative error value
1373 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1374 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1375 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1377 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1380 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1381 * @brief Sets the content name of media info.
1382 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1384 * @param[in] media The handle to the media info
1385 * @param[in] content_name The content name of the media info
1387 * @return @c 0 on success,
1388 * otherwise a negative error value
1390 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1391 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1392 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1394 * @post media_info_update_to_db()
1396 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1399 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1400 * @brief Sets the category of media info.
1401 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1403 * @param[in] media The handle to the media info
1404 * @param[in] category The category of the media info
1406 * @return @c 0 on success,
1407 * otherwise a negative error value
1409 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1410 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1411 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1413 * @post media_info_update_to_db()
1415 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1418 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1419 * @brief Sets the location tag of media info.
1420 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1422 * @param[in] media The handle to the media info
1423 * @param[in] location_tag The location of the media info
1425 * @return @c 0 on success,
1426 * otherwise a negative error value
1428 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1429 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1430 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1432 * @post media_info_update_to_db()
1434 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1437 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1438 * @brief Sets the age rating of media info.
1439 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1441 * @param[in] media The handle to the media info
1442 * @param[in] age_rating The age rating of the media info
1444 * @return @c 0 on success,
1445 * otherwise a negative error value
1447 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1448 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1449 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1451 * @post media_info_update_to_db()
1453 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1456 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1457 * @brief Sets the keyword of media info.
1458 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1460 * @param[in] media The handle to the media info
1461 * @param[in] keyword The keyword of the media info
1463 * @return @c 0 on success,
1464 * otherwise a negative error value
1466 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1467 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1468 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1470 * @post media_info_update_to_db()
1472 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1475 * @brief Updates the media info to the media database.
1477 * @details The function updates the given media info in the media database.
1479 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1481 * @privilege %http://tizen.org/privilege/content.write
1483 * @remarks The function should be called after any change in media, to be updated to the media
1484 * database. For example, after using media_info_set_favorite()
1485 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1486 * the given media info attributes in the media database.
1488 * @param[in] media The handle to the media info
1490 * @return @c 0 on success,
1491 * otherwise a negative error value
1493 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1494 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1495 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1496 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1497 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1498 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1499 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1500 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1502 * @pre This function requires opened connection to content service by media_content_connect().
1504 * @see media_content_connect()
1505 * @see media_info_set_favorite()
1507 int media_info_update_to_db(media_info_h media);
1510 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1511 * @brief Refreshes the media metadata to the media database.
1512 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1515 * @privilege %http://tizen.org/privilege/content.write \n
1516 * %http://tizen.org/privilege/mediastorage \n
1517 * %http://tizen.org/privilege/externalstorage
1519 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1520 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1521 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1522 * If you can access both storage, you should add all privilege.
1524 * @param[in] media_id The media ID
1526 * @return @c 0 on success,
1527 * otherwise a negative error value
1529 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1530 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1531 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1532 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1533 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1534 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1535 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1536 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1538 * @pre This function requires opened connection to content service by media_content_connect().
1540 * @see media_content_connect()
1542 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1545 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1546 * @brief Sets the added time of media info.
1547 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1549 * @param[in] media The handle to the media info
1550 * @param[in] added_time The added time of the media info
1552 * @return @c 0 on success,
1553 * otherwise a negative error value
1555 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1556 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1557 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1559 * @post media_info_update_to_db()
1561 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1564 * @brief Moves the media info to the given destination path in the media database.
1565 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1566 * If the source path and destination path are the same, then this function does nothing.
1567 * If you want to refresh media information, you should use media_content_scan_file() function.
1569 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1572 * @privilege %http://tizen.org/privilege/content.write \n
1573 * %http://tizen.org/privilege/mediastorage \n
1574 * %http://tizen.org/privilege/externalstorage
1576 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1577 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1578 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1579 * If you can access both storage, you should add all privilege. \n
1580 * This function does not support USB storage.
1582 * @param[in] media The handle to the media info
1583 * @param[in] dst_path The path of destination
1585 * @return @c 0 on success,
1586 * otherwise a negative error value
1588 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1589 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1590 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1591 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1592 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1593 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1594 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1595 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1597 * @pre This function requires opened connection to content service by media_content_connect().
1599 * @see media_content_connect()
1600 * @see media_content_scan_folder()
1602 int media_info_move_to_db(media_info_h media, const char* dst_path);
1605 * @brief Creates a thumbnail file for the given media, asynchronously.
1606 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1607 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1608 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1609 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1611 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1614 * @privilege %http://tizen.org/privilege/content.write \n
1615 * %http://tizen.org/privilege/mediastorage \n
1616 * %http://tizen.org/privilege/externalstorage
1618 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1619 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1620 * Items in external storage except MMC not supported.
1622 * @param[in] media The handle to the media info
1623 * @param[in] callback The callback function to be invoked
1624 * @param[in] user_data The user data to be passed to the callback function
1626 * @return @c 0 on success,
1627 * otherwise a negative error value
1629 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1630 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1631 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1632 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1633 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1634 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1635 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1636 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1638 * @pre This function requires opened connection to content service by media_content_connect().
1640 * @see media_content_connect()
1642 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1645 * @brief Cancels the creation of thumbnail file for the given media.
1646 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1649 * @privilege %http://tizen.org/privilege/content.write
1651 * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1653 * @param[in] media The handle to the media info
1655 * @return @c 0 on success,
1656 * otherwise a negative error value
1658 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1659 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1660 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1661 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1663 * @pre This function requires opened connection to content service by media_content_connect().
1664 * @see media_content_connect()
1666 int media_info_cancel_thumbnail(media_info_h media);
1669 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1670 * @brief Starts face detection for the given image, asynchronously.
1671 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1672 * The given callback function is called when the detection is completed. \n
1673 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1678 * @privilege %http://tizen.org/privilege/content.write \n
1679 * %http://tizen.org/privilege/mediastorage \n
1680 * %http://tizen.org/privilege/externalstorage
1682 * @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
1683 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1684 * Media items in external storage are not supported, with the exception of MMC items.
1686 * @param[in] media The handle to the media info
1687 * @param[in] callback The callback function to be invoked when detection is completed
1688 * @param[in] user_data The user data to be passed to the callback function
1690 * @return @c 0 on success,
1691 * otherwise a negative error value
1693 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1694 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1695 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1696 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1697 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1698 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1699 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1700 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1701 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1703 * @pre This function requires opened connection to content service by media_content_connect().
1705 * @see media_content_connect()
1706 * @see media_info_cancel_face_detection()
1708 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1711 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1712 * @brief Cancels face detection of image for the given media.
1713 * @details This function cancels face detection for given media item. \n
1714 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1719 * @privilege %http://tizen.org/privilege/content.write
1721 * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1723 * @param[in] media The handle to the media info
1725 * @return @c 0 on success,
1726 * otherwise a negative error value
1728 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1729 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1730 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1731 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1733 * @pre This function requires opened connection to content service by media_content_connect().
1735 * @see media_content_connect()
1736 * @see media_info_start_face_detection()
1738 int media_info_cancel_face_detection(media_info_h media);
1741 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1742 * @brief Creates the media info handle.
1743 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1747 * @privilege %http://tizen.org/privilege/mediastorage \n
1748 * %http://tizen.org/privilege/externalstorage
1750 * @remarks The @a media should be released using media_info_destroy().
1751 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1752 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1753 * If you can access both storage, you must add all privilege.
1755 * @param[in] path The path to create the media info handle
1756 * @param[out] media The handle to the media info
1758 * @return @c 0 on success,
1759 * otherwise a negative error value
1761 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1762 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1763 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1764 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1765 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1767 * @see media_info_destroy()
1769 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1772 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1773 * @brief Inserts media info to database with media info data.
1777 * @privilege %http://tizen.org/privilege/content.write
1779 * @remarks The @a media should be released using media_info_destroy().
1781 * @param[in] media The handle to the media info
1783 * @return @c 0 on success,
1784 * otherwise a negative error value
1786 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1787 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1788 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1789 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1791 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1794 * @deprecated Deprecated since 4.0.
1795 * @brief Sets the title of media info handle.
1798 * @param[in] media The handle to the media info
1799 * @param[in] title The title of media info handle
1801 * @return @c 0 on success,
1802 * otherwise a negative error value
1804 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1805 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1806 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1808 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1811 * @deprecated Deprecated since 4.0.
1812 * @brief Sets the album of media info handle.
1815 * @param[in] media The handle to the media info
1816 * @param[in] album The album of the media
1818 * @return @c 0 on success,
1819 * otherwise a negative error value
1821 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1822 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1823 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1825 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1828 * @deprecated Deprecated since 4.0.
1829 * @brief Sets the artist of media info handle.
1832 * @param[in] media The handle to the media info
1833 * @param[in] artist The artist of media info handle
1835 * @return @c 0 on success,
1836 * otherwise a negative error value
1838 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1839 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1840 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1842 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1845 * @deprecated Deprecated since 4.0.
1846 * @brief Sets the genre of media info handle.
1849 * @param[in] media The handle to the media info
1850 * @param[in] genre The genre of media info handle
1852 * @return @c 0 on success,
1853 * otherwise a negative error value
1855 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1856 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1857 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1859 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1862 * @deprecated Deprecated since 4.0.
1863 * @brief Sets the recorded date of media info handle.
1866 * @param[in] media The handle to the media info
1867 * @param[in] recorded_date The recorded date of media info handle
1869 * @return @c 0 on success,
1870 * otherwise a negative error value
1872 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1873 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1874 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1876 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1884 #endif /* __cplusplus */
1886 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */