]> arthur.barton.de Git - netatalk.git/blob - include/atalk/volinfo.h
Time Machine support. Merge from branch-2-0
[netatalk.git] / include / atalk / volinfo.h
1 /*
2  * $Id: volinfo.h,v 1.7 2009-09-11 09:14:16 franklahm Exp $
3  */
4
5 #ifndef _ATALK_VOLINFO_H
6 #define _ATALK_VOLINFO_H 1
7
8 #include <atalk/unicode.h>
9
10 /* FIXME: following duplicated from etc/afpd/volume.h  */
11
12 /* flags that alter volume behaviour. */
13 #define AFPVOL_A2VOL     (1 << 5)   /* prodos volume */
14 #define AFPVOL_CRLF      (1 << 6)   /* cr/lf translation */
15 #define AFPVOL_NOADOUBLE (1 << 7)   /* don't create .AppleDouble by default */
16 #define AFPVOL_RO        (1 << 8)   /* read-only volume */
17 #define AFPVOL_MSWINDOWS (1 << 9)   /* deal with ms-windows yuckiness. this is going away. */
18 #define AFPVOL_NOHEX     (1 << 10)  /* don't do :hex translation */
19 #define AFPVOL_USEDOTS   (1 << 11)  /* use real dots */
20 #define AFPVOL_LIMITSIZE (1 << 12)  /* limit size for older macs */
21 #define AFPVOL_MAPASCII  (1 << 13)  /* map the ascii range as well */
22 #define AFPVOL_DROPBOX   (1 << 14)  /* dropkludge dropbox support */
23 #define AFPVOL_NOFILEID  (1 << 15)  /* don't advertise createid resolveid and deleteid calls */
24 #define AFPVOL_NOSTAT    (1 << 16)  /* advertise the volume even if we can't stat() it
25                                      * maybe because it will be mounted later in preexec */
26 #define AFPVOL_UNIX_PRIV (1 << 17)  /* support unix privileges */
27 #define AFPVOL_NODEV     (1 << 18)  /* always use 0 for device number in cnid calls
28                                      * help if device number is notconsistent across reboot
29                                      * NOTE symlink to a different device will return an ACCESS error */
30 #define AFPVOL_CASEINSEN (1 << 19)  /* volume is case insensitive */
31 #define AFPVOL_EILSEQ    (1 << 20)  /* encode illegal sequence 'asis' UCS2, ex "\217-", which is not 
32                                        a valid SHIFT-JIS char, is encoded  as U\217 -*/
33 #define AFPVOL_CACHE     (1 << 21)   /* Use adouble v2 CNID caching, default don't use it */
34 #define AFPVOL_INV_DOTS  (1 << 22)   /* dots files are invisible */
35 #define AFPVOL_EXT_ATTRS (1 << 23)   /* Volume supports Extended Attributes */
36 #define AFPVOL_TM        (1 << 24)   /* Supports TimeMachine */
37 #define AFPVOL_ACLS      (1 << 25)   /* Volume supports ACLS */
38
39 /* handle casefolding */
40 #define AFPVOL_MTOUUPPER       (1 << 0)
41 #define AFPVOL_MTOULOWER       (1 << 1)
42 #define AFPVOL_UTOMUPPER       (1 << 2)
43 #define AFPVOL_UTOMLOWER       (1 << 3)
44 #define AFPVOL_UMLOWER         (AFPVOL_MTOULOWER | AFPVOL_UTOMLOWER)
45 #define AFPVOL_UMUPPER         (AFPVOL_MTOUUPPER | AFPVOL_UTOMUPPER)
46 #define AFPVOL_UUPPERMLOWER    (AFPVOL_MTOUUPPER | AFPVOL_UTOMLOWER)
47 #define AFPVOL_ULOWERMUPPER    (AFPVOL_MTOULOWER | AFPVOL_UTOMUPPER)
48
49 /* volinfo for shell utilities */
50 #define VOLINFODIR  ".AppleDesktop"
51 #define VOLINFOFILE ".volinfo"
52
53 struct volinfo {
54     char                *v_name;
55     char                *v_path;
56     int                 v_flags;
57     int                 v_casefold;
58     char                *v_cnidscheme;
59     char                *v_dbpath;
60     char                *v_volcodepage;
61     charset_t           v_volcharset;
62     char                *v_maccodepage;
63     charset_t           v_maccharset;
64     int                 v_adouble;  /* default adouble format */
65     int                 v_ad_options;
66     char                *(*ad_path)(const char *, int);
67     char                *v_dbd_host;
68     int                 v_dbd_port;
69 };
70
71 extern int loadvolinfo(char *path, struct volinfo *vol);
72 extern int vol_load_charsets(struct volinfo *vol);
73
74 #endif