## RBStaticPlaylistSource RBStaticPlaylistSource — Manually defined playlist class |

## Functions

RBSource * | rb_static_playlist_source_new ()
RBSource * | rb_static_playlist_source_new_from_xml ()
void | rb_static_playlist_source_load_from_xml ()
void | rb_static_playlist_source_add_entry ()
void | rb_static_playlist_source_remove_entry ()
void | rb_static_playlist_source_add_location ()
void | rb_static_playlist_source_add_locations ()
void | rb_static_playlist_source_remove_location ()
void | rb_static_playlist_source_move_entry ()

## Types and Values

struct | RBStaticPlaylistSource
struct | RBStaticPlaylistSourceClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── RBDisplayPage
                            ╰── RBSource
                                ╰── RBPlaylistSource
                                    ╰── RBStaticPlaylistSource
                                        ╰── RBPlayQueueSource

## Implemented Interfaces

RBStaticPlaylistSource implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

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.

## Functions

### rb_static_playlist_source_new ()

    RBSource *
    rb_static_playlist_source_new (RBShell *shell,
                                   const char *name,
                                   GSettings *settings,
                                   gboolean local,
                                   RhythmDBEntryType *entry_type);

Creates a new static playlist source.

#### Parameters

shell | the RBShell |
name | the playlist name |
settings | GSettings instance, or NULL to have one created |
local | if `TRUE`, the playlist is local to the library |
entry_type | type of database entries that can be added to the playlist. |

#### Returns

new playlist.

### rb_static_playlist_source_new_from_xml ()

    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.

#### Parameters

shell | the RBShell |
name | playlist name |
node | XML node containing playlist entries |

#### Returns

playlist read from XML

### rb_static_playlist_source_load_from_xml ()

    void
    rb_static_playlist_source_load_from_xml
                                   (RBStaticPlaylistSource *source,
                                    xmlNodePtr node);

Loads the playlist contents from the specified XML document node.

#### Parameters

source | an RBStaticPlaylistSource |
node | XML node to load from |

### rb_static_playlist_source_add_entry ()

    void
    rb_static_playlist_source_add_entry (RBStaticPlaylistSource *source,
                                         RhythmDBEntry *entry,
                                         gint index);

Adds the specified entry to the playlist.

#### Parameters

source | an RBStaticPlaylistSource |
entry | entry to add to the playlist |
index | position at which to add it (-1 to add at the end) |

### rb_static_playlist_source_remove_entry ()

    void
    rb_static_playlist_source_remove_entry
                                   (RBStaticPlaylistSource *source,
                                    RhythmDBEntry *entry);

Removes the specified entry from the playlist.

#### Parameters

source | an RBStaticPlaylistSource |
entry | the entry to remove |

### rb_static_playlist_source_add_location ()

    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.

#### Parameters

source | an RBStaticPlaylistSource |
location | location (URI) to add to the playlist |
index | position at which to add the location (-1 to add at the end) |

### rb_static_playlist_source_add_locations ()

    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.

#### Parameters

source | an RBStaticPlaylistSource |
locations | URI strings to add. | [element-type utf8][transfer none]

### rb_static_playlist_source_remove_location ()

    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.

#### Parameters

source | an RBStaticPlaylistSource |
location | location to remove |

### rb_static_playlist_source_move_entry ()

    void
    rb_static_playlist_source_move_entry (RBStaticPlaylistSource *source,
                                          RhythmDBEntry *entry,
                                          gint index);

Moves an entry within the playlist.

#### Parameters

source | an RBStaticPlaylistSource |
entry | the entry to move |
index | new location for the entry |

## Types and Values

### struct RBStaticPlaylistSource

    struct RBStaticPlaylistSource;

### struct RBStaticPlaylistSourceClass

    struct RBStaticPlaylistSourceClass {
    	RBPlaylistSourceClass parent;
    };