idl: add nt backup blobs format
[samba.git] / librpc / idl / bkupblobs.idl
1 #include "idl_types.h"
2
3 import "misc.idl";
4 import "security.idl";
5 import "fscc.idl";
6 /* bkup blobs interface definition */
7
8
9 [
10         pointer_default(unique),
11         helpstring("bkup blobs")
12 ]
13
14
15 interface bkup
16 {
17         typedef [v1_enum] enum {
18                 STREAM_ID_DATA  = 1,
19                 STREAM_ID_EX_DATA = 2,
20                 STREAM_ID_SECURITY_DATA = 3,
21                 STREAM_ID_ALTERNATE_DATA = 4,
22                 STREAM_ID_LINK = 5,
23                 STREAM_ID_OBJECTID = 7,
24                 STREAM_ID_REPARSE_DATA = 8,
25                 STREAM_ID_SPARSE_BLOCK = 9,
26                 STREAM_ID_TXFS_DATA = 10
27         } bkup_StreamId;
28
29         typedef [v1_enum] enum {
30                 STREAM_ATTRIBUTE_NORMAL = 0,
31                 STREAM_ATTRIBUTE_SECURITY = 2,
32                 STREAM_ATTRIBUTE_SPARSE = 8
33         } bkup_StreamAttribute;
34
35         typedef [nodiscriminant] union {
36                 [default] DATA_BLOB blob;
37                 [flag(NDR_ALIGN2),case(STREAM_ID_SECURITY_DATA)] security_descriptor sd;
38                 [case(STREAM_ID_OBJECTID)] fscc_FileObjectIdBuffer_2 object;
39         } bkup_StreamData;
40
41         typedef [public] struct {
42                 bkup_StreamId id;
43                 bkup_StreamAttribute attribute;
44                 hyper size;
45                 uint32 stream_name_size;
46                 [charset(UTF16),flag(STR_NOTERM)] uint16 stream_name[stream_name_size];
47                 [subcontext(0), subcontext_size(size), switch_is(id)] [flag(NDR_REMAINING)]  bkup_StreamData data;
48         } bkup_Win32StreamId;
49
50         typedef [nopush, nopull, flag(NDR_NOALIGN), public] struct {
51                 uint32 num_stream;
52                 bkup_Win32StreamId streams[num_stream];
53         } bkup_NTBackupFile;
54 }