]> arthur.barton.de Git - netatalk.git/blob - include/atalk/cnid.h
Update the CNID code again to allow for 4G CNIDs, and a little somethin'
[netatalk.git] / include / atalk / cnid.h
1 /* 
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.
4  */
5
6 #ifndef _ATALK_CNID_H
7 #define _ATALK_CNID_H 1
8
9 #include <sys/cdefs.h>
10 #include <sys/stat.h>
11 #include <unistd.h>
12 #include <string.h>
13
14 #include <netatalk/endian.h>
15
16 #define CNID_ERR_PARAM 0x80000001
17 #define CNID_ERR_PATH  0x80000002
18 #define CNID_ERR_DB    0x80000003
19 #define CNID_ERR_MAX   0x80000004
20
21 typedef u_int32_t cnid_t;
22
23 /* cnid_open.c */
24 extern void *cnid_open __P((const char *));
25
26 /* cnid_close.c */
27 extern void cnid_close __P((void *));
28
29 /* cnid_add.c */
30 extern cnid_t cnid_add __P((void *, const struct stat *, const cnid_t,
31                             const char *, const int, cnid_t));
32
33 /* cnid_get.c */
34 extern cnid_t cnid_get __P((void *, const cnid_t, const char *, const int)); 
35 extern char *cnid_resolve __P((void *, cnid_t *)); 
36 extern cnid_t cnid_lookup __P((void *, const struct stat *, const cnid_t,
37                                const char *, const int));
38
39 /* cnid_update.c */
40 extern int cnid_update __P((void *, const cnid_t, const struct stat *,
41                             const cnid_t, const char *, int));
42
43 /* cnid_delete.c */
44 extern int cnid_delete __P((void *, const cnid_t));
45
46 /* cnid_nextid.c */
47 extern cnid_t cnid_nextid __P((void *));
48
49 #endif /* include/atalk/cnid.h */