diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-10 21:58:27 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-10 21:58:27 +0000 |
commit | c5d27d8eaa17302b64decc502f70ab00f9a77e74 (patch) | |
tree | 88d66ab6e2edd7946e87942b7e1f8249c43ca86b /src/directory.h | |
parent | 86cf70dcb262e6637a1859893833c724149d1628 (diff) | |
download | mpd-c5d27d8eaa17302b64decc502f70ab00f9a77e74.tar.gz mpd-c5d27d8eaa17302b64decc502f70ab00f9a77e74.tar.xz mpd-c5d27d8eaa17302b64decc502f70ab00f9a77e74.zip |
merge changes from metadata-rewrite branch
git-svn-id: https://svn.musicpd.org/mpd/trunk@2589 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.h')
-rw-r--r-- | src/directory.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/directory.h b/src/directory.h index b11f18ffb..b0b2c843c 100644 --- a/src/directory.h +++ b/src/directory.h @@ -27,6 +27,21 @@ #include <stdio.h> #include <sys/param.h> +typedef List DirectoryList; + +typedef struct _DirectoryStat { + ino_t inode; + dev_t device; +} DirectoryStat; + +typedef struct _Directory { + char * utf8name; + DirectoryList * subDirectories; + SongList * songs; + struct _Directory * parent; + DirectoryStat * stat; +} Directory; + extern char * directory_db; void readDirectoryDBIfUpdateIsFinished(); @@ -51,22 +66,12 @@ int readDirectoryDB(); void updateMp3Directory(); -int printAllIn(FILE * fp, char * name); - -int addAllIn(FILE * fp, char * name); - -int printInfoForAllIn(FILE * fp, char * name); - -int searchForSongsIn(FILE * fp, char * name, char * item, char * string); - -int findSongsIn(FILE * fp, char * name, char * item, char * string); - -int countSongsIn(FILE * fp, char * name); - -unsigned long sumSongTimesIn(FILE * fp, char * name); - Song * getSongFromDB(char * file); time_t getDbModTime(); +int traverseAllIn(FILE * fp, char * name, + int (*forEachSong)(FILE *, Song *, void *), + int (*forEachDir)(FILE *, Directory *, void *), + void * data); #endif |