r5775: Remove some unused functions (unions are no longer as special as they used...
[samba.git] / source4 / librpc / idl / winreg.idl
1 #include "idl_types.h"
2
3 /*
4   winreg interface definition
5 */
6
7
8   uuid("338cd001-2244-31f1-aaaa-900038001003"),
9   version(1.0),
10   endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
11   pointer_default(unique),
12   helpstring("Remote Registry Service"),
13   depends(lsa)
14 ] interface winreg
15 {
16         typedef struct {
17                 [value(strlen_m_term(r->name)*2)] uint16 name_len;
18                 [value(r->name_len)]              uint16 name_size;
19                 unistr *name;
20         } winreg_String;
21
22         typedef struct {
23                 uint16 unknown0;
24                 uint16 unknown1;
25         } winreg_OpenUnknown;
26
27         /******************/
28         /* Function: 0x00 */
29         WERROR winreg_OpenHKCR(
30                 [in]      winreg_OpenUnknown *unknown,
31                 [in]      uint32 access_required,
32                 [out,ref] policy_handle *handle
33         );
34
35         /******************/
36         /* Function: 0x01 */
37         WERROR winreg_OpenHKCU(
38                 [in]      winreg_OpenUnknown *unknown,
39                 [in]      uint32 access_required,
40                 [out,ref] policy_handle *handle
41         );
42
43         /******************/
44         /* Function: 0x02 */
45         WERROR winreg_OpenHKLM(
46                 [in]      winreg_OpenUnknown *unknown,
47                 [in]      uint32 access_required,
48                 [out,ref] policy_handle *handle
49         );
50
51         /******************/
52         /* Function: 0x03 */
53         WERROR winreg_OpenHKPD(
54                 [in]      winreg_OpenUnknown *unknown,
55                 [in]      uint32 access_required,
56                 [out,ref] policy_handle *handle
57         );
58
59         /******************/
60         /* Function: 0x04 */
61         WERROR winreg_OpenHKU(
62                 [in]      winreg_OpenUnknown *unknown,
63                 [in]      uint32 access_required,
64                 [out,ref] policy_handle *handle
65         );
66
67         /******************/
68         /* Function: 0x05 */
69         WERROR winreg_CloseKey(
70                 [in,out,ref] policy_handle *handle
71         );
72
73         /******************/
74         /* Function: 0x06 */
75         WERROR winreg_CreateKey(
76                 [in,out,ref] policy_handle *handle,
77                 [in] winreg_String key,
78                 [in] winreg_String class,
79                 [in] uint32 options,
80                 [in] uint32 access_mask,
81                 [in,out,ref] uint32 *action_taken,
82                 [in] sec_desc_buf *sec_desc
83         );
84
85         /******************/
86         /* Function: 0x07 */
87         WERROR winreg_DeleteKey(
88                 [in,ref] policy_handle *handle,
89                 [in]     winreg_String key
90         );
91
92         /******************/
93         /* Function: 0x08 */
94         WERROR winreg_DeleteValue(
95                 [in,ref] policy_handle *handle,
96                 [in]     winreg_String value
97         );
98
99         typedef struct {
100                 uint32 low;
101                 uint32 high;
102         } winreg_Time;
103
104         typedef struct {
105                 uint32 unknown;
106                 winreg_String key_name;
107         } winreg_EnumKeyNameRequest;
108
109         typedef struct {
110                 uint32 unknown1;
111                 uint32 unknown2;
112                 lstring name;
113         } winreg_EnumKeyNameResponse;
114
115         /******************/
116         /* Function: 0x09 */
117         WERROR winreg_EnumKey(
118                 [in,ref]    policy_handle *handle,
119                 [in] uint32 enum_index,
120                 [in,out]    uint16 key_name_len,
121                 [in,out]    uint16 unknown,
122                 [in]        winreg_EnumKeyNameRequest *in_name,
123                 [out]       winreg_EnumKeyNameResponse *out_name,
124                 [in,out]    winreg_String *class,
125                 [in,out]    winreg_Time *last_changed_time
126         );
127
128         /******************/
129         /* Function: 0x0a */
130
131         /* 
132            this is equivalent IDL to a winreg_String, but we need to
133            have absolute control over the length/size fields as the
134            server looks at those to see what size buffer we have, so
135            we can't use the automatic unistr handing in pidl.
136         */
137         typedef struct {
138                 uint16 length;
139                 uint16 size;
140                 [size_is(size/2),length_is(length/2)] uint16 *name[];
141         } winreg_EnumValueString;
142
143         WERROR winreg_EnumValue(
144                 [in,ref] policy_handle *handle,
145                 [in]     uint32 enum_index,
146                 [in]     winreg_EnumValueString name_in,
147                 [out]    winreg_String name_out,
148                 [in,out] uint32 *type,
149                 [in,out,size_is(*size),length_is(*length)] uint8 *value[],
150                 [in,out] uint32 *size,
151                 [in,out] uint32 *length
152         );
153
154         /******************/
155         /* Function: 0x0b */
156         WERROR winreg_FlushKey(
157                 [in,ref] policy_handle *handle
158         );
159
160         typedef struct {
161                 [size_is(size),length_is(len)] uint8 *data[];
162                 uint32 size;
163                 uint32 len;
164         } KeySecurityData;
165
166         /******************/
167         /* Function: 0x0c */
168         WERROR winreg_GetKeySecurity(
169                 [in,ref] policy_handle *handle,
170                 [in] uint32 access_mask,
171                 [in,out,ref] KeySecurityData *data
172         );
173
174         /******************/
175         /* Function: 0x0d */
176         WERROR winreg_LoadKey(
177                 [in,ref] policy_handle *handle,
178                 [in] winreg_String *keyname,
179                 [in] winreg_String *filename
180         );
181
182         /******************/
183         /* Function: 0x0e */
184         WERROR winreg_NotifyChangeKeyValue(
185                 [in,ref] policy_handle *handle,
186                 [in] uint8 watch_subtree,
187                 [in] uint32 notify_filter,
188                 [in] uint32 unknown,
189                 [in] winreg_String string1,
190                 [in] winreg_String string2, 
191                 [in] uint32 unknown2
192         );
193
194         /******************/
195         /* Function: 0x0f */
196         WERROR winreg_OpenKey(
197                 [in,ref] policy_handle *handle,
198                 [in] winreg_String keyname,
199                 [in] uint32 unknown,
200                 [in] uint32 access_mask,
201                 [out,ref] policy_handle *handle
202         );
203
204         /******************/
205         /* Function: 0x10 */
206         WERROR winreg_QueryInfoKey(
207                 [in,ref] policy_handle *handle,
208                 [in] winreg_String class,
209                 [out] winreg_String class,
210                 [out] uint32 num_subkeys,
211                 [out] uint32 max_subkeylen,
212                 [out] uint32 max_subkeysize,
213                 [out] uint32 num_values,
214                 [out] uint32 max_valnamelen,
215                 [out] uint32 max_valbufsize,
216                 [out] uint32 secdescsize,
217                 [out] winreg_Time last_changed_time
218         );
219
220         /******************/
221         /* Function: 0x11 */
222         WERROR winreg_QueryValue(
223                 [in,ref] policy_handle *handle,
224                 [in] winreg_String value_name,
225                 [in,out] uint32 *type,
226                 [in,out,size_is(*size),length_is(*length)] uint8 *data[],
227                 [in,out] uint32 *size,
228                 [in,out] uint32 *length
229         );
230
231         /******************/
232         /* Function: 0x12 */
233         WERROR winreg_ReplaceKey(
234         );
235
236         /******************/
237         /* Function: 0x13 */
238         WERROR winreg_RestoreKey(
239         );
240
241         /******************/
242         /* Function: 0x14 */
243         WERROR winreg_SaveKey(
244         );
245
246         /******************/
247         /* Function: 0x15 */
248         WERROR winreg_SetKeySecurity(
249                 [in,ref] policy_handle *handle,
250                 [in] uint32 access_mask,
251                 [in,out,ref] KeySecurityData *data
252         );
253
254         /******************/
255         /* Function: 0x16 */
256         WERROR winreg_SetValue(
257                 [in,ref]           policy_handle *handle,
258                 [in]               winreg_String name,
259                 [in]               uint32 type,
260                 [in,size_is(size)] uint8  *data[],
261                 [in]               uint32 size
262         );
263
264         /******************/
265         /* Function: 0x17 */
266         WERROR winreg_UnLoadKey(
267         );
268
269         /******************/
270         /* Function: 0x18 */
271         WERROR winreg_InitiateSystemShutdown(
272                 [in]    uint16 *hostname,
273                 [in]    winreg_String *message,
274                 [in]    uint32 timeout,
275                 [in]    uint8 force_apps,
276                 [in]    uint8 reboot
277         );
278
279         /******************/
280         /* Function: 0x19 */
281         WERROR winreg_AbortSystemShutdown(
282                 [in]    uint16 *server
283         );
284
285         /******************/
286         /* Function: 0x1a */
287         WERROR winreg_GetVersion(
288                 [in,ref] policy_handle *handle,
289                 [out]    uint32 version
290         );
291
292         /******************/
293         /* Function: 0x1b */
294         WERROR winreg_OpenHKCC(
295                 [in]      winreg_OpenUnknown *unknown,
296                 [in]      uint32 access_required,
297                 [out,ref] policy_handle *handle
298         );
299
300         /******************/
301         /* Function: 0x1c */
302         WERROR winreg_OpenHKDD(
303                 [in]      winreg_OpenUnknown *unknown,
304                 [in]      uint32 access_required,
305                 [out,ref] policy_handle *handle
306         );
307
308         typedef struct {
309                 winreg_String *name;
310                 uint32 type;
311                 uint32 offset;
312                 uint32 length;
313         } QueryMultipleValue;
314         
315         /******************/
316         /* Function: 0x1d */
317         WERROR winreg_QueryMultipleValues(
318                 [in,ref] policy_handle *key_handle, 
319                 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values[],
320         [in] uint32 num_values,
321         [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer[],
322         [in,out,ref] uint32 *buffer_size
323         );
324
325         /******************/
326         /* Function: 0x1e */
327         WERROR winreg_InitiateSystemShutdownEx(
328                 [in] uint16 *hostname,
329                 [in] winreg_String *message,
330                 [in] uint32 timeout,
331                 [in] uint8 force_apps,
332                 [in] uint8 reboot,
333                 [in] uint32 reason
334         );
335
336         /******************/
337         /* Function: 0x1f */
338         WERROR winreg_SaveKeyEx(
339         );
340
341         /******************/
342         /* Function: 0x20 */
343         WERROR winreg_OpenHKPT(
344                 [in]      winreg_OpenUnknown *unknown,
345                 [in]      uint32 access_required,
346                 [out,ref] policy_handle *handle
347         );
348
349         /******************/
350         /* Function: 0x21 */
351         WERROR winreg_OpenHKPN(
352                 [in]      winreg_OpenUnknown *unknown,
353                 [in]      uint32 access_required,
354                 [out,ref] policy_handle *handle
355         );
356
357         /******************/
358         /* Function: 0x22 */
359         WERROR winreg_QueryMultipleValues2(
360         );
361 }