diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 10:48:48 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:47 -0700 |
commit | 6f43d71628db3c9acb9e0693216885685566b7d3 (patch) | |
tree | 63a7b7786cb79bed2c09cee229e0614c0dcd7889 /src/directory.h | |
parent | 0b4c78339608179841838798517485208cee08a2 (diff) | |
download | mpd-6f43d71628db3c9acb9e0693216885685566b7d3.tar.gz mpd-6f43d71628db3c9acb9e0693216885685566b7d3.tar.xz mpd-6f43d71628db3c9acb9e0693216885685566b7d3.zip |
directory: moved code to update.c
The source directory.c mixes several libraries: directory object
management, database management and database update, resulting in a
1000+ line monster. Move the whole database update code to update.c.
Diffstat (limited to '')
-rw-r--r-- | src/directory.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/directory.h b/src/directory.h index 20b784166..c43f8f3c5 100644 --- a/src/directory.h +++ b/src/directory.h @@ -37,23 +37,22 @@ typedef struct _Directory { unsigned stat; /* not needed if ino_t == dev_t == 0 is impossible */ } Directory; -void reap_update_task(void); - -int isUpdatingDB(void); - -/* - * returns the non-negative update job ID on success, - * returns -1 if busy - * @path will be freed by this function and should not be reused - */ -int directory_update_init(char *path); - void directory_init(void); void directory_finish(void); int isRootDirectory(const char *name); +Directory * directory_get_root(void); + +Directory * newDirectory(const char *dirname, Directory * parent); + +void freeDirectory(Directory * directory); + +Directory * getDirectory(const char *name); + +void sortDirectory(Directory * directory); + int printDirectoryInfo(int fd, const char *dirname); int checkDirectoryDB(void); |