winreg: add winreg_Data union to IDL.
[sfrench/samba-autobuild/.git] / librpc / gen_ndr / winreg.h
1 /* header auto-generated by pidl */
2
3 #include <stdint.h>
4
5 #include "libcli/util/ntstatus.h"
6
7 #include "librpc/gen_ndr/lsa.h"
8 #include "librpc/gen_ndr/security.h"
9 #include "librpc/gen_ndr/misc.h"
10 #ifndef _HEADER_winreg
11 #define _HEADER_winreg
12
13 #define REG_KEY_READ    ( (STANDARD_RIGHTS_READ_ACCESS|KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS|KEY_NOTIFY) )
14 #define REG_KEY_EXECUTE ( REG_KEY_READ )
15 #define REG_KEY_WRITE   ( (STANDARD_RIGHTS_WRITE_ACCESS|KEY_SET_VALUE|KEY_CREATE_SUB_KEY) )
16 #define REG_KEY_ALL     ( (STANDARD_RIGHTS_REQUIRED_ACCESS|REG_KEY_READ|REG_KEY_WRITE|KEY_CREATE_LINK) )
17 /* bitmap winreg_AccessMask */
18 #define KEY_QUERY_VALUE ( 0x00001 )
19 #define KEY_SET_VALUE ( 0x00002 )
20 #define KEY_CREATE_SUB_KEY ( 0x00004 )
21 #define KEY_ENUMERATE_SUB_KEYS ( 0x00008 )
22 #define KEY_NOTIFY ( 0x00010 )
23 #define KEY_CREATE_LINK ( 0x00020 )
24 #define KEY_WOW64_64KEY ( 0x00100 )
25 #define KEY_WOW64_32KEY ( 0x00200 )
26
27 struct winreg_String {
28         uint16_t name_len;/* [value(strlen_m_term(name)*2)] */
29         uint16_t name_size;/* [value(strlen_m_term(name)*2)] */
30         const char *name;/* [unique,charset(UTF16)] */
31 }/* [public] */;
32
33 struct KeySecurityData {
34         uint8_t *data;/* [unique,length_is(len),size_is(size)] */
35         uint32_t size;
36         uint32_t len;
37 };
38
39 struct winreg_SecBuf {
40         uint32_t length;
41         struct KeySecurityData sd;
42         uint8_t inherit;
43 };
44
45 enum winreg_CreateAction
46 #ifndef USE_UINT_ENUMS
47  {
48         REG_ACTION_NONE=(int)(0),
49         REG_CREATED_NEW_KEY=(int)(1),
50         REG_OPENED_EXISTING_KEY=(int)(2)
51 }
52 #else
53  { __donnot_use_enum_winreg_CreateAction=0x7FFFFFFF}
54 #define REG_ACTION_NONE ( 0 )
55 #define REG_CREATED_NEW_KEY ( 1 )
56 #define REG_OPENED_EXISTING_KEY ( 2 )
57 #endif
58 ;
59
60 struct winreg_StringBuf {
61         uint16_t length;/* [value(strlen_m_term_null(name)*2)] */
62         uint16_t size;
63         const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
64 };
65
66 struct winreg_ValNameBuf {
67         uint16_t length;/* [value(strlen_m_term(name)*2)] */
68         uint16_t size;
69         const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
70 };
71
72 /* bitmap winreg_NotifyChangeType */
73 #define REG_NOTIFY_CHANGE_NAME ( 0x00000001 )
74 #define REG_NOTIFY_CHANGE_ATTRIBUTES ( 0x00000002 )
75 #define REG_NOTIFY_CHANGE_LAST_SET ( 0x00000004 )
76 #define REG_NOTIFY_CHANGE_SECURITY ( 0x00000008 )
77
78 struct KeySecurityAttribute {
79         uint32_t data_size;
80         struct KeySecurityData sec_data;
81         uint8_t inherit;
82 };
83
84 struct QueryMultipleValue {
85         struct winreg_String *name;/* [unique] */
86         enum winreg_Type type;
87         uint32_t offset;
88         uint32_t length;
89 };
90
91
92 struct winreg_OpenHKCR {
93         struct {
94                 uint16_t *system_name;/* [unique] */
95                 uint32_t access_mask;
96         } in;
97
98         struct {
99                 struct policy_handle *handle;/* [ref] */
100                 WERROR result;
101         } out;
102
103 };
104
105
106 struct winreg_OpenHKCU {
107         struct {
108                 uint16_t *system_name;/* [unique] */
109                 uint32_t access_mask;
110         } in;
111
112         struct {
113                 struct policy_handle *handle;/* [ref] */
114                 WERROR result;
115         } out;
116
117 };
118
119
120 struct winreg_OpenHKLM {
121         struct {
122                 uint16_t *system_name;/* [unique] */
123                 uint32_t access_mask;
124         } in;
125
126         struct {
127                 struct policy_handle *handle;/* [ref] */
128                 WERROR result;
129         } out;
130
131 };
132
133
134 struct winreg_OpenHKPD {
135         struct {
136                 uint16_t *system_name;/* [unique] */
137                 uint32_t access_mask;
138         } in;
139
140         struct {
141                 struct policy_handle *handle;/* [ref] */
142                 WERROR result;
143         } out;
144
145 };
146
147
148 struct winreg_OpenHKU {
149         struct {
150                 uint16_t *system_name;/* [unique] */
151                 uint32_t access_mask;
152         } in;
153
154         struct {
155                 struct policy_handle *handle;/* [ref] */
156                 WERROR result;
157         } out;
158
159 };
160
161
162 struct winreg_CloseKey {
163         struct {
164                 struct policy_handle *handle;/* [ref] */
165         } in;
166
167         struct {
168                 struct policy_handle *handle;/* [ref] */
169                 WERROR result;
170         } out;
171
172 };
173
174
175 struct winreg_CreateKey {
176         struct {
177                 struct policy_handle *handle;/* [ref] */
178                 struct winreg_String name;
179                 struct winreg_String keyclass;
180                 uint32_t options;
181                 uint32_t access_mask;
182                 struct winreg_SecBuf *secdesc;/* [unique] */
183                 enum winreg_CreateAction *action_taken;/* [unique] */
184         } in;
185
186         struct {
187                 struct policy_handle *new_handle;/* [ref] */
188                 enum winreg_CreateAction *action_taken;/* [unique] */
189                 WERROR result;
190         } out;
191
192 };
193
194
195 struct winreg_DeleteKey {
196         struct {
197                 struct policy_handle *handle;/* [ref] */
198                 struct winreg_String key;
199         } in;
200
201         struct {
202                 WERROR result;
203         } out;
204
205 };
206
207
208 struct winreg_DeleteValue {
209         struct {
210                 struct policy_handle *handle;/* [ref] */
211                 struct winreg_String value;
212         } in;
213
214         struct {
215                 WERROR result;
216         } out;
217
218 };
219
220
221 struct winreg_EnumKey {
222         struct {
223                 struct policy_handle *handle;/* [ref] */
224                 uint32_t enum_index;
225                 struct winreg_StringBuf *name;/* [ref] */
226                 struct winreg_StringBuf *keyclass;/* [unique] */
227                 NTTIME *last_changed_time;/* [unique] */
228         } in;
229
230         struct {
231                 struct winreg_StringBuf *name;/* [ref] */
232                 struct winreg_StringBuf *keyclass;/* [unique] */
233                 NTTIME *last_changed_time;/* [unique] */
234                 WERROR result;
235         } out;
236
237 };
238
239
240 struct winreg_EnumValue {
241         struct {
242                 struct policy_handle *handle;/* [ref] */
243                 uint32_t enum_index;
244                 struct winreg_ValNameBuf *name;/* [ref] */
245                 enum winreg_Type *type;/* [unique] */
246                 uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
247                 uint32_t *size;/* [unique] */
248                 uint32_t *length;/* [unique] */
249         } in;
250
251         struct {
252                 struct winreg_ValNameBuf *name;/* [ref] */
253                 enum winreg_Type *type;/* [unique] */
254                 uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
255                 uint32_t *size;/* [unique] */
256                 uint32_t *length;/* [unique] */
257                 WERROR result;
258         } out;
259
260 };
261
262
263 struct winreg_FlushKey {
264         struct {
265                 struct policy_handle *handle;/* [ref] */
266         } in;
267
268         struct {
269                 WERROR result;
270         } out;
271
272 };
273
274
275 struct winreg_GetKeySecurity {
276         struct {
277                 struct policy_handle *handle;/* [ref] */
278                 uint32_t sec_info;
279                 struct KeySecurityData *sd;/* [ref] */
280         } in;
281
282         struct {
283                 struct KeySecurityData *sd;/* [ref] */
284                 WERROR result;
285         } out;
286
287 };
288
289
290 struct winreg_LoadKey {
291         struct {
292                 struct policy_handle *handle;/* [ref] */
293                 struct winreg_String *keyname;/* [unique] */
294                 struct winreg_String *filename;/* [unique] */
295         } in;
296
297         struct {
298                 WERROR result;
299         } out;
300
301 };
302
303
304 struct winreg_NotifyChangeKeyValue {
305         struct {
306                 struct policy_handle *handle;/* [ref] */
307                 uint8_t watch_subtree;
308                 uint32_t notify_filter;
309                 uint32_t unknown;
310                 struct winreg_String string1;
311                 struct winreg_String string2;
312                 uint32_t unknown2;
313         } in;
314
315         struct {
316                 WERROR result;
317         } out;
318
319 };
320
321
322 struct winreg_OpenKey {
323         struct {
324                 struct policy_handle *parent_handle;/* [ref] */
325                 struct winreg_String keyname;
326                 uint32_t unknown;
327                 uint32_t access_mask;
328         } in;
329
330         struct {
331                 struct policy_handle *handle;/* [ref] */
332                 WERROR result;
333         } out;
334
335 };
336
337
338 struct winreg_QueryInfoKey {
339         struct {
340                 struct policy_handle *handle;/* [ref] */
341                 struct winreg_String *classname;/* [ref] */
342         } in;
343
344         struct {
345                 uint32_t *num_subkeys;/* [ref] */
346                 uint32_t *max_subkeylen;/* [ref] */
347                 uint32_t *max_classlen;/* [ref] */
348                 uint32_t *num_values;/* [ref] */
349                 uint32_t *max_valnamelen;/* [ref] */
350                 uint32_t *max_valbufsize;/* [ref] */
351                 uint32_t *secdescsize;/* [ref] */
352                 NTTIME *last_changed_time;/* [ref] */
353                 struct winreg_String *classname;/* [ref] */
354                 WERROR result;
355         } out;
356
357 };
358
359
360 struct winreg_QueryValue {
361         struct {
362                 struct policy_handle *handle;/* [ref] */
363                 struct winreg_String *value_name;/* [ref] */
364                 enum winreg_Type *type;/* [unique] */
365                 uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
366                 uint32_t *data_size;/* [unique] */
367                 uint32_t *data_length;/* [unique] */
368         } in;
369
370         struct {
371                 enum winreg_Type *type;/* [unique] */
372                 uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
373                 uint32_t *data_size;/* [unique] */
374                 uint32_t *data_length;/* [unique] */
375                 WERROR result;
376         } out;
377
378 };
379
380
381 struct winreg_ReplaceKey {
382         struct {
383                 WERROR result;
384         } out;
385
386 };
387
388
389 struct winreg_RestoreKey {
390         struct {
391                 struct policy_handle *handle;/* [ref] */
392                 struct winreg_String *filename;/* [ref] */
393                 uint32_t flags;
394         } in;
395
396         struct {
397                 WERROR result;
398         } out;
399
400 };
401
402
403 struct winreg_SaveKey {
404         struct {
405                 struct policy_handle *handle;/* [ref] */
406                 struct winreg_String *filename;/* [ref] */
407                 struct KeySecurityAttribute *sec_attrib;/* [unique] */
408         } in;
409
410         struct {
411                 WERROR result;
412         } out;
413
414 };
415
416
417 struct winreg_SetKeySecurity {
418         struct {
419                 struct policy_handle *handle;/* [ref] */
420                 uint32_t sec_info;
421                 struct KeySecurityData *sd;/* [ref] */
422         } in;
423
424         struct {
425                 WERROR result;
426         } out;
427
428 };
429
430
431 struct winreg_SetValue {
432         struct {
433                 struct policy_handle *handle;/* [ref] */
434                 struct winreg_String name;
435                 enum winreg_Type type;
436                 uint8_t *data;/* [ref,size_is(size)] */
437                 uint32_t size;
438         } in;
439
440         struct {
441                 WERROR result;
442         } out;
443
444 };
445
446
447 struct winreg_UnLoadKey {
448         struct {
449                 WERROR result;
450         } out;
451
452 };
453
454
455 struct winreg_InitiateSystemShutdown {
456         struct {
457                 uint16_t *hostname;/* [unique] */
458                 struct lsa_StringLarge *message;/* [unique] */
459                 uint32_t timeout;
460                 uint8_t force_apps;
461                 uint8_t do_reboot;
462         } in;
463
464         struct {
465                 WERROR result;
466         } out;
467
468 };
469
470
471 struct winreg_AbortSystemShutdown {
472         struct {
473                 uint16_t *server;/* [unique] */
474         } in;
475
476         struct {
477                 WERROR result;
478         } out;
479
480 };
481
482
483 struct winreg_GetVersion {
484         struct {
485                 struct policy_handle *handle;/* [ref] */
486         } in;
487
488         struct {
489                 uint32_t *version;/* [ref] */
490                 WERROR result;
491         } out;
492
493 };
494
495
496 struct winreg_OpenHKCC {
497         struct {
498                 uint16_t *system_name;/* [unique] */
499                 uint32_t access_mask;
500         } in;
501
502         struct {
503                 struct policy_handle *handle;/* [ref] */
504                 WERROR result;
505         } out;
506
507 };
508
509
510 struct winreg_OpenHKDD {
511         struct {
512                 uint16_t *system_name;/* [unique] */
513                 uint32_t access_mask;
514         } in;
515
516         struct {
517                 struct policy_handle *handle;/* [ref] */
518                 WERROR result;
519         } out;
520
521 };
522
523
524 struct winreg_QueryMultipleValues {
525         struct {
526                 struct policy_handle *key_handle;/* [ref] */
527                 uint32_t num_values;
528                 struct QueryMultipleValue *values;/* [ref,length_is(num_values),size_is(num_values)] */
529                 uint8_t *buffer;/* [unique,length_is(*buffer_size),size_is(*buffer_size)] */
530                 uint32_t *buffer_size;/* [ref] */
531         } in;
532
533         struct {
534                 struct QueryMultipleValue *values;/* [ref,length_is(num_values),size_is(num_values)] */
535                 uint8_t *buffer;/* [unique,length_is(*buffer_size),size_is(*buffer_size)] */
536                 uint32_t *buffer_size;/* [ref] */
537                 WERROR result;
538         } out;
539
540 };
541
542
543 struct winreg_InitiateSystemShutdownEx {
544         struct {
545                 uint16_t *hostname;/* [unique] */
546                 struct lsa_StringLarge *message;/* [unique] */
547                 uint32_t timeout;
548                 uint8_t force_apps;
549                 uint8_t do_reboot;
550                 uint32_t reason;
551         } in;
552
553         struct {
554                 WERROR result;
555         } out;
556
557 };
558
559
560 struct winreg_SaveKeyEx {
561         struct {
562                 WERROR result;
563         } out;
564
565 };
566
567
568 struct winreg_OpenHKPT {
569         struct {
570                 uint16_t *system_name;/* [unique] */
571                 uint32_t access_mask;
572         } in;
573
574         struct {
575                 struct policy_handle *handle;/* [ref] */
576                 WERROR result;
577         } out;
578
579 };
580
581
582 struct winreg_OpenHKPN {
583         struct {
584                 uint16_t *system_name;/* [unique] */
585                 uint32_t access_mask;
586         } in;
587
588         struct {
589                 struct policy_handle *handle;/* [ref] */
590                 WERROR result;
591         } out;
592
593 };
594
595
596 struct winreg_QueryMultipleValues2 {
597         struct {
598                 WERROR result;
599         } out;
600
601 };
602
603 #endif /* _HEADER_winreg */