]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filetypes.h
Big backport from Enterprise
[bacula/bacula] / bacula / src / filetypes.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    This notice must be preserved when any source code is
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /**
20  * Stream definitions.  Split from baconfig.h Nov 2010
21  *
22  *  Kern Sibbald, MM
23  */
24
25 #ifndef __BFILETYPES_H
26 #define __BFILETYPES_H 1
27
28
29 /**
30  *  File type (Bacula defined).
31  *  NOTE!!! These are saved in the Attributes record on the tape, so
32  *          do not change them. If need be, add to them.
33  *
34  *  This is stored as 32 bits on the Volume, but only FT_MASK (16) bits are
35  *    used for the file type. The upper bits are used to indicate
36  *    additional optional fields in the attribute record.
37  */
38 #define FT_MASK       0xFFFF          /* Bits used by FT (type) */
39 #define FT_LNKSAVED   1               /* hard link to file already saved */
40 #define FT_REGE       2               /* Regular file but empty */
41 #define FT_REG        3               /* Regular file */
42 #define FT_LNK        4               /* Soft Link */
43 #define FT_DIREND     5               /* Directory at end (saved) */
44 #define FT_SPEC       6               /* Special file -- chr, blk, fifo, sock */
45 #define FT_NOACCESS   7               /* Not able to access */
46 #define FT_NOFOLLOW   8               /* Could not follow link */
47 #define FT_NOSTAT     9               /* Could not stat file */
48 #define FT_NOCHG     10               /* Incremental option, file not changed */
49 #define FT_DIRNOCHG  11               /* Incremental option, directory not changed */
50 #define FT_ISARCH    12               /* Trying to save archive file */
51 #define FT_NORECURSE 13               /* No recursion into directory */
52 #define FT_NOFSCHG   14               /* Different file system, prohibited */
53 #define FT_NOOPEN    15               /* Could not open directory */
54 #define FT_RAW       16               /* Raw block device */
55 #define FT_FIFO      17               /* Raw fifo device */
56 /** 
57  * The DIRBEGIN packet is sent to the FD file processing routine so
58  * that it can filter packets, but otherwise, it is not used
59  * or saved */
60 #define FT_DIRBEGIN  18               /* Directory at beginning (not saved) */
61 #define FT_INVALIDFS 19               /* File system not allowed for */
62 #define FT_INVALIDDT 20               /* Drive type not allowed for */
63 #define FT_REPARSE   21               /* Win NTFS reparse point */
64 #define FT_PLUGIN    22               /* Plugin generated filename */
65 #define FT_DELETED   23               /* Deleted file entry */
66 #define FT_BASE      24               /* Duplicate base file entry */
67 #define FT_RESTORE_FIRST 25           /* Restore this "object" first */
68 #define FT_JUNCTION  26               /* Win32 Junction point */
69 #define FT_PLUGIN_CONFIG 27           /* Object for Plugin configuration */
70 #define FT_PLUGIN_CONFIG_FILLED 28    /* Object for Plugin configuration filled by Director */
71
72 /* Definitions for upper part of type word (see above). */
73 #define AR_DATA_STREAM (1<<16)        /* Data stream id present */
74
75 /* Quick way to know if a Filetype is about a plugin "Object" */
76 #define IS_FT_OBJECT(x) (((x) == FT_RESTORE_FIRST) || ((x) == FT_PLUGIN_CONFIG_FILLED) || ((x) == FT_PLUGIN_CONFIG))
77
78 #endif /* __BFILETYPES_H */