00001 /* 00002 * Copyright (C) 2003-2009 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 "playlist.h" 00024 00025 #include <glib.h> 00026 #include <stdbool.h> 00027 #include <time.h> 00028 00029 struct song; 00030 00031 struct stored_playlist_info { 00032 char *name; 00033 00034 time_t mtime; 00035 }; 00036 00037 extern bool playlist_saveAbsolutePaths; 00038 00042 void 00043 spl_global_init(void); 00044 00049 bool 00050 spl_valid_name(const char *name_utf8); 00051 00056 GPtrArray * 00057 spl_list(void); 00058 00059 void 00060 spl_list_free(GPtrArray *list); 00061 00062 GPtrArray * 00063 spl_load(const char *utf8path); 00064 00065 void 00066 spl_free(GPtrArray *list); 00067 00068 enum playlist_result 00069 spl_move_index(const char *utf8path, unsigned src, unsigned dest); 00070 00071 enum playlist_result 00072 spl_clear(const char *utf8path); 00073 00074 enum playlist_result 00075 spl_delete(const char *name_utf8); 00076 00077 enum playlist_result 00078 spl_remove_index(const char *utf8path, unsigned pos); 00079 00080 enum playlist_result 00081 spl_append_song(const char *utf8path, struct song *song); 00082 00083 enum playlist_result 00084 spl_append_uri(const char *file, const char *utf8file); 00085 00086 enum playlist_result 00087 spl_rename(const char *utf8from, const char *utf8to); 00088 00089 #endif