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. \n
60 * Since 4.0, This function does not allow a symbolic link. \n
61 * @remarks Since 4.0, this function is related to the following feature:\n
62 * %http://tizen.org/feature/content.scanning.others\n
63 * If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
65 * @param[in] path The path of the content file to add
66 * @param[out] info The handle of the inserted content file
68 * @return @c 0 on success,
69 * otherwise a negative error value
71 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
72 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
73 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
74 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
75 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
76 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
77 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
78 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
79 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
81 * @pre This function requires opened connection to content service by media_content_connect().
83 * @see media_content_connect()
84 * @see media_content_scan_file()
85 * @see media_content_scan_folder()
87 int media_info_insert_to_db(const char *path, media_info_h *info);
90 * @brief Inserts content files into the media database, asynchronously.
91 * @details This function can insert multiple content files into the media database.
93 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
96 * @privilege %http://tizen.org/privilege/content.write \n
97 * %http://tizen.org/privilege/mediastorage \n
98 * %http://tizen.org/privilege/externalstorage
100 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
101 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
102 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
103 * If you can access both storage, you must add all privilege. \n
104 * Since 4.0, This function does not allow a symbolic link. \n
105 * @remarks Since 4.0, this function is related to the following feature:\n
106 * %http://tizen.org/feature/content.scanning.others\n
107 * If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
109 * @param[in] path_array The path array of the content files to add
110 * @param[in] array_length The length of the array
111 * @param[in] callback The callback function to be invoked when media items inserted completely
112 * @param[in] user_data The user data to be passed to the callback function
114 * @return @c 0 on success,
115 * otherwise a negative error value
117 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
118 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
119 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
120 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
121 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
122 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
123 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
124 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
125 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
127 * @pre This function requires opened connection to content service by media_content_connect().
129 * @see media_content_connect()
130 * @see media_insert_completed_cb()
132 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
135 * @deprecated Deprecated since 4.0.
136 * @brief Inserts the burst shot images into the media database, asynchronously.
137 * @details This function inserts burst images into the media database.
138 * media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.
140 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
143 * @privilege %http://tizen.org/privilege/content.write \n
144 * %http://tizen.org/privilege/mediastorage \n
145 * %http://tizen.org/privilege/externalstorage
147 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
148 * If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
149 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
150 * If you can access both storage, you must add all privilege. \n
151 * Since 4.0, This function does not allow a symbolic link. \n
153 * @param[in] path_array The path array of the burst shot images to add
154 * @param[in] array_length The length of the array
155 * @param[in] callback The callback function to be invoked when the images are inserted completely
156 * @param[in] user_data The user data to be passed to the callback function
158 * @return @c 0 on success,
159 * otherwise a negative error value
161 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
162 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
163 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
164 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
165 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
166 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
167 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
168 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
170 * @pre This function requires opened connection to content service by media_content_connect().
172 * @see media_content_connect()
173 * @see media_insert_burst_shot_completed_cb()
175 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;
178 * @deprecated Deprecated since 5.0. Use media_content_scan_file() instead.
179 * @brief Deletes the media information from the media database.
180 * @details This function only remove media information in the media database. \n
181 * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if a file is removed from the file system.
183 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
186 * @privilege %http://tizen.org/privilege/content.write
188 * @param[in] media_id The media ID. It can get from media info handle.
190 * @return @c 0 on success,
191 * otherwise a negative error value
193 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
194 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
195 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
196 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
197 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
198 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
199 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
201 * @pre This function requires opened connection to content service by media_content_connect().
203 * @see media_content_connect()
204 * @see media_content_scan_file()
205 * @see media_content_scan_folder()
207 int media_info_delete_from_db(const char *media_id) TIZEN_DEPRECATED_API;
210 * @deprecated Deprecated since 4.0.
211 * @brief Deletes media information that meets the conditions of the filter from the media database.
212 * @details This function can delete multiple media information from the media database.
214 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
217 * @privilege %http://tizen.org/privilege/content.write
219 * @param[in] filter The handle to the media filter
221 * @return @c 0 on success,
222 * otherwise a negative error value
224 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
225 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
226 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
227 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
228 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
229 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
230 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
232 * @pre This function requires opened connection to content service by media_content_connect().
234 * @see media_content_connect()
235 * @see media_filter_create()
237 int media_info_delete_batch_from_db(filter_h filter) TIZEN_DEPRECATED_API;
241 * @brief Destroys media info.
242 * @details The function frees all resources related to the media info handle. This handle
243 * can no longer be used to perform any operation. New media info handle has to
244 * be created before the next usage.
246 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
248 * @param[in] media The handle to the media info
250 * @return @c 0 on success,
251 * otherwise a negative error value
253 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
254 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
256 * @pre Get copy of media_info handle by calling media_info_clone().
258 * @see media_info_clone()
260 int media_info_destroy(media_info_h media);
263 * @brief Clones the media info handle.
265 * @details This function copies the media info handle from a source to the destination.
266 * There is no media_info_create() function. The media_info_h is created internally and
267 * available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db().
268 * To use this handle outside of these foreach functions, use this function.
270 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
272 * @remarks The @a dst should be released using media_info_destroy().
274 * @param[out] dst The destination handle to the media info
275 * @param[in] src The source handle to the media info
277 * @return @c 0 on success,
278 * otherwise a negative error value
280 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
281 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
282 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
284 * @see media_info_destroy()
285 * @see media_album_foreach_media_from_db()
286 * @see media_playlist_foreach_media_from_db()
287 * @see media_group_foreach_media_from_db()
288 * @see media_tag_foreach_media_from_db()
289 * @see media_info_foreach_media_from_db()
290 * @see media_info_insert_to_db()
291 * @see media_folder_foreach_media_from_db()
293 int media_info_clone(media_info_h *dst, media_info_h src);
296 * @brief Gets the count of media info for the passed @a filter from the media database.
297 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
299 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
302 * @param[in] filter The handle to the media filter
303 * @param[out] media_count The count of media
305 * @return @c 0 on success,
306 * otherwise a negative error value
308 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
309 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
310 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
311 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
313 * @pre This function requires opened connection to content service by media_content_connect().
315 * @see media_content_connect()
316 * @see media_filter_create()
318 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
321 * @brief Iterates through media info from the media database.
322 * @details This function gets all media info handles meeting the given @a filter.
323 * The @a callback function will be invoked for every retrieved media info.
324 * If @c NULL is passed to the @a filter, then no filtering is applied.
326 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
328 * @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,
329 * your callback function is invoked as inline function.
330 * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
331 * We do not recommend you call updating DB function in callback of foreach function.
333 * @param[in] filter The handle to the media filter
334 * @param[in] callback The callback function to be invoked
335 * @param[in] user_data The user data to be passed to the callback function
337 * @return @c 0 on success,
338 * otherwise a negative error value
340 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
341 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
342 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
343 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
344 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
346 * @pre This function requires opened connection to content service by media_content_connect().
347 * @post This function invokes media_info_cb().
349 * @see media_content_connect()
350 * @see #media_info_cb
351 * @see media_filter_create()
353 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
356 * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
357 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
359 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
361 * @param[in] media_id The media ID
362 * @param[in] filter The handle to the media filter
363 * @param[out] tag_count The count of the media tag
365 * @return @c 0 on success,
366 * otherwise a negative error value
368 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
369 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
370 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
371 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
373 * @pre This function requires opened connection to content service by media_content_connect().
375 * @see media_content_connect()
376 * @see media_filter_create()
378 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
381 * @brief Iterates through the media tag in the given media info from the media database.
382 * @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
383 * If @c NULL is passed to the @a filter, then no filtering is applied.
385 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
387 * @param[in] media_id The media ID
388 * @param[in] filter The handle to the media filter
389 * @param[in] callback The callback function to be invoked
390 * @param[in] user_data The user data to be passed to the callback function
392 * @return @c 0 on success,
393 * otherwise a negative error value
395 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
396 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
397 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
398 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
399 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
401 * @pre This function requires opened connection to content service by media_content_connect().
402 * @post This function invokes media_tag_cb().
404 * @see media_content_connect()
406 * @see media_filter_create()
408 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
411 * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
412 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
414 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
416 * @param[in] media_id The media ID
417 * @param[in] filter The handle to the media filter
418 * @param[out] bookmark_count The count of the media tag
420 * @return @c 0 on success,
421 * otherwise a negative error value
423 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
424 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
425 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
426 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
428 * @pre This function requires opened connection to content service by media_content_connect().
430 * @see media_content_connect()
431 * @see media_filter_create()
433 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
436 * @brief Iterates through the media bookmark in the given media info from the media database.
437 * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
438 * If @c NULL is passed to the @a filter, then no filtering is applied.
440 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
442 * @param[in] media_id The media ID
443 * @param[in] filter The handle to the media filter
444 * @param[in] callback The callback function to be invoked
445 * @param[in] user_data The user data to be passed to the callback function
447 * @return @c 0 on success,
448 * otherwise a negative error value
450 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
451 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
452 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
453 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
454 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
456 * @pre This function requires opened connection to content service by media_content_connect().
457 * @post This function invokes media_bookmark_cb().
459 * @see media_content_connect()
460 * @see media_bookmark_cb()
461 * @see media_filter_create()
463 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
466 * @brief Gets the number of face for the passed @a media_id from the media database.
467 * @details If @c NULL is passed to the @a filter, then no filtering is applied.
471 * @param[in] media_id The media ID
472 * @param[in] filter The handle to the media filter
473 * @param[out] face_count The count of media face
475 * @return 0 on success, otherwise a negative error value.
477 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
478 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
479 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
481 * @pre This function requires opened connection to content service by media_content_connect().
482 * @see media_content_connect()
483 * @see media_filter_create()
486 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
489 * @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
490 * @details This function gets all media face info associated with the given media id and
491 * meeting desired filter option and calls @a callback for
492 * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
496 * @param[in] media_id The media ID
497 * @param[in] filter The handle to the media filter
498 * @param[in] callback The callback function to invoke
499 * @param[in] user_data The user data to be passed to the callback function
501 * @return 0 on success, otherwise a negative error value.
503 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
504 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
505 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
507 * @pre This function requires opened connection to content service by media_content_connect().
508 * @see media_content_connect()
509 * @see media_filter_create()
512 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
515 * @brief Gets the image metadata handle for a given media info.
516 * @details This function returns an image metadata handle retrieved from the media info.
518 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
520 * @remarks The @a image should be released using image_meta_destroy().
522 * @param[in] media The handle to the media info
523 * @param[out] image The handle to the image metadata
525 * @return @c 0 on success,
526 * otherwise a negative error value
528 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
529 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
530 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
532 * @see image_meta_destroy()
534 int media_info_get_image(media_info_h media, image_meta_h *image);
537 * @brief Gets a video metadata handle for a given media info.
538 * @details This function returns a video metadata handle retrieved from the media info handle.
540 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
542 * @remarks The @a video should be released using video_meta_destroy().
544 * @param[in] media The handle to the media info
545 * @param[out] video The handle to the video metadata
547 * @return @c 0 on success,
548 * otherwise a negative error value
550 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
551 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
552 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
554 * @see video_meta_destroy()
556 int media_info_get_video(media_info_h media, video_meta_h *video);
559 * @brief Gets an audio metadata handle for a given media info.
560 * @details This function returns an audio metadata handle retrieved from the media info handle.
562 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
564 * @remarks The @a audio should be released using audio_meta_destroy().
566 * @param[in] media The handle to the media info
567 * @param[out] audio The handle to the audio metadata
569 * @return @c 0 on success,
570 * otherwise a negative error value
572 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
573 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
574 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
576 * @see audio_meta_destroy()
578 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
581 * @brief Gets the media ID.
582 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
583 * @remarks The @a media_id should be released using free().
585 * @param[in] media The handle to the media info
586 * @param[out] media_id The media ID
588 * @return @c 0 on success,
589 * otherwise a negative error value
591 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
592 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
593 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
595 int media_info_get_media_id(media_info_h media, char **media_id);
598 * @brief Gets the full path of the content file.
599 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
601 * @remarks The @a path should be released using free().
603 * @param[in] media The handle to the media info
604 * @param[out] path The full path of the content file
606 * @return @c 0 on success,
607 * otherwise a negative error value
609 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
610 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
611 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
614 int media_info_get_file_path(media_info_h media, char **path);
617 * @brief Gets the file name including the extension of the content file.
618 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
620 * @remarks The @a name should be released using free().
622 * @param[in] media The handle to the media info
623 * @param[out] name The file name including the extension of the content file
625 * @return @c 0 on success,
626 * otherwise a negative error value
628 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
629 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
630 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
632 int media_info_get_display_name(media_info_h media, char **name);
635 * @brief Gets the content type of the content file.
636 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
638 * @param[in] media The handle to the media info
639 * @param[out] type The content type of the content file (#media_content_type_e)
641 * @return @c 0 on success,
642 * otherwise a negative error value
644 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
645 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
647 * @see #media_content_type_e
649 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
652 * @brief Gets the MIME type of the content file.
653 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
655 * @remarks The @a mime_type should be released using free().
657 * @param[in] media The handle to the media info
658 * @param[out] mime_type The MIME type of the content file
660 * @return @c 0 on success,
661 * otherwise a negative error value
663 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
664 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
665 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
667 int media_info_get_mime_type(media_info_h media, char **mime_type);
670 * @brief Gets the content file size.
671 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
673 * @param[in] media The handle to the media info
674 * @param[out] size The content file size
676 * @return @c 0 on success,
677 * otherwise a negative error value
679 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
680 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
682 int media_info_get_size(media_info_h media, unsigned long long *size);
685 * @brief Gets the added time of the content file.
686 * @details The added time refers to the time that content file was first added to media database.
687 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
689 * @param[in] media The handle to the media info
690 * @param[out] added_time The added time to the media database
692 * @return @c 0 on success,
693 * otherwise a negative error value
695 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
696 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
698 int media_info_get_added_time(media_info_h media, time_t *added_time);
701 * @brief Gets the modified time of the content file.
702 * @details The modified time refers to the last modification time provided by the file system.
703 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
705 * @param[in] media The handle to the media info
706 * @param[out] time The last modification time of the content file
708 * @return @c 0 on success,
709 * otherwise a negative error value
711 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
712 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
714 int media_info_get_modified_time(media_info_h media, time_t *time);
717 * @brief Gets the timeline of content file.
718 * @details If the content file has the creation time information (like Content recored date or Image creation date), that value is timeline. \n
719 * Otherwise, timeline value is the same as modified time.
720 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
722 * @param[in] media The handle to the media info
723 * @param[out] time The timeline of content file
725 * @return @c 0 on success,
726 * otherwise a negative error value
728 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
729 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
731 int media_info_get_timeline(media_info_h media, time_t *time);
734 * @brief Gets the thumbnail path of content file.
735 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
737 * @remarks The @a path should be released using free(). \n
738 * If the thumbnail extraction for the given media has not been requested yet, this function returns NULL. \n
739 * To create a thumbnail, you should use media_info_generate_thumbnail() function. \n
740 * This function returns an empty string if media_info_generate_thumbnail() has failed to create a thumbnail for the given media.
742 * @param[in] media The handle to the media info
743 * @param[out] path The thumbnail path
745 * @return @c 0 on success,
746 * otherwise a negative error value
748 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
749 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
750 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
752 int media_info_get_thumbnail_path(media_info_h media, char **path);
755 * @brief Gets the description of content file.
756 * @details If the value is an empty string, the method returns "Unknown". \n
757 * Since 3.0, if the media info has no description, the method returns empty string.
758 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
760 * @remarks The @a description should be released using free().
762 * @param[in] media The handle to the media info
763 * @param[out] description The description of the content file
765 * @return @c 0 on success,
766 * otherwise a negative error value
768 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
769 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
770 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
772 int media_info_get_description(media_info_h media, char **description);
775 * @brief Gets the longitude of content file.
776 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
778 * @param[in] media The handle to the media info
779 * @param[out] longitude The longitude of the content file
781 * @return @c 0 on success,
782 * otherwise a negative error value
784 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
785 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
787 int media_info_get_longitude(media_info_h media, double *longitude);
790 * @brief Gets the latitude of content file.
791 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
793 * @param[in] media The handle to the media info
794 * @param[out] latitude The latitude of the content file
796 * @return @c 0 on success,
797 * otherwise a negative error value
799 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
800 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
803 int media_info_get_latitude(media_info_h media, double* latitude);
806 * @brief Gets the altitude of content file.
807 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
809 * @param[in] media The handle to the media info
810 * @param[out] altitude The altitude of the content file
812 * @return @c 0 on success,
813 * otherwise a negative error value
815 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
816 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
818 int media_info_get_altitude(media_info_h media, double* altitude);
821 * @deprecated Deprecated since 4.0.
822 * @brief Gets the weather of content file.
823 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
824 * @remarks The @a weather should be released using free().
826 * @param[in] media The handle to the media info
827 * @param[out] weather The weather of the content file
829 * @return @c 0 on success,
830 * otherwise a negative error value
832 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
833 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
834 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
836 int media_info_get_weather(media_info_h media, char **weather) TIZEN_DEPRECATED_API;
839 * @brief Gets the rating of content file.
840 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
842 * @param[in] media The handle to the media info
843 * @param[out] rating The rating of the content file
845 * @return @c 0 on success,
846 * otherwise a negative error value
848 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
849 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
851 int media_info_get_rating(media_info_h media, int *rating);
854 * @brief Gets the favorite status of content file which User set.
855 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
857 * @param[in] media The handle to the media info
858 * @param[out] favorite @c true if content file is set as favorite,
859 * otherwise @c false if content file is not set as favorite
861 * @return @c 0 on success,
862 * otherwise a negative error value
864 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
865 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
867 * @see media_info_set_favorite()
869 int media_info_get_favorite(media_info_h media, bool* favorite);
872 * @deprecated Deprecated since 4.0.
873 * @brief Gets the author of content file.
874 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
876 * @remarks The @a author should be released using free().
878 * @param[in] media The handle to the media info
879 * @param[out] author The author of the content file
881 * @return @c 0 on success,
882 * otherwise a negative error value
884 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
885 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
886 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
888 int media_info_get_author(media_info_h media, char **author) TIZEN_DEPRECATED_API;
891 * @deprecated Deprecated since 4.0.
892 * @brief Gets the provider of content file which User set.
893 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
895 * @remarks The @a provider should be released using free().
897 * @param[in] media The handle to the media info
898 * @param[out] provider The provider of the content file
900 * @return @c 0 on success,
901 * otherwise a negative error value
903 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
904 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
905 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
908 int media_info_get_provider(media_info_h media, char **provider) TIZEN_DEPRECATED_API;
911 * @deprecated Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
912 * @brief Gets the content name of content file which User set.
913 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
915 * @remarks The @a content_name should be released using free().
917 * @param[in] media The handle to the media info
918 * @param[out] content_name The content name of the content file
920 * @return @c 0 on success,
921 * otherwise a negative error value
923 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
924 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
925 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
928 int media_info_get_content_name(media_info_h media, char **content_name) TIZEN_DEPRECATED_API;
931 * @brief Gets the title of content file.
932 * @details If the content file does not have a title, this method returns the filename without the extension.
934 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
936 * @remarks The @a title should be released using free().
938 * @param[in] media The handle to the media info
939 * @param[out] title The title of the content file
941 * @return @c 0 on success,
942 * otherwise a negative error value
944 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
945 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
946 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
948 int media_info_get_title(media_info_h media, char **title);
951 * @deprecated Deprecated since 4.0.
952 * @brief Gets the category of content file which User set.
953 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
955 * @remarks The @a category should be released using free().
957 * @param[in] media The handle to the media info
958 * @param[out] category The category of the content file
960 * @return @c 0 on success,
961 * otherwise a negative error value
963 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
964 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
965 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
968 int media_info_get_category(media_info_h media, char **category) TIZEN_DEPRECATED_API;
971 * @deprecated Deprecated since 4.0.
972 * @brief Gets the location tag of content file which User set.
973 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
975 * @remarks The @a location_tag should be released using free().
977 * @param[in] media The handle to the media info
978 * @param[out] location_tag The location of the content file
980 * @return @c 0 on success,
981 * otherwise a negative error value
983 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
984 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
985 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
988 int media_info_get_location_tag(media_info_h media, char **location_tag) TIZEN_DEPRECATED_API;
991 * @deprecated Deprecated since 4.0.
992 * @brief Gets the age_rating of content file which User set.
993 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
995 * @remarks The @a age_rating should be released using free().
997 * @param[in] media The handle to the media info
998 * @param[out] age_rating The age rating of the content file
1000 * @return @c 0 on success,
1001 * otherwise a negative error value
1003 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1004 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1005 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1008 int media_info_get_age_rating(media_info_h media, char **age_rating) TIZEN_DEPRECATED_API;
1011 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1012 * @brief Gets the keyword of content file which User set.
1013 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1015 * @remarks The @a keyword should be released using free().
1017 * @param[in] media The handle to the media info
1018 * @param[out] keyword The keyword of the content file
1020 * @return @c 0 on success,
1021 * otherwise a negative error value
1023 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1024 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1025 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1028 int media_info_get_keyword(media_info_h media, char **keyword) TIZEN_DEPRECATED_API;
1031 * @brief Gets the storage id of content file.
1032 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1034 * @remarks The @a storage_id should be released using free().
1036 * @param[in] media The handle to the media info
1037 * @param[out] storage_id The ID of the media storage
1039 * @return @c 0 on success,
1040 * otherwise a negative error value
1042 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1043 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1044 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1046 int media_info_get_storage_id(media_info_h media, char **storage_id);
1049 * @brief Checks whether the media is protected via DRM.
1050 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1052 * @param[in] media The handle to the media info
1053 * @param[out] is_drm @c true if media is DRM media,
1054 * otherwise @c false if media is not DRM media
1056 * @return @c 0 on success,
1057 * otherwise a negative error value
1059 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1060 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1062 int media_info_is_drm(media_info_h media, bool *is_drm);
1065 * @brief Checks whether the content file is 360 content.
1068 * @param[in] media The handle to the media info
1069 * @param[out] is_360 @c true if media is 360 content,
1070 * otherwise @c false if media is not 360 content
1072 * @return @c 0 on success,
1073 * otherwise a negative error value
1075 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1076 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1078 int media_info_is_360_content(media_info_h media, bool *is_360);
1081 * @brief Gets the storage type of content file.
1082 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1084 * @param[in] media The handle to the media info
1085 * @param[out] storage_type The storage type of the content file
1087 * @return @c 0 on success,
1088 * otherwise a negative error value
1090 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1091 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1093 int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
1096 * @deprecated Deprecated since 4.0. \n
1097 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1098 * @brief Gets number which represents how many times given content has been played.
1099 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1101 * @param[in] media The handle to the media info
1102 * @param[out] played_count The counter of content played
1104 * @return 0 on success,
1105 * otherwise a negative error value
1107 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1108 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1110 int media_info_get_played_count(media_info_h media, int *played_count) TIZEN_DEPRECATED_API;
1113 * @deprecated Deprecated since 4.0. \n
1114 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1115 * @brief Gets the content's played time parameter.
1116 * @details Function returns content's elapsed playback time parameter as period
1117 * starting from the beginning of the track.
1118 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1120 * @param[in] media The handle to the media info
1121 * @param[out] played_time The elapsed time of the content
1123 * @return 0 on success,
1124 * otherwise a negative error value
1126 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1127 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1129 int media_info_get_played_time(media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API;
1132 * @brief Gets the media info from the media database.
1134 * @details This function creates a new media handle from the media database by the given @a media_id.
1135 * Media info will be created and filled with information.
1137 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1139 * @remarks The @a media should be released using media_info_destroy().
1141 * @param[in] media_id The media ID
1142 * @param[out] media The handle to the media info
1144 * @return @c 0 on success,
1145 * otherwise a negative error value
1147 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1148 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1149 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1150 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1151 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1153 * @pre This function requires opened connection to content service by media_content_connect().
1155 * @see media_content_connect()
1156 * @see media_info_destroy()
1158 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
1161 * @deprecated Deprecated since 4.0. \n
1162 * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
1163 * @brief Increments the played count to content meta handle.
1164 * @details You can increase the played(opened) count of the content file.
1165 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1167 * @param[in] media The handle to the media info
1169 * @return 0 on success,
1170 * otherwise a negative error value
1172 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1173 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1175 * @post media_info_update_to_db()
1177 int media_info_increase_played_count(media_info_h media) TIZEN_DEPRECATED_API;
1180 * @deprecated Deprecated since 4.0. \n
1181 * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.
1182 * @brief Sets the played time to content meta handle.
1183 * @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.
1184 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
1186 * @param[in] media The handle to the media info
1188 * @return 0 on success,
1189 * otherwise a negative error value
1191 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1192 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1194 * @post media_info_update_to_db()
1196 int media_info_set_played_time(media_info_h media) TIZEN_DEPRECATED_API;
1199 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1200 * @brief Sets the file name including the extension of the content file.
1201 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1203 * @param[in] media The handle to the media info
1204 * @param[in] display_name The file name including the extension of the content file.
1206 * @return @c 0 on success,
1207 * otherwise a negative error value
1209 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1210 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1211 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1213 * @post media_info_update_to_db().
1216 int media_info_set_display_name(media_info_h media, const char *display_name) TIZEN_DEPRECATED_API;
1219 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1220 * @brief Sets the description of media info.
1221 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1223 * @param[in] media The handle to the media info
1224 * @param[in] description The description of the media info
1226 * @return @c 0 on success,
1227 * otherwise a negative error value
1229 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1230 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1231 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1233 * @post media_info_update_to_db().
1236 int media_info_set_description(media_info_h media, const char *description) TIZEN_DEPRECATED_API;
1239 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1240 * @brief Sets the longitude of media info.
1241 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1243 * @param[in] media The handle to the media info
1244 * @param[in] longitude The longitude of the media info
1246 * @return @c 0 on success,
1247 * otherwise a negative error value
1249 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1250 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1252 * @post media_info_update_to_db().
1254 int media_info_set_longitude(media_info_h media, double longitude) TIZEN_DEPRECATED_API;
1257 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1258 * @brief Sets the latitude of media info.
1259 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1261 * @param[in] media The handle to the media info
1262 * @param[in] latitude The latitude of the media info
1264 * @return @c 0 on success,
1265 * otherwise a negative error value
1267 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1268 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1270 * @post media_info_update_to_db().
1272 int media_info_set_latitude(media_info_h media, double latitude) TIZEN_DEPRECATED_API;
1275 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1276 * @brief Sets the altitude of media info.
1277 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1279 * @param[in] media The handle to the media info
1280 * @param[in] altitude The altitude of the media info
1282 * @return @c 0 on success,
1283 * otherwise a negative error value
1285 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1286 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1288 * @post media_info_update_to_db().
1290 int media_info_set_altitude(media_info_h media, double altitude) TIZEN_DEPRECATED_API;
1293 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1294 * @brief Sets the weather of media info.
1295 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1297 * @param[in] media The handle to the media info
1298 * @param[in] weather The weather of the media info
1300 * @return @c 0 on success,
1301 * otherwise a negative error value
1303 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1304 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1305 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1307 * @post media_info_update_to_db().
1310 int media_info_set_weather(media_info_h media, const char *weather) TIZEN_DEPRECATED_API;
1313 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1314 * @brief Sets the rating of media info.
1315 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1317 * @param[in] media The handle to the media info
1318 * @param[in] rating The rating of the media info
1320 * @return @c 0 on success,
1321 * otherwise a negative error value
1323 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1324 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1326 * @post media_info_update_to_db().
1328 int media_info_set_rating(media_info_h media, int rating) TIZEN_DEPRECATED_API;
1331 * @brief Sets the favorite of media info.
1332 * @details This function can mark favorite of the media. If set to @c true, this function record the time of the change moment. \n
1333 * So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
1334 * Or, if you use it in condition parameter, you can get the result of the favorite media.
1336 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1338 * @param[in] media The handle to the media info
1339 * @param[in] favorite Set @c true to set the media info as favorite,
1340 * otherwise set @c false to not set the media info as favorite
1342 * @return @c 0 on success,
1343 * otherwise a negative error value
1345 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1346 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1348 int media_info_set_favorite(media_info_h media, bool favorite);
1351 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1352 * @brief Sets the author of media info.
1353 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1355 * @param[in] media The handle to the media info
1356 * @param[in] author The author of the media info
1358 * @return @c 0 on success,
1359 * otherwise a negative error value
1361 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1362 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1363 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1365 int media_info_set_author(media_info_h media, const char *author) TIZEN_DEPRECATED_API;
1368 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1369 * @brief Sets the provider of media info.
1370 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1372 * @param[in] media The handle to the media info
1373 * @param[in] provider The provider of the media info
1375 * @return @c 0 on success,
1376 * otherwise a negative error value
1378 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1379 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1380 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1382 int media_info_set_provider(media_info_h media, const char *provider) TIZEN_DEPRECATED_API;
1385 * @deprecated Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
1386 * @brief Sets the content name of media info.
1387 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1389 * @param[in] media The handle to the media info
1390 * @param[in] content_name The content name of the media info
1392 * @return @c 0 on success,
1393 * otherwise a negative error value
1395 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1396 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1397 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1399 * @post media_info_update_to_db()
1401 int media_info_set_content_name(media_info_h media, const char *content_name) TIZEN_DEPRECATED_API;
1404 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1405 * @brief Sets the category of media info.
1406 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1408 * @param[in] media The handle to the media info
1409 * @param[in] category The category of the media info
1411 * @return @c 0 on success,
1412 * otherwise a negative error value
1414 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1415 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1416 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1418 * @post media_info_update_to_db()
1420 int media_info_set_category(media_info_h media, const char *category) TIZEN_DEPRECATED_API;
1423 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1424 * @brief Sets the location tag of media info.
1425 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1427 * @param[in] media The handle to the media info
1428 * @param[in] location_tag The location of the media info
1430 * @return @c 0 on success,
1431 * otherwise a negative error value
1433 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1434 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1435 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1437 * @post media_info_update_to_db()
1439 int media_info_set_location_tag(media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API;
1442 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1443 * @brief Sets the age rating of media info.
1444 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1446 * @param[in] media The handle to the media info
1447 * @param[in] age_rating The age rating of the media info
1449 * @return @c 0 on success,
1450 * otherwise a negative error value
1452 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1453 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1454 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1456 * @post media_info_update_to_db()
1458 int media_info_set_age_rating(media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API;
1461 * @deprecated Deprecated since 4.0. Use media_tag_insert_to_db() instead.
1462 * @brief Sets the keyword of media info.
1463 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1465 * @param[in] media The handle to the media info
1466 * @param[in] keyword The keyword of the media info
1468 * @return @c 0 on success,
1469 * otherwise a negative error value
1471 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1472 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1473 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1475 * @post media_info_update_to_db()
1477 int media_info_set_keyword(media_info_h media, const char *keyword) TIZEN_DEPRECATED_API;
1480 * @brief Updates the media info to the media database.
1482 * @details The function updates the given media info in the media database.
1484 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1486 * @privilege %http://tizen.org/privilege/content.write
1488 * @remarks The function should be called after any change in media, to be updated to the media
1489 * database. For example, after using media_info_set_favorite()
1490 * for setting the name of the media, the media_info_update_to_db() function should be called so as to update
1491 * the given media info attributes in the media database.
1493 * @param[in] media The handle to the media info
1495 * @return @c 0 on success,
1496 * otherwise a negative error value
1498 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1499 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1500 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1501 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1502 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1503 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1504 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1505 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1507 * @pre This function requires opened connection to content service by media_content_connect().
1509 * @see media_content_connect()
1510 * @see media_info_set_favorite()
1512 int media_info_update_to_db(media_info_h media);
1515 * @deprecated Deprecated since 4.0. Use media_content_scan_file() instead.
1516 * @brief Refreshes the media metadata to the media database.
1517 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1520 * @privilege %http://tizen.org/privilege/content.write \n
1521 * %http://tizen.org/privilege/mediastorage \n
1522 * %http://tizen.org/privilege/externalstorage
1524 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1525 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1526 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1527 * If you can access both storage, you should add all privilege.
1529 * @param[in] media_id The media ID
1531 * @return @c 0 on success,
1532 * otherwise a negative error value
1534 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1535 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1536 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1537 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1538 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1539 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1540 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1541 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1543 * @pre This function requires opened connection to content service by media_content_connect().
1545 * @see media_content_connect()
1547 int media_info_refresh_metadata_to_db(const char *media_id) TIZEN_DEPRECATED_API;
1550 * @deprecated Deprecated since 4.0. This data cannot be saved to the file.
1551 * @brief Sets the added time of media info.
1552 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1554 * @param[in] media The handle to the media info
1555 * @param[in] added_time The added time of the media info
1557 * @return @c 0 on success,
1558 * otherwise a negative error value
1560 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1561 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1562 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1564 * @post media_info_update_to_db()
1566 int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRECATED_API;
1569 * @brief Moves the media info to the given destination path in the media database.
1570 * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
1571 * If the source path and destination path are the same, then this function does nothing.
1572 * If you want to refresh media information, you should use media_content_scan_file() function.
1574 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1577 * @privilege %http://tizen.org/privilege/content.write \n
1578 * %http://tizen.org/privilege/mediastorage \n
1579 * %http://tizen.org/privilege/externalstorage
1581 * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
1582 * If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1583 * Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1584 * If you can access both storage, you should add all privilege. \n
1585 * Since 4.0, this function does not allow symbolic links. \n
1586 * This function does not support USB storage before 5.0. Since 5.0, USB storage is supported. \n
1587 * Since 5.0, the thumbnail is removed if it exists.
1589 * @param[in] media The handle to the media info
1590 * @param[in] dst_path The path of destination
1592 * @return @c 0 on success,
1593 * otherwise a negative error value
1595 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1596 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
1597 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1598 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1599 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1600 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1601 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1602 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1604 * @pre This function requires opened connection to content service by media_content_connect().
1606 * @see media_content_connect()
1607 * @see media_content_scan_folder()
1608 * @see media_info_generate_thumbnail()
1610 int media_info_move_to_db(media_info_h media, const char* dst_path);
1613 * @deprecated Deprecated since 5.0. Use media_info_generate_thumbnail() instead.
1614 * @brief Creates a thumbnail file for the given media, asynchronously.
1615 * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
1616 * If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
1617 * Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
1618 * Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
1620 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1623 * @privilege %http://tizen.org/privilege/content.write \n
1624 * %http://tizen.org/privilege/mediastorage \n
1625 * %http://tizen.org/privilege/externalstorage
1627 * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
1628 * Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
1629 * Items in external storage except MMC not supported.
1631 * @param[in] media The handle to the media info
1632 * @param[in] callback The callback function to be invoked
1633 * @param[in] user_data The user data to be passed to the callback function
1635 * @return @c 0 on success,
1636 * otherwise a negative error value
1638 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1639 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1640 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1641 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1642 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1643 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1644 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1645 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1647 * @pre This function requires opened connection to content service by media_content_connect().
1649 * @see media_content_connect()
1651 int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
1654 * @deprecated Deprecated since 5.0.
1655 * @brief Cancels the creation of thumbnail file for the given media.
1656 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1659 * @privilege %http://tizen.org/privilege/content.write
1661 * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1663 * @param[in] media The handle to the media info
1665 * @return @c 0 on success,
1666 * otherwise a negative error value
1668 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1669 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1670 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1671 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1673 * @pre This function requires opened connection to content service by media_content_connect().
1674 * @see media_content_connect()
1676 int media_info_cancel_thumbnail(media_info_h media) TIZEN_DEPRECATED_API;
1679 * @brief Generates a thumbnail file for the given media, synchronously.
1684 * @privilege %http://tizen.org/privilege/content.write
1686 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
1687 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1688 * Items in external storage are not supported, with the exception of MMC.
1690 * @param[in] media The handle to the media info
1692 * @return @c 0 on success,
1693 * otherwise a negative error value
1695 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1696 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1697 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1698 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1699 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1700 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1701 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1702 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1704 * @pre This function requires opened connection to content service by media_content_connect().
1706 * @see media_content_connect()
1707 * @see media_info_get_thumbnail_path()
1709 int media_info_generate_thumbnail(media_info_h media);
1712 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1713 * @brief Starts face detection for the given image, asynchronously.
1714 * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1715 * The given callback function is called when the detection is completed. \n
1716 * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
1721 * @privilege %http://tizen.org/privilege/content.write \n
1722 * %http://tizen.org/privilege/mediastorage \n
1723 * %http://tizen.org/privilege/externalstorage
1725 * @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
1726 * If face detection fails, the face_count argument in media_face_detection_completed_cb() will be set to 0.
1727 * Media items in external storage are not supported, with the exception of MMC items.
1729 * @param[in] media The handle to the media info
1730 * @param[in] callback The callback function to be invoked when detection is completed
1731 * @param[in] user_data The user data to be passed to the callback function
1733 * @return @c 0 on success,
1734 * otherwise a negative error value
1736 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1737 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1738 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1739 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1740 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
1741 * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
1742 * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
1743 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1744 * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED Not supported
1746 * @pre This function requires opened connection to content service by media_content_connect().
1748 * @see media_content_connect()
1749 * @see media_info_cancel_face_detection()
1751 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1754 * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1755 * @brief Cancels face detection of image for the given media.
1756 * @details This function cancels face detection for given media item. \n
1757 * If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1762 * @privilege %http://tizen.org/privilege/content.write
1764 * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
1766 * @param[in] media The handle to the media info
1768 * @return @c 0 on success,
1769 * otherwise a negative error value
1771 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1772 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1773 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1774 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1776 * @pre This function requires opened connection to content service by media_content_connect().
1778 * @see media_content_connect()
1779 * @see media_info_start_face_detection()
1781 int media_info_cancel_face_detection(media_info_h media);
1784 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1785 * @brief Creates the media info handle.
1786 * @details If the information about the file that is already known, you can use this function to generate empty handler.
1790 * @privilege %http://tizen.org/privilege/mediastorage \n
1791 * %http://tizen.org/privilege/externalstorage
1793 * @remarks The @a media should be released using media_info_destroy().
1794 * @remarks If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
1795 * Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
1796 * If you can access both storage, you must add all privilege.
1798 * @param[in] path The path to create the media info handle
1799 * @param[out] media The handle to the media info
1801 * @return @c 0 on success,
1802 * otherwise a negative error value
1804 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1805 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1806 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1807 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1808 * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1810 * @see media_info_destroy()
1812 int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
1815 * @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
1816 * @brief Inserts media info to database with media info data.
1820 * @privilege %http://tizen.org/privilege/content.write
1822 * @remarks The @a media should be released using media_info_destroy().
1824 * @param[in] media The handle to the media info
1826 * @return @c 0 on success,
1827 * otherwise a negative error value
1829 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1830 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1831 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
1832 * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1834 int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
1837 * @deprecated Deprecated since 4.0.
1838 * @brief Sets the title of media info handle.
1841 * @param[in] media The handle to the media info
1842 * @param[in] title The title of media info handle
1844 * @return @c 0 on success,
1845 * otherwise a negative error value
1847 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1848 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1849 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1851 int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
1854 * @deprecated Deprecated since 4.0.
1855 * @brief Sets the album of media info handle.
1858 * @param[in] media The handle to the media info
1859 * @param[in] album The album of the media
1861 * @return @c 0 on success,
1862 * otherwise a negative error value
1864 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1865 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1866 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1868 int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
1871 * @deprecated Deprecated since 4.0.
1872 * @brief Sets the artist of media info handle.
1875 * @param[in] media The handle to the media info
1876 * @param[in] artist The artist of media info handle
1878 * @return @c 0 on success,
1879 * otherwise a negative error value
1881 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1882 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1883 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1885 int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
1888 * @deprecated Deprecated since 4.0.
1889 * @brief Sets the genre of media info handle.
1892 * @param[in] media The handle to the media info
1893 * @param[in] genre The genre of media info handle
1895 * @return @c 0 on success,
1896 * otherwise a negative error value
1898 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1899 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1900 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1902 int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
1905 * @deprecated Deprecated since 4.0.
1906 * @brief Sets the recorded date of media info handle.
1909 * @param[in] media The handle to the media info
1910 * @param[in] recorded_date The recorded date of media info handle
1912 * @return @c 0 on success,
1913 * otherwise a negative error value
1915 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
1916 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
1917 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1919 int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
1927 #endif /* __cplusplus */
1929 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */