### Class

# RB PlaylistManager

#### Description [src]

    class RB.PlaylistManager : GObject.Object
    {
      RBPlaylistManagerPrivate* priv
    }

The playlist manager loads and saves the on-disk playlist file, provides UI actions and a DBus interface for dealing with playlists, and internal interfaces for creating playlists.

#### Ancestors

- GObject

#### Constructors

###### rb_playlist_manager_new

Creates the `RBPlaylistManager` instance.

#### Functions

###### rb_playlist_manager_error_quark

No description available.

#### Instance methods

###### rb_playlist_manager_add_to_playlist

Adds an entry to the specified playlist. Fails if no playlist with that name exists. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_create_static_playlist

Creates a new static playlist source with the given name. Will fail if a playlist with that name already exists. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_delete_playlist

Deletes the specified playlist. Will fail if no playlist with that name exists. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_export_playlist

Saves the specified playlist to a file in either M3U or PLS format. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_get_playlist_names

Allocates and returns an array containing the names of all local playlists. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_get_playlists

Returns a `GList` containing all local playlist source objects.

###### rb_playlist_manager_load_playlists

Loads the user’s playlists, or if the playlist file does not exists, reads the default playlist file. Should be called only once on startup.

###### rb_playlist_manager_new_playlist

Creates a new playlist and adds it to the source list.

###### rb_playlist_manager_new_playlist_from_selection_data

Creates a new playlist based on selection data from gtk. Used to implement playlist creation through drag and drop to the source list.

###### rb_playlist_manager_parse_file

Parses a playlist file, adding entries to the database and to a new static playlist. If the playlist file includes a title, the static playlist created will have the same title.

###### rb_playlist_manager_remove_from_playlist

Removes an entry from the specified playlist. Fails if no playlist with that name exists. This is part of the playlist manager dbus interface.

###### rb_playlist_manager_save_playlist_file

No description available.

###### rb_playlist_manager_save_playlists

Saves the user’s playlists. If the force flag is TRUE, the playlists will always be saved. Otherwise, the playlists will only be saved if a playlist has been created, modified, or deleted since the last time the playlists were saved, and no save operation is currently taking place.

###### rb_playlist_manager_shutdown

Shuts down the playlist manager, making sure any outstanding playlist save operation finishes.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### RB.PlaylistManager:playlists-file

No description available.

###### RB.PlaylistManager:shell

No description available.

###### RB.PlaylistManager:source

No description available.

#### Signals

###### RB.PlaylistManager::load-finish

Emitted when the playlist manager finishes loading the user’s playlist file.

###### RB.PlaylistManager::load-start

Emitted when the playlist manager starts loading the user’s playlist file.

###### RB.PlaylistManager::playlist-added

Emitted when a playlist is added, including when being loaded from the user’s playlist file.

###### RB.PlaylistManager::playlist-created

Emitted when a new playlist is created.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct RBPlaylistManagerClass {
      GObjectClass parent_class;
      void (* playlist_added) (
        RBPlaylistManager* manager,
        RBSource* source
      );
      void (* playlist_created) (
        RBPlaylistManager* manager,
        RBSource* source
      );
      void (* load_start) (
        RBPlaylistManager* manager
      );
      void (* load_finish) (
        RBPlaylistManager* manager
      );

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`playlist_added: void (* playlist_added) ( RBPlaylistManager* manager, RBSource* source )`

  No description available.

`playlist_created: void (* playlist_created) ( RBPlaylistManager* manager, RBSource* source )`

  No description available.

`load_start: void (* load_start) ( RBPlaylistManager* manager )`

  No description available.

`load_finish: void (* load_finish) ( RBPlaylistManager* manager )`

  No description available.

#### Virtual methods

###### RB.PlaylistManagerClass.load_finish

No description available.

###### RB.PlaylistManagerClass.load_start

No description available.

###### RB.PlaylistManagerClass.playlist_added

No description available.

###### RB.PlaylistManagerClass.playlist_created

No description available.