libmpd 0.20.0
|
00001 /* libmpd (high level libmpdclient library) 00002 * Copyright (C) 2004-2009 Qball Cow <qball@sarine.nl> 00003 * Project homepage: http://gmpcwiki.sarine.nl/ 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_LIB_DATABASE__ 00021 #define __MPD_LIB_DATABASE__ 00022 00026 00027 00028 00038 MpdData * mpd_database_get_albums (MpdObj *mi,const char *artist); 00039 00040 00048 MpdData * mpd_database_get_artists (MpdObj *mi); 00049 00050 00059 MpdData * mpd_database_get_complete(MpdObj *mi); 00060 00061 00070 int mpd_database_update_dir (MpdObj *mi,const char *path); 00071 00072 00081 MpdData * mpd_database_find(MpdObj *mi, int table,const char *string, int exact); 00082 00091 MpdData * mpd_database_get_directory(MpdObj *mi,const char *path); 00092 00101 MpdData * mpd_database_get_directory_recursive(MpdObj *mi, const char *path); 00102 00112 mpd_Song * mpd_database_get_fileinfo(MpdObj *mi,const char *path); 00113 00121 00122 00130 void mpd_database_search_add_constraint(MpdObj *mi, mpd_TagItems field, const char *value); 00131 00157 void mpd_database_search_start(MpdObj *mi, int exact); 00158 00179 void mpd_database_search_field_start(MpdObj *mi, mpd_TagItems field); 00180 00188 MpdData * mpd_database_search_commit(MpdObj *mi); 00189 00190 00191 00200 00207 typedef mpd_SearchStats MpdDBStats; 00208 00218 void mpd_database_search_stats_start(MpdObj *mi); 00219 00220 00228 MpdDBStats * mpd_database_search_stats_commit(MpdObj *mi); 00229 00235 void mpd_database_search_free_stats(MpdDBStats *data); 00236 00243 00244 00253 int mpd_database_delete_playlist(MpdObj *mi,const char *path); 00254 00264 int mpd_database_save_playlist (MpdObj *mi,const char *name); 00265 00274 MpdData *mpd_database_get_playlist_content(MpdObj *mi,const char *playlist); 00275 00284 void mpd_database_playlist_list_add(MpdObj *mi, const char *path, const char *file); 00285 00295 void mpd_database_playlist_list_delete(MpdObj *mi, const char *path, int pos); 00296 00304 void mpd_database_playlist_clear(MpdObj *mi,const char *path); 00305 00314 void mpd_database_playlist_rename(MpdObj *mi, const char *old_name, const char *new_name); 00315 00325 int mpd_database_playlist_move(MpdObj *mi, const char *playlist, int old_pos, int new_pos); 00326 MpdData * mpd_database_playlist_list(MpdObj *mi); 00328 #endif