]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/dircache.h
commit dircache rewrite.
[netatalk.git] / etc / afpd / dircache.h
diff --git a/etc/afpd/dircache.h b/etc/afpd/dircache.h
new file mode 100644 (file)
index 0000000..88c15f2
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+   $Id: dircache.h,v 1.1.2.1 2010-02-01 10:56:08 franklahm Exp $
+   Copyright (c) 2010 Frank Lahm <franklahm@gmail.com>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+ */
+
+#ifndef DIRCACHE_H 
+#define DIRCACHE_H
+
+#include <atalk/volume.h>
+#include <atalk/directory.h>
+
+/* flags for dircache_remove */
+#define DIRCACHE      (1 << 0)
+#define DIDNAME_INDEX (1 << 1)
+#define QUEUE_INDEX   (1 << 2)
+
+extern int        dircache_init(int reqsize);
+extern int        dircache_add(struct dir *);
+extern void       dircache_remove(const struct vol *, struct dir *, int flag);
+extern struct dir *dircache_search_by_did(const struct vol *vol, cnid_t did);
+extern struct dir *dircache_search_by_name(const struct vol *, cnid_t did, char *name, int len);
+extern void       dircache_dump(void);
+
+#endif /* DIRCACHE_H */