Tizen Native API
|
The Media Group API provides information related to artist of media group.
Required Header
#include <media_content.h>
Overview
A Media Group represents logical grouping of media files with respect to their group name. It is also used for filtering media items.
The API provides functions to get and search image, video and audio items in media group. For getting the count of media items associated with a given group, call media_group_get_media_count_from_db() function.
Foreach Operations
FOREACH | CALLBACK | DESCRIPTION |
---|---|---|
media_group_foreach_group_from_db() | media_group_cb() | Iterates through group |
media_group_foreach_media_from_db() | media_info_cb() | Iterates through group's items |
Functions | |
int | media_group_get_group_count_from_db (filter_h filter, media_group_e group, int *group_count) |
Gets the number of the group for the passed filter from the media database. | |
int | media_group_foreach_group_from_db (filter_h filter, media_group_e group, media_group_cb callback, void *user_data) |
Iterates through the media group with an optional filter from the media database. | |
int | media_group_get_media_count_from_db (const char *group_name, media_group_e group, filter_h filter, int *media_count) |
Gets the count of the media info for the given media group present in the media database. | |
int | media_group_foreach_media_from_db (const char *group_name, media_group_e group, filter_h filter, media_info_cb callback, void *user_data) |
Iterates through the media files with an optional filter in the given group from the media database. | |
Typedefs | |
typedef bool(* | media_group_cb )(const char *group_name, void *user_data) |
Called for every group in the obtained list of groups. |
Typedef Documentation
typedef bool(* media_group_cb)(const char *group_name, void *user_data) |
Called for every group in the obtained list of groups.
Iterates over a media group list.
- Remarks:
- You should not free group_name returned by this function.
- Parameters:
-
[in] group_name The name of the media group [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop, otherwisefalse
to break out of the loop
- Precondition:
- media_group_foreach_group_from_db() will invoke this function.
- See also:
- media_group_foreach_group_from_db()
Function Documentation
int media_group_foreach_group_from_db | ( | filter_h | filter, |
media_group_e | group, | ||
media_group_cb | callback, | ||
void * | user_data | ||
) |
Iterates through the media group with an optional filter from the media database.
This function gets names of media group meeting the given filter. The callback function will be invoked for every retrieved media group. If NULL
is passed to the filter, no filtering is applied.
- Since :
- 2.3.1
- Parameters:
-
[in] filter The media filter handle [in] group The type of the media group [in] callback The callback function to be invoked [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MEDIA_CONTENT_ERROR_NONE Successful MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- Postcondition:
- This function invokes media_group_cb().
int media_group_foreach_media_from_db | ( | const char * | group_name, |
media_group_e | group, | ||
filter_h | filter, | ||
media_info_cb | callback, | ||
void * | user_data | ||
) |
Iterates through the media files with an optional filter in the given group from the media database.
This function gets all media files associated with the given group and meeting desired filter option and calls registered callback function for every retrieved media info. If NULL
is passed to the filter, no filtering is applied.
- Since :
- 2.3.1
- Parameters:
-
[in] group_name The name of the media group [in] group The type of the media group [in] filter The media filter handle [in] callback The callback function to be invoked [in] user_data The user data to be passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MEDIA_CONTENT_ERROR_NONE Successful MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- Postcondition:
- This function invokes media_info_cb().
int media_group_get_group_count_from_db | ( | filter_h | filter, |
media_group_e | group, | ||
int * | group_count | ||
) |
Gets the number of the group for the passed filter from the media database.
- Since :
- 2.3.1
- Parameters:
-
[in] filter The media filter handle [in] group The type of the media group [out] group_count The count of the media group
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MEDIA_CONTENT_ERROR_NONE Successful MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
int media_group_get_media_count_from_db | ( | const char * | group_name, |
media_group_e | group, | ||
filter_h | filter, | ||
int * | media_count | ||
) |
Gets the count of the media info for the given media group present in the media database.
- Since :
- 2.3.1
- Parameters:
-
[in] group_name The name of the media group [in] group The type of the media group [in] filter The media filter handle [out] media_count The count of the media
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MEDIA_CONTENT_ERROR_NONE Successful MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()