aboutsummaryrefslogtreecommitdiffstats
path: root/src/SongSave.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/SongSave.cxx')
-rw-r--r--src/SongSave.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index c3796235b..d6860d1b0 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "SongSave.hxx"
-#include "song.h"
+#include "Song.hxx"
#include "TagSave.hxx"
#include "Directory.hxx"
#include "TextFile.hxx"
@@ -43,7 +43,7 @@ song_save_quark(void)
}
void
-song_save(FILE *fp, const struct song *song)
+song_save(FILE *fp, const Song *song)
{
fprintf(fp, SONG_BEGIN "%s\n", song->uri);
@@ -59,13 +59,13 @@ song_save(FILE *fp, const struct song *song)
fprintf(fp, SONG_END "\n");
}
-struct song *
+Song *
song_load(TextFile &file, Directory *parent, const char *uri,
GError **error_r)
{
- struct song *song = parent != NULL
- ? song_file_new(uri, parent)
- : song_remote_new(uri);
+ Song *song = parent != NULL
+ ? Song::NewFile(uri, parent)
+ : Song::NewRemote(uri);
char *line, *colon;
enum tag_type type;
const char *value;
@@ -76,7 +76,7 @@ song_load(TextFile &file, Directory *parent, const char *uri,
if (colon == NULL || colon == line) {
if (song->tag != NULL)
tag_end_add(song->tag);
- song_free(song);
+ song->Free();
g_set_error(error_r, song_save_quark(), 0,
"unknown line in db: %s", line);
@@ -118,7 +118,7 @@ song_load(TextFile &file, Directory *parent, const char *uri,
} else {
if (song->tag != NULL)
tag_end_add(song->tag);
- song_free(song);
+ song->Free();
g_set_error(error_r, song_save_quark(), 0,
"unknown line in db: %s", line);