MPD 0.17~git
|
00001 /* 00002 * Copyright (C) 2003-2011 The Music Player Daemon Project 00003 * http://www.musicpd.org 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00020 #ifndef MPD_STORED_PLAYLIST_H 00021 #define MPD_STORED_PLAYLIST_H 00022 00023 #include <glib.h> 00024 #include <stdbool.h> 00025 #include <time.h> 00026 00027 struct song; 00028 00029 struct stored_playlist_info { 00030 char *name; 00031 00032 time_t mtime; 00033 }; 00034 00035 extern bool playlist_saveAbsolutePaths; 00036 00040 void 00041 spl_global_init(void); 00042 00047 bool 00048 spl_valid_name(const char *name_utf8); 00049 00054 GPtrArray * 00055 spl_list(GError **error_r); 00056 00057 void 00058 spl_list_free(GPtrArray *list); 00059 00060 GPtrArray * 00061 spl_load(const char *utf8path, GError **error_r); 00062 00063 void 00064 spl_free(GPtrArray *list); 00065 00066 bool 00067 spl_move_index(const char *utf8path, unsigned src, unsigned dest, 00068 GError **error_r); 00069 00070 bool 00071 spl_clear(const char *utf8path, GError **error_r); 00072 00073 bool 00074 spl_delete(const char *name_utf8, GError **error_r); 00075 00076 bool 00077 spl_remove_index(const char *utf8path, unsigned pos, GError **error_r); 00078 00079 bool 00080 spl_append_song(const char *utf8path, struct song *song, GError **error_r); 00081 00082 bool 00083 spl_append_uri(const char *file, const char *utf8file, GError **error_r); 00084 00085 bool 00086 spl_rename(const char *utf8from, const char *utf8to, GError **error_r); 00087 00088 #endif