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 value is an empty string, the method returns "Unknown". \n
928 * Since 3.0, if the content file has no title, the method returns empty string.
930 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
932 * @remarks The @a title should be released using free().
934 * @param[in] media The handle to the media info
935 * @param[out] title The title of the content file
937 * @return @c 0 on success,
938 * otherwise a negative error value
940 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
941 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
942 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
944 int media_info_get_title(media_info_h media, char **title);
947 * @deprecated Deprecated since 4.0.
948 * @brief Gets the category of content file which User set.
949 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
951 * @remarks The @a category should be released using free().
953 * @param[in] media The handle to the media info
954 * @param[out] category The category of the content file
956 * @return @c 0 on success,
957 * otherwise a negative error value
959 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
960 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
961 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
964 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
967 * @deprecated Deprecated since 4.0.
968 * @brief Gets the location tag of content file which User set.
969 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
971 * @remarks The @a location_tag should be released using free().
973 * @param[in] media The handle to the media info
974 * @param[out] location_tag The location of the content file
976 * @return @c 0 on success,
977 * otherwise a negative error value
979 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
980 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
981 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
984 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
987 * @deprecated Deprecated since 4.0.
988 * @brief Gets the age_rating of content file which User set.
989 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
991 * @remarks The @a age_rating should be released using free().
993 * @param[in] media The handle to the media info
994 * @param[out] age_rating The age rating of the content file
996 * @return @c 0 on success,
997 * otherwise a negative error value
999 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1000 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1001 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1004 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1007 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1008 * @brief Gets the keyword of content file which User set.
1009 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1011 * @remarks The @a keyword should be released using free().
1013 * @param[in] media The handle to the media info
1014 * @param[out] keyword The keyword of the content file
1016 * @return @c 0 on success,
1017 * otherwise a negative error value
1019 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1020 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1021 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1024 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1027 * @brief Gets the storage id of content file.
1028 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1030 * @remarks The @a storage_id should be released using free().
1032 * @param[in] media The handle to the media info
1033 * @param[out] storage_id The ID of the media storage
1035 * @return @c 0 on success,
1036 * otherwise a negative error value
1038 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1039 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1040 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1042 int media_info_get_storage_id(media_info_h media, char **storage_id);
1045 * @brief Checks whether the media is protected via DRM.
1046 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1048 * @param[in] media The handle to the media info
1049 * @param[out] is_drm @c true if media is DRM media,
1050 * otherwise @c false if media is not DRM media
1052 * @return @c 0 on success,
1053 * otherwise a negative error value
1055 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1056 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1058 int media_info_is_drm(media_info_h media, bool *is_drm);
1061 * @brief Checks whether the content file is 360 content.
1064 * @param[in] media The handle to the media info
1065 * @param[out] is_360 @c true if media is 360 content,
1066 * otherwise @c false if media is not 360 content
1068 * @return @c 0 on success,
1069 * otherwise a negative error value
1071 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1072 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1074 int media_info_is_360_content(media_info_h media, bool *is_360);
1077 * @brief Gets the storage type of content file.
1078 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1080 * @param[in] media The handle to the media info
1081 * @param[out] storage_type The storage type of the content file
1083 * @return @c 0 on success,
1084 * otherwise a negative error value
1086 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1087 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1089 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1092 * @deprecated Deprecated since 4.0. \n
1093 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1094 * @brief Gets number which represents how many times given content has been played.
1095 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1097 * @param[in] media The handle to the media info
1098 * @param[out] played_count The counter of content played
1100 * @return 0 on success,
1101 * otherwise a negative error value
1103 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1104 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1106 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1109 * @deprecated Deprecated since 4.0. \n
1110 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1111 * @brief Gets the content's played time parameter.
1112 * @details Function returns content's elapsed playback time parameter as period
1113 * starting from the beginning of the track.
1114 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1116 * @param[in] media The handle to the media info
1117 * @param[out] played_time The elapsed time of the content
1119 * @return 0 on success,
1120 * otherwise a negative error value
1122 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1123 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1125 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1128 * @brief Gets the media info from the media database.
1130 * @details This function creates a new media handle from the media database by the given @a media_id.
1131 * Media info will be created and filled with information.
1133 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1135 * @remarks The @a media should be released using media_info_destroy().
1137 * @param[in] media_id The media ID
1138 * @param[out] media The handle to the media info
1140 * @return @c 0 on success,
1141 * otherwise a negative error value
1143 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1144 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1145 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1146 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1147 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1149 * @pre This function requires opened connection to content service by media_content_connect().
1151 * @see media_content_connect()
1152 * @see media_info_destroy()
1154 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1157 * @deprecated Deprecated since 4.0. \n
1158 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1159 * @brief Increments the played count to content meta handle.
1160 * @details You can increase the played(opened) count of the content file.
1161 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1163 * @param[in] media The handle to the media info
1165 * @return 0 on success,
1166 * otherwise a negative error value
1168 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1169 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1171 * @post media_info_update_to_db()
1173 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1176 * @deprecated Deprecated since 4.0. \n
1177 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1178 * @brief Sets the played time to content meta handle.
1179 * @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.
1180 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1182 * @param[in] media The handle to the media info
1184 * @return 0 on success,
1185 * otherwise a negative error value
1187 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1188 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1190 * @post media_info_update_to_db()
1192 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1195 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1196 * @brief Sets the file name including the extension of the content file.
1197 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1199 * @param[in] media The handle to the media info
1200 * @param[in] display_name The file name including the extension of the content file.
1202 * @return @c 0 on success,
1203 * otherwise a negative error value
1205 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1206 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1207 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1209 * @post media_info_update_to_db().
1212 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1215 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1216 * @brief Sets the description of media info.
1217 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1219 * @param[in] media The handle to the media info
1220 * @param[in] description The description of the media info
1222 * @return @c 0 on success,
1223 * otherwise a negative error value
1225 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1226 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1227 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1229 * @post media_info_update_to_db().
1232 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1235 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1236 * @brief Sets the longitude of media info.
1237 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1239 * @param[in] media The handle to the media info
1240 * @param[in] longitude The longitude of the media info
1242 * @return @c 0 on success,
1243 * otherwise a negative error value
1245 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1246 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1248 * @post media_info_update_to_db().
1250 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1253 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1254 * @brief Sets the latitude of media info.
1255 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1257 * @param[in] media The handle to the media info
1258 * @param[in] latitude The latitude of the media info
1260 * @return @c 0 on success,
1261 * otherwise a negative error value
1263 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1264 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1266 * @post media_info_update_to_db().
1268 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1271 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1272 * @brief Sets the altitude of media info.
1273 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1275 * @param[in] media The handle to the media info
1276 * @param[in] altitude The altitude of the media info
1278 * @return @c 0 on success,
1279 * otherwise a negative error value
1281 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1282 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1284 * @post media_info_update_to_db().
1286 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1289 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1290 * @brief Sets the weather of media info.
1291 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1293 * @param[in] media The handle to the media info
1294 * @param[in] weather The weather of the media info
1296 * @return @c 0 on success,
1297 * otherwise a negative error value
1299 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1300 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1301 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1303 * @post media_info_update_to_db().
1306 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1309 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1310 * @brief Sets the rating of media info.
1311 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1313 * @param[in] media The handle to the media info
1314 * @param[in] rating The rating of the media info
1316 * @return @c 0 on success,
1317 * otherwise a negative error value
1319 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1320 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1322 * @post media_info_update_to_db().
1324 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1327 * @brief Sets the favorite of media info.
1328 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1329 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1330 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1332 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1334 * @param[in] media The handle to the media info
1335 * @param[in] favorite Set @c true to set the media info as favorite,
1336 * otherwise set @c false to not set the media info as favorite
1338 * @return @c 0 on success,
1339 * otherwise a negative error value
1341 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1342 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1344 int media_info_set_favorite(media_info_h media, bool favorite);
1347 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1348 * @brief Sets the author of media info.
1349 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1351 * @param[in] media The handle to the media info
1352 * @param[in] author The author of the media info
1354 * @return @c 0 on success,
1355 * otherwise a negative error value
1357 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1358 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1359 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1361 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1364 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1365 * @brief Sets the provider of media info.
1366 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1368 * @param[in] media The handle to the media info
1369 * @param[in] provider The provider of the media info
1371 * @return @c 0 on success,
1372 * otherwise a negative error value
1374 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1375 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1376 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1378 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1381 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1382 * @brief Sets the content name of media info.
1383 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1385 * @param[in] media The handle to the media info
1386 * @param[in] content_name The content name of the media info
1388 * @return @c 0 on success,
1389 * otherwise a negative error value
1391 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1392 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1393 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1395 * @post media_info_update_to_db()
1397 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1400 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1401 * @brief Sets the category of media info.
1402 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1404 * @param[in] media The handle to the media info
1405 * @param[in] category The category of the media info
1407 * @return @c 0 on success,
1408 * otherwise a negative error value
1410 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1411 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1412 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1414 * @post media_info_update_to_db()
1416 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1419 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1420 * @brief Sets the location tag of media info.
1421 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1423 * @param[in] media The handle to the media info
1424 * @param[in] location_tag The location of the media info
1426 * @return @c 0 on success,
1427 * otherwise a negative error value
1429 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1430 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1431 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1433 * @post media_info_update_to_db()
1435 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1438 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1439 * @brief Sets the age rating of media info.
1440 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1442 * @param[in] media The handle to the media info
1443 * @param[in] age_rating The age rating of the media info
1445 * @return @c 0 on success,
1446 * otherwise a negative error value
1448 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1449 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1450 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1452 * @post media_info_update_to_db()
1454 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1457 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1458 * @brief Sets the keyword of media info.
1459 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1461 * @param[in] media The handle to the media info
1462 * @param[in] keyword The keyword of the media info
1464 * @return @c 0 on success,
1465 * otherwise a negative error value
1467 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1468 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1469 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1471 * @post media_info_update_to_db()
1473 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1476 * @brief Updates the media info to the media database.
1478 * @details The function updates the given media info in the media database.
1480 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1482 * @privilege %http://tizen.org/privilege/content.write
1484 * @remarks The function should be called after any change in media, to be updated to the media
1485 * database. For example, after using media_info_set_favorite()
1486 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1487 * the given media info attributes in the media database.
1489 * @param[in] media The handle to the media info
1491 * @return @c 0 on success,
1492 * otherwise a negative error value
1494 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1495 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1496 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1497 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1498 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1499 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1500 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1501 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1503 * @pre This function requires opened connection to content service by media_content_connect().
1505 * @see media_content_connect()
1506 * @see media_info_set_favorite()
1508 int media_info_update_to_db(media_info_h media);
1511 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1512 * @brief Refreshes the media metadata to the media database.
1513 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1516 * @privilege %http://tizen.org/privilege/content.write \n
1517 * %http://tizen.org/privilege/mediastorage \n
1518 * %http://tizen.org/privilege/externalstorage
1520 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1521 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1522 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1523 * If you can access both storage, you should add all privilege.
1525 * @param[in] media_id The media ID
1527 * @return @c 0 on success,
1528 * otherwise a negative error value
1530 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1531 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1532 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1533 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1534 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1535 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1536 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1537 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1539 * @pre This function requires opened connection to content service by media_content_connect().
1541 * @see media_content_connect()
1543 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1546 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1547 * @brief Sets the added time of media info.
1548 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1550 * @param[in] media The handle to the media info
1551 * @param[in] added_time The added time of the media info
1553 * @return @c 0 on success,
1554 * otherwise a negative error value
1556 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1557 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1558 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1560 * @post media_info_update_to_db()
1562 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1565 * @brief Moves the media info to the given destination path in the media database.
1566 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1567 * If the source path and destination path are the same, then this function does nothing.
1568 * If you want to refresh media information, you should use media_content_scan_file() function.
1570 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1573 * @privilege %http://tizen.org/privilege/content.write \n
1574 * %http://tizen.org/privilege/mediastorage \n
1575 * %http://tizen.org/privilege/externalstorage
1577 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1578 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1579 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1580 * If you can access both storage, you should add all privilege. \n
1581 * This function does not support USB storage.
1583 * @param[in] media The handle to the media info
1584 * @param[in] dst_path The path of destination
1586 * @return @c 0 on success,
1587 * otherwise a negative error value
1589 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1590 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1591 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1592 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1593 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1594 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1595 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1596 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1598 * @pre This function requires opened connection to content service by media_content_connect().
1600 * @see media_content_connect()
1601 * @see media_content_scan_folder()
1603 int media_info_move_to_db(media_info_h media, const char* dst_path);
1606 * @brief Creates a thumbnail file for the given media, asynchronously.
1607 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1608 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1609 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1610 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1612 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1615 * @privilege %http://tizen.org/privilege/content.write
1617 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1618 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1619 * Items in external storage except MMC not supported.
1621 * @param[in] media The handle to the media info
1622 * @param[in] callback The callback function to be invoked
1623 * @param[in] user_data The user data to be passed to the callback function
1625 * @return @c 0 on success,
1626 * otherwise a negative error value
1628 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1629 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1630 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1631 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1632 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1633 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1634 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1635 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1637 * @pre This function requires opened connection to content service by media_content_connect().
1639 * @see media_content_connect()
1641 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1644 * @brief Cancels the creation of thumbnail file for the given media.
1645 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1648 * @privilege %http://tizen.org/privilege/content.write
1650 * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1652 * @param[in] media The handle to the media info
1654 * @return @c 0 on success,
1655 * otherwise a negative error value
1657 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1658 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1659 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1660 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1662 * @pre This function requires opened connection to content service by media_content_connect().
1663 * @see media_content_connect()
1665 int media_info_cancel_thumbnail(media_info_h media);
1668 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1669 * @brief Starts face detection for the given image, asynchronously.
1670 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1671 * The given callback function is called when the detection is completed. \n
1672 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1677 * @privilege %http://tizen.org/privilege/content.write \n
1678 * %http://tizen.org/privilege/mediastorage
1680 * @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
1681 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1682 * Media items in external storage are not supported, with the exception of MMC items.
1684 * @param[in] media The handle to the media info
1685 * @param[in] callback The callback function to be invoked when detection is completed
1686 * @param[in] user_data The user data to be passed to the callback function
1688 * @return @c 0 on success,
1689 * otherwise a negative error value
1691 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1692 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1693 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1694 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1695 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1696 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1697 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1698 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1699 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1701 * @pre This function requires opened connection to content service by media_content_connect().
1703 * @see media_content_connect()
1704 * @see media_info_cancel_face_detection()
1706 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1709 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1710 * @brief Cancels face detection of image for the given media.
1711 * @details This function cancels face detection for given media item. \n
1712 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1717 * @privilege %http://tizen.org/privilege/content.write
1719 * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1721 * @param[in] media The handle to the media info
1723 * @return @c 0 on success,
1724 * otherwise a negative error value
1726 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1727 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1728 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1729 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1731 * @pre This function requires opened connection to content service by media_content_connect().
1733 * @see media_content_connect()
1734 * @see media_info_start_face_detection()
1736 int media_info_cancel_face_detection(media_info_h media);
1739 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1740 * @brief Creates the media info handle.
1741 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1745 * @privilege %http://tizen.org/privilege/mediastorage \n
1746 * %http://tizen.org/privilege/externalstorage
1748 * @remarks The @a media should be released using media_info_destroy().
1749 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1750 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1751 * If you can access both storage, you must add all privilege.
1753 * @param[in] path The path to create the media info handle
1754 * @param[out] media The handle to the media info
1756 * @return @c 0 on success,
1757 * otherwise a negative error value
1759 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1760 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1761 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1762 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1763 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1765 * @see media_info_destroy()
1767 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1770 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1771 * @brief Inserts media info to database with media info data.
1775 * @privilege %http://tizen.org/privilege/content.write
1777 * @remarks The @a media should be released using media_info_destroy().
1779 * @param[in] media The handle to the media info
1781 * @return @c 0 on success,
1782 * otherwise a negative error value
1784 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1785 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1786 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1787 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1789 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1792 * @deprecated Deprecated since 4.0.
1793 * @brief Sets the title of media info handle.
1796 * @param[in] media The handle to the media info
1797 * @param[in] title The title of media info handle
1799 * @return @c 0 on success,
1800 * otherwise a negative error value
1802 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1803 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1804 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1806 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1809 * @deprecated Deprecated since 4.0.
1810 * @brief Sets the album of media info handle.
1813 * @param[in] media The handle to the media info
1814 * @param[in] album The album of the media
1816 * @return @c 0 on success,
1817 * otherwise a negative error value
1819 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1820 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1821 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1823 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1826 * @deprecated Deprecated since 4.0.
1827 * @brief Sets the artist of media info handle.
1830 * @param[in] media The handle to the media info
1831 * @param[in] artist The artist of media info handle
1833 * @return @c 0 on success,
1834 * otherwise a negative error value
1836 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1837 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1838 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1840 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1843 * @deprecated Deprecated since 4.0.
1844 * @brief Sets the genre of media info handle.
1847 * @param[in] media The handle to the media info
1848 * @param[in] genre The genre of media info handle
1850 * @return @c 0 on success,
1851 * otherwise a negative error value
1853 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1854 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1855 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1857 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1860 * @deprecated Deprecated since 4.0.
1861 * @brief Sets the recorded date of media info handle.
1864 * @param[in] media The handle to the media info
1865 * @param[in] recorded_date The recorded date of media info handle
1867 * @return @c 0 on success,
1868 * otherwise a negative error value
1870 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1871 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1872 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1874 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__ */