2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_MEDIA_INFORMATION_H__
19 #define __TIZEN_MEDIA_INFORMATION_H__
21 #include <media_content_type.h>
27 #endif /* __cplusplus */
31 * @brief This file contains the media info API and related functions to proceed with it. \n
32 * You can use the functions to insert, delete, count and get list of content files from media database. \n
33 * You can get properties of content file such as size, mime_type, modified_time etc. And you can set properties such as provider, favorite etc. \n
34 * And you can get bookmark, face, tag info related the content file.
39 * @addtogroup CAPI_CONTENT_MEDIA_INFO_MODULE
44 * @brief Inserts the content file into the media database.
45 * @details In general, you can use this API to insert content files into the media database. \n
46 * You can use media_content_scan_file()/media_content_scan_folder() API instead of this API.
48 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
51 * @privilege %http://tizen.org/privilege/content.write \n
52 * %http://tizen.org/privilege/mediastorage \n
53 * %http://tizen.org/privilege/externalstorage
55 * @remarks You must release the handle using media_info_destroy(). \n
56 * You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
57 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
58 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
59 * If you can access both storage, you must add all privilege.
61 * @param[in] path The path of the content file to add
62 * @param[out] info The handle of the inserted content file
64 * @return @c 0 on success,
65 * otherwise a negative error value
67 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
68 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
69 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
70 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
71 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
72 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
73 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
74 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
76 * @pre This function requires opened connection to content service by media_content_connect().
78 * @see media_content_connect()
79 * @see media_content_scan_file()
80 * @see media_content_scan_folder()
82 int media_info_insert_to_db(const char *path, media_info_h *info);
85 * @brief Inserts content files into the media database, asynchronously.
86 * @details This function can insert multiple content files into the media database.
88 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
91 * @privilege %http://tizen.org/privilege/content.write \n
92 * %http://tizen.org/privilege/mediastorage \n
93 * %http://tizen.org/privilege/externalstorage
95 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
96 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
97 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
98 * If you can access both storage, you must add all privilege.
100 * @param[in] path_array The path array of the content files to add
101 * @param[in] array_length The length of the array
102 * @param[in] callback The callback to be invoked when media items inserted completely
103 * @param[in] user_data The user data to be passed to the callback function
105 * @return @c 0 on success,
106 * otherwise a negative error value
108 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
109 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
110 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
111 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
112 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
113 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
114 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
115 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
117 * @pre This function requires opened connection to content service by media_content_connect().
119 * @see media_content_connect()
120 * @see media_insert_completed_cb()
122 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
125 * @brief Inserts the burst shot images into the media database, asynchronously.
126 * @details This function inserts burst images into the media database.
127 * media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.
129 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
132 * @privilege %http://tizen.org/privilege/content.write \n
133 * %http://tizen.org/privilege/mediastorage \n
134 * %http://tizen.org/privilege/externalstorage
136 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
137 * If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
138 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
139 * If you can access both storage, you must add all privilege.
141 * @param[in] path_array The path array of the burst shot images to add
142 * @param[in] array_length The length of the array
143 * @param[in] callback The callback to be invoked when the images are inserted completely
144 * @param[in] user_data The user data to be passed to the callback function
146 * @return @c 0 on success,
147 * otherwise a negative error value
149 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
150 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
151 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
152 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
153 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
154 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
155 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
156 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
158 * @pre This function requires opened connection to content service by media_content_connect().
160 * @see media_content_connect()
161 * @see media_insert_burst_shot_completed_cb()
163 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);
166 * @brief Deletes the media information from the media database.
167 * @details This function only remove media information in the media database. \n
168 * You can use media_content_scan_file()/media_content_scan_folder() API instead of this API if file is removed from the file system.
170 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
173 * @privilege %http://tizen.org/privilege/content.write
175 * @param[in] media_id The media ID. It can get from media info handle.
177 * @return @c 0 on success,
178 * otherwise a negative error value
180 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
181 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
182 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
183 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
184 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
185 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
186 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
188 * @pre This function requires opened connection to content service by media_content_connect().
190 * @see media_content_connect()
191 * @see media_content_scan_file()
192 * @see media_content_scan_folder()
194 int media_info_delete_from_db(const char *media_id);
197 * @brief Deletes media information that meets the conditions of the filter from the media database.
198 * @details This function can delete multiple media information from the media database.
200 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
203 * @privilege %http://tizen.org/privilege/content.write
205 * @param[in] filter The filter handle
207 * @return @c 0 on success,
208 * otherwise a negative error value
210 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
211 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
212 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
213 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
214 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
215 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
216 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
218 * @pre This function requires opened connection to content service by media_content_connect().
220 * @see media_content_connect()
221 * @see media_filter_create()
223 int media_info_delete_batch_from_db(filter_h filter);
227 * @brief Destroys media info.
228 * @details The function frees all resources related to the media info handle. This handle
229 * can no longer be used to perform any operation. New media info handle has to
230 * be created before the next usage.
232 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
234 * @param[in] media The media info handle
236 * @return @c 0 on success,
237 * otherwise a negative error value
239 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
240 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
242 * @pre Get copy of media_info handle by calling media_info_clone().
244 * @see media_info_clone()
246 int media_info_destroy(media_info_h media);
249 * @brief Clones the media info handle.
251 * @details This function copies the media info handle from a source to the destination.
252 * There is no media_info_create() function. The media_info_h is created internally and
253 * available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
254 * To use this handle outside of these foreach functions, use this function.
256 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
258 * @remarks You must release the destination handle using media_info_destroy().
260 * @param[out] dst The destination handle to the media info
261 * @param[in] src The source handle to media info
263 * @return @c 0 on success,
264 * otherwise a negative error value
266 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
267 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
268 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
270 * @see media_info_destroy()
271 * @see media_album_foreach_media_from_db()
272 * @see media_playlist_foreach_media_from_db()
273 * @see media_group_foreach_media_from_db()
274 * @see media_tag_foreach_media_from_db()
275 * @see media_info_foreach_media_from_db()
276 * @see media_info_insert_to_db()
277 * @see media_folder_foreach_media_from_db()
279 int media_info_clone(media_info_h *dst, media_info_h src);
282 * @brief Gets the count of media info for the passed @a filter from the media database.
283 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
285 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
288 * @param[in] filter The handle to filter
289 * @param[out] media_count The count of media
291 * @return @c 0 on success,
292 * otherwise a negative error value
294 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
295 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
296 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
297 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
298 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
300 * @pre This function requires opened connection to content service by media_content_connect().
302 * @see media_content_connect()
303 * @see media_filter_create()
305 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
308 * @brief Iterates through media info from the media database.
309 * @details This function gets all media info handles meeting the given @a filter.
310 * The @a callback function will be invoked for every retrieved media info.
311 * If @c NULL is passed to the @a filter, then no filtering is applied.
313 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
315 * @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,
316 * your callback function is invoked as inline function.
317 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
318 * We do not recommend you call updating DB function in callback of foreach function.
320 * @param[in] filter The media info handle filter
321 * @param[in] callback The callback function to be invoked
322 * @param[in] user_data The user data to be passed to the callback function
324 * @return @c 0 on success,
325 * otherwise a negative error value
327 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
328 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
329 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
330 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
331 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
332 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
334 * @pre This function requires opened connection to content service by media_content_connect().
335 * @post This function invokes media_info_cb().
337 * @see media_content_connect()
338 * @see #media_info_cb
339 * @see media_info_filter_create()
341 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
344 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
345 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
347 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
349 * @param[in] media_id The ID of the media info
350 * @param[in] filter The handle to the media filter
351 * @param[out] tag_count The count of the media tag
353 * @return @c 0 on success,
354 * otherwise a negative error value
356 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
357 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
358 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
359 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
360 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
362 * @pre This function requires opened connection to content service by media_content_connect().
364 * @see media_content_connect()
365 * @see media_filter_create()
367 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
370 * @brief Iterates through the media tag in the given media info from the media database.
371 * @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
372 * If @c NULL is passed to the @a filter, then no filtering is applied.
374 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
376 * @param[in] media_id The ID of the media info
377 * @param[in] filter The handle to the media filter
378 * @param[in] callback The callback function to be invoked
379 * @param[in] user_data The user data to be passed to the callback function
381 * @return @c 0 on success,
382 * otherwise a negative error value
384 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
385 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
386 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
387 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
388 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
389 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
391 * @pre This function requires opened connection to content service by media_content_connect().
392 * @post This function invokes media_tag_cb().
394 * @see media_content_connect()
396 * @see media_filter_create()
398 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
401 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
402 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
404 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
406 * @param[in] media_id The ID of the media info
407 * @param[in] filter The handle to the media filter
408 * @param[out] bookmark_count The count of the media tag
410 * @return @c 0 on success,
411 * otherwise a negative error value
413 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
414 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
415 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
416 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
417 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
419 * @pre This function requires opened connection to content service by media_content_connect().
421 * @see media_content_connect()
422 * @see media_filter_create()
424 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
427 * @brief Iterates through the media bookmark in the given media info from the media database.
428 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
429 * If @c NULL is passed to the @a filter, then no filtering is applied.
431 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
433 * @param[in] media_id The ID of the media info
434 * @param[in] filter The handle to the media filter
435 * @param[in] callback The callback function to be invoked
436 * @param[in] user_data The user data to be passed to the callback function
438 * @return @c 0 on success,
439 * otherwise a negative error value
441 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
442 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
443 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
444 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
445 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
446 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
448 * @pre This function requires opened connection to content service by media_content_connect().
449 * @post This function invokes media_bookmark_cb().
451 * @see media_content_connect()
452 * @see media_bookmark_cb()
453 * @see media_filter_create()
455 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
458 * @brief Gets the number of face for the passed @a media_id from the media database.
459 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
463 * @param[in] media_id media id
464 * @param[in] filter The handle to the media filter
465 * @param[out] face_count The count of media face
467 * @return 0 on success, otherwise a negative error value.
469 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
470 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
471 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
472 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
474 * @pre This function requires opened connection to content service by media_content_connect().
475 * @see media_content_connect()
476 * @see media_filter_create()
479 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
482 * @brief Iterates through the media files with optional @a media_id in the given @a face @a face from the media database.
483 * @details This function gets all media face info associated with the given media id and
484 * meeting desired filter option and calls @a callback for
485 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
489 * @param [in] media_id media id
490 * @param[in] filter The handle to the media filter
491 * @param [in] callback The callback function to invoke
492 * @param [in] user_data The user data to be passed to the callback function
494 * @return 0 on success, otherwise a negative error value.
496 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
497 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
498 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
499 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
501 * @pre This function requires opened connection to content service by media_content_connect().
502 * @see media_content_connect()
503 * @see media_filter_create()
506 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
509 * @brief Gets the image metadata handle for a given media info
510 * @details This function returns an image metadata handle retrieved from the media info.
512 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
514 * @remarks You must release the @a image handle using image_meta_destroy().
516 * @param[in] media The media info handle
517 * @param[out] image A handle to image metadata
519 * @return @c 0 on success,
520 * otherwise a negative error value
522 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
523 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
524 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
526 * @see image_meta_destroy()
528 int media_info_get_image(media_info_h media, image_meta_h *image);
531 * @brief Gets a video metadata handle for a given media info.
532 * @details This function returns a video metadata handle retrieved from the media info handle.
534 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
536 * @remarks You must release the @a video handle using video_meta_destroy().
538 * @param[in] media The media info handle
539 * @param[out] video A handle to the video meta
541 * @return @c 0 on success,
542 * otherwise a negative error value
544 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
545 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
546 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
548 * @see video_meta_destroy()
550 int media_info_get_video(media_info_h media, video_meta_h *video);
553 * @brief Gets an audio metadata handle for a given media info.
554 * @details This function returns an audio metadata handle retrieved from the media info handle.
556 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
558 * @remarks You must release the @a audio handle using audio_meta_destroy().
560 * @param[in] media The media info handle
561 * @param[out] audio A handle to the audio meta
563 * @return @c 0 on success,
564 * otherwise a negative error value
566 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
567 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
568 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
570 * @see audio_meta_destroy()
572 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
575 * @brief Gets the media ID
576 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
578 * @param[in] media The media info handle
579 * @param[out] media_id The media ID
581 * @return @c 0 on success,
582 * otherwise a negative error value
584 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
585 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
586 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
588 int media_info_get_media_id(media_info_h media, char **media_id);
591 * @brief Gets the full path of the content file.
592 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
594 * @remarks You must release @a path using free().
596 * @param[in] media The media info handle
597 * @param[out] path The full path of the content file
599 * @return @c 0 on success,
600 * otherwise a negative error value
602 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
603 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
604 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
607 int media_info_get_file_path(media_info_h media, char **path);
610 * @brief Gets the file name including the extension of the content file.
611 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
613 * @remarks You must release @a name using free().
615 * @param[in] media The media info handle
616 * @param[out] name The file name including the extension of the content file
618 * @return @c 0 on success,
619 * otherwise a negative error value
621 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
622 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
623 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
625 int media_info_get_display_name(media_info_h media, char **name);
628 * @brief Gets the content type of the content file.
629 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
631 * @param[in] media The media info handle
632 * @param[out] type The content type of the content file (#media_content_type_e)
634 * @return @c 0 on success,
635 * otherwise a negative error value
637 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
638 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
640 * @see #media_content_type_e
642 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
645 * @brief Gets the MIME type of the content file.
646 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
648 * @remarks You must release @a mime_type using free().
650 * @param[in] media The media info handle
651 * @param[out] mime_type The MIME type of the content file
653 * @return @c 0 on success,
654 * otherwise a negative error value
656 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
657 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
658 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
660 int media_info_get_mime_type(media_info_h media, char **mime_type);
663 * @brief Gets the content file size.
664 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
666 * @param[in] media The media info handle
667 * @param[out] size The content file size
669 * @return @c 0 on success,
670 * otherwise a negative error value
672 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
673 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
675 int media_info_get_size(media_info_h media, unsigned long long *size);
678 * @brief Gets the added time of the content file.
679 * @details The added time refers to the time that content file was first added to media database.
680 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
682 * @param[in] media The media info handle
683 * @param[out] added_time The added time to the media database
685 * @return @c 0 on success,
686 * otherwise a negative error value
688 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
689 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
691 int media_info_get_added_time(media_info_h media, time_t *added_time);
694 * @brief Gets the modified time of the content file.
695 * @details The modified time refers to the last modification time provided by the file system.
696 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
698 * @param[in] media The media info handle
699 * @param[out] time The last modification time of the content file
701 * @return @c 0 on success,
702 * otherwise a negative error value
704 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
705 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
707 int media_info_get_modified_time(media_info_h media, time_t *time);
710 * @brief Gets the timeline of content file.
711 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
712 * Otherwise, timeline value is the same as modified time.
713 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
715 * @param[in] media The media info handle
716 * @param[out] time The timeline of content file
718 * @return @c 0 on success,
719 * otherwise a negative error value
721 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
722 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
724 int media_info_get_timeline(media_info_h media, time_t *time);
727 * @brief Gets the thumbnail path of content file.
728 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
730 * @remarks You must release @a path using free(). \n
731 * If the thumbnail extraction for the given media has not been requested yet, this API returns NULL. To create a thumbnail, you should use media_info_create_thumbnail() API. \n
732 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
734 * @param[in] media The media info handle
735 * @param[out] path The thumbnail path
737 * @return @c 0 on success,
738 * otherwise a negative error value
740 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
741 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
742 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
744 int media_info_get_thumbnail_path(media_info_h media, char **path);
747 * @brief Gets the description of content file.
748 * @details If the value is an empty string, the method returns "Unknown". \n
749 * Since 3.0, if the media info has no description, the method returns empty string.
750 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
752 * @remarks You must release @a description using free().
754 * @param[in] media The media info handle
755 * @param[out] description The description of the content file
757 * @return @c 0 on success,
758 * otherwise a negative error value
760 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
761 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
762 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
764 int media_info_get_description(media_info_h media, char **description);
767 * @brief Gets the longitude of content file.
768 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
770 * @param[in] media The media info handle
771 * @param[out] longitude The longitude of the content file
773 * @return @c 0 on success,
774 * otherwise a negative error value
776 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
777 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
779 int media_info_get_longitude(media_info_h media, double *longitude);
782 * @brief Gets the latitude of content file.
783 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
785 * @param[in] media The media info handle
786 * @param[out] latitude The latitude of the content file
788 * @return @c 0 on success,
789 * otherwise a negative error value
791 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
792 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
795 int media_info_get_latitude(media_info_h media, double* latitude);
798 * @brief Gets the altitude of content file.
799 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
801 * @param[in] media The media info handle
802 * @param[out] altitude The altitude of the content file
804 * @return @c 0 on success,
805 * otherwise a negative error value
807 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
808 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
810 int media_info_get_altitude(media_info_h media, double* altitude);
813 * @brief Gets the weather of content file.
814 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
816 * @param[in] media The media info handle
817 * @param[out] weather The weather of the content file
819 * @return @c 0 on success,
820 * otherwise a negative error value
822 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
823 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
824 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
826 int media_info_get_weather(media_info_h media, char **weather);
829 * @brief Gets the rating of content file.
830 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
832 * @param[in] media The media info handle
833 * @param[out] rating The rating of the content file
835 * @return @c 0 on success,
836 * otherwise a negative error value
838 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
839 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
841 int media_info_get_rating(media_info_h media, int *rating);
844 * @brief Gets the favorite status of content file which User set.
845 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
847 * @param[in] media The media info handle
848 * @param[out] favorite @c true if content file is set as favorite,
849 * otherwise @c false if content file is not set as favorite
851 * @return @c 0 on success,
852 * otherwise a negative error value
854 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
855 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
857 * @see media_info_set_favorite()
859 int media_info_get_favorite(media_info_h media, bool* favorite);
862 * @deprecated Deprecated since 4.0.
863 * @brief Gets the author of content file.
864 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
866 * @remarks You must release @a author using free().
868 * @param[in] media The media info handle
869 * @param[out] author The author of the content file
871 * @return @c 0 on success,
872 * otherwise a negative error value
874 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
875 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
876 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
878 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
881 * @brief Gets the provider of content file which User set.
882 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
884 * @remarks You must release @a provider using free().
886 * @param[in] media The media info handle
887 * @param[out] provider The provider of the content file
889 * @return @c 0 on success,
890 * otherwise a negative error value
892 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
893 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
894 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
896 * @see media_info_set_provider()
898 int media_info_get_provider(media_info_h media, char **provider);
901 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
902 * @brief Gets the content name of content file which User set.
903 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
905 * @remarks You must release @a content_name using free().
907 * @param[in] media The media info handle
908 * @param[out] content_name The content name of the content file
910 * @return @c 0 on success,
911 * otherwise a negative error value
913 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
914 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
915 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
917 * @see media_info_set_content_name()
919 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
922 * @brief Gets the title of content file.
923 * @details If the value is an empty string, the method returns "Unknown". \n
924 * Since 3.0, if the content file has no title, the method returns empty string.
926 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
928 * @remarks You must release @a title using free().
930 * @param[in] media The media info handle
931 * @param[out] title The title of the content file
933 * @return @c 0 on success,
934 * otherwise a negative error value
936 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
937 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
938 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
940 int media_info_get_title(media_info_h media, char **title);
943 * @brief Gets the category of content file which User set.
944 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
946 * @remarks You must release @a category using free().
948 * @param[in] media The media info handle
949 * @param[out] category The category of the content file
951 * @return @c 0 on success,
952 * otherwise a negative error value
954 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
955 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
956 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
958 * @see media_info_set_category()
960 int media_info_get_category(media_info_h media, char **category);
963 * @brief Gets the location tag of content file which User set.
964 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
966 * @remarks You must release @a location_tag using free().
968 * @param[in] media The media info handle
969 * @param[out] location_tag The location of the content file
971 * @return @c 0 on success,
972 * otherwise a negative error value
974 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
975 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
976 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
978 * @see media_info_set_location_tag()
980 int media_info_get_location_tag(media_info_h media, char **location_tag);
983 * @brief Gets the age_rating of content file which User set.
984 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
986 * @remarks You must release @a age_rating using free().
988 * @param[in] media The media info handle
989 * @param[out] age_rating The age rating of the content file
991 * @return @c 0 on success,
992 * otherwise a negative error value
994 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
995 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
996 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
998 * @see media_info_set_age_rating()
1000 int media_info_get_age_rating(media_info_h media, char **age_rating);
1003 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1004 * @brief Gets the keyword of content file which User set.
1005 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1007 * @remarks You must release @a keyword using free().
1009 * @param[in] media The media info handle
1010 * @param[out] keyword The keyword of the content file
1012 * @return @c 0 on success,
1013 * otherwise a negative error value
1015 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1016 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1017 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1019 * @see media_info_set_keyword()
1021 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1024 * @brief Gets the storage id of content file.
1025 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1027 * @remarks You must release @a storage_id using free().
1029 * @param[in] media The media info handle
1030 * @param[out] storage_id The storage id of the content file
1032 * @return @c 0 on success,
1033 * otherwise a negative error value
1035 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1036 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1037 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1039 int media_info_get_storage_id(media_info_h media, char **storage_id);
1042 * @brief Checks whether the media is protected via DRM.
1043 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1045 * @param[in] media The media info handle
1046 * @param[out] is_drm @c true if media is DRM media,
1047 * otherwise @c false if media is not DRM media
1049 * @return @c 0 on success,
1050 * otherwise a negative error value
1052 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1053 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1055 int media_info_is_drm(media_info_h media, bool *is_drm);
1058 * @brief Checks whether the content file is 360 content.
1061 * @param[in] media The media info handle
1062 * @param[out] is_360 @c true if media is 360 content,
1063 * otherwise @c false if media is not 360 content
1065 * @return @c 0 on success,
1066 * otherwise a negative error value
1068 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1069 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1071 int media_info_is_360_content(media_info_h media, bool *is_360);
1074 * @brief Gets the storage type of content file.
1075 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1077 * @param[in] media The media info handle
1078 * @param[out] storage_type The storage type of the content file
1080 * @return @c 0 on success,
1081 * otherwise a negative error value
1083 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1084 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1086 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1089 * @deprecated Deprecated since 4.0. \n
1090 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1091 * @brief Gets number which represents how many times given content has been played.
1092 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1094 * @param [in] media The handle to media info
1095 * @param [out] played_count The counter of content played
1097 * @return 0 on success,
1098 * otherwise a negative error value
1100 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1101 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1103 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1106 * @deprecated Deprecated since 4.0. \n
1107 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1108 * @brief Gets the content's played time parameter.
1109 * @details Function returns content's elapsed playback time parameter as period
1110 * starting from the beginning of the track.
1111 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1113 * @param [in] media The handle to media info
1114 * @param [out] played_time The elapsed time of the content
1116 * @return 0 on success,
1117 * otherwise a negative error value
1119 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1120 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1122 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1125 * @brief Gets the media info from the media database.
1127 * @details This function creates a new media handle from the media database by the given @a media_id.
1128 * Media info will be created and filled with information.
1130 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1132 * @remarks You must release @a media using media_tag_destroy().
1134 * @param[in] media_id The ID of media info
1135 * @param[out] media The media handle associated with the media ID
1137 * @return @c 0 on success,
1138 * otherwise a negative error value
1140 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1141 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1142 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1143 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1144 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1145 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1147 * @pre This function requires opened connection to content service by media_content_connect().
1149 * @see media_content_connect()
1150 * @see media_info_destroy()
1152 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1155 * @deprecated Deprecated since 4.0. \n
1156 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1157 * @brief Increments the played count to content meta handle.
1158 * @details You can increase the played(opened) count of the content file.
1159 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1161 * @param [in] media The handle to media info
1163 * @return 0 on success,
1164 * otherwise a negative error value
1166 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1167 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1169 * @post media_info_update_to_db()
1171 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1174 * @deprecated Deprecated since 4.0. \n
1175 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1176 * @brief Sets the played time to content meta handle.
1177 * @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.
1178 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1180 * @param [in] media The handle to media info
1182 * @return 0 on success,
1183 * otherwise a negative error value
1185 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1186 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1188 * @post media_info_update_to_db()
1190 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1193 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1194 * @brief Sets the file name including the extension of the content file.
1195 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1197 * @param[in] media The media info handle
1198 * @param[in] display_name The file name including the extension of the content file.
1200 * @return @c 0 on success,
1201 * otherwise a negative error value
1203 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1204 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1205 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1207 * @post media_info_update_to_db().
1210 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1213 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1214 * @brief Sets the description of media info.
1215 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1217 * @param[in] media The media info handle
1218 * @param[in] description The description of the media info
1220 * @return @c 0 on success,
1221 * otherwise a negative error value
1223 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1224 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1225 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1227 * @post media_info_update_to_db().
1230 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1233 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1234 * @brief Sets the longitude of media info.
1235 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1237 * @param[in] media The media info handle
1238 * @param[in] longitude The longitude of the media info
1240 * @return @c 0 on success,
1241 * otherwise a negative error value
1243 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1244 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1246 * @post media_info_update_to_db().
1248 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1251 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1252 * @brief Sets the latitude of media info.
1253 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1255 * @param[in] media The media info handle
1256 * @param[in] latitude The latitude of the media info
1258 * @return @c 0 on success,
1259 * otherwise a negative error value
1261 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1262 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1264 * @post media_info_update_to_db().
1266 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1269 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1270 * @brief Sets the altitude of media info.
1271 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1273 * @param[in] media The media info handle
1274 * @param[in] altitude The altitude of the media info
1276 * @return @c 0 on success,
1277 * otherwise a negative error value
1279 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1280 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1282 * @post media_info_update_to_db().
1284 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1287 * @brief Sets the weather of media info.
1288 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1290 * @param[in] media The media info handle
1291 * @param[in] weather The weather of the media info
1293 * @return @c 0 on success,
1294 * otherwise a negative error value
1296 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1297 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1298 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1300 * @post media_info_update_to_db().
1303 int media_info_set_weather(media_info_h media, const char *weather);
1306 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1307 * @brief Sets the rating of media info.
1308 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1310 * @param[in] media The media info handle
1311 * @param[in] rating The rating of the media info
1313 * @return @c 0 on success,
1314 * otherwise a negative error value
1316 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1317 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1319 * @post media_info_update_to_db().
1321 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1324 * @brief Sets the favorite of media info.
1325 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1326 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1327 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1329 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1331 * @param[in] media The media info handle
1332 * @param[in] favorite Set @c true to set the media info as favorite,
1333 * otherwise set @c false to not set the media info as favorite
1335 * @return @c 0 on success,
1336 * otherwise a negative error value
1338 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1339 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1341 int media_info_set_favorite(media_info_h media, bool favorite);
1344 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1345 * @brief Sets the author of media info.
1346 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1348 * @param[in] media The media info handle
1349 * @param[in] author The author of the media info
1351 * @return @c 0 on success,
1352 * otherwise a negative error value
1354 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1355 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1356 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1358 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1361 * @brief Sets the provider of media info.
1362 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1364 * @param[in] media The media info handle
1365 * @param[in] provider The provider of the media info
1367 * @return @c 0 on success,
1368 * otherwise a negative error value
1370 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1371 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1372 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1374 int media_info_set_provider(media_info_h media, const char *provider);
1377 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1378 * @brief Sets the content name of media info.
1379 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1381 * @param[in] media The media info handle
1382 * @param[in] content_name The content name of the media info
1384 * @return @c 0 on success,
1385 * otherwise a negative error value
1387 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1388 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1389 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1391 * @post media_info_update_to_db()
1393 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1396 * @brief Sets the category of media info.
1397 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1399 * @param[in] media The media info handle
1400 * @param[in] category The category of the media info
1402 * @return @c 0 on success,
1403 * otherwise a negative error value
1405 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1406 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1407 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1409 * @post media_info_update_to_db()
1411 int media_info_set_category(media_info_h media, const char *category);
1414 * @brief Sets the location tag of media info.
1415 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1417 * @param[in] media The media info handle
1418 * @param[in] location_tag The location of the media info
1420 * @return @c 0 on success,
1421 * otherwise a negative error value
1423 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1424 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1425 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1427 * @post media_info_update_to_db()
1429 int media_info_set_location_tag(media_info_h media, const char *location_tag);
1432 * @brief Sets the age rating of media info.
1433 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1435 * @param[in] media The media info handle
1436 * @param[in] age_rating The age rating of the media info
1438 * @return @c 0 on success,
1439 * otherwise a negative error value
1441 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1442 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1443 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1445 * @post media_info_update_to_db()
1447 int media_info_set_age_rating(media_info_h media, const char *age_rating);
1450 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1451 * @brief Sets the keyword of media info.
1452 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1454 * @param[in] media The media info handle
1455 * @param[in] keyword The keyword of the media info
1457 * @return @c 0 on success,
1458 * otherwise a negative error value
1460 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1461 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1462 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1464 * @post media_info_update_to_db()
1466 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1469 * @brief Updates the media info to the media database.
1471 * @details The function updates the given media info in the media database.
1473 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1475 * @privilege %http://tizen.org/privilege/content.write
1477 * @remarks The function should be called after any change in media, to be updated to the media
1478 * database. For example, after using media_info_set_favorite()
1479 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1480 * the given media info attributes in the media database.
1482 * @param[in] media The media info handle
1484 * @return @c 0 on success,
1485 * otherwise a negative error value
1487 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1488 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1489 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1490 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1491 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1492 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1493 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1494 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1496 * @pre This function requires opened connection to content service by media_content_connect().
1498 * @see media_content_connect()
1499 * @see media_info_set_favorite()
1500 * @see media_info_set_provider()
1501 * @see media_info_set_category()
1502 * @see media_info_set_location_tag()
1503 * @see media_info_set_age_rating()
1505 int media_info_update_to_db(media_info_h media);
1508 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1509 * @brief Refreshes the media metadata to the media database.
1510 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1513 * @privilege %http://tizen.org/privilege/content.write \n
1514 * %http://tizen.org/privilege/mediastorage \n
1515 * %http://tizen.org/privilege/externalstorage
1517 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1518 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1519 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1520 * If you can access both storage, you should add all privilege.
1522 * @param[in] media_id The ID of the media info
1524 * @return @c 0 on success,
1525 * otherwise a negative error value
1527 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1528 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1529 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1530 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1531 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1532 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1533 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1534 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1536 * @pre This function requires opened connection to content service by media_content_connect().
1538 * @see media_content_connect()
1540 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1543 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1544 * @brief Sets the added time of media info.
1545 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1547 * @param[in] media The media info handle
1548 * @param[in] added_time The added time of the media info
1550 * @return @c 0 on success,
1551 * otherwise a negative error value
1553 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1554 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1555 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1557 * @post media_info_update_to_db()
1559 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1562 * @brief Moves the media info to the given destination path in the media database.
1563 * @details After moving or renaming a file in the filesystem, call this function to update the database.
1565 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1568 * @privilege %http://tizen.org/privilege/content.write \n
1569 * %http://tizen.org/privilege/mediastorage \n
1570 * %http://tizen.org/privilege/externalstorage
1572 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1573 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1574 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1575 * If you can access both storage, you should add all privilege. \n
1576 * This API does not support USB storage.
1578 * @param[in] media The media info handle
1579 * @param[in] dst_path The path of destination
1581 * @return @c 0 on success,
1582 * otherwise a negative error value
1584 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1585 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1586 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1587 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1588 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1589 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1590 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1591 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1593 * @pre This function requires opened connection to content service by media_content_connect().
1595 * @see media_content_connect()
1596 * @see media_content_scan_folder()
1598 int media_info_move_to_db(media_info_h media, const char* dst_path);
1601 * @brief Creates a thumbnail file for the given media, asynchronously.
1602 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1603 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1604 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1605 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1607 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1610 * @privilege %http://tizen.org/privilege/content.write
1612 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1613 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1614 * Items in external storage except MMC not supported.
1616 * @param[in] media The media info handle
1617 * @param[in] callback The callback function to be invoked
1618 * @param[in] user_data The user data to be passed to the callback function
1620 * @return @c 0 on success,
1621 * otherwise a negative error value
1623 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1624 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1625 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1626 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1627 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1628 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1629 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1630 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1632 * @pre This function requires opened connection to content service by media_content_connect().
1634 * @see media_content_connect()
1636 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1639 * @brief Cancels the creation of thumbnail file for the given media.
1640 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1643 * @privilege %http://tizen.org/privilege/content.write
1645 * @remarks If you request cancel for the already thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1647 * @param[in] media The media info handle
1649 * @return @c 0 on success,
1650 * otherwise a negative error value
1652 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1653 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1654 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1655 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1657 * @pre This function requires opened connection to content service by media_content_connect().
1658 * @see media_content_connect()
1660 int media_info_cancel_thumbnail(media_info_h media);
1663 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1664 * @brief Starts face detection for the given image, asynchronously.
1665 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1666 * The given callback function is called when the detection is completed. \n
1667 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1672 * @privilege %http://tizen.org/privilege/content.write \n
1673 * %http://tizen.org/privilege/mediastorage
1675 * @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
1676 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1677 * Media items in external storage are not supported, with the exception of MMC items.
1679 * @param[in] media The media info handle
1680 * @param[in] callback The callback function to be invoked when detection is completed
1681 * @param[in] user_data The user data to be passed to the callback function
1683 * @return @c 0 on success,
1684 * otherwise a negative error value
1686 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1687 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1688 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1689 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1690 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1691 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1692 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1693 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1694 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1696 * @pre This function requires opened connection to content service by media_content_connect().
1698 * @see media_content_connect()
1699 * @see media_info_cancel_face_detection()
1701 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1704 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1705 * @brief Cancels face detection of image for the given media.
1706 * @details This function cancels face detection for given media item. \n
1707 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() API will not be invoked.
1712 * @privilege %http://tizen.org/privilege/content.write
1714 * @remarks If face detection is already done when you request the cancellation, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1716 * @param[in] media The media info handle
1718 * @return @c 0 on success,
1719 * otherwise a negative error value
1721 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1722 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1723 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1724 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1726 * @pre This function requires opened connection to content service by media_content_connect().
1728 * @see media_content_connect()
1729 * @see media_info_start_face_detection()
1731 int media_info_cancel_face_detection(media_info_h media);
1734 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1735 * @brief Creates the media info handle.
1736 * @details If the information about the file that is already known, you can use this API to generate empty handler.
1740 * @privilege %http://tizen.org/privilege/mediastorage \n
1741 * %http://tizen.org/privilege/externalstorage
1743 * @remarks If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1744 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1745 * If you can access both storage, you must add all privilege.
1747 * @param[in] path The path to create the media info handle
1748 * @param[out] media The media info handle
1750 * @return @c 0 on success,
1751 * otherwise a negative error value
1753 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1754 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1755 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1756 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1757 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1759 * @see media_info_destroy()
1761 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1764 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1765 * @brief Inserts media info to database with media info data.
1768 * @remarks You must release @a info using media_info_destroy().
1771 * @privilege %http://tizen.org/privilege/content.write
1773 * @param[in] media The media info handle to be inserted
1775 * @return @c 0 on success,
1776 * otherwise a negative error value
1778 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1779 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1780 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1781 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1783 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1786 * @deprecated Deprecated since 4.0.
1787 * @brief Sets the title of media info handle.
1790 * @param[in] media The media info handle
1791 * @param[in] title The title of media info handle
1793 * @return @c 0 on success,
1794 * otherwise a negative error value
1796 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1797 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1798 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1800 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1803 * @deprecated Deprecated since 4.0.
1804 * @brief Sets the album of media info handle.
1807 * @param[in] media The media info handle
1808 * @param[in] album The album 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_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1820 * @deprecated Deprecated since 4.0.
1821 * @brief Sets the artist of media info handle.
1824 * @param[in] media The media info handle
1825 * @param[in] artist The artist of media info handle
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_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1837 * @deprecated Deprecated since 4.0.
1838 * @brief Sets the genre of media info handle.
1841 * @param[in] media The media info handle
1842 * @param[in] genre The genre 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_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1854 * @deprecated Deprecated since 4.0.
1855 * @brief Sets the recorded date of media info handle.
1858 * @param[in] media The media info handle
1859 * @param[in] recorded_date The recorded date 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_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1878 #endif /* __cplusplus */
1880 #endif /* __TIZEN_MEDIA_INFORMATION_H__ */