![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
RBAutoPlaylistSource; RBAutoPlaylistSourceClass; RBSource* rb_auto_playlist_source_new (RBShell *shell, const char *name, gboolean local); RBSource* rb_auto_playlist_source_new_from_xml (RBShell *shell, xmlNodePtr node); void rb_auto_playlist_source_set_query (RBAutoPlaylistSource *source, GPtrArray *query, RhythmDBQueryModelLimitType limit_type, GValueArray *limit_value, const char *sort_key, gint sort_order); void rb_auto_playlist_source_get_query (RBAutoPlaylistSource *source, GPtrArray **query, RhythmDBQueryModelLimitType *limit_type, GValueArray **limit_value, char **sort_key, gint *sort_order);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----RBSource +----RBPlaylistSource +----RBAutoPlaylistSource
A playlist populated with the results of a database query.
The query, limit, and sort settings are saved to the playlists file, so they are persistent.
Searching is implemented by appending the query criteria generated from the search text to the query. Browsing is implemented by using the base query model (or a query model using the query generated from the search text, there is some) as the input to a RBLibraryBrowser.
If the user has not set a sort order as part of the playlist definition, the entry view columns are made clickable to allow the user to sort the results.
typedef struct { RBPlaylistSourceClass parent; } RBAutoPlaylistSourceClass;
RBSource* rb_auto_playlist_source_new (RBShell *shell, const char *name, gboolean local);
Creates a new automatic playlist source, initially with an empty query.
|
the RBShell instance |
|
the name of the new playlist |
|
if TRUE, the playlist will be considered local |
Returns : |
the new source |
RBSource* rb_auto_playlist_source_new_from_xml (RBShell *shell, xmlNodePtr node);
Creates a new auto playlist source by parsing an XML-encoded query.
|
the RBShell instance |
|
libxml node containing the playlist |
Returns : |
the new source |
void rb_auto_playlist_source_set_query (RBAutoPlaylistSource *source, GPtrArray *query, RhythmDBQueryModelLimitType limit_type, GValueArray *limit_value, const char *sort_key, gint sort_order);
Sets the database query used to populate the playlist, and also the limit on playlist size, and the sorting type used.
|
the RBAutoPlaylistSource |
|
the new database query |
|
the playlist limit type |
|
the playlist limit value |
|
the sorting key |
|
void rb_auto_playlist_source_get_query (RBAutoPlaylistSource *source, GPtrArray **query, RhythmDBQueryModelLimitType *limit_type, GValueArray **limit_value, char **sort_key, gint *sort_order);
Extracts the current query, playlist limit, and sorting settings for the playlist.
|
the RBAutoPlaylistSource |
|
returns the database query for the playlist |
|
returns the playlist limit type |
|
returns the playlist limit value |
|
returns the playlist sorting key |
|