2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2013-01-02 19:52:57 +01:00
|
|
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2008-09-07 13:35:01 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-09-07 13:35:01 +02:00
|
|
|
*/
|
|
|
|
|
2013-01-02 19:52:57 +01:00
|
|
|
#ifndef MPD_SONG_SAVE_HXX
|
|
|
|
#define MPD_SONG_SAVE_HXX
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2009-07-05 08:29:52 +02:00
|
|
|
#include <glib.h>
|
|
|
|
|
2008-10-08 10:49:11 +02:00
|
|
|
#include <stdio.h>
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2009-11-01 17:51:29 +01:00
|
|
|
#define SONG_BEGIN "song_begin: "
|
|
|
|
|
2010-07-25 12:21:47 +02:00
|
|
|
struct song;
|
2013-01-02 23:06:20 +01:00
|
|
|
struct Directory;
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2010-07-25 12:21:47 +02:00
|
|
|
void
|
|
|
|
song_save(FILE *fp, const struct song *song);
|
|
|
|
|
2009-07-05 08:29:52 +02:00
|
|
|
/**
|
2009-11-01 17:51:29 +01:00
|
|
|
* Loads a song from the input file. Reading stops after the
|
|
|
|
* "song_end" line.
|
2009-07-05 08:29:52 +02:00
|
|
|
*
|
2011-03-31 21:43:53 +02:00
|
|
|
* @param error_r location to store the error occurring, or NULL to
|
2009-07-05 08:29:52 +02:00
|
|
|
* ignore errors
|
|
|
|
* @return true on success, false on error
|
|
|
|
*/
|
2009-11-01 17:51:29 +01:00
|
|
|
struct song *
|
2013-01-02 23:06:20 +01:00
|
|
|
song_load(FILE *fp, Directory *parent, const char *uri,
|
2009-11-01 17:51:29 +01:00
|
|
|
GString *buffer, GError **error_r);
|
2008-09-07 13:35:01 +02:00
|
|
|
|
|
|
|
#endif
|