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 * @deprecated Deprecated since 4.0.
126 * @brief Inserts the burst shot images into the media database, asynchronously.
127 * @details This function inserts burst images into the media database.
128 * media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.
130 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
133 * @privilege %http://tizen.org/privilege/content.write \n
134 * %http://tizen.org/privilege/mediastorage \n
135 * %http://tizen.org/privilege/externalstorage
137 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
138 * If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
139 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
140 * If you can access both storage, you must add all privilege.
142 * @param[in] path_array The path array of the burst shot images to add
143 * @param[in] array_length The length of the array
144 * @param[in] callback The callback to be invoked when the images are inserted completely
145 * @param[in] user_data The user data to be passed to the callback function
147 * @return @c 0 on success,
148 * otherwise a negative error value
150 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
151 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
152 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
153 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
154 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
155 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
156 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
157 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
159 * @pre This function requires opened connection to content service by media_content_connect().
161 * @see media_content_connect()
162 * @see media_insert_burst_shot_completed_cb()
164 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;
167 * @brief Deletes the media information from the media database.
168 * @details This function only remove media information in the media database. \n
169 * You can use media_content_scan_file()/media_content_scan_folder() API instead of this API if file is removed from the file system.
171 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
174 * @privilege %http://tizen.org/privilege/content.write
176 * @param[in] media_id The media ID. It can get from media info handle.
178 * @return @c 0 on success,
179 * otherwise a negative error value
181 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
182 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
183 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
184 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
185 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
186 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
187 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
189 * @pre This function requires opened connection to content service by media_content_connect().
191 * @see media_content_connect()
192 * @see media_content_scan_file()
193 * @see media_content_scan_folder()
195 int media_info_delete_from_db(const char *media_id);
198 * @deprecated Deprecated since 4.0.
199 * @brief Deletes media information that meets the conditions of the filter from the media database.
200 * @details This function can delete multiple media information from the media database.
202 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
205 * @privilege %http://tizen.org/privilege/content.write
207 * @param[in] filter The filter handle
209 * @return @c 0 on success,
210 * otherwise a negative error value
212 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
213 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
214 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
215 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
216 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
217 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
218 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
220 * @pre This function requires opened connection to content service by media_content_connect().
222 * @see media_content_connect()
223 * @see media_filter_create()
225 int media_info_delete_batch_from_db(filter_h filter) TIZEN_DEPRECATED_API;
229 * @brief Destroys media info.
230 * @details The function frees all resources related to the media info handle. This handle
231 * can no longer be used to perform any operation. New media info handle has to
232 * be created before the next usage.
234 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
236 * @param[in] media The media info handle
238 * @return @c 0 on success,
239 * otherwise a negative error value
241 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
242 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
244 * @pre Get copy of media_info handle by calling media_info_clone().
246 * @see media_info_clone()
248 int media_info_destroy(media_info_h media);
251 * @brief Clones the media info handle.
253 * @details This function copies the media info handle from a source to the destination.
254 * There is no media_info_create() function. The media_info_h is created internally and
255 * available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
256 * To use this handle outside of these foreach functions, use this function.
258 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
260 * @remarks You must release the destination handle using media_info_destroy().
262 * @param[out] dst The destination handle to the media info
263 * @param[in] src The source handle to media info
265 * @return @c 0 on success,
266 * otherwise a negative error value
268 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
269 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
270 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
272 * @see media_info_destroy()
273 * @see media_album_foreach_media_from_db()
274 * @see media_playlist_foreach_media_from_db()
275 * @see media_group_foreach_media_from_db()
276 * @see media_tag_foreach_media_from_db()
277 * @see media_info_foreach_media_from_db()
278 * @see media_info_insert_to_db()
279 * @see media_folder_foreach_media_from_db()
281 int media_info_clone(media_info_h *dst, media_info_h src);
284 * @brief Gets the count of media info for the passed @a filter from the media database.
285 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
287 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
290 * @param[in] filter The handle to filter
291 * @param[out] media_count The count of media
293 * @return @c 0 on success,
294 * otherwise a negative error value
296 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
297 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
298 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
299 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
300 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
302 * @pre This function requires opened connection to content service by media_content_connect().
304 * @see media_content_connect()
305 * @see media_filter_create()
307 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
310 * @brief Iterates through media info from the media database.
311 * @details This function gets all media info handles meeting the given @a filter.
312 * The @a callback function will be invoked for every retrieved media info.
313 * If @c NULL is passed to the @a filter, then no filtering is applied.
315 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
317 * @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,
318 * your callback function is invoked as inline function.
319 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
320 * We do not recommend you call updating DB function in callback of foreach function.
322 * @param[in] filter The media info handle filter
323 * @param[in] callback The callback function to be invoked
324 * @param[in] user_data The user data to be passed to the callback function
326 * @return @c 0 on success,
327 * otherwise a negative error value
329 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
330 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
331 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
332 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
333 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
334 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
336 * @pre This function requires opened connection to content service by media_content_connect().
337 * @post This function invokes media_info_cb().
339 * @see media_content_connect()
340 * @see #media_info_cb
341 * @see media_info_filter_create()
343 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
346 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
347 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
349 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
351 * @param[in] media_id The ID of the media info
352 * @param[in] filter The handle to the media filter
353 * @param[out] tag_count The count of the media tag
355 * @return @c 0 on success,
356 * otherwise a negative error value
358 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
359 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
360 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
361 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
362 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
364 * @pre This function requires opened connection to content service by media_content_connect().
366 * @see media_content_connect()
367 * @see media_filter_create()
369 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
372 * @brief Iterates through the media tag in the given media info from the media database.
373 * @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
374 * If @c NULL is passed to the @a filter, then no filtering is applied.
376 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
378 * @param[in] media_id The ID of the media info
379 * @param[in] filter The handle to the media filter
380 * @param[in] callback The callback function to be invoked
381 * @param[in] user_data The user data to be passed to the callback function
383 * @return @c 0 on success,
384 * otherwise a negative error value
386 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
387 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
388 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
389 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
390 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
391 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
393 * @pre This function requires opened connection to content service by media_content_connect().
394 * @post This function invokes media_tag_cb().
396 * @see media_content_connect()
398 * @see media_filter_create()
400 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
403 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
404 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
406 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
408 * @param[in] media_id The ID of the media info
409 * @param[in] filter The handle to the media filter
410 * @param[out] bookmark_count The count of the media tag
412 * @return @c 0 on success,
413 * otherwise a negative error value
415 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
416 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
417 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
418 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
419 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
421 * @pre This function requires opened connection to content service by media_content_connect().
423 * @see media_content_connect()
424 * @see media_filter_create()
426 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
429 * @brief Iterates through the media bookmark in the given media info from the media database.
430 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
431 * If @c NULL is passed to the @a filter, then no filtering is applied.
433 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
435 * @param[in] media_id The ID of the media info
436 * @param[in] filter The handle to the media filter
437 * @param[in] callback The callback function to be invoked
438 * @param[in] user_data The user data to be passed to the callback function
440 * @return @c 0 on success,
441 * otherwise a negative error value
443 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
444 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
445 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
446 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
447 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
448 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
450 * @pre This function requires opened connection to content service by media_content_connect().
451 * @post This function invokes media_bookmark_cb().
453 * @see media_content_connect()
454 * @see media_bookmark_cb()
455 * @see media_filter_create()
457 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
460 * @brief Gets the number of face for the passed @a media_id from the media database.
461 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
465 * @param[in] media_id media id
466 * @param[in] filter The handle to the media filter
467 * @param[out] face_count The count of media face
469 * @return 0 on success, otherwise a negative error value.
471 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
472 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
473 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
474 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
476 * @pre This function requires opened connection to content service by media_content_connect().
477 * @see media_content_connect()
478 * @see media_filter_create()
481 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
484 * @brief Iterates through the media files with optional @a media_id in the given @a face @a face from the media database.
485 * @details This function gets all media face info associated with the given media id and
486 * meeting desired filter option and calls @a callback for
487 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
491 * @param [in] media_id media id
492 * @param[in] filter The handle to the media filter
493 * @param [in] callback The callback function to invoke
494 * @param [in] user_data The user data to be passed to the callback function
496 * @return 0 on success, otherwise a negative error value.
498 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
499 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
500 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
501 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
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 You must release the @a image handle using image_meta_destroy().
518 * @param[in] media The media info handle
519 * @param[out] image A handle to 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 You must release the @a video handle using video_meta_destroy().
540 * @param[in] media The media info handle
541 * @param[out] video A handle to the video meta
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 You must release the @a audio handle using audio_meta_destroy().
562 * @param[in] media The media info handle
563 * @param[out] audio A handle to the audio meta
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
580 * @param[in] media The media info handle
581 * @param[out] media_id The media ID
583 * @return @c 0 on success,
584 * otherwise a negative error value
586 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
587 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
588 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
590 int media_info_get_media_id(media_info_h media, char **media_id);
593 * @brief Gets the full path of the content file.
594 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
596 * @remarks You must release @a path using free().
598 * @param[in] media The media info handle
599 * @param[out] path The full path of the content file
601 * @return @c 0 on success,
602 * otherwise a negative error value
604 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
605 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
606 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
609 int media_info_get_file_path(media_info_h media, char **path);
612 * @brief Gets the file name including the extension of the content file.
613 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
615 * @remarks You must release @a name using free().
617 * @param[in] media The media info handle
618 * @param[out] name The file name including the extension of the content file
620 * @return @c 0 on success,
621 * otherwise a negative error value
623 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
624 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
625 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
627 int media_info_get_display_name(media_info_h media, char **name);
630 * @brief Gets the content type of the content file.
631 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
633 * @param[in] media The media info handle
634 * @param[out] type The content type of the content file (#media_content_type_e)
636 * @return @c 0 on success,
637 * otherwise a negative error value
639 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
640 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
642 * @see #media_content_type_e
644 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
647 * @brief Gets the MIME type of the content file.
648 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
650 * @remarks You must release @a mime_type using free().
652 * @param[in] media The media info handle
653 * @param[out] mime_type The MIME type of the content file
655 * @return @c 0 on success,
656 * otherwise a negative error value
658 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
659 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
660 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
662 int media_info_get_mime_type(media_info_h media, char **mime_type);
665 * @brief Gets the content file size.
666 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
668 * @param[in] media The media info handle
669 * @param[out] size The content file size
671 * @return @c 0 on success,
672 * otherwise a negative error value
674 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
675 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
677 int media_info_get_size(media_info_h media, unsigned long long *size);
680 * @brief Gets the added time of the content file.
681 * @details The added time refers to the time that content file was first added to media database.
682 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
684 * @param[in] media The media info handle
685 * @param[out] added_time The added time to the media database
687 * @return @c 0 on success,
688 * otherwise a negative error value
690 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
691 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
693 int media_info_get_added_time(media_info_h media, time_t *added_time);
696 * @brief Gets the modified time of the content file.
697 * @details The modified time refers to the last modification time provided by the file system.
698 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
700 * @param[in] media The media info handle
701 * @param[out] time The last modification time of the content file
703 * @return @c 0 on success,
704 * otherwise a negative error value
706 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
707 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
709 int media_info_get_modified_time(media_info_h media, time_t *time);
712 * @brief Gets the timeline of content file.
713 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
714 * Otherwise, timeline value is the same as modified time.
715 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
717 * @param[in] media The media info handle
718 * @param[out] time The timeline of content file
720 * @return @c 0 on success,
721 * otherwise a negative error value
723 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
724 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
726 int media_info_get_timeline(media_info_h media, time_t *time);
729 * @brief Gets the thumbnail path of content file.
730 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
732 * @remarks You must release @a path using free(). \n
733 * 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
734 * Since 3.0, this function returns an empty string if media_info_create_thumbnail() has failed to create a thumbnail for the given media.
736 * @param[in] media The media info handle
737 * @param[out] path The thumbnail path
739 * @return @c 0 on success,
740 * otherwise a negative error value
742 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
743 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
744 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
746 int media_info_get_thumbnail_path(media_info_h media, char **path);
749 * @brief Gets the description of content file.
750 * @details If the value is an empty string, the method returns "Unknown". \n
751 * Since 3.0, if the media info has no description, the method returns empty string.
752 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
754 * @remarks You must release @a description using free().
756 * @param[in] media The media info handle
757 * @param[out] description The description of the content file
759 * @return @c 0 on success,
760 * otherwise a negative error value
762 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
763 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
764 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
766 int media_info_get_description(media_info_h media, char **description);
769 * @brief Gets the longitude of content file.
770 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
772 * @param[in] media The media info handle
773 * @param[out] longitude The longitude of the content file
775 * @return @c 0 on success,
776 * otherwise a negative error value
778 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
779 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
781 int media_info_get_longitude(media_info_h media, double *longitude);
784 * @brief Gets the latitude of content file.
785 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
787 * @param[in] media The media info handle
788 * @param[out] latitude The latitude of the content file
790 * @return @c 0 on success,
791 * otherwise a negative error value
793 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
794 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
797 int media_info_get_latitude(media_info_h media, double* latitude);
800 * @brief Gets the altitude of content file.
801 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
803 * @param[in] media The media info handle
804 * @param[out] altitude The altitude of the content file
806 * @return @c 0 on success,
807 * otherwise a negative error value
809 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
810 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
812 int media_info_get_altitude(media_info_h media, double* altitude);
815 * @brief Gets the weather of content file.
816 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
818 * @param[in] media The media info handle
819 * @param[out] weather The weather of the content file
821 * @return @c 0 on success,
822 * otherwise a negative error value
824 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
825 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
826 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
828 int media_info_get_weather(media_info_h media, char **weather);
831 * @brief Gets the rating of content file.
832 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
834 * @param[in] media The media info handle
835 * @param[out] rating The rating of the content file
837 * @return @c 0 on success,
838 * otherwise a negative error value
840 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
841 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
843 int media_info_get_rating(media_info_h media, int *rating);
846 * @brief Gets the favorite status of content file which User set.
847 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
849 * @param[in] media The media info handle
850 * @param[out] favorite @c true if content file is set as favorite,
851 * otherwise @c false if content file is not set as favorite
853 * @return @c 0 on success,
854 * otherwise a negative error value
856 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
857 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
859 * @see media_info_set_favorite()
861 int media_info_get_favorite(media_info_h media, bool* favorite);
864 * @deprecated Deprecated since 4.0.
865 * @brief Gets the author of content file.
866 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
868 * @remarks You must release @a author using free().
870 * @param[in] media The media info handle
871 * @param[out] author The author of the content file
873 * @return @c 0 on success,
874 * otherwise a negative error value
876 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
877 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
878 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
880 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
883 * @brief Gets the provider of content file which User set.
884 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
886 * @remarks You must release @a provider using free().
888 * @param[in] media The media info handle
889 * @param[out] provider The provider of the content file
891 * @return @c 0 on success,
892 * otherwise a negative error value
894 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
895 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
896 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
898 * @see media_info_set_provider()
900 int media_info_get_provider(media_info_h media, char **provider);
903 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
904 * @brief Gets the content name of content file which User set.
905 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
907 * @remarks You must release @a content_name using free().
909 * @param[in] media The media info handle
910 * @param[out] content_name The content name of the content file
912 * @return @c 0 on success,
913 * otherwise a negative error value
915 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
916 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
917 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
919 * @see media_info_set_content_name()
921 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
924 * @brief Gets the title of content file.
925 * @details If the value is an empty string, the method returns "Unknown". \n
926 * Since 3.0, if the content file has no title, the method returns empty string.
928 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
930 * @remarks You must release @a title using free().
932 * @param[in] media The media info handle
933 * @param[out] title The title of the content file
935 * @return @c 0 on success,
936 * otherwise a negative error value
938 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
939 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
940 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
942 int media_info_get_title(media_info_h media, char **title);
945 * @brief Gets the category of content file which User set.
946 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
948 * @remarks You must release @a category using free().
950 * @param[in] media The media info handle
951 * @param[out] category The category of the content file
953 * @return @c 0 on success,
954 * otherwise a negative error value
956 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
957 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
958 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
960 * @see media_info_set_category()
962 int media_info_get_category(media_info_h media, char **category);
965 * @brief Gets the location tag of content file which User set.
966 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
968 * @remarks You must release @a location_tag using free().
970 * @param[in] media The media info handle
971 * @param[out] location_tag The location of the content file
973 * @return @c 0 on success,
974 * otherwise a negative error value
976 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
977 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
978 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
980 * @see media_info_set_location_tag()
982 int media_info_get_location_tag(media_info_h media, char **location_tag);
985 * @brief Gets the age_rating of content file which User set.
986 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
988 * @remarks You must release @a age_rating using free().
990 * @param[in] media The media info handle
991 * @param[out] age_rating The age rating of the content file
993 * @return @c 0 on success,
994 * otherwise a negative error value
996 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
997 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
998 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1000 * @see media_info_set_age_rating()
1002 int media_info_get_age_rating(media_info_h media, char **age_rating);
1005 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1006 * @brief Gets the keyword of content file which User set.
1007 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1009 * @remarks You must release @a keyword using free().
1011 * @param[in] media The media info handle
1012 * @param[out] keyword The keyword of the content file
1014 * @return @c 0 on success,
1015 * otherwise a negative error value
1017 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1018 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1019 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1021 * @see media_info_set_keyword()
1023 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1026 * @brief Gets the storage id of content file.
1027 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1029 * @remarks You must release @a storage_id using free().
1031 * @param[in] media The media info handle
1032 * @param[out] storage_id The storage id of the content file
1034 * @return @c 0 on success,
1035 * otherwise a negative error value
1037 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1038 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1039 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1041 int media_info_get_storage_id(media_info_h media, char **storage_id);
1044 * @brief Checks whether the media is protected via DRM.
1045 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1047 * @param[in] media The media info handle
1048 * @param[out] is_drm @c true if media is DRM media,
1049 * otherwise @c false if media is not DRM media
1051 * @return @c 0 on success,
1052 * otherwise a negative error value
1054 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1055 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1057 int media_info_is_drm(media_info_h media, bool *is_drm);
1060 * @brief Checks whether the content file is 360 content.
1063 * @param[in] media The media info handle
1064 * @param[out] is_360 @c true if media is 360 content,
1065 * otherwise @c false if media is not 360 content
1067 * @return @c 0 on success,
1068 * otherwise a negative error value
1070 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1071 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1073 int media_info_is_360_content(media_info_h media, bool *is_360);
1076 * @brief Gets the storage type of content file.
1077 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1079 * @param[in] media The media info handle
1080 * @param[out] storage_type The storage type of the content file
1082 * @return @c 0 on success,
1083 * otherwise a negative error value
1085 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1086 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1088 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1091 * @deprecated Deprecated since 4.0. \n
1092 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1093 * @brief Gets number which represents how many times given content has been played.
1094 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1096 * @param [in] media The handle to media info
1097 * @param [out] played_count The counter of content played
1099 * @return 0 on success,
1100 * otherwise a negative error value
1102 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1103 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1105 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1108 * @deprecated Deprecated since 4.0. \n
1109 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1110 * @brief Gets the content's played time parameter.
1111 * @details Function returns content's elapsed playback time parameter as period
1112 * starting from the beginning of the track.
1113 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1115 * @param [in] media The handle to media info
1116 * @param [out] played_time The elapsed time of the content
1118 * @return 0 on success,
1119 * otherwise a negative error value
1121 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1122 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1124 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1127 * @brief Gets the media info from the media database.
1129 * @details This function creates a new media handle from the media database by the given @a media_id.
1130 * Media info will be created and filled with information.
1132 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1134 * @remarks You must release @a media using media_tag_destroy().
1136 * @param[in] media_id The ID of media info
1137 * @param[out] media The media handle associated with the media ID
1139 * @return @c 0 on success,
1140 * otherwise a negative error value
1142 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1143 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1144 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1145 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
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 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 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 media info handle
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 media info handle
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 media info handle
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 media info handle
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 media info handle
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 * @brief Sets the weather of media info.
1290 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1292 * @param[in] media The media info handle
1293 * @param[in] weather The weather of the media info
1295 * @return @c 0 on success,
1296 * otherwise a negative error value
1298 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1299 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1300 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1302 * @post media_info_update_to_db().
1305 int media_info_set_weather(media_info_h media, const char *weather);
1308 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1309 * @brief Sets the rating of media info.
1310 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1312 * @param[in] media The media info handle
1313 * @param[in] rating The rating of the media info
1315 * @return @c 0 on success,
1316 * otherwise a negative error value
1318 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1319 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1321 * @post media_info_update_to_db().
1323 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1326 * @brief Sets the favorite of media info.
1327 * @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
1328 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1329 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1331 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1333 * @param[in] media The media info handle
1334 * @param[in] favorite Set @c true to set the media info as favorite,
1335 * otherwise set @c false to not set the media info as favorite
1337 * @return @c 0 on success,
1338 * otherwise a negative error value
1340 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1341 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1343 int media_info_set_favorite(media_info_h media, bool favorite);
1346 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1347 * @brief Sets the author of media info.
1348 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1350 * @param[in] media The media info handle
1351 * @param[in] author The author of the media info
1353 * @return @c 0 on success,
1354 * otherwise a negative error value
1356 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1357 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1358 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1360 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1363 * @brief Sets the provider of media info.
1364 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1366 * @param[in] media The media info handle
1367 * @param[in] provider The provider of the media info
1369 * @return @c 0 on success,
1370 * otherwise a negative error value
1372 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1373 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1374 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1376 int media_info_set_provider(media_info_h media, const char *provider);
1379 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1380 * @brief Sets the content name of media info.
1381 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1383 * @param[in] media The media info handle
1384 * @param[in] content_name The content name of the media info
1386 * @return @c 0 on success,
1387 * otherwise a negative error value
1389 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1390 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1391 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1393 * @post media_info_update_to_db()
1395 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1398 * @brief Sets the category of media info.
1399 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1401 * @param[in] media The media info handle
1402 * @param[in] category The category of the media info
1404 * @return @c 0 on success,
1405 * otherwise a negative error value
1407 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1408 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1409 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1411 * @post media_info_update_to_db()
1413 int media_info_set_category(media_info_h media, const char *category);
1416 * @brief Sets the location tag of media info.
1417 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1419 * @param[in] media The media info handle
1420 * @param[in] location_tag The location of the media info
1422 * @return @c 0 on success,
1423 * otherwise a negative error value
1425 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1426 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1427 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1429 * @post media_info_update_to_db()
1431 int media_info_set_location_tag(media_info_h media, const char *location_tag);
1434 * @brief Sets the age rating of media info.
1435 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1437 * @param[in] media The media info handle
1438 * @param[in] age_rating The age rating of the media info
1440 * @return @c 0 on success,
1441 * otherwise a negative error value
1443 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1444 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1445 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1447 * @post media_info_update_to_db()
1449 int media_info_set_age_rating(media_info_h media, const char *age_rating);
1452 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1453 * @brief Sets the keyword of media info.
1454 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1456 * @param[in] media The media info handle
1457 * @param[in] keyword The keyword of the media info
1459 * @return @c 0 on success,
1460 * otherwise a negative error value
1462 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1463 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1464 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1466 * @post media_info_update_to_db()
1468 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1471 * @brief Updates the media info to the media database.
1473 * @details The function updates the given media info in the media database.
1475 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1477 * @privilege %http://tizen.org/privilege/content.write
1479 * @remarks The function should be called after any change in media, to be updated to the media
1480 * database. For example, after using media_info_set_favorite()
1481 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1482 * the given media info attributes in the media database.
1484 * @param[in] media The media info handle
1486 * @return @c 0 on success,
1487 * otherwise a negative error value
1489 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1490 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1491 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1492 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1493 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1494 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1495 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1496 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1498 * @pre This function requires opened connection to content service by media_content_connect().
1500 * @see media_content_connect()
1501 * @see media_info_set_favorite()
1502 * @see media_info_set_provider()
1503 * @see media_info_set_category()
1504 * @see media_info_set_location_tag()
1505 * @see media_info_set_age_rating()
1507 int media_info_update_to_db(media_info_h media);
1510 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1511 * @brief Refreshes the media metadata to the media database.
1512 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1515 * @privilege %http://tizen.org/privilege/content.write \n
1516 * %http://tizen.org/privilege/mediastorage \n
1517 * %http://tizen.org/privilege/externalstorage
1519 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1520 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1521 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1522 * If you can access both storage, you should add all privilege.
1524 * @param[in] media_id The ID of the media info
1526 * @return @c 0 on success,
1527 * otherwise a negative error value
1529 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1530 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1531 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1532 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1533 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1534 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1535 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1536 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1538 * @pre This function requires opened connection to content service by media_content_connect().
1540 * @see media_content_connect()
1542 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1545 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1546 * @brief Sets the added time of media info.
1547 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1549 * @param[in] media The media info handle
1550 * @param[in] added_time The added time of the media info
1552 * @return @c 0 on success,
1553 * otherwise a negative error value
1555 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1556 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1557 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1559 * @post media_info_update_to_db()
1561 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1564 * @brief Moves the media info to the given destination path in the media database.
1565 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1566 * If the source path and destination path are the same, then this API does nothing.
1567 * If you want to refresh media information, you should use media_content_scan_file() API.
1569 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1572 * @privilege %http://tizen.org/privilege/content.write \n
1573 * %http://tizen.org/privilege/mediastorage \n
1574 * %http://tizen.org/privilege/externalstorage
1576 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1577 * If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1578 * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1579 * If you can access both storage, you should add all privilege. \n
1580 * This API does not support USB storage.
1582 * @param[in] media The media info handle
1583 * @param[in] dst_path The path of destination
1585 * @return @c 0 on success,
1586 * otherwise a negative error value
1588 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1589 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1590 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1591 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1592 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1593 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1594 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1595 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1597 * @pre This function requires opened connection to content service by media_content_connect().
1599 * @see media_content_connect()
1600 * @see media_content_scan_folder()
1602 int media_info_move_to_db(media_info_h media, const char* dst_path);
1605 * @brief Creates a thumbnail file for the given media, asynchronously.
1606 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1607 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1608 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1609 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1611 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1614 * @privilege %http://tizen.org/privilege/content.write
1616 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1617 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1618 * Items in external storage except MMC not supported.
1620 * @param[in] media The media info handle
1621 * @param[in] callback The callback function to be invoked
1622 * @param[in] user_data The user data to be passed to the callback function
1624 * @return @c 0 on success,
1625 * otherwise a negative error value
1627 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1628 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1629 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1630 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1631 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1632 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1633 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1634 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1636 * @pre This function requires opened connection to content service by media_content_connect().
1638 * @see media_content_connect()
1640 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data);
1643 * @brief Cancels the creation of thumbnail file for the given media.
1644 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1647 * @privilege %http://tizen.org/privilege/content.write
1649 * @remarks If you request cancel for the already thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1651 * @param[in] media The media info handle
1653 * @return @c 0 on success,
1654 * otherwise a negative error value
1656 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1657 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1658 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1659 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1661 * @pre This function requires opened connection to content service by media_content_connect().
1662 * @see media_content_connect()
1664 int media_info_cancel_thumbnail(media_info_h media);
1667 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1668 * @brief Starts face detection for the given image, asynchronously.
1669 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1670 * The given callback function is called when the detection is completed. \n
1671 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1676 * @privilege %http://tizen.org/privilege/content.write \n
1677 * %http://tizen.org/privilege/mediastorage
1679 * @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
1680 * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0.
1681 * Media items in external storage are not supported, with the exception of MMC items.
1683 * @param[in] media The media info handle
1684 * @param[in] callback The callback function to be invoked when detection is completed
1685 * @param[in] user_data The user data to be passed to the callback function
1687 * @return @c 0 on success,
1688 * otherwise a negative error value
1690 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1691 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1692 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1693 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1694 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1695 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1696 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1697 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1698 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1700 * @pre This function requires opened connection to content service by media_content_connect().
1702 * @see media_content_connect()
1703 * @see media_info_cancel_face_detection()
1705 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1708 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1709 * @brief Cancels face detection of image for the given media.
1710 * @details This function cancels face detection for given media item. \n
1711 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() API will not be invoked.
1716 * @privilege %http://tizen.org/privilege/content.write
1718 * @remarks If face detection is already done when you request the cancellation, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1720 * @param[in] media The media info handle
1722 * @return @c 0 on success,
1723 * otherwise a negative error value
1725 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1726 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1727 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1728 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1730 * @pre This function requires opened connection to content service by media_content_connect().
1732 * @see media_content_connect()
1733 * @see media_info_start_face_detection()
1735 int media_info_cancel_face_detection(media_info_h media);
1738 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1739 * @brief Creates the media info handle.
1740 * @details If the information about the file that is already known, you can use this API to generate empty handler.
1744 * @privilege %http://tizen.org/privilege/mediastorage \n
1745 * %http://tizen.org/privilege/externalstorage
1747 * @remarks If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
1748 * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
1749 * If you can access both storage, you must add all privilege.
1751 * @param[in] path The path to create the media info handle
1752 * @param[out] media The media info handle
1754 * @return @c 0 on success,
1755 * otherwise a negative error value
1757 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1758 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1759 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1760 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1761 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1763 * @see media_info_destroy()
1765 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1768 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1769 * @brief Inserts media info to database with media info data.
1772 * @remarks You must release @a info using media_info_destroy().
1775 * @privilege %http://tizen.org/privilege/content.write
1777 * @param[in] media The media info handle to be inserted
1779 * @return @c 0 on success,
1780 * otherwise a negative error value
1782 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1783 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1784 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1785 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1787 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1790 * @deprecated Deprecated since 4.0.
1791 * @brief Sets the title of media info handle.
1794 * @param[in] media The media info handle
1795 * @param[in] title The title of media info handle
1797 * @return @c 0 on success,
1798 * otherwise a negative error value
1800 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1801 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1802 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1804 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1807 * @deprecated Deprecated since 4.0.
1808 * @brief Sets the album of media info handle.
1811 * @param[in] media The media info handle
1812 * @param[in] album The album of media info handle
1814 * @return @c 0 on success,
1815 * otherwise a negative error value
1817 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1818 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1819 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1821 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1824 * @deprecated Deprecated since 4.0.
1825 * @brief Sets the artist of media info handle.
1828 * @param[in] media The media info handle
1829 * @param[in] artist The artist of media info handle
1831 * @return @c 0 on success,
1832 * otherwise a negative error value
1834 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1835 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1836 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1838 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1841 * @deprecated Deprecated since 4.0.
1842 * @brief Sets the genre of media info handle.
1845 * @param[in] media The media info handle
1846 * @param[in] genre The genre of media info handle
1848 * @return @c 0 on success,
1849 * otherwise a negative error value
1851 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1852 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1853 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1855 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1858 * @deprecated Deprecated since 4.0.
1859 * @brief Sets the recorded date of media info handle.
1862 * @param[in] media The media info handle
1863 * @param[in] recorded_date The recorded date of media info handle
1865 * @return @c 0 on success,
1866 * otherwise a negative error value
1868 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1869 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1870 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1872 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1882 #endif /* __cplusplus */
1884 #endif /* __TIZEN_MEDIA_INFORMATION_H__ */