75d997a0184caa545fd7b2c807d4206580140ab6
[abartlet/samba.git/.git] / source4 / librpc / idl / efs.idl
1 /*
2         IDL definitions from original packet-dcerpc-efs.c
3         by Jean-Baptiste Marchand
4 */
5
6
7   uuid("c681d488-d850-11d0-8c52-00c04fd90f7e"),
8   version(1.0),
9   depends(security),
10   pointer_default(unique)
11 ] interface efs
12 {
13
14 WERROR EfsRpcOpenFileRaw(
15         [out,ref] policy_handle *pvContext,
16         [in] [charset(UTF16),string] uint16 FileName[],
17         [in] uint32 Flags
18         );
19
20 WERROR EfsRpcReadFileRaw(
21         [in,ref] policy_handle *pvContext
22 /* incomplete */
23 );
24
25
26 WERROR EfsRpcWriteFileRaw(
27         [in,ref] policy_handle *pvContext
28 /* incomplete */
29 );
30
31 void EfsRpcCloseRaw(
32         [in,out,ref] policy_handle *pvContext
33 );
34
35 WERROR EfsRpcEncryptFileSrv(
36         [in] [charset(UTF16),string] uint16 Filename[]
37 );
38
39 WERROR EfsRpcDecryptFileSrv(
40         [in] [charset(UTF16),string] uint16 FileName[], 
41         [in] uint32 Reserved
42 );
43
44 typedef struct {
45         uint32 cbData;
46         [size_is(cbData), unique]  uint8  *pbData;
47 } EFS_HASH_BLOB;
48
49 typedef struct {
50         uint32 cbTotalLength;
51         [unique] dom_sid *pUserSid;
52         [unique] EFS_HASH_BLOB  *pHash;
53         [unique] [charset(UTF16),string] uint16 *lpDisplayInformation;
54 } ENCRYPTION_CERTIFICATE_HASH;
55
56 typedef struct {
57         uint32 nCert_Hash;
58         /* this is a pointer to an array of pointers */
59         [size_is(nCert_Hash)] ENCRYPTION_CERTIFICATE_HASH *pUsers[*];
60 } ENCRYPTION_CERTIFICATE_HASH_LIST;
61
62 WERROR EfsRpcQueryUsersOnFile(
63         [in] [charset(UTF16),string] uint16 FileName[],
64         [out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pUsers
65 );
66
67 WERROR EfsRpcQueryRecoveryAgents(
68         [in] [charset(UTF16),string] uint16 FileName[],
69         [out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pRecoveryAgents
70 );
71
72 WERROR EfsRpcRemoveUsersFromFile(
73         [in] [charset(UTF16),string] uint16 FileName[]
74         /*      [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
75 );
76
77 WERROR EfsRpcAddUsersToFile(
78         [in] [charset(UTF16),string] uint16 FileName[]
79         /*      [in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
80 );
81
82 typedef struct {
83         uint32 dwCertEncodingType;
84         uint32 cbData;
85   [size_is(cbData)] [unique] uint8 *pbData;
86 } EFS_CERTIFICATE_BLOB;
87
88 typedef struct {
89         uint32 TotalLength;
90         [unique] dom_sid *pUserSid;
91         [unique] EFS_CERTIFICATE_BLOB *pCertBlob;
92 } ENCRYPTION_CERTIFICATE;
93
94 WERROR EfsRpcSetFileEncryptionKey(
95         [in] [unique] ENCRYPTION_CERTIFICATE *pEncryptionCertificate
96 );
97
98 WERROR EfsRpcNotSupported(
99 );
100
101 WERROR EfsRpcFileKeyInfo(
102 );
103
104 WERROR EfsRpcDuplicateEncryptionInfoFile(
105 );
106
107 }