29d60c11a78a367683dc997e19daa6637ec93773
[platform/core/api/media-content.git] / include_product / media_info.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17
18 #ifndef __TIZEN_CONTENT_MEDIA_INFO_H__
19 #define __TIZEN_CONTENT_MEDIA_INFO_H__
20
21 #include <media_content_type.h>
22
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28
29 /**
30  * @file media_info.h
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 favorite etc. \n
34  *        And you can get bookmark, face, tag info related the content file.
35  */
36
37
38 /**
39  * @addtogroup CAPI_CONTENT_MEDIA_INFO_MODULE
40  * @{
41  */
42
43 /**
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. \n
47  *          If media information exists in the media database, this function returns information stored in the database.\n
48  *          Since 5.5, if media information already exists in the media database,
49  *          this function returns the updated latest information. (Media database will be updated if necessary).
50  *
51  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
52  *
53  * @privlevel public
54  * @privilege %http://tizen.org/privilege/content.write \n
55  *                   %http://tizen.org/privilege/mediastorage \n
56  *                   %http://tizen.org/privilege/externalstorage
57  *
58  * @remarks The @a info should be released using media_info_destroy(). \n
59  *                   You must add the privilege %http://tizen.org/privilege/content.write. You need to add more privileges depending on your choice of contents path. \n
60  *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
61  *                   If you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
62  *                   If you want to access storages of both types, you must add all privileges. \n
63  *                   Since 4.0, this function does not accept symbolic links. \n
64  * @remarks Since 4.0, this function is related to the following feature:\n
65  *              %http://tizen.org/feature/content.scanning.others\n
66  *              If this feature is not supported on the device, #MEDIA_CONTENT_TYPE_OTHERS type files are not scanned.
67  *
68  * @param[in] path The path of the content file to add
69  * @param[out] info The handle of the inserted content file
70  *
71  * @return @c 0 on success,
72  *         otherwise a negative error value
73  *
74  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
75  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
76  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
77  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
78  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
79  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
80  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
81  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
82  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
83  *
84  * @pre This function requires opened connection to content service by media_content_connect().
85  *
86  * @see media_content_connect()
87  * @see media_content_scan_file()
88  * @see media_content_scan_folder()
89  */
90 int media_info_insert_to_db(const char *path, media_info_h *info);
91
92 /**
93  * @brief Inserts content files into the media database, asynchronously.
94  * @details This function can insert multiple content files into the media database.
95  *
96  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
97  *
98  * @privlevel public
99  * @privilege %http://tizen.org/privilege/content.write \n
100  *                   %http://tizen.org/privilege/mediastorage \n
101  *                   %http://tizen.org/privilege/externalstorage
102  *
103  * @remarks You must add privilege %http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
104  *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
105  *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
106  *                   If you can access both storage, you must add all privilege. \n
107  *                   Since 4.0, This function does not allow a symbolic link. \n
108  * @remarks Since 4.0, this function is related to the following feature:\n
109  *              %http://tizen.org/feature/content.scanning.others\n
110  *              If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
111  *
112  * @param[in] path_array The path array of the content files to add
113  * @param[in] array_length The length of the array
114  * @param[in] callback The callback function to be invoked when media items inserted completely
115  * @param[in] user_data The user data to be passed to the callback function
116  *
117  * @return @c 0 on success,
118  *         otherwise a negative error value
119  *
120  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
121  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
122  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
123  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
124  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
125  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
126  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
127  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
128  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
129  *
130  * @pre This function requires opened connection to content service by media_content_connect().
131  *
132  * @see media_content_connect()
133  * @see media_insert_completed_cb()
134  */
135 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
136
137 /**
138  * @brief Destroys media info.
139  * @details The function frees all resources related to the media info handle. This handle
140  *          can no longer be used to perform any operations. New media info handle has to
141  *          be created before the next usage.
142  *
143  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
144  *
145  * @param[in] media The handle to the media info
146  *
147  * @return @c 0 on success,
148  *         otherwise a negative error value
149  *
150  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
151  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
152  *
153  * @pre Get copy of media_info handle by calling media_info_clone().
154  *
155  * @see media_info_clone()
156  */
157 int media_info_destroy(media_info_h media);
158
159 /**
160  * @brief Clones the media info handle.
161  *
162  * @details This function copies the media info handle from a source to the destination.
163  *          To use this handle outside of these foreach functions, use this function.
164  *
165  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
166  *
167  * @remarks The @a dst should be released using media_info_destroy().
168  *
169  * @param[out] dst The destination handle to the media info
170  * @param[in] src The source handle to the media info
171  *
172  * @return @c 0 on success,
173  *         otherwise a negative error value
174  *
175  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
176  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
177  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
178  *
179  * @see media_info_destroy()
180  * @see media_album_foreach_media_from_db()
181  * @see media_playlist_foreach_media_from_db()
182  * @see media_group_foreach_media_from_db()
183  * @see media_tag_foreach_media_from_db()
184  * @see media_info_foreach_media_from_db()
185  * @see media_info_insert_to_db()
186  * @see media_folder_foreach_media_from_db()
187  */
188 int media_info_clone(media_info_h *dst, media_info_h src);
189
190 /**
191  * @brief Gets the count of media info for the passed @a filter from the media database.
192  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
193  *
194  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
195  *
196  *
197  * @param[in] filter The handle to the media filter
198  * @param[out] media_count The count of media
199  *
200  * @return @c 0 on success,
201  *         otherwise a negative error value
202  *
203  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
204  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
205  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
206  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
207  *
208  * @pre This function requires opened connection to content service by media_content_connect().
209  *
210  * @see media_content_connect()
211  * @see media_filter_create()
212  */
213 int media_info_get_media_count_from_db(filter_h filter, int *media_count);
214
215 /**
216  * @brief Iterates through media info from the media database.
217  * @details This function gets all media info handles meeting the given @a filter.
218  *          The @a callback function will be invoked for every retrieved media info.
219  *          If @c NULL is passed to the @a filter, then no filtering is applied.
220  *
221  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
222  *
223  * @remarks Do not call updating DB function like media_info_update_to_db() in your callback function,
224  *                   your callback function is invoked as inline function.
225  *                   So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB.
226  *                   We do not recommend you call updating DB function in callback of foreach function.
227  *
228  * @param[in] filter The handle to the media filter
229  * @param[in] callback The callback function to be invoked
230  * @param[in] user_data The user data to be passed to the callback function
231  *
232  * @return @c 0 on success,
233  *         otherwise a negative error value
234  *
235  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
236  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
237  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
238  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
239  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
240  *
241  * @pre  This function requires opened connection to content service by media_content_connect().
242  * @post This function invokes media_info_cb().
243  *
244  * @see media_content_connect()
245  * @see #media_info_cb
246  * @see media_filter_create()
247  */
248 int media_info_foreach_media_from_db(filter_h filter, media_info_cb callback, void *user_data);
249
250 /**
251  * @brief Gets the count of media tags for the passed @a filter in the given @a media_id from the media database.
252  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
253  *
254  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
255  *
256  * @param[in] media_id The media ID
257  * @param[in] filter The handle to the media filter
258  * @param[out] tag_count The count of the media tag
259  *
260  * @return @c 0 on success,
261  *         otherwise a negative error value
262  *
263  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
264  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
265  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
266  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
267  *
268  * @pre This function requires opened connection to content service by media_content_connect().
269  *
270  * @see media_content_connect()
271  * @see media_filter_create()
272  */
273 int media_info_get_tag_count_from_db(const char *media_id, filter_h filter, int *tag_count);
274
275 /**
276  * @brief Iterates through the media tag in the given media info from the media database.
277  * @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
278  *               If @c NULL is passed to the @a filter, then no filtering is applied.
279  *
280  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
281  *
282  * @param[in] media_id The media ID
283  * @param[in] filter The handle to the media filter
284  * @param[in] callback The callback function to be invoked
285  * @param[in] user_data The user data to be passed to the callback function
286  *
287  * @return @c 0 on success,
288  *         otherwise a negative error value
289  *
290  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
291  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
292  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
293  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
294  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
295  *
296  * @pre  This function requires opened connection to content service by media_content_connect().
297  * @post This function invokes media_tag_cb().
298  *
299  * @see media_content_connect()
300  * @see #media_tag_cb
301  * @see media_filter_create()
302  */
303 int media_info_foreach_tag_from_db(const char *media_id, filter_h filter, media_tag_cb callback, void *user_data);
304
305 /**
306  * @brief Gets the number of bookmarks for the passed @a filter in the given media ID from the media database.
307  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
308  *
309  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
310  *
311  * @param[in] media_id The media ID
312  * @param[in] filter The handle to the media filter
313  * @param[out] bookmark_count The count of the media tag
314  *
315  * @return @c 0 on success,
316  *         otherwise a negative error value
317  *
318  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
319  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
320  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
321  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
322  *
323  * @pre This function requires opened connection to content service by media_content_connect().
324  *
325  * @see media_content_connect()
326  * @see media_filter_create()
327  */
328 int media_info_get_bookmark_count_from_db(const char *media_id, filter_h filter, int *bookmark_count);
329
330 /**
331  * @brief Iterates through the media bookmark in the given media info from the media database.
332  * @details This function gets all media bookmarks associated with the given media and calls @a callback for every retrieved media bookmark.
333  *                If @c NULL is passed to the @a filter, then no filtering is applied.
334  *
335  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
336  *
337  * @param[in] media_id The media ID
338  * @param[in] filter The handle to the media filter
339  * @param[in] callback The callback function to be invoked
340  * @param[in] user_data The user data to be passed to the callback function
341  *
342  * @return @c 0 on success,
343  *         otherwise a negative error value
344  *
345  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
346  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
347  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
348  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
349  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
350  *
351  * @pre  This function requires opened connection to content service by media_content_connect().
352  * @post This function invokes media_bookmark_cb().
353  *
354  * @see media_content_connect()
355  * @see media_bookmark_cb()
356  * @see media_filter_create()
357  */
358 int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
359
360 /**
361  * @brief Gets the number of face for the passed @a media_id from the media database.
362  * @details If @c NULL is passed to the @a filter, then no filtering is applied.
363  *
364  * @since_tizen 3.0
365  *
366  * @param[in] media_id The media ID
367  * @param[in] filter The handle to the media filter
368  * @param[out] face_count The count of media face
369  *
370  * @return 0 on success, otherwise a negative error value.
371  *
372  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
373  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
374  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
375  *
376  * @pre This function requires opened connection to content service by media_content_connect().
377  * @see media_content_connect()
378  * @see media_filter_create()
379  *
380  */
381 int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
382
383 /**
384  * @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
385  * @details This function gets all media face info associated with the given media id and
386  * meeting desired filter option and calls @a callback for
387  * every retrieved media face info. If NULL is passed to the @a filter, no filtering is applied.
388  *
389  * @since_tizen 3.0
390  *
391  * @param[in] media_id The media ID
392  * @param[in] filter The handle to the media filter
393  * @param[in] callback The callback function to invoke
394  * @param[in] user_data The user data to be passed to the callback function
395  *
396  * @return 0 on success, otherwise a negative error value.
397  *
398  * @retval #MEDIA_CONTENT_ERROR_NONE Successful
399  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
400  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
401  *
402  * @pre This function requires opened connection to content service by media_content_connect().
403  * @see media_content_connect()
404  * @see media_filter_create()
405  *
406  */
407 int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
408
409 /**
410  * @brief Gets the image metadata handle for a given media info.
411  * @details This function returns an image metadata handle retrieved from the media info.
412  *
413  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
414  *
415  * @remarks The @a image should be released using image_meta_destroy().
416  *
417  * @param[in] media The handle to the media info
418  * @param[out] image The handle to the image metadata
419  *
420  * @return @c 0 on success,
421  *         otherwise a negative error value
422  *
423  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
424  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
425  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
426  *
427  * @see image_meta_destroy()
428  */
429 int media_info_get_image(media_info_h media, image_meta_h *image);
430
431 /**
432  * @brief Gets a video metadata handle for a given media info.
433  * @details This function returns a video metadata handle retrieved from the media info handle.
434  *
435  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
436  *
437  * @remarks The @a video should be released using video_meta_destroy().
438  *
439  * @param[in] media The handle to the media info
440  * @param[out] video The handle to the video metadata
441  *
442  * @return @c 0 on success,
443  *         otherwise a negative error value
444  *
445  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
446  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
447  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
448  *
449  * @see video_meta_destroy()
450  */
451 int media_info_get_video(media_info_h media, video_meta_h *video);
452
453 /**
454  * @brief Gets an audio metadata handle for a given media info.
455  * @details This function returns an audio metadata handle retrieved from the media info handle.
456  *
457  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
458  *
459  * @remarks The @a audio should be released using audio_meta_destroy().
460  *
461  * @param[in] media The handle to the media info
462  * @param[out] audio The handle to the audio metadata
463  *
464  * @return @c 0 on success,
465  *         otherwise a negative error value
466  *
467  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
468  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
469  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
470  *
471  * @see audio_meta_destroy()
472  */
473 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
474
475 /**
476  * @brief Gets a book metadata handle for a given media info.
477  * @details This function returns a book metadata handle retrieved from the media info handle. \n
478  *          The title and description information of the book can be obtained from @a media.
479  *
480  * @since_tizen 6.5
481  *
482  * @remarks The @a book should be released using book_meta_destroy().
483  *
484  * @param[in] media The handle to the media info
485  * @param[out] book The handle to the book metadata
486  *
487  * @return @c 0 on success,
488  *         otherwise a negative error value
489  *
490  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
491  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
492  *
493  * @see media_info_get_title()
494  * @see media_info_get_description()
495  * @see book_meta_destroy()
496  */
497 int media_info_get_book(media_info_h media, book_meta_h *book);
498
499 /**
500  * @brief Gets the media ID.
501  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
502  * @remarks The @a media_id should be released using free().
503  *
504  * @param[in] media The handle to the media info
505  * @param[out] media_id The media ID
506  *
507  * @return @c 0 on success,
508  *         otherwise a negative error value
509  *
510  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
511  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
512  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
513  */
514 int media_info_get_media_id(media_info_h media, char **media_id);
515
516 /**
517  * @brief Gets the full path of the content file.
518  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
519  *
520  * @remarks The @a path should be released using free().
521  *
522  * @param[in] media The handle to the media info
523  * @param[out] path The full path of the content file
524  *
525  * @return @c 0 on success,
526  *         otherwise a negative error value
527  *
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
531  *
532  */
533 int media_info_get_file_path(media_info_h media, char **path);
534
535 /**
536  * @brief Gets the file name including the extension of the content file.
537  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
538  *
539  * @remarks The @a name should be released using free().
540  *
541  * @param[in] media The handle to the media info
542  * @param[out] name The file name including the extension of the content file
543  *
544  * @return @c 0 on success,
545  *         otherwise a negative error value
546  *
547  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
548  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
549  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
550  */
551 int media_info_get_display_name(media_info_h media, char **name);
552
553 /**
554  * @brief Gets the content type of the content file.
555  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
556  *
557  * @param[in] media The handle to the media info
558  * @param[out] type The content type of the content file (#media_content_type_e)
559  *
560  * @return @c 0 on success,
561  *         otherwise a negative error value
562  *
563  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
564  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
565  *
566  * @see #media_content_type_e
567  */
568 int media_info_get_media_type(media_info_h media, media_content_type_e *type);
569
570 /**
571  * @brief Gets the MIME type of the content file.
572  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
573  *
574  * @remarks The @a mime_type should be released using free().
575  *
576  * @param[in] media The handle to the media info
577  * @param[out] mime_type The MIME type of the content file
578  *
579  * @return @c 0 on success,
580  *         otherwise a negative error value
581  *
582  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
583  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
584  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
585  */
586 int media_info_get_mime_type(media_info_h media, char **mime_type);
587
588 /**
589  * @brief Gets the content file size.
590  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
591  *
592  * @param[in] media The handle to the media info
593  * @param[out] size The content file size
594  *
595  * @return @c 0 on success,
596  *         otherwise a negative error value
597  *
598  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
599  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
600  */
601 int media_info_get_size(media_info_h media, unsigned long long *size);
602
603 /**
604  * @brief Gets the added time of the content file.
605  * @details The added time refers to the time that content file was first added to media database.
606  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
607  *
608  * @param[in] media The handle to the media info
609  * @param[out] added_time The added time to the media database
610  *
611  * @return @c 0 on success,
612  *         otherwise a negative error value
613  *
614  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
615  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
616  */
617 int media_info_get_added_time(media_info_h media, time_t *added_time);
618
619 /**
620  * @brief Gets the modified time of the content file.
621  * @details The modified time refers to the last modification time provided by the file system.
622  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
623  *
624  * @param[in] media The handle to the media info
625  * @param[out] time The last modification time of the content file
626  *
627  * @return @c 0 on success,
628  *         otherwise a negative error value
629  *
630  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
631  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
632  */
633 int media_info_get_modified_time(media_info_h media, time_t *time);
634
635 /**
636  * @brief Gets the timeline of content file.
637  * @details If the content file has the creation time information (like Content recorded date or Image creation date), that value is timeline. \n
638  *               Otherwise, timeline value is the same as modified time.
639  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
640  *
641  * @param[in] media The handle to the media info
642  * @param[out] time The timeline of content file
643  *
644  * @return @c 0 on success,
645  *         otherwise a negative error value
646  *
647  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
648  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
649  */
650 int media_info_get_timeline(media_info_h media, time_t *time);
651
652 /**
653  * @brief Gets the thumbnail path of content file.
654  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
655  *
656  * @remarks The @a path should be released using free(). \n
657  *                   If the thumbnail extraction for the given media has not been requested yet, this function returns NULL. \n
658  *                   To create a thumbnail, you should use media_info_generate_thumbnail() function. \n
659  *                   This function returns an empty string if media_info_generate_thumbnail() has failed to create a thumbnail for the given media.
660  *
661  * @param[in] media The handle to the media info
662  * @param[out] path The thumbnail path
663  *
664  * @return @c 0 on success,
665  *         otherwise a negative error value
666  *
667  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
668  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
669  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
670  */
671 int media_info_get_thumbnail_path(media_info_h media, char **path);
672
673 /**
674  * @brief Gets the description of content file.
675  * @details If the value is an empty string, the method returns "Unknown". \n
676  *                Since 3.0, if the media info has no description, the method returns empty string.
677  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
678  *
679  * @remarks The @a description should be released using free().
680  *
681  * @param[in] media The handle to the media info
682  * @param[out] description The description of the content file
683  *
684  * @return @c 0 on success,
685  *         otherwise a negative error value
686  *
687  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
688  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
689  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
690  */
691 int media_info_get_description(media_info_h media, char **description);
692
693 /**
694  * @brief Gets the longitude of content file.
695  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
696  *
697  * @param[in] media The handle to the media info
698  * @param[out] longitude The longitude of the content file
699  *
700  * @return @c 0 on success,
701  *         otherwise a negative error value
702  *
703  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
704  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
705  */
706 int media_info_get_longitude(media_info_h media, double *longitude);
707
708 /**
709  * @brief Gets the latitude of content file.
710  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
711  *
712  * @param[in] media The handle to the media info
713  * @param[out] latitude The latitude of the content file
714  *
715  * @return @c 0 on success,
716  *         otherwise a negative error value
717  *
718  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
719  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
720  *
721  */
722 int media_info_get_latitude(media_info_h media, double* latitude);
723
724 /**
725  * @brief Gets the altitude of content file.
726  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
727  *
728  * @param[in] media The handle to the media info
729  * @param[out] altitude The altitude of the content file
730  *
731  * @return @c 0 on success,
732  *         otherwise a negative error value
733  *
734  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
735  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
736  */
737 int media_info_get_altitude(media_info_h media, double* altitude);
738
739 /**
740  * @brief Gets the rating of content file.
741  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
742  *
743  * @param[in] media The handle to the media info
744  * @param[out] rating The rating of the content file
745  *
746  * @return @c 0 on success,
747  *         otherwise a negative error value
748  *
749  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
750  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
751  */
752 int media_info_get_rating(media_info_h media, int *rating);
753
754 /**
755  * @brief Gets the favorite status of content file which User set.
756  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
757  *
758  * @param[in] media The handle to the media info
759  * @param[out] favorite @c true if content file is set as favorite,
760  *                       otherwise @c false if content file is not set as favorite
761  *
762  * @return @c 0 on success,
763  *         otherwise a negative error value
764  *
765  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
766  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
767  *
768  * @see media_info_set_favorite()
769  */
770 int media_info_get_favorite(media_info_h media, bool* favorite);
771
772 /**
773  * @brief Gets the title of content file.
774  * @details If the content file does not have a title, this method returns the filename without the extension.
775  *
776  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
777  *
778  * @remarks The @a title should be released using free().
779  *
780  * @param[in] media The handle to the media info
781  * @param[out] title The title of the content file
782  *
783  * @return @c 0 on success,
784  *         otherwise a negative error value
785  *
786  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
787  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
788  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
789  */
790 int media_info_get_title(media_info_h media, char **title);
791
792 /**
793  * @brief Checks whether the media is protected via DRM.
794  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
795  *
796  * @param[in] media The handle to the media info
797  * @param[out] is_drm @c true if media is DRM media,
798  *                    otherwise @c false if media is not DRM media
799  *
800  * @return @c 0 on success,
801  *         otherwise a negative error value
802  *
803  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
804  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
805  */
806 int media_info_is_drm(media_info_h media, bool *is_drm);
807
808 /**
809  * @brief Checks whether the content file is 360 content.
810  * @since_tizen 3.0
811  *
812  * @param[in] media The handle to the media info
813  * @param[out] is_360 @c true if media is 360 content,
814  *                    otherwise @c false if media is not 360 content
815  *
816  * @return @c 0 on success,
817  *         otherwise a negative error value
818  *
819  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
820  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
821  */
822 int media_info_is_360_content(media_info_h media, bool *is_360);
823
824 /**
825  * @brief Gets the media info from the media database.
826  *
827  * @details This function creates a new media handle from the media database by the given @a media_id.
828  *          Media info will be created and filled with information.
829  *
830  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
831  *
832  * @remarks The @a media should be released using media_info_destroy().
833  *
834  * @param[in] media_id The media ID
835  * @param[out] media The handle to the media info
836  *
837  * @return @c 0 on success,
838  *         otherwise a negative error value
839  *
840  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
841  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
842  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
843  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
844  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
845  *
846  * @pre This function requires opened connection to content service by media_content_connect().
847  *
848  * @see media_content_connect()
849  * @see media_info_destroy()
850  */
851 int media_info_get_media_from_db(const char *media_id, media_info_h *media);
852
853 /**
854  * @brief Gets the media info from the media database using path.
855  *
856  * @details This function creates a new media handle filled with information from the database by the given @a media_path.
857  *
858  * @since_tizen 6.5
859  *
860  * @remarks The @a media should be released using media_info_destroy().\n
861  *          If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
862  *          If you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
863  *          If you want to access storages of both types, you must add all privileges. \n
864  *
865  * @param[in] media_path The media path
866  * @param[out] media The handle to the media info
867  *
868  * @return @c 0 on success,
869  *         otherwise a negative error value
870  *
871  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
872  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
873  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
874  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
875  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
876  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
877  *
878  * @pre This function requires opened connection to content service by media_content_connect().
879  *
880  * @see media_content_connect()
881  * @see media_info_destroy()
882  */
883 int media_info_get_media_from_db_by_path(const char *media_path, media_info_h *media);
884
885 /**
886  * @brief Sets the favorite of media info.
887  * @details This function can mark favorite of the media. If set to @c true, this function record the time of the change moment. \n
888  *                So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
889  *                Or, if you use it in condition parameter, you can get the result of the favorite media.
890  *
891  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
892  *
893  * @param[in] media The handle to the media info
894  * @param[in] favorite Set @c true to set the media info as favorite,
895  *                     otherwise set @c false to not set the media info as favorite
896  *
897  * @return @c 0 on success,
898  *         otherwise a negative error value
899  *
900  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
901  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
902  */
903 int media_info_set_favorite(media_info_h media, bool favorite);
904
905 /**
906  * @brief Updates the media info to the media database.
907  *
908  * @details The function updates the given media info in the media database.
909  *
910  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
911  * @privlevel public
912  * @privilege %http://tizen.org/privilege/content.write
913  *
914  * @remarks The function should be called after any change in media, to be updated to the media
915  *          database. For example, after using media_info_set_favorite()
916  *          for setting the name of the media, the media_info_update_to_db() function should be called so as to update
917  *          the given media info attributes in the media database.
918  *
919  * @param[in] media The handle to the media info
920  *
921  * @return @c 0 on success,
922  *         otherwise a negative error value
923  *
924  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
925  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
926  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
927  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
928  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
929  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
930  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
931  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
932  *
933  * @pre This function requires opened connection to content service by media_content_connect().
934  *
935  * @see media_content_connect()
936  * @see media_info_set_favorite()
937  */
938 int media_info_update_to_db(media_info_h media);
939
940 /**
941  * @brief Moves the media info to the given destination path in the media database.
942  * @details After moving or renaming a file in the filesystem, call this function to update the database. \n
943  *               If the source path and destination path are the same, then this function does nothing.
944  *               If you want to refresh media information, you should use media_content_scan_file() function.
945  *
946  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
947  *
948  * @privlevel public
949  * @privilege %http://tizen.org/privilege/content.write \n
950  *                   %http://tizen.org/privilege/mediastorage \n
951  *                   %http://tizen.org/privilege/externalstorage
952  *
953  * @remarks You must add privilege %http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
954  *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
955  *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
956  *                   If you can access both storage, you should add all privilege. \n
957  *                   Since 4.0, this function does not allow symbolic links. \n
958  *                   This function does not support USB storage before 5.0. Since 5.0, USB storage is supported. \n
959  *                   Since 5.0, the thumbnail is removed if it exists.
960  *
961  * @param[in] media The handle to the media info
962  * @param[in] dst_path The path of destination
963  *
964  * @return @c 0 on success,
965  *         otherwise a negative error value
966  *
967  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
968  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter (Especially, if the request is duplicated, this error returns.)
969  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
970  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
971  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
972  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
973  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
974  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
975  *
976  * @pre This function requires opened connection to content service by media_content_connect().
977  *
978  * @see media_content_connect()
979  * @see media_content_scan_folder()
980  * @see media_info_generate_thumbnail()
981  */
982 int media_info_move_to_db(media_info_h media, const char* dst_path);
983
984 /**
985  * @brief Generates a thumbnail file for the given media, synchronously.
986  *
987  * @since_tizen 5.0
988  *
989  * @privlevel public
990  * @privilege %http://tizen.org/privilege/content.write
991  *
992  * @remarks %http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
993  *          %http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
994  *          Items in external storage are not supported, with the exception of MMC.
995  *
996  * @param[in] media The handle to the media info
997  *
998  * @return @c 0 on success,
999  *         otherwise a negative error value
1000  *
1001  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1002  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1003  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1004  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1005  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1006  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1007  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1008  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1009  *
1010  * @pre This function requires opened connection to content service by media_content_connect().
1011  *
1012  * @see media_content_connect()
1013  * @see media_info_get_thumbnail_path()
1014  */
1015 int media_info_generate_thumbnail(media_info_h media);
1016
1017 /**
1018  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1019  * @brief Starts face detection for the given image, asynchronously.
1020  * @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
1021  *          The given callback function is called when the detection is completed. \n
1022  *          To obtain the detected faces, call the media_info_foreach_face_from_db() function. \n
1023  *          Supported image formats are jpg, png, and bmp.
1024  *
1025  * @since_tizen 3.0
1026  *
1027  * @privlevel public
1028  * @privilege %http://tizen.org/privilege/content.write \n
1029  *                   %http://tizen.org/privilege/mediastorage \n
1030  *                   %http://tizen.org/privilege/externalstorage
1031  *
1032  * @remarks If you want to destroy the media handle before the callback invoked, you must cancel the face detection request using media_info_cancel_face_detection(). \n
1033  *          If the face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0. \n
1034  *          The face detection of media items in external storage except MMC is not supported. \n
1035  *          Since 5.5, if the format of media data is unsupported, this function returns an error and the callback will not be invoked.
1036  *
1037  * @param[in] media The handle to the media info
1038  * @param[in] callback The callback function to be invoked when detection is completed
1039  * @param[in] user_data The user data to be passed to the callback function
1040  *
1041  * @return @c 0 on success,
1042  *         otherwise a negative error value
1043  *
1044  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1045  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1046  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
1047  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1048  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
1049  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
1050  * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
1051  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1052  * @retval #MEDIA_CONTENT_ERROR_NOT_SUPPORTED     Not supported
1053  *
1054  * @pre This function requires opened connection to content service by media_content_connect().
1055  *
1056  * @see media_content_connect()
1057  * @see media_info_cancel_face_detection()
1058  */
1059 int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
1060
1061 /**
1062  * @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
1063  * @brief Cancels face detection of image for the given media.
1064  * @details This function cancels face detection for given media item. \n
1065  *          If you cancel face detection request before callback is invoked, the callback registered by media_info_start_face_detection() function will not be invoked.
1066  *
1067  * @since_tizen 3.0
1068  *
1069  * @privlevel public
1070  * @privilege %http://tizen.org/privilege/content.write
1071  *
1072  * @remarks If face detection is already done when you request the cancellation, this function returns #MEDIA_CONTENT_ERROR_INVALID_OPERATION
1073  *
1074  * @param[in] media The handle to the media info
1075  *
1076  * @return @c 0 on success,
1077  *         otherwise a negative error value
1078  *
1079  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
1080  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
1081  * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
1082  * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
1083  *
1084  * @pre This function requires opened connection to content service by media_content_connect().
1085  *
1086  * @see media_content_connect()
1087  * @see media_info_start_face_detection()
1088  */
1089 int media_info_cancel_face_detection(media_info_h media);
1090
1091 /**
1092  * @}
1093  */
1094
1095 #ifdef __cplusplus
1096 }
1097 #endif /* __cplusplus */
1098
1099 #endif /* __TIZEN_CONTENT_MEDIA_INFO_H__ */