DetachedSong: fork of struct Song

From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else.  DetachedSong is easier
to use, but Song has lower overhead.
This commit is contained in:
Max Kellermann
2014-01-07 21:39:47 +01:00
parent 43847f2244
commit 322b061632
70 changed files with 811 additions and 779 deletions

View File

@@ -26,12 +26,16 @@
struct Song;
struct Directory;
class DetachedSong;
class TextFile;
class Error;
void
song_save(FILE *fp, const Song &song);
void
song_save(FILE *fp, const DetachedSong &song);
/**
* Loads a song from the input file. Reading stops after the
* "song_end" line.
@@ -39,8 +43,8 @@ song_save(FILE *fp, const Song &song);
* @param error location to store the error occurring
* @return true on success, false on error
*/
Song *
song_load(TextFile &file, Directory *parent, const char *uri,
DetachedSong *
song_load(TextFile &file, const char *uri,
Error &error);
#endif