diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-29 03:05:14 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-29 03:05:14 -0700 |
commit | c4772b46eedc41cbe40678be1c02f31d24117b5e (patch) | |
tree | a43100a40f5f30d95dabacd98a9e372930b5bc5e /src/directory.h | |
parent | 1e36728aedede8f521b622ef32ca102e79cb61f6 (diff) | |
parent | dde461fe6e012a62ee47cf5f3bfc022b650b6bf5 (diff) | |
download | mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.tar.gz mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.tar.xz mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.zip |
Merge branch 'ew/directory'
* ew/directory:
directory: remove redundant sanitizePathDup
update: move path sanitation up the stack to avoid extra copies
clean up updateInit calling and error handling
directory: isRootDirectory() is a one-liner
directory: writeDirectoryInfo propagates errors
directory: make it clear that DIRECTORY_MTIME is deprecated
directory: remove "Mp3" references
playlist: deleteASongFromPlaylist takes a const Song *
songvec: songvec_delete takes a const Song pointer
directory: remove shortname arguments everywhere
path: add mpd_basename() function
directory.h: remove directory_sigChldHandler decl
directory: replace DirectoryList with dirvec
directory: remove unused CPP defines
songvec_free => songvec_destroy
directory.c: kill unnecessary includes
Diffstat (limited to '')
-rw-r--r-- | src/directory.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/directory.h b/src/directory.h index e2ff3832a..eb1b35aa7 100644 --- a/src/directory.h +++ b/src/directory.h @@ -21,13 +21,15 @@ #include "song.h" #include "songvec.h" -#include "list.h" -typedef List DirectoryList; +struct dirvec { + struct _Directory **base; + size_t nr; +}; typedef struct _Directory { char *path; - DirectoryList *subDirectories; + struct dirvec children; struct songvec songs; struct _Directory *parent; ino_t inode; @@ -39,13 +41,17 @@ void reap_update_task(void); int isUpdatingDB(void); -void directory_sigChldHandler(int pid, int status); - -int updateInit(int fd, List * pathList); +/* + * returns the non-negative update job ID on success, + * -1 if busy, -2 if invalid argument + * @argv itself is safe to free once updateInit returns, but the + * string values contained by @argv MUST NOT be freed manually + */ +int updateInit(int argc, char *argv[]); -void initMp3Directory(void); +void directory_init(void); -void closeMp3Directory(void); +void directory_finish(void); int isRootDirectory(const char *name); |