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
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.
- Since :
- 2.3
- 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, otherwise false
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
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
- Parameters:
-
[in] | filter | The handle to the media filter |
[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:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- Postcondition:
- This function invokes media_group_cb().
- See also:
- media_group_cb
-
media_content_connect()
-
media_filter_create()
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 callback for every retrieved media info. If NULL
is passed to the filter, no filtering is applied.
- Since :
- 2.3
- Parameters:
-
[in] | group_name | The name of the media group |
[in] | group | The type of the media group |
[in] | filter | The handle to the media filter |
[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:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- Postcondition:
- This function invokes media_info_cb().
- See also:
- media_info_cb()
-
media_content_connect()
-
media_filter_create()
Gets the number of the group for the passed filter from the media database.
- Since :
- 2.3
- Parameters:
-
[in] | filter | The handle to the media filter |
[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:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
Gets the count of the media info for the given media group present in the media database.
- Since :
- 2.3
- Parameters:
-
[in] | group_name | The name of the media group |
[in] | group | The type of the media group |
[in] | filter | The handle to the media filter |
[out] | media_count | The count of the media |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()