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.
17 #ifndef __TIZEN_MEDIA_CONTENT_H__
18 #define __TIZEN_MEDIA_CONTENT_H__
20 #include <media_audio.h>
21 #include <media_content_type.h>
22 #include <media_filter.h>
23 #include <media_folder.h>
24 #include <media_image.h>
25 #include <media_info.h>
26 #include <media_tag.h>
27 #include <media_video.h>
28 #include <media_group.h>
29 #include <media_playlist.h>
30 #include <media_bookmark.h>
35 #endif /* __cplusplus */
38 * @addtogroup CAPI_MEDIA_CONTENT_MODULE
44 * @brief Connects to the media content service.
45 * @details Any media content related function call should be invoked after this function call.
47 * @return 0 on success, otherwise a negative error value.
48 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
49 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
50 * @post media_content_disconnect()
51 * @see media_content_disconnect()
54 int media_content_connect(void);
57 * @brief Disconnects from the media content service.
58 * @details This function closes connection to the media content service. Any further media content related operation
59 * cannot be performed after this function is called.
61 * @return 0 on success, otherwise a negative error value.
62 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
63 * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
64 * @pre media_content_connect()
65 * @see media_content_connect()
68 int media_content_disconnect(void);
71 * @brief Requests to scan a media file.
72 * @details This function requests to scan a media file to media server.
73 * @param[in] path The file path
74 * @return 0 on success, otherwise a negative error value.
75 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
78 int media_content_scan_file(const char *path);
82 * @brief Requests to scan a media folder, asynchronously.
83 * @details This function requests to scan a media folder to media server with given completed callback fucntion.
84 * #media_scan_completed_cb() function will be called when the scanning is finished.
85 * The sub folders are also scanned, if there are sub folder in that folder. \n
86 * If you want that the any folders are not scanned, you have to create a blank file ".scan_ignore" in that folder.
87 * @param[in] path The folder path
88 * @param[in] callback The callback to invoke when the scanning is finished
89 * @param[in] user_data The user data to be passed to the callback function
90 * @return 0 on success, otherwise a negative error value.
91 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
92 * @see media_scan_completed_cb()
95 int media_content_scan_folder(const char *path, media_scan_completed_cb callback, void *user_data);
104 #endif /* __cplusplus */
106 #endif /* __TIZEN_MEDIA_CONTENT_H__ */