]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/fork.h
commenting changes, more autoconf support in afpd, etc
[netatalk.git] / etc / afpd / fork.h
1 /*
2  * $Id: fork.h,v 1.2 2001-06-20 18:33:04 rufustfirefly Exp $
3  *
4  * Copyright (c) 1990,1993 Regents of The University of Michigan.
5  * All Rights Reserved.  See COPYRIGHT.
6  */
7
8 #ifndef AFPD_FORK_H
9 #define AFPD_FORK_H 1
10
11 #include <stdio.h>
12 #include <sys/cdefs.h>
13
14 #include <netatalk/endian.h>
15 #include <atalk/adouble.h>
16 #include "volume.h"
17 #include "directory.h"
18
19 struct ofork {
20     struct adouble      *of_ad;
21     struct vol          *of_vol;
22     struct dir          *of_dir;
23     char                *of_name;
24     int                 of_namelen;
25     u_int16_t           of_refnum;
26     int                 of_flags;
27     struct ofork        **prevp, *next;
28     struct ofork        *of_d_prev, *of_d_next;
29 };
30
31 #define OPENFORK_DATA   (0)
32 #define OPENFORK_RSCS   (1<<7)
33
34 #define OPENACC_RD      (1<<0)
35 #define OPENACC_WR      (1<<1)
36 #define OPENACC_DRD     (1<<4)
37 #define OPENACC_DWR     (1<<5)
38
39 #define AFPFORK_OPEN    (1<<0)
40 #define AFPFORK_RSRC    (1<<1)
41 #define AFPFORK_DATA    (1<<2)
42 #define AFPFORK_DIRTY   (1<<3)
43 #define AFPFORK_ACCRD   (1<<4)
44 #define AFPFORK_ACCWR   (1<<5)
45 #define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR)
46
47 /* in ofork.c */
48 extern struct ofork *of_alloc    __P((struct vol *, struct dir *, 
49                                       char *, u_int16_t *, const int, 
50                                       struct adouble *));
51 extern void         of_dealloc   __P((struct ofork *));
52 extern struct ofork *of_find     __P((const u_int16_t));
53 extern struct ofork *of_findname __P((const struct vol *, const struct dir *,
54                                       const char *));
55 extern int          of_rename    __P((const struct vol *, 
56                                       struct dir *, const char *,
57                                       struct dir *, const char *));
58 extern int          of_flush     __P((const struct vol *));
59 extern void         of_pforkdesc __P((FILE *));
60
61 /* in fork.c */
62 extern int          flushfork    __P((struct ofork *));
63
64 /* FP functions */
65 extern int      afp_openfork __P((AFPObj *, char *, int, char *, int *));
66 extern int      afp_bytelock __P((AFPObj *, char *, int, char *, int *));
67 extern int      afp_getforkparams __P((AFPObj *, char *, int, char *, int *));
68 extern int      afp_setforkparams __P((AFPObj *, char *, int, char *, int *));
69 extern int      afp_read __P((AFPObj *, char *, int, char *, int *));
70 extern int      afp_write __P((AFPObj *, char *, int, char *, int *));
71 extern int      afp_flushfork __P((AFPObj *, char *, int, char *, int *));
72 extern int      afp_flush __P((AFPObj *, char *, int, char *, int *));
73 extern int      afp_closefork __P((AFPObj *, char *, int, char *, int *));
74
75 #endif