]> arthur.barton.de Git - netatalk.git/blob - include/atalk/cnid.h
1. Respect the kFPDeleteInhibitBit attribute
[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_INVALID   0
17
18 #define CNID_ERR_PARAM 0x80000001
19 #define CNID_ERR_PATH  0x80000002
20 #define CNID_ERR_DB    0x80000003
21 #define CNID_ERR_MAX   0x80000004
22
23 typedef u_int32_t cnid_t;
24
25 /* cnid_open.c */
26 extern void *cnid_open __P((const char *));
27
28 /* cnid_close.c */
29 extern void cnid_close __P((void *));
30
31 /* cnid_add.c */
32 extern cnid_t cnid_add __P((void *, const struct stat *, const cnid_t,
33                             const char *, const int, cnid_t));
34
35 /* cnid_get.c */
36 extern cnid_t cnid_get __P((void *, const cnid_t, const char *, const int)); 
37 extern char *cnid_resolve __P((void *, cnid_t *, void *, u_int32_t )); 
38 extern cnid_t cnid_lookup __P((void *, const struct stat *, const cnid_t,
39                                const char *, const int));
40
41 /* cnid_update.c */
42 extern int cnid_update __P((void *, const cnid_t, const struct stat *,
43                             const cnid_t, const char *, int));
44
45 /* cnid_delete.c */
46 extern int cnid_delete __P((void *, const cnid_t));
47
48 /* cnid_nextid.c */
49 extern cnid_t cnid_nextid __P((void *));
50
51 #endif /* include/atalk/cnid.h */