diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 13:48:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 13:48:24 +0200 |
commit | 528be8a0a9b8f9978b3968ab855e69a7ec2935d4 (patch) | |
tree | b7374d05e21cd7966ef93fca41cf059f147ce7b1 /src/directory.h | |
parent | d8ef33b71025decd52eaec5bb8417ad8e6dff873 (diff) | |
download | mpd-528be8a0a9b8f9978b3968ab855e69a7ec2935d4.tar.gz mpd-528be8a0a9b8f9978b3968ab855e69a7ec2935d4.tar.xz mpd-528be8a0a9b8f9978b3968ab855e69a7ec2935d4.zip |
directory: don't pass fd to traverseAllIn() callbacks
Database traversal should be generic, and not bound to a client
connection. This is the first step: no file descriptor for the
callback functions forEachSong() and forEachDir(). If a callback
needs the file descriptor, it has to be passed in the void*data
pointer somehow; some callbacks might need a new struct for passing
more than one parameter. This might look a bit cumbersome right now,
but our goal is to have a clean API.
Diffstat (limited to '')
-rw-r--r-- | src/directory.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory.h b/src/directory.h index 00b902510..02a6b22d4 100644 --- a/src/directory.h +++ b/src/directory.h @@ -65,8 +65,8 @@ Song *getSongFromDB(const char *file); time_t getDbModTime(void); int traverseAllIn(int fd, const char *name, - int (*forEachSong) (int, Song *, void *), - int (*forEachDir) (int, Directory *, void *), void *data); + int (*forEachSong) (Song *, void *), + int (*forEachDir) (Directory *, void *), void *data); #define getDirectoryPath(dir) ((dir && dir->path) ? dir->path : "") |