diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 10:48:48 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 10:48:48 +0200 |
commit | 7b9bed8398137e90538908a24467633029b1c307 (patch) | |
tree | be142d5e64ba61acae701dcf5e459e067ab6f166 /src/directory.h | |
parent | 4cfd356e1266ccf4ebb4082ca62e978dc827adc0 (diff) | |
download | mpd-7b9bed8398137e90538908a24467633029b1c307.tar.gz mpd-7b9bed8398137e90538908a24467633029b1c307.tar.xz mpd-7b9bed8398137e90538908a24467633029b1c307.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 | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/directory.h b/src/directory.h index 764902071..44e6f63d5 100644 --- a/src/directory.h +++ b/src/directory.h @@ -38,23 +38,27 @@ 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(struct client *client, const char *dirname); int checkDirectoryDB(void); |