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