2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2018 Kern Sibbald
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.
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.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 /* Pulled from other files by Alain Spineux */
22 #ifndef WIN32FILTER_H_
23 #define WIN32FILTER_H_
27 /* this should physically correspond to WIN32_STREAM_ID
28 * from winbase.h on Win32. We didn't inlcude cStreamName
29 * as we don't use it and don't need it for a correct struct size.
32 #define WIN32_BACKUP_DATA 1
34 typedef struct _BWIN32_STREAM_ID {
36 int32_t dwStreamAttributes;
38 int32_t dwStreamNameSize;
39 } BWIN32_STREAM_ID, *LPBWIN32_STREAM_ID ;
45 int64_t skip_size; /* how many bytes we have to skip before next header */
46 int64_t data_size; /* how many data are expected in the stream */
47 int header_pos; /* the part of the header that was filled in by previous record */
49 BWIN32_STREAM_ID header;
62 void copy(Win32Filter *f)
64 skip_size = f->skip_size;
65 data_size = f->data_size;
66 header_pos = f->header_pos;
68 initialized = (skip_size != 0 ||
73 /* If the stream is HHHDDDDD, you can call have_data("HHHDDDDD", 8, <not used>)
74 * and it will return "DDDDD", 0, 5
76 bool have_data(char **raw, int64_t *raw_len, int64_t *data_len);