2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
19 #ifndef __TIZEN_MEDIA_CONTENT_TYPE_H__
\r
20 #define __TIZEN_MEDIA_CONTENT_TYPE_H__
\r
27 #endif /* __cplusplus */
\r
29 #define ERROR_MASKL16 0xFFFF
\r
30 #define ERROR_SET(X) ((X) & ERROR_MASKL16)
\r
34 * @addtogroup CAPI_MEDIA_CONTENT_MODULE
\r
39 * @ingroup CAPI_MEDIA_CONTENT_MODULE
\r
40 * @brief The enumerations of the media file format.
\r
44 MEDIA_CONTENT_TYPE_IMAGE = 0x01 << 0, /**<The type of image */
\r
45 MEDIA_CONTENT_TYPE_VIDEO = 0x01 << 1, /**<The type of video */
\r
46 MEDIA_CONTENT_TYPE_AUDIO = 0x01 << 2, /**<The type of audio */
\r
47 MEDIA_CONTENT_TYPE_ALL = MEDIA_CONTENT_TYPE_IMAGE|MEDIA_CONTENT_TYPE_VIDEO|MEDIA_CONTENT_TYPE_AUDIO, /**< The type of all media content */
\r
49 } media_content_type_e;
\r
52 * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
\r
53 * @brief The enumerations of the storage type.
\r
54 * @detail This information is used to establish where the folder is.
\r
58 MEDIA_CONTENT_STORAGE_INTERNAL = 0x01 << 0, /**< The device's internal storage */
\r
59 MEDIA_CONTENT_STORAGE_EXTERNAL = 0x01 << 1, /**< The device's external storage */
\r
60 //MEDIA_CONTENT_STORAGE_WEB = 0x01<< 2,
\r
61 } media_content_storage_e;
\r
64 * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
\r
65 * @brief The type of orientation.
\r
68 MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE=0, /**< Not available*/
\r
69 MEDIA_CONTENT_ORIENTATION_NORMAL =1, /**< Normal*/
\r
70 MEDIA_CONTENT_ORIENTATION_HFLIP =2, /**< Flip horizontal*/
\r
71 MEDIA_CONTENT_ORIENTATION_ROT_180 =3, /**< Rotate 180 degrees*/
\r
72 MEDIA_CONTENT_ORIENTATION_VFLIP =4, /**< Flip vertical*/
\r
73 MEDIA_CONTENT_ORIENTATION_TRANSPOSE =5, /**< Transpose*/
\r
74 MEDIA_CONTENT_ORIENTATION_ROT_90 =6, /**< Rotate 90 degrees*/
\r
75 MEDIA_CONTENT_ORIENTATION_TRANSVERSE =7, /**< Transverse*/
\r
76 MEDIA_CONTENT_ORIENTATION_ROT_270 =8, /**< Rotate 270 degrees*/
\r
77 } media_content_orientation_e;
\r
80 * @ingroup CAPI_MEDIA_CONTENT_MODULE
\r
81 * @brief The enumerations of ordering.
\r
85 MEDIA_CONTENT_SORT_NONE, /**< None order of sort*/
\r
86 MEDIA_CONTENT_SORT_BY_NAME_ASC, /**< The sort by name in ascending order*/
\r
87 MEDIA_CONTENT_SORT_BY_NAME_DESC, /**< The sort by name in descending order*/
\r
88 MEDIA_CONTENT_SORT_BY_DATE_ASC, /**< The sort by date in ascending order*/
\r
89 MEDIA_CONTENT_SORT_BY_DATE_DESC, /**< The sort by date in descending order*/
\r
90 } media_content_order_e;
\r
93 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_META_MODULE
\r
94 * @brief The category of audio.
\r
97 CONTENT_AUDIO_MUSIC, /**< Music Category*/
\r
98 CONTENT_AUDIO_SOUND /**< Sound Category*/
\r
102 * @ingroup CAPI_MEDIA_CONTENT_MODULE
\r
103 * @brief The enumerations of media content error
\r
107 MEDIA_CONTENT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
\r
108 MEDIA_CONTENT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
\r
109 MEDIA_CONTENT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
\r
110 MEDIA_CONTENT_ERROR_DB_FAILED = TIZEN_ERROR_CONTENT_CLASS | 0x01, /**< DB operation failed */
\r
111 MEDIA_CONTENT_ERROR_NOT_SUPPORTED_AUDIO = TIZEN_ERROR_CONTENT_CLASS | 0x02, /**< Only video and image info can be added to Tag */
\r
112 } media_content_error_e;
\r
117 * @ingroup CAPI_CONTENT_MEDIA_FILTER_INFO_MODULE
\r
118 * @brief The type of searchable media info
\r
122 MEDIA_INFO_SEARCH_NONE = 0x00, /**< No Search */
\r
123 MEDIA_INFO_SEARCH_BY_DISPLAY_NAME = 0x01 << 0, /**< The search by display name */
\r
125 }media_info_search_type_e;
\r
129 * @ingroup CAPI_CONTENT_MEDIA_FILTER_FOLDER_MODULE
\r
130 * @brief The type of searchable media folder
\r
134 MEDIA_FOLDER_SEARCH_NONE = 0x00, /**< No Search */
\r
135 MEDIA_FOLDER_SEARCH_BY_FOLDER_NAME = 0x01 << 0, /**< The searchabe type folder name */
\r
136 }media_folder_search_type_e;
\r
139 * @ingroup CAPI_CONTENT_MEDIA_FILTER_AUDIO_MODULE
\r
140 * @brief The type of searchable media audio
\r
144 MEDIA_AUDIO_SEARCH_NONE = 0x00, /**< No Search */
\r
145 MEDIA_AUDIO_SEARCH_BY_PLAYLIST = 0x01 << 0, /**< The searchabe type of playlist */
\r
146 MEDIA_AUDIO_SEARCH_BY_ARTIST = 0x01 << 1, /**< The searchabe type of artist */
\r
147 MEDIA_AUDIO_SEARCH_BY_ALBUM = 0x01 << 2, /**< The searchabe type of album */
\r
148 MEDIA_AUDIO_SEARCH_BY_AUTHOR = 0x01 << 3, /**< The searchabe type of author */
\r
149 MEDIA_AUDIO_SEARCH_BY_GENRE = 0x01 << 4, /**< The searchabe type of genre */
\r
150 }media_audio_search_type_e;
\r
153 * @ingroup CAPI_CONTENT_MEDIA_FILTER_TAG_MODULE
\r
154 * @brief The type of searchable media tag
\r
158 MEDIA_TAG_SEARCH_NONE = 0x00, /**< No Search */
\r
159 MEDIA_TAG_SEARCH_BY_TAG_NAME = 0x01 << 0, /**< The searchabe type folder name */
\r
160 }media_tag_search_type_e;
\r
167 * @ingroup CAPI_CONTENT_MEDIA_FILTER_INFO_MODULE
\r
168 * @brief The handle to media infon filter.
\r
170 typedef struct media_info_filter_s* media_info_filter_h;
\r
173 * @ingroup CAPI_CONTENT_MEDIA_FILTER_FOLDER_MODULE
\r
174 * @brief The handle to media folder filter.
\r
176 typedef struct media_folder_filter_s* media_folder_filter_h;
\r
179 * @ingroup CAPI_CONTENT_MEDIA_FILTER_TAG_MODULE
\r
180 * @brief The handle to media tag filter.
\r
182 typedef struct media_tag_filter_s* media_tag_filter_h;
\r
185 * @ingroup CAPI_CONTENT_MEDIA_FILTER_AUDIO_MODULE
\r
186 * @brief The handle to media audio filter.
\r
188 typedef struct media_audio_filter_s* media_audio_filter_h;
\r
191 * @ingroup CAPI_CONTENT_MEDIA_FILTER_BOOKMARK_MODULE
\r
192 * @brief The handle to video bookmark filter.
\r
194 typedef struct video_bookmark_filter_s* video_bookmark_filter_h;
\r
198 * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
\r
199 * @brief The handle to media info.
\r
201 typedef struct media_info_s* media_info_h;
\r
204 * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
\r
205 * @brief The handle to media folder.
\r
207 typedef struct media_folder_s* media_folder_h;
\r
210 * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
\r
211 * @brief The handle to media tag.
\r
213 typedef struct media_tag_s* media_tag_h;
\r
216 * @ingroup CAPI_CONTENT_MEDIA_IMAGE_MODULE
\r
217 * @brief The handle to image metadata.
\r
219 typedef struct image_meta_s* image_meta_h;
\r
222 * @ingroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE
\r
223 * @brief The handle to video metadata.
\r
225 typedef struct video_meta_s* video_meta_h;
\r
228 * @ingroup CAPI_CONTENT_MEDIA_VIDEO_BOOKMARK_MODULE
\r
229 * @brief The handle to video bookmark.
\r
231 typedef struct video_bookmark_s* video_bookmark_h;
\r
234 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_META_MODULE
\r
235 * @brief The handle to audio metadata.
\r
237 typedef struct audio_meta_s* audio_meta_h;
\r
240 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_PLAYLIST_MODULE
\r
241 * @brief The handle to audio playlist.
\r
243 typedef struct audio_playlist_s* audio_playlist_h;
\r
246 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_ALBUM_MODULE
\r
247 * @brief The handle to audio album.
\r
249 typedef struct audio_album_s* audio_album_h;
\r
252 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_AUTHOR_MODULE
\r
253 * @brief The handle to audio author.
\r
255 typedef struct audio_author_s* audio_author_h;
\r
258 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_GENRE_MODULE
\r
259 * @brief The handle to audio genre.
\r
261 typedef struct audio_genre_s* audio_genre_h;
\r
264 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_ARTIST_MODULE
\r
265 * @brief The handle to audio artist.
\r
267 typedef struct audio_artist_s* audio_artist_h;
\r
270 * @ingroup CAPI_CONTENT_MEDIA_FOLDER_MODULE
\r
271 * @brief Iterates over a list of folders.
\r
273 * @details This callback is called for every available media folder.\n
\r
275 * @remarks To use the @a folder outside this function, copy the handle with #media_folder_clone() function.
\r
277 * @param[in] folder The handle to media folder
\r
278 * @param[in] user_data The user data passed from the foreach function
\r
280 * @return true to continue with the next iteration of the loop,
\r
281 * @return false to break out of the loop.
\r
282 * @pre media_folder_foreach_folder_from_db() will invoke this function.
\r
283 * @see media_folder_clone()
\r
284 * @see media_folder_foreach_folder_from_db()
\r
286 typedef bool (*media_folder_cb)(media_folder_h folder, void *user_data);
\r
290 * @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
\r
291 * @brief Iterates over a list of media info.
\r
293 * @details This callback is called for every available media info.\n
\r
295 * @remarks To use the @a media outside this function, copy the handle with #media_info_clone() function.
\r
297 * @param[in] media The hande to media info
\r
298 * @param[in] user_data The user data passed from the foreach function
\r
299 * @return true to continue with the next iteration of the loop,
\r
300 * @return false to break out of the loop.
\r
301 * @pre media_tag_foreach_media_from_db(), audio_playlist_foreach_media_from_db(), audio_genre_foreach_media_from_db(),
\r
302 * audio_album_foreach_media_from_db(), audio_artist_foreach_media_from_db(), audio_author_foreach_media_from_db(),
\r
303 * media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function.
\r
304 * @see media_info_clone()
\r
305 * @see audio_album_foreach_media_from_db()
\r
306 * @see audio_playlist_foreach_media_from_db()
\r
307 * @see audio_artist_foreach_media_from_db()
\r
308 * @see audio_author_foreach_media_from_db()
\r
309 * @see audio_genre_get_media_count_from_db()
\r
310 * @see media_tag_foreach_media_from_db()
\r
311 * @see media_info_foreach_media_from_db()
\r
312 * @see media_folder_foreach_media_from_db()
\r
314 typedef bool (*media_info_cb)(media_info_h media, void *user_data);
\r
317 * @ingroup CAPI_CONTENT_MEDIA_TAG_MODULE
\r
318 * @brief Iterates over a list of tags
\r
320 * @details This callback is called for every tag in the obtained list of tags.\n
\r
322 * @remarks To use the @a tag outside this function, copy the handle with #media_tag_clone() function.
\r
324 * @param[in] tag The handle to media tag
\r
325 * @param[in] user_data The user data passed from the foreach function
\r
326 * @return true to continue with the next iteration of the loop,
\r
327 * @return false to break out of the loop.
\r
328 * @pre media_tag_foreach_tag_from_db(), media_info_foreach_tag_from_db() will invoke this function.
\r
329 * @see media_tag_clone()
\r
330 * @see media_tag_foreach_tag_from_db()
\r
331 * @see media_info_foreach_tag_from_db()
\r
333 typedef bool (*media_tag_cb)(media_tag_h tag, void *user_data);
\r
336 * @ingroup CAPI_CONTENT_MEDIA_VIDEO_BOOKMARK_MODULE
\r
337 * @brief Iterates over bookmark list
\r
339 * @details This callback is called for every bookmark in obtained list of bookmarks.\n
\r
341 * @remarks To use the @a bookmark outside this function, copy the handle with #video_bookmark_clone() function.
\r
343 * @param[in] bookmark The handle to video bookmark
\r
344 * @param[in] user_data The user data passed from the foreach function
\r
345 * @return true to continue with the next iteration of the loop,
\r
346 * @return false to break out of the loop.
\r
347 * @pre video_bookmark_foreach_bookmark_from_db() will invoke this function.
\r
348 * @see video_bookmark_clone()
\r
349 * @see video_bookmark_foreach_bookmark_from_db()
\r
351 typedef bool (*video_bookmark_cb)(video_bookmark_h bookmark, void *user_data);
\r
354 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_PLAYLIST_MODULE
\r
355 * @brief Iterates over playlist list
\r
357 * @details This callback is called for every playlist in obtained list of playlists.\n
\r
359 * @remarks To use the @a playlist outside this function, copy the handle with #audio_playlist_clone() function.
\r
362 * @param[in] playlist The handle to audio playlist
\r
363 * @param[in] user_data The user data passed from the foreach function
\r
364 * @return true to continue with the next iteration of the loop,
\r
365 * @return false to break out of the loop.
\r
366 * @pre audio_playlist_foreach_playlist_from_db() will invoke this function.
\r
367 * @see audio_playlist_clone()
\r
368 * @see audio_playlist_foreach_playlist_from_db()
\r
370 typedef bool (*audio_playlist_cb)(audio_playlist_h playlist, void *user_data);
\r
373 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_GENRE_MODULE
\r
374 * @brief Iterates over genre list
\r
376 * @details This callback is called for every genre in obtained list of groups.\n
\r
378 * @remarks To use the @a genre outside this function, copy the handle with #audio_genre_clone() function.
\r
380 * @param[in] genre The handle to audio genre
\r
381 * @param[in] user_data The user data passed from the foreach function
\r
382 * @return true to continue with the next iteration of the loop,
\r
383 * @return false to break out of the loop.
\r
384 * @pre audio_genre_foreach_genre_from_db() will invoke this function.
\r
385 * @see audio_genre_clone()
\r
386 * @see audio_genre_foreach_genre_from_db()
\r
388 typedef bool (*audio_genre_cb)(audio_genre_h genre, void *user_data);
\r
391 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_ARTIST_MODULE
\r
392 * @brief Iterates over artist list
\r
394 * @details This callback is called for every artist in obtained list of groups.\n
\r
396 * @remarks To use the @a artist outside this function, copy the handle with #audio_artist_clone() function.
\r
398 * @param[in] artist The handle to audio artist
\r
399 * @param[in] user_data The user data passed from the foreach function
\r
400 * @return true to continue with the next iteration of the loop,
\r
401 * @return false to break out of the loop.
\r
402 * @pre audio_artist_foreach_artist_from_db() will invoke this function.
\r
403 * @see audio_artist_clone()
\r
404 * @see audio_artist_foreach_artist_from_db()
\r
406 typedef bool (*audio_artist_cb)(audio_artist_h artist, void *user_data);
\r
409 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_AUTHOR_MODULE
\r
410 * @brief Iterates over author list
\r
412 * @details This callback is called for every author in obtained list of groups.\n
\r
414 * @remarks To use the @a author outside this function, copy the handle with #audio_author_clone() function.
\r
416 * @param[in] author The handle to audio author
\r
417 * @param[in] user_data The user data passed from the foreach function
\r
418 * @return true to continue with the next iteration of the loop,
\r
419 * @return false to break out of the loop.
\r
420 * @pre audio_author_foreach_author_from_db() will invoke this function.
\r
421 * @see audio_author_clone()
\r
422 * @see audio_author_foreach_author_from_db()
\r
424 typedef bool (*audio_author_cb)(audio_author_h author, void *user_data);
\r
427 * @ingroup CAPI_CONTENT_MEDIA_AUDIO_ALBUM_MODULE
\r
428 * @brief Iterates over album list
\r
430 * @details This callback is called for every album in obtained list of groups.\n
\r
432 * @remarks To use the @a album outside this function, copy the handle with #audio_album_clone() function.
\r
434 * @param[in] album The handle to audio album
\r
435 * @param[in] user_data The user data passed from the foreach function
\r
436 * @return true to continue with the next iteration of the loop,
\r
437 * @return false to break out of the loop.
\r
438 * @pre audio_album_foreach_album_from_db() will invoke this function.
\r
439 * @see audio_album_clone()
\r
440 * @see audio_album_foreach_album_from_db()
\r
443 typedef bool (*audio_album_cb)(audio_album_h album, void *user_data);
\r
451 #endif /* __cplusplus */
\r
454 #endif /*__TIZEN_MEDIA_CONTENT_TYPE_H__*/
\r