Top | Description | Object Hierarchy | Implemented Interfaces | ![]() |
![]() |
![]() |
![]() |
struct RBStaticPlaylistSource; struct RBStaticPlaylistSourceClass; RBSource * rb_static_playlist_source_new (RBShell *shell
,const char *name
,GSettings *settings
,gboolean local
,RhythmDBEntryType *entry_type
); RBSource * rb_static_playlist_source_new_from_xml (RBShell *shell
,const char *name
,xmlNodePtr node
); void rb_static_playlist_source_load_from_xml (RBStaticPlaylistSource *source
,xmlNodePtr node
); void rb_static_playlist_source_add_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
,gint index
); void rb_static_playlist_source_remove_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
); void rb_static_playlist_source_add_location (RBStaticPlaylistSource *source
,const char *location
,gint index
); void rb_static_playlist_source_add_locations (RBStaticPlaylistSource *source
,GList *locations
); void rb_static_playlist_source_remove_location (RBStaticPlaylistSource *source
,const char *location
); void rb_static_playlist_source_move_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
,gint index
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----RBDisplayPage +----RBSource +----RBPlaylistSource +----RBStaticPlaylistSource +----RBPlayQueueSource
RBStaticPlaylistSource implements AtkImplementorIface, GtkBuildable and GtkOrientable.
Static playlists are not defined by a query, but instead by manually selected and ordered tracks.
This class is used for static playlists built from the user's library, and is also a base class for the play queue and for playlists on devices and network shares.
It has some ability to track locations that are not yet present in the database and to add them to the playlist once they are added.
struct RBStaticPlaylistSourceClass { RBPlaylistSourceClass parent; };
RBSource * rb_static_playlist_source_new (RBShell *shell
,const char *name
,GSettings *settings
,gboolean local
,RhythmDBEntryType *entry_type
);
Creates a new static playlist source.
|
the RBShell |
|
the playlist name |
|
GSettings instance, or NULL to have one created |
|
if TRUE , the playlist is local to the library |
|
type of database entries that can be added to the playlist. |
Returns : |
new playlist. |
RBSource * rb_static_playlist_source_new_from_xml (RBShell *shell
,const char *name
,xmlNodePtr node
);
Constructs a new playlist from the given XML document node.
|
the RBShell |
|
playlist name |
|
XML node containing playlist entries |
Returns : |
playlist read from XML |
void rb_static_playlist_source_load_from_xml (RBStaticPlaylistSource *source
,xmlNodePtr node
);
Loads the playlist contents from the specified XML document node.
|
an RBStaticPlaylistSource |
|
XML node to load from |
void rb_static_playlist_source_add_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
,gint index
);
Adds the specified entry to the playlist.
|
an RBStaticPlaylistSource |
|
entry to add to the playlist |
|
position at which to add it (-1 to add at the end) |
void rb_static_playlist_source_remove_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
);
Removes the specified entry from the playlist.
|
an RBStaticPlaylistSource |
|
the entry to remove |
void rb_static_playlist_source_add_location (RBStaticPlaylistSource *source
,const char *location
,gint index
);
If the location matches an entry in the database, the entry is added to the playlist. Otherwise, if it identifies a directory, the contents of that directory are added.
|
an RBStaticPlaylistSource |
|
location (URI) to add to the playlist |
|
position at which to add the location (-1 to add at the end) |
void rb_static_playlist_source_add_locations (RBStaticPlaylistSource *source
,GList *locations
);
Adds the locations specified in locations
to the playlist.
See rb_static_playlist_source_add_location
for details.
|
an RBStaticPlaylistSource |
|
URI strings to add. [element-type utf8][transfer none] |
void rb_static_playlist_source_remove_location (RBStaticPlaylistSource *source
,const char *location
);
Removes the specified location from the playlist. This affects both the location map and the query model, whether an entry exists for the location or not.
|
an RBStaticPlaylistSource |
|
location to remove |
void rb_static_playlist_source_move_entry (RBStaticPlaylistSource *source
,RhythmDBEntry *entry
,gint index
);
Moves an entry within the playlist.
|
an RBStaticPlaylistSource |
|
the entry to move |
|
new location for the entry |