2 * interface for database access to cnids. i do it this way to abstract
3 * things a bit in case we want to change the underlying implementation.
7 #define _ATALK_CNID_H 1
14 #include <netatalk/endian.h>
16 #define CNID_INVALID 0
18 #define CNID_ERR_PARAM 0x80000001
19 #define CNID_ERR_PATH 0x80000002
20 #define CNID_ERR_DB 0x80000003
21 #define CNID_ERR_CLOSE 0x80000004 /* the db was not open */
22 #define CNID_ERR_MAX 0x80000005
25 extern void *cnid_open __P((const char *, mode_t));
28 extern void cnid_close __P((void *));
31 extern cnid_t cnid_add __P((void *, const struct stat *, const cnid_t,
32 const char *, const int, cnid_t));
35 extern cnid_t cnid_get __P((void *, const cnid_t, const char *, const int));
36 extern char *cnid_resolve __P((void *, cnid_t *, void *, u_int32_t ));
37 extern cnid_t cnid_lookup __P((void *, const struct stat *, const cnid_t,
38 const char *, const int));
41 extern int cnid_update __P((void *, const cnid_t, const struct stat *,
42 const cnid_t, const char *, int));
45 extern int cnid_delete __P((void *, const cnid_t));
48 extern cnid_t cnid_nextid __P((void *));
51 extern int cnid_mangle_add __P((void *, char *, char *));
52 extern char *cnid_mangle_get __P((void *, char *));
54 extern int cnid_lock __P((void *));
55 extern int cnid_unlock __P((void *));
57 #endif /* include/atalk/cnid.h */