]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - playlist.c
Rename mood_switch(), mood_close(), playlist_{open/close}.
[paraslash.git] / playlist.c
index 5150d380f1de1b35e8e9bbb5b01fdf9785882ea8..9a6e4829082a4b6e772338762119f6b9525328a4 100644 (file)
@@ -102,12 +102,8 @@ int playlist_check_callback(struct afs_callback_arg *aca)
                check_playlist));
 }
 
-/**
- * Close the current playlist.
- *
- * \sa \ref playlist_open().
- */
-void playlist_close(void)
+/** Free all resources of the current playlist, if any. */
+void playlist_unload(void)
 {
        if (!current_playlist.name)
                return;
@@ -124,14 +120,14 @@ void playlist_close(void)
  * up in the audio file table. If the path lookup succeeds, a reference to the
  * corresponding row of the audio file table is added to the score table.
  *
- * \param name The name of the playlist to open.
+ * \param name The name of the playlist to load.
  * \param msg Error message or playlist info is returned here.
  *
  * \return The length of the loaded playlist on success, negative error code
  * else. Files which are listed in the playlist, but are not contained in the
  * database are ignored. This is not considered an error.
  */
-int playlist_open(const char *name, char **msg)
+int playlist_load(const char *name, char **msg)
 {
        int ret;
        struct playlist_instance *playlist = &current_playlist;
@@ -142,7 +138,7 @@ int playlist_open(const char *name, char **msg)
                *msg = make_message("could not read playlist %s\n", name);
                return ret;
        }
-       playlist_close();
+       playlist_unload();
        ret = for_each_line(FELF_READ_ONLY, playlist_def.data,
                playlist_def.size, add_playlist_entry, playlist);
        osl_close_disk_object(&playlist_def);