source: vendor/current/librpc/gen_ndr/cli_ntsvcs.c@ 587

Last change on this file since 587 was 587, checked in by Herwig Bauernfeind, 14 years ago

Samba 3.5: Update vendor to version 3.5.6

File size: 212.4 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
5
6#include "includes.h"
7#include "../librpc/gen_ndr/cli_ntsvcs.h"
8
9struct rpccli_PNP_Disconnect_state {
10 struct PNP_Disconnect orig;
11 struct PNP_Disconnect tmp;
12 TALLOC_CTX *out_mem_ctx;
13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
14};
15
16static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq);
17
18struct tevent_req *rpccli_PNP_Disconnect_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli)
21{
22 struct tevent_req *req;
23 struct rpccli_PNP_Disconnect_state *state;
24 struct tevent_req *subreq;
25
26 req = tevent_req_create(mem_ctx, &state,
27 struct rpccli_PNP_Disconnect_state);
28 if (req == NULL) {
29 return NULL;
30 }
31 state->out_mem_ctx = NULL;
32 state->dispatch_recv = cli->dispatch_recv;
33
34 /* In parameters */
35
36 /* Out parameters */
37
38 /* Result */
39 ZERO_STRUCT(state->orig.out.result);
40
41 /* make a temporary copy, that we pass to the dispatch function */
42 state->tmp = state->orig;
43
44 subreq = cli->dispatch_send(state, ev, cli,
45 &ndr_table_ntsvcs,
46 NDR_PNP_DISCONNECT,
47 &state->tmp);
48 if (tevent_req_nomem(subreq, req)) {
49 return tevent_req_post(req, ev);
50 }
51 tevent_req_set_callback(subreq, rpccli_PNP_Disconnect_done, req);
52 return req;
53}
54
55static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq)
56{
57 struct tevent_req *req = tevent_req_callback_data(
58 subreq, struct tevent_req);
59 struct rpccli_PNP_Disconnect_state *state = tevent_req_data(
60 req, struct rpccli_PNP_Disconnect_state);
61 NTSTATUS status;
62 TALLOC_CTX *mem_ctx;
63
64 if (state->out_mem_ctx) {
65 mem_ctx = state->out_mem_ctx;
66 } else {
67 mem_ctx = state;
68 }
69
70 status = state->dispatch_recv(subreq, mem_ctx);
71 TALLOC_FREE(subreq);
72 if (!NT_STATUS_IS_OK(status)) {
73 tevent_req_nterror(req, status);
74 return;
75 }
76
77 /* Copy out parameters */
78
79 /* Copy result */
80 state->orig.out.result = state->tmp.out.result;
81
82 /* Reset temporary structure */
83 ZERO_STRUCT(state->tmp);
84
85 tevent_req_done(req);
86}
87
88NTSTATUS rpccli_PNP_Disconnect_recv(struct tevent_req *req,
89 TALLOC_CTX *mem_ctx,
90 WERROR *result)
91{
92 struct rpccli_PNP_Disconnect_state *state = tevent_req_data(
93 req, struct rpccli_PNP_Disconnect_state);
94 NTSTATUS status;
95
96 if (tevent_req_is_nterror(req, &status)) {
97 tevent_req_received(req);
98 return status;
99 }
100
101 /* Steal possbile out parameters to the callers context */
102 talloc_steal(mem_ctx, state->out_mem_ctx);
103
104 /* Return result */
105 *result = state->orig.out.result;
106
107 tevent_req_received(req);
108 return NT_STATUS_OK;
109}
110
111NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
112 TALLOC_CTX *mem_ctx,
113 WERROR *werror)
114{
115 struct PNP_Disconnect r;
116 NTSTATUS status;
117
118 /* In parameters */
119
120 status = cli->dispatch(cli,
121 mem_ctx,
122 &ndr_table_ntsvcs,
123 NDR_PNP_DISCONNECT,
124 &r);
125
126 if (!NT_STATUS_IS_OK(status)) {
127 return status;
128 }
129
130 if (NT_STATUS_IS_ERR(status)) {
131 return status;
132 }
133
134 /* Return variables */
135
136 /* Return result */
137 if (werror) {
138 *werror = r.out.result;
139 }
140
141 return werror_to_ntstatus(r.out.result);
142}
143
144struct rpccli_PNP_Connect_state {
145 struct PNP_Connect orig;
146 struct PNP_Connect tmp;
147 TALLOC_CTX *out_mem_ctx;
148 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
149};
150
151static void rpccli_PNP_Connect_done(struct tevent_req *subreq);
152
153struct tevent_req *rpccli_PNP_Connect_send(TALLOC_CTX *mem_ctx,
154 struct tevent_context *ev,
155 struct rpc_pipe_client *cli)
156{
157 struct tevent_req *req;
158 struct rpccli_PNP_Connect_state *state;
159 struct tevent_req *subreq;
160
161 req = tevent_req_create(mem_ctx, &state,
162 struct rpccli_PNP_Connect_state);
163 if (req == NULL) {
164 return NULL;
165 }
166 state->out_mem_ctx = NULL;
167 state->dispatch_recv = cli->dispatch_recv;
168
169 /* In parameters */
170
171 /* Out parameters */
172
173 /* Result */
174 ZERO_STRUCT(state->orig.out.result);
175
176 /* make a temporary copy, that we pass to the dispatch function */
177 state->tmp = state->orig;
178
179 subreq = cli->dispatch_send(state, ev, cli,
180 &ndr_table_ntsvcs,
181 NDR_PNP_CONNECT,
182 &state->tmp);
183 if (tevent_req_nomem(subreq, req)) {
184 return tevent_req_post(req, ev);
185 }
186 tevent_req_set_callback(subreq, rpccli_PNP_Connect_done, req);
187 return req;
188}
189
190static void rpccli_PNP_Connect_done(struct tevent_req *subreq)
191{
192 struct tevent_req *req = tevent_req_callback_data(
193 subreq, struct tevent_req);
194 struct rpccli_PNP_Connect_state *state = tevent_req_data(
195 req, struct rpccli_PNP_Connect_state);
196 NTSTATUS status;
197 TALLOC_CTX *mem_ctx;
198
199 if (state->out_mem_ctx) {
200 mem_ctx = state->out_mem_ctx;
201 } else {
202 mem_ctx = state;
203 }
204
205 status = state->dispatch_recv(subreq, mem_ctx);
206 TALLOC_FREE(subreq);
207 if (!NT_STATUS_IS_OK(status)) {
208 tevent_req_nterror(req, status);
209 return;
210 }
211
212 /* Copy out parameters */
213
214 /* Copy result */
215 state->orig.out.result = state->tmp.out.result;
216
217 /* Reset temporary structure */
218 ZERO_STRUCT(state->tmp);
219
220 tevent_req_done(req);
221}
222
223NTSTATUS rpccli_PNP_Connect_recv(struct tevent_req *req,
224 TALLOC_CTX *mem_ctx,
225 WERROR *result)
226{
227 struct rpccli_PNP_Connect_state *state = tevent_req_data(
228 req, struct rpccli_PNP_Connect_state);
229 NTSTATUS status;
230
231 if (tevent_req_is_nterror(req, &status)) {
232 tevent_req_received(req);
233 return status;
234 }
235
236 /* Steal possbile out parameters to the callers context */
237 talloc_steal(mem_ctx, state->out_mem_ctx);
238
239 /* Return result */
240 *result = state->orig.out.result;
241
242 tevent_req_received(req);
243 return NT_STATUS_OK;
244}
245
246NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
247 TALLOC_CTX *mem_ctx,
248 WERROR *werror)
249{
250 struct PNP_Connect r;
251 NTSTATUS status;
252
253 /* In parameters */
254
255 status = cli->dispatch(cli,
256 mem_ctx,
257 &ndr_table_ntsvcs,
258 NDR_PNP_CONNECT,
259 &r);
260
261 if (!NT_STATUS_IS_OK(status)) {
262 return status;
263 }
264
265 if (NT_STATUS_IS_ERR(status)) {
266 return status;
267 }
268
269 /* Return variables */
270
271 /* Return result */
272 if (werror) {
273 *werror = r.out.result;
274 }
275
276 return werror_to_ntstatus(r.out.result);
277}
278
279struct rpccli_PNP_GetVersion_state {
280 struct PNP_GetVersion orig;
281 struct PNP_GetVersion tmp;
282 TALLOC_CTX *out_mem_ctx;
283 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
284};
285
286static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq);
287
288struct tevent_req *rpccli_PNP_GetVersion_send(TALLOC_CTX *mem_ctx,
289 struct tevent_context *ev,
290 struct rpc_pipe_client *cli,
291 uint16_t *_version /* [out] [ref] */)
292{
293 struct tevent_req *req;
294 struct rpccli_PNP_GetVersion_state *state;
295 struct tevent_req *subreq;
296
297 req = tevent_req_create(mem_ctx, &state,
298 struct rpccli_PNP_GetVersion_state);
299 if (req == NULL) {
300 return NULL;
301 }
302 state->out_mem_ctx = NULL;
303 state->dispatch_recv = cli->dispatch_recv;
304
305 /* In parameters */
306
307 /* Out parameters */
308 state->orig.out.version = _version;
309
310 /* Result */
311 ZERO_STRUCT(state->orig.out.result);
312
313 state->out_mem_ctx = talloc_named_const(state, 0,
314 "rpccli_PNP_GetVersion_out_memory");
315 if (tevent_req_nomem(state->out_mem_ctx, req)) {
316 return tevent_req_post(req, ev);
317 }
318
319 /* make a temporary copy, that we pass to the dispatch function */
320 state->tmp = state->orig;
321
322 subreq = cli->dispatch_send(state, ev, cli,
323 &ndr_table_ntsvcs,
324 NDR_PNP_GETVERSION,
325 &state->tmp);
326 if (tevent_req_nomem(subreq, req)) {
327 return tevent_req_post(req, ev);
328 }
329 tevent_req_set_callback(subreq, rpccli_PNP_GetVersion_done, req);
330 return req;
331}
332
333static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq)
334{
335 struct tevent_req *req = tevent_req_callback_data(
336 subreq, struct tevent_req);
337 struct rpccli_PNP_GetVersion_state *state = tevent_req_data(
338 req, struct rpccli_PNP_GetVersion_state);
339 NTSTATUS status;
340 TALLOC_CTX *mem_ctx;
341
342 if (state->out_mem_ctx) {
343 mem_ctx = state->out_mem_ctx;
344 } else {
345 mem_ctx = state;
346 }
347
348 status = state->dispatch_recv(subreq, mem_ctx);
349 TALLOC_FREE(subreq);
350 if (!NT_STATUS_IS_OK(status)) {
351 tevent_req_nterror(req, status);
352 return;
353 }
354
355 /* Copy out parameters */
356 *state->orig.out.version = *state->tmp.out.version;
357
358 /* Copy result */
359 state->orig.out.result = state->tmp.out.result;
360
361 /* Reset temporary structure */
362 ZERO_STRUCT(state->tmp);
363
364 tevent_req_done(req);
365}
366
367NTSTATUS rpccli_PNP_GetVersion_recv(struct tevent_req *req,
368 TALLOC_CTX *mem_ctx,
369 WERROR *result)
370{
371 struct rpccli_PNP_GetVersion_state *state = tevent_req_data(
372 req, struct rpccli_PNP_GetVersion_state);
373 NTSTATUS status;
374
375 if (tevent_req_is_nterror(req, &status)) {
376 tevent_req_received(req);
377 return status;
378 }
379
380 /* Steal possbile out parameters to the callers context */
381 talloc_steal(mem_ctx, state->out_mem_ctx);
382
383 /* Return result */
384 *result = state->orig.out.result;
385
386 tevent_req_received(req);
387 return NT_STATUS_OK;
388}
389
390NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
391 TALLOC_CTX *mem_ctx,
392 uint16_t *version /* [out] [ref] */,
393 WERROR *werror)
394{
395 struct PNP_GetVersion r;
396 NTSTATUS status;
397
398 /* In parameters */
399
400 status = cli->dispatch(cli,
401 mem_ctx,
402 &ndr_table_ntsvcs,
403 NDR_PNP_GETVERSION,
404 &r);
405
406 if (!NT_STATUS_IS_OK(status)) {
407 return status;
408 }
409
410 if (NT_STATUS_IS_ERR(status)) {
411 return status;
412 }
413
414 /* Return variables */
415 *version = *r.out.version;
416
417 /* Return result */
418 if (werror) {
419 *werror = r.out.result;
420 }
421
422 return werror_to_ntstatus(r.out.result);
423}
424
425struct rpccli_PNP_GetGlobalState_state {
426 struct PNP_GetGlobalState orig;
427 struct PNP_GetGlobalState tmp;
428 TALLOC_CTX *out_mem_ctx;
429 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
430};
431
432static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq);
433
434struct tevent_req *rpccli_PNP_GetGlobalState_send(TALLOC_CTX *mem_ctx,
435 struct tevent_context *ev,
436 struct rpc_pipe_client *cli)
437{
438 struct tevent_req *req;
439 struct rpccli_PNP_GetGlobalState_state *state;
440 struct tevent_req *subreq;
441
442 req = tevent_req_create(mem_ctx, &state,
443 struct rpccli_PNP_GetGlobalState_state);
444 if (req == NULL) {
445 return NULL;
446 }
447 state->out_mem_ctx = NULL;
448 state->dispatch_recv = cli->dispatch_recv;
449
450 /* In parameters */
451
452 /* Out parameters */
453
454 /* Result */
455 ZERO_STRUCT(state->orig.out.result);
456
457 /* make a temporary copy, that we pass to the dispatch function */
458 state->tmp = state->orig;
459
460 subreq = cli->dispatch_send(state, ev, cli,
461 &ndr_table_ntsvcs,
462 NDR_PNP_GETGLOBALSTATE,
463 &state->tmp);
464 if (tevent_req_nomem(subreq, req)) {
465 return tevent_req_post(req, ev);
466 }
467 tevent_req_set_callback(subreq, rpccli_PNP_GetGlobalState_done, req);
468 return req;
469}
470
471static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq)
472{
473 struct tevent_req *req = tevent_req_callback_data(
474 subreq, struct tevent_req);
475 struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data(
476 req, struct rpccli_PNP_GetGlobalState_state);
477 NTSTATUS status;
478 TALLOC_CTX *mem_ctx;
479
480 if (state->out_mem_ctx) {
481 mem_ctx = state->out_mem_ctx;
482 } else {
483 mem_ctx = state;
484 }
485
486 status = state->dispatch_recv(subreq, mem_ctx);
487 TALLOC_FREE(subreq);
488 if (!NT_STATUS_IS_OK(status)) {
489 tevent_req_nterror(req, status);
490 return;
491 }
492
493 /* Copy out parameters */
494
495 /* Copy result */
496 state->orig.out.result = state->tmp.out.result;
497
498 /* Reset temporary structure */
499 ZERO_STRUCT(state->tmp);
500
501 tevent_req_done(req);
502}
503
504NTSTATUS rpccli_PNP_GetGlobalState_recv(struct tevent_req *req,
505 TALLOC_CTX *mem_ctx,
506 WERROR *result)
507{
508 struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data(
509 req, struct rpccli_PNP_GetGlobalState_state);
510 NTSTATUS status;
511
512 if (tevent_req_is_nterror(req, &status)) {
513 tevent_req_received(req);
514 return status;
515 }
516
517 /* Steal possbile out parameters to the callers context */
518 talloc_steal(mem_ctx, state->out_mem_ctx);
519
520 /* Return result */
521 *result = state->orig.out.result;
522
523 tevent_req_received(req);
524 return NT_STATUS_OK;
525}
526
527NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
528 TALLOC_CTX *mem_ctx,
529 WERROR *werror)
530{
531 struct PNP_GetGlobalState r;
532 NTSTATUS status;
533
534 /* In parameters */
535
536 status = cli->dispatch(cli,
537 mem_ctx,
538 &ndr_table_ntsvcs,
539 NDR_PNP_GETGLOBALSTATE,
540 &r);
541
542 if (!NT_STATUS_IS_OK(status)) {
543 return status;
544 }
545
546 if (NT_STATUS_IS_ERR(status)) {
547 return status;
548 }
549
550 /* Return variables */
551
552 /* Return result */
553 if (werror) {
554 *werror = r.out.result;
555 }
556
557 return werror_to_ntstatus(r.out.result);
558}
559
560struct rpccli_PNP_InitDetection_state {
561 struct PNP_InitDetection orig;
562 struct PNP_InitDetection tmp;
563 TALLOC_CTX *out_mem_ctx;
564 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
565};
566
567static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq);
568
569struct tevent_req *rpccli_PNP_InitDetection_send(TALLOC_CTX *mem_ctx,
570 struct tevent_context *ev,
571 struct rpc_pipe_client *cli)
572{
573 struct tevent_req *req;
574 struct rpccli_PNP_InitDetection_state *state;
575 struct tevent_req *subreq;
576
577 req = tevent_req_create(mem_ctx, &state,
578 struct rpccli_PNP_InitDetection_state);
579 if (req == NULL) {
580 return NULL;
581 }
582 state->out_mem_ctx = NULL;
583 state->dispatch_recv = cli->dispatch_recv;
584
585 /* In parameters */
586
587 /* Out parameters */
588
589 /* Result */
590 ZERO_STRUCT(state->orig.out.result);
591
592 /* make a temporary copy, that we pass to the dispatch function */
593 state->tmp = state->orig;
594
595 subreq = cli->dispatch_send(state, ev, cli,
596 &ndr_table_ntsvcs,
597 NDR_PNP_INITDETECTION,
598 &state->tmp);
599 if (tevent_req_nomem(subreq, req)) {
600 return tevent_req_post(req, ev);
601 }
602 tevent_req_set_callback(subreq, rpccli_PNP_InitDetection_done, req);
603 return req;
604}
605
606static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq)
607{
608 struct tevent_req *req = tevent_req_callback_data(
609 subreq, struct tevent_req);
610 struct rpccli_PNP_InitDetection_state *state = tevent_req_data(
611 req, struct rpccli_PNP_InitDetection_state);
612 NTSTATUS status;
613 TALLOC_CTX *mem_ctx;
614
615 if (state->out_mem_ctx) {
616 mem_ctx = state->out_mem_ctx;
617 } else {
618 mem_ctx = state;
619 }
620
621 status = state->dispatch_recv(subreq, mem_ctx);
622 TALLOC_FREE(subreq);
623 if (!NT_STATUS_IS_OK(status)) {
624 tevent_req_nterror(req, status);
625 return;
626 }
627
628 /* Copy out parameters */
629
630 /* Copy result */
631 state->orig.out.result = state->tmp.out.result;
632
633 /* Reset temporary structure */
634 ZERO_STRUCT(state->tmp);
635
636 tevent_req_done(req);
637}
638
639NTSTATUS rpccli_PNP_InitDetection_recv(struct tevent_req *req,
640 TALLOC_CTX *mem_ctx,
641 WERROR *result)
642{
643 struct rpccli_PNP_InitDetection_state *state = tevent_req_data(
644 req, struct rpccli_PNP_InitDetection_state);
645 NTSTATUS status;
646
647 if (tevent_req_is_nterror(req, &status)) {
648 tevent_req_received(req);
649 return status;
650 }
651
652 /* Steal possbile out parameters to the callers context */
653 talloc_steal(mem_ctx, state->out_mem_ctx);
654
655 /* Return result */
656 *result = state->orig.out.result;
657
658 tevent_req_received(req);
659 return NT_STATUS_OK;
660}
661
662NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
663 TALLOC_CTX *mem_ctx,
664 WERROR *werror)
665{
666 struct PNP_InitDetection r;
667 NTSTATUS status;
668
669 /* In parameters */
670
671 status = cli->dispatch(cli,
672 mem_ctx,
673 &ndr_table_ntsvcs,
674 NDR_PNP_INITDETECTION,
675 &r);
676
677 if (!NT_STATUS_IS_OK(status)) {
678 return status;
679 }
680
681 if (NT_STATUS_IS_ERR(status)) {
682 return status;
683 }
684
685 /* Return variables */
686
687 /* Return result */
688 if (werror) {
689 *werror = r.out.result;
690 }
691
692 return werror_to_ntstatus(r.out.result);
693}
694
695struct rpccli_PNP_ReportLogOn_state {
696 struct PNP_ReportLogOn orig;
697 struct PNP_ReportLogOn tmp;
698 TALLOC_CTX *out_mem_ctx;
699 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
700};
701
702static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq);
703
704struct tevent_req *rpccli_PNP_ReportLogOn_send(TALLOC_CTX *mem_ctx,
705 struct tevent_context *ev,
706 struct rpc_pipe_client *cli)
707{
708 struct tevent_req *req;
709 struct rpccli_PNP_ReportLogOn_state *state;
710 struct tevent_req *subreq;
711
712 req = tevent_req_create(mem_ctx, &state,
713 struct rpccli_PNP_ReportLogOn_state);
714 if (req == NULL) {
715 return NULL;
716 }
717 state->out_mem_ctx = NULL;
718 state->dispatch_recv = cli->dispatch_recv;
719
720 /* In parameters */
721
722 /* Out parameters */
723
724 /* Result */
725 ZERO_STRUCT(state->orig.out.result);
726
727 /* make a temporary copy, that we pass to the dispatch function */
728 state->tmp = state->orig;
729
730 subreq = cli->dispatch_send(state, ev, cli,
731 &ndr_table_ntsvcs,
732 NDR_PNP_REPORTLOGON,
733 &state->tmp);
734 if (tevent_req_nomem(subreq, req)) {
735 return tevent_req_post(req, ev);
736 }
737 tevent_req_set_callback(subreq, rpccli_PNP_ReportLogOn_done, req);
738 return req;
739}
740
741static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq)
742{
743 struct tevent_req *req = tevent_req_callback_data(
744 subreq, struct tevent_req);
745 struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data(
746 req, struct rpccli_PNP_ReportLogOn_state);
747 NTSTATUS status;
748 TALLOC_CTX *mem_ctx;
749
750 if (state->out_mem_ctx) {
751 mem_ctx = state->out_mem_ctx;
752 } else {
753 mem_ctx = state;
754 }
755
756 status = state->dispatch_recv(subreq, mem_ctx);
757 TALLOC_FREE(subreq);
758 if (!NT_STATUS_IS_OK(status)) {
759 tevent_req_nterror(req, status);
760 return;
761 }
762
763 /* Copy out parameters */
764
765 /* Copy result */
766 state->orig.out.result = state->tmp.out.result;
767
768 /* Reset temporary structure */
769 ZERO_STRUCT(state->tmp);
770
771 tevent_req_done(req);
772}
773
774NTSTATUS rpccli_PNP_ReportLogOn_recv(struct tevent_req *req,
775 TALLOC_CTX *mem_ctx,
776 WERROR *result)
777{
778 struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data(
779 req, struct rpccli_PNP_ReportLogOn_state);
780 NTSTATUS status;
781
782 if (tevent_req_is_nterror(req, &status)) {
783 tevent_req_received(req);
784 return status;
785 }
786
787 /* Steal possbile out parameters to the callers context */
788 talloc_steal(mem_ctx, state->out_mem_ctx);
789
790 /* Return result */
791 *result = state->orig.out.result;
792
793 tevent_req_received(req);
794 return NT_STATUS_OK;
795}
796
797NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
798 TALLOC_CTX *mem_ctx,
799 WERROR *werror)
800{
801 struct PNP_ReportLogOn r;
802 NTSTATUS status;
803
804 /* In parameters */
805
806 status = cli->dispatch(cli,
807 mem_ctx,
808 &ndr_table_ntsvcs,
809 NDR_PNP_REPORTLOGON,
810 &r);
811
812 if (!NT_STATUS_IS_OK(status)) {
813 return status;
814 }
815
816 if (NT_STATUS_IS_ERR(status)) {
817 return status;
818 }
819
820 /* Return variables */
821
822 /* Return result */
823 if (werror) {
824 *werror = r.out.result;
825 }
826
827 return werror_to_ntstatus(r.out.result);
828}
829
830struct rpccli_PNP_ValidateDeviceInstance_state {
831 struct PNP_ValidateDeviceInstance orig;
832 struct PNP_ValidateDeviceInstance tmp;
833 TALLOC_CTX *out_mem_ctx;
834 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
835};
836
837static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq);
838
839struct tevent_req *rpccli_PNP_ValidateDeviceInstance_send(TALLOC_CTX *mem_ctx,
840 struct tevent_context *ev,
841 struct rpc_pipe_client *cli,
842 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
843 uint32_t _flags /* [in] */)
844{
845 struct tevent_req *req;
846 struct rpccli_PNP_ValidateDeviceInstance_state *state;
847 struct tevent_req *subreq;
848
849 req = tevent_req_create(mem_ctx, &state,
850 struct rpccli_PNP_ValidateDeviceInstance_state);
851 if (req == NULL) {
852 return NULL;
853 }
854 state->out_mem_ctx = NULL;
855 state->dispatch_recv = cli->dispatch_recv;
856
857 /* In parameters */
858 state->orig.in.devicepath = _devicepath;
859 state->orig.in.flags = _flags;
860
861 /* Out parameters */
862
863 /* Result */
864 ZERO_STRUCT(state->orig.out.result);
865
866 /* make a temporary copy, that we pass to the dispatch function */
867 state->tmp = state->orig;
868
869 subreq = cli->dispatch_send(state, ev, cli,
870 &ndr_table_ntsvcs,
871 NDR_PNP_VALIDATEDEVICEINSTANCE,
872 &state->tmp);
873 if (tevent_req_nomem(subreq, req)) {
874 return tevent_req_post(req, ev);
875 }
876 tevent_req_set_callback(subreq, rpccli_PNP_ValidateDeviceInstance_done, req);
877 return req;
878}
879
880static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq)
881{
882 struct tevent_req *req = tevent_req_callback_data(
883 subreq, struct tevent_req);
884 struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data(
885 req, struct rpccli_PNP_ValidateDeviceInstance_state);
886 NTSTATUS status;
887 TALLOC_CTX *mem_ctx;
888
889 if (state->out_mem_ctx) {
890 mem_ctx = state->out_mem_ctx;
891 } else {
892 mem_ctx = state;
893 }
894
895 status = state->dispatch_recv(subreq, mem_ctx);
896 TALLOC_FREE(subreq);
897 if (!NT_STATUS_IS_OK(status)) {
898 tevent_req_nterror(req, status);
899 return;
900 }
901
902 /* Copy out parameters */
903
904 /* Copy result */
905 state->orig.out.result = state->tmp.out.result;
906
907 /* Reset temporary structure */
908 ZERO_STRUCT(state->tmp);
909
910 tevent_req_done(req);
911}
912
913NTSTATUS rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req *req,
914 TALLOC_CTX *mem_ctx,
915 WERROR *result)
916{
917 struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data(
918 req, struct rpccli_PNP_ValidateDeviceInstance_state);
919 NTSTATUS status;
920
921 if (tevent_req_is_nterror(req, &status)) {
922 tevent_req_received(req);
923 return status;
924 }
925
926 /* Steal possbile out parameters to the callers context */
927 talloc_steal(mem_ctx, state->out_mem_ctx);
928
929 /* Return result */
930 *result = state->orig.out.result;
931
932 tevent_req_received(req);
933 return NT_STATUS_OK;
934}
935
936NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli,
937 TALLOC_CTX *mem_ctx,
938 const char *devicepath /* [in] [ref,charset(UTF16)] */,
939 uint32_t flags /* [in] */,
940 WERROR *werror)
941{
942 struct PNP_ValidateDeviceInstance r;
943 NTSTATUS status;
944
945 /* In parameters */
946 r.in.devicepath = devicepath;
947 r.in.flags = flags;
948
949 status = cli->dispatch(cli,
950 mem_ctx,
951 &ndr_table_ntsvcs,
952 NDR_PNP_VALIDATEDEVICEINSTANCE,
953 &r);
954
955 if (!NT_STATUS_IS_OK(status)) {
956 return status;
957 }
958
959 if (NT_STATUS_IS_ERR(status)) {
960 return status;
961 }
962
963 /* Return variables */
964
965 /* Return result */
966 if (werror) {
967 *werror = r.out.result;
968 }
969
970 return werror_to_ntstatus(r.out.result);
971}
972
973struct rpccli_PNP_GetRootDeviceInstance_state {
974 struct PNP_GetRootDeviceInstance orig;
975 struct PNP_GetRootDeviceInstance tmp;
976 TALLOC_CTX *out_mem_ctx;
977 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
978};
979
980static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq);
981
982struct tevent_req *rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX *mem_ctx,
983 struct tevent_context *ev,
984 struct rpc_pipe_client *cli)
985{
986 struct tevent_req *req;
987 struct rpccli_PNP_GetRootDeviceInstance_state *state;
988 struct tevent_req *subreq;
989
990 req = tevent_req_create(mem_ctx, &state,
991 struct rpccli_PNP_GetRootDeviceInstance_state);
992 if (req == NULL) {
993 return NULL;
994 }
995 state->out_mem_ctx = NULL;
996 state->dispatch_recv = cli->dispatch_recv;
997
998 /* In parameters */
999
1000 /* Out parameters */
1001
1002 /* Result */
1003 ZERO_STRUCT(state->orig.out.result);
1004
1005 /* make a temporary copy, that we pass to the dispatch function */
1006 state->tmp = state->orig;
1007
1008 subreq = cli->dispatch_send(state, ev, cli,
1009 &ndr_table_ntsvcs,
1010 NDR_PNP_GETROOTDEVICEINSTANCE,
1011 &state->tmp);
1012 if (tevent_req_nomem(subreq, req)) {
1013 return tevent_req_post(req, ev);
1014 }
1015 tevent_req_set_callback(subreq, rpccli_PNP_GetRootDeviceInstance_done, req);
1016 return req;
1017}
1018
1019static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq)
1020{
1021 struct tevent_req *req = tevent_req_callback_data(
1022 subreq, struct tevent_req);
1023 struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data(
1024 req, struct rpccli_PNP_GetRootDeviceInstance_state);
1025 NTSTATUS status;
1026 TALLOC_CTX *mem_ctx;
1027
1028 if (state->out_mem_ctx) {
1029 mem_ctx = state->out_mem_ctx;
1030 } else {
1031 mem_ctx = state;
1032 }
1033
1034 status = state->dispatch_recv(subreq, mem_ctx);
1035 TALLOC_FREE(subreq);
1036 if (!NT_STATUS_IS_OK(status)) {
1037 tevent_req_nterror(req, status);
1038 return;
1039 }
1040
1041 /* Copy out parameters */
1042
1043 /* Copy result */
1044 state->orig.out.result = state->tmp.out.result;
1045
1046 /* Reset temporary structure */
1047 ZERO_STRUCT(state->tmp);
1048
1049 tevent_req_done(req);
1050}
1051
1052NTSTATUS rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req *req,
1053 TALLOC_CTX *mem_ctx,
1054 WERROR *result)
1055{
1056 struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data(
1057 req, struct rpccli_PNP_GetRootDeviceInstance_state);
1058 NTSTATUS status;
1059
1060 if (tevent_req_is_nterror(req, &status)) {
1061 tevent_req_received(req);
1062 return status;
1063 }
1064
1065 /* Steal possbile out parameters to the callers context */
1066 talloc_steal(mem_ctx, state->out_mem_ctx);
1067
1068 /* Return result */
1069 *result = state->orig.out.result;
1070
1071 tevent_req_received(req);
1072 return NT_STATUS_OK;
1073}
1074
1075NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
1076 TALLOC_CTX *mem_ctx,
1077 WERROR *werror)
1078{
1079 struct PNP_GetRootDeviceInstance r;
1080 NTSTATUS status;
1081
1082 /* In parameters */
1083
1084 status = cli->dispatch(cli,
1085 mem_ctx,
1086 &ndr_table_ntsvcs,
1087 NDR_PNP_GETROOTDEVICEINSTANCE,
1088 &r);
1089
1090 if (!NT_STATUS_IS_OK(status)) {
1091 return status;
1092 }
1093
1094 if (NT_STATUS_IS_ERR(status)) {
1095 return status;
1096 }
1097
1098 /* Return variables */
1099
1100 /* Return result */
1101 if (werror) {
1102 *werror = r.out.result;
1103 }
1104
1105 return werror_to_ntstatus(r.out.result);
1106}
1107
1108struct rpccli_PNP_GetRelatedDeviceInstance_state {
1109 struct PNP_GetRelatedDeviceInstance orig;
1110 struct PNP_GetRelatedDeviceInstance tmp;
1111 TALLOC_CTX *out_mem_ctx;
1112 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1113};
1114
1115static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq);
1116
1117struct tevent_req *rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX *mem_ctx,
1118 struct tevent_context *ev,
1119 struct rpc_pipe_client *cli)
1120{
1121 struct tevent_req *req;
1122 struct rpccli_PNP_GetRelatedDeviceInstance_state *state;
1123 struct tevent_req *subreq;
1124
1125 req = tevent_req_create(mem_ctx, &state,
1126 struct rpccli_PNP_GetRelatedDeviceInstance_state);
1127 if (req == NULL) {
1128 return NULL;
1129 }
1130 state->out_mem_ctx = NULL;
1131 state->dispatch_recv = cli->dispatch_recv;
1132
1133 /* In parameters */
1134
1135 /* Out parameters */
1136
1137 /* Result */
1138 ZERO_STRUCT(state->orig.out.result);
1139
1140 /* make a temporary copy, that we pass to the dispatch function */
1141 state->tmp = state->orig;
1142
1143 subreq = cli->dispatch_send(state, ev, cli,
1144 &ndr_table_ntsvcs,
1145 NDR_PNP_GETRELATEDDEVICEINSTANCE,
1146 &state->tmp);
1147 if (tevent_req_nomem(subreq, req)) {
1148 return tevent_req_post(req, ev);
1149 }
1150 tevent_req_set_callback(subreq, rpccli_PNP_GetRelatedDeviceInstance_done, req);
1151 return req;
1152}
1153
1154static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq)
1155{
1156 struct tevent_req *req = tevent_req_callback_data(
1157 subreq, struct tevent_req);
1158 struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data(
1159 req, struct rpccli_PNP_GetRelatedDeviceInstance_state);
1160 NTSTATUS status;
1161 TALLOC_CTX *mem_ctx;
1162
1163 if (state->out_mem_ctx) {
1164 mem_ctx = state->out_mem_ctx;
1165 } else {
1166 mem_ctx = state;
1167 }
1168
1169 status = state->dispatch_recv(subreq, mem_ctx);
1170 TALLOC_FREE(subreq);
1171 if (!NT_STATUS_IS_OK(status)) {
1172 tevent_req_nterror(req, status);
1173 return;
1174 }
1175
1176 /* Copy out parameters */
1177
1178 /* Copy result */
1179 state->orig.out.result = state->tmp.out.result;
1180
1181 /* Reset temporary structure */
1182 ZERO_STRUCT(state->tmp);
1183
1184 tevent_req_done(req);
1185}
1186
1187NTSTATUS rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req *req,
1188 TALLOC_CTX *mem_ctx,
1189 WERROR *result)
1190{
1191 struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data(
1192 req, struct rpccli_PNP_GetRelatedDeviceInstance_state);
1193 NTSTATUS status;
1194
1195 if (tevent_req_is_nterror(req, &status)) {
1196 tevent_req_received(req);
1197 return status;
1198 }
1199
1200 /* Steal possbile out parameters to the callers context */
1201 talloc_steal(mem_ctx, state->out_mem_ctx);
1202
1203 /* Return result */
1204 *result = state->orig.out.result;
1205
1206 tevent_req_received(req);
1207 return NT_STATUS_OK;
1208}
1209
1210NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
1211 TALLOC_CTX *mem_ctx,
1212 WERROR *werror)
1213{
1214 struct PNP_GetRelatedDeviceInstance r;
1215 NTSTATUS status;
1216
1217 /* In parameters */
1218
1219 status = cli->dispatch(cli,
1220 mem_ctx,
1221 &ndr_table_ntsvcs,
1222 NDR_PNP_GETRELATEDDEVICEINSTANCE,
1223 &r);
1224
1225 if (!NT_STATUS_IS_OK(status)) {
1226 return status;
1227 }
1228
1229 if (NT_STATUS_IS_ERR(status)) {
1230 return status;
1231 }
1232
1233 /* Return variables */
1234
1235 /* Return result */
1236 if (werror) {
1237 *werror = r.out.result;
1238 }
1239
1240 return werror_to_ntstatus(r.out.result);
1241}
1242
1243struct rpccli_PNP_EnumerateSubKeys_state {
1244 struct PNP_EnumerateSubKeys orig;
1245 struct PNP_EnumerateSubKeys tmp;
1246 TALLOC_CTX *out_mem_ctx;
1247 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1248};
1249
1250static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq);
1251
1252struct tevent_req *rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX *mem_ctx,
1253 struct tevent_context *ev,
1254 struct rpc_pipe_client *cli)
1255{
1256 struct tevent_req *req;
1257 struct rpccli_PNP_EnumerateSubKeys_state *state;
1258 struct tevent_req *subreq;
1259
1260 req = tevent_req_create(mem_ctx, &state,
1261 struct rpccli_PNP_EnumerateSubKeys_state);
1262 if (req == NULL) {
1263 return NULL;
1264 }
1265 state->out_mem_ctx = NULL;
1266 state->dispatch_recv = cli->dispatch_recv;
1267
1268 /* In parameters */
1269
1270 /* Out parameters */
1271
1272 /* Result */
1273 ZERO_STRUCT(state->orig.out.result);
1274
1275 /* make a temporary copy, that we pass to the dispatch function */
1276 state->tmp = state->orig;
1277
1278 subreq = cli->dispatch_send(state, ev, cli,
1279 &ndr_table_ntsvcs,
1280 NDR_PNP_ENUMERATESUBKEYS,
1281 &state->tmp);
1282 if (tevent_req_nomem(subreq, req)) {
1283 return tevent_req_post(req, ev);
1284 }
1285 tevent_req_set_callback(subreq, rpccli_PNP_EnumerateSubKeys_done, req);
1286 return req;
1287}
1288
1289static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq)
1290{
1291 struct tevent_req *req = tevent_req_callback_data(
1292 subreq, struct tevent_req);
1293 struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data(
1294 req, struct rpccli_PNP_EnumerateSubKeys_state);
1295 NTSTATUS status;
1296 TALLOC_CTX *mem_ctx;
1297
1298 if (state->out_mem_ctx) {
1299 mem_ctx = state->out_mem_ctx;
1300 } else {
1301 mem_ctx = state;
1302 }
1303
1304 status = state->dispatch_recv(subreq, mem_ctx);
1305 TALLOC_FREE(subreq);
1306 if (!NT_STATUS_IS_OK(status)) {
1307 tevent_req_nterror(req, status);
1308 return;
1309 }
1310
1311 /* Copy out parameters */
1312
1313 /* Copy result */
1314 state->orig.out.result = state->tmp.out.result;
1315
1316 /* Reset temporary structure */
1317 ZERO_STRUCT(state->tmp);
1318
1319 tevent_req_done(req);
1320}
1321
1322NTSTATUS rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req *req,
1323 TALLOC_CTX *mem_ctx,
1324 WERROR *result)
1325{
1326 struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data(
1327 req, struct rpccli_PNP_EnumerateSubKeys_state);
1328 NTSTATUS status;
1329
1330 if (tevent_req_is_nterror(req, &status)) {
1331 tevent_req_received(req);
1332 return status;
1333 }
1334
1335 /* Steal possbile out parameters to the callers context */
1336 talloc_steal(mem_ctx, state->out_mem_ctx);
1337
1338 /* Return result */
1339 *result = state->orig.out.result;
1340
1341 tevent_req_received(req);
1342 return NT_STATUS_OK;
1343}
1344
1345NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
1346 TALLOC_CTX *mem_ctx,
1347 WERROR *werror)
1348{
1349 struct PNP_EnumerateSubKeys r;
1350 NTSTATUS status;
1351
1352 /* In parameters */
1353
1354 status = cli->dispatch(cli,
1355 mem_ctx,
1356 &ndr_table_ntsvcs,
1357 NDR_PNP_ENUMERATESUBKEYS,
1358 &r);
1359
1360 if (!NT_STATUS_IS_OK(status)) {
1361 return status;
1362 }
1363
1364 if (NT_STATUS_IS_ERR(status)) {
1365 return status;
1366 }
1367
1368 /* Return variables */
1369
1370 /* Return result */
1371 if (werror) {
1372 *werror = r.out.result;
1373 }
1374
1375 return werror_to_ntstatus(r.out.result);
1376}
1377
1378struct rpccli_PNP_GetDeviceList_state {
1379 struct PNP_GetDeviceList orig;
1380 struct PNP_GetDeviceList tmp;
1381 TALLOC_CTX *out_mem_ctx;
1382 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1383};
1384
1385static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq);
1386
1387struct tevent_req *rpccli_PNP_GetDeviceList_send(TALLOC_CTX *mem_ctx,
1388 struct tevent_context *ev,
1389 struct rpc_pipe_client *cli,
1390 const char *_filter /* [in] [unique,charset(UTF16)] */,
1391 uint16_t *_buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1392 uint32_t *_length /* [in,out] [ref] */,
1393 uint32_t _flags /* [in] */)
1394{
1395 struct tevent_req *req;
1396 struct rpccli_PNP_GetDeviceList_state *state;
1397 struct tevent_req *subreq;
1398
1399 req = tevent_req_create(mem_ctx, &state,
1400 struct rpccli_PNP_GetDeviceList_state);
1401 if (req == NULL) {
1402 return NULL;
1403 }
1404 state->out_mem_ctx = NULL;
1405 state->dispatch_recv = cli->dispatch_recv;
1406
1407 /* In parameters */
1408 state->orig.in.filter = _filter;
1409 state->orig.in.length = _length;
1410 state->orig.in.flags = _flags;
1411
1412 /* Out parameters */
1413 state->orig.out.buffer = _buffer;
1414 state->orig.out.length = _length;
1415
1416 /* Result */
1417 ZERO_STRUCT(state->orig.out.result);
1418
1419 state->out_mem_ctx = talloc_named_const(state, 0,
1420 "rpccli_PNP_GetDeviceList_out_memory");
1421 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1422 return tevent_req_post(req, ev);
1423 }
1424
1425 /* make a temporary copy, that we pass to the dispatch function */
1426 state->tmp = state->orig;
1427
1428 subreq = cli->dispatch_send(state, ev, cli,
1429 &ndr_table_ntsvcs,
1430 NDR_PNP_GETDEVICELIST,
1431 &state->tmp);
1432 if (tevent_req_nomem(subreq, req)) {
1433 return tevent_req_post(req, ev);
1434 }
1435 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceList_done, req);
1436 return req;
1437}
1438
1439static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq)
1440{
1441 struct tevent_req *req = tevent_req_callback_data(
1442 subreq, struct tevent_req);
1443 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1444 req, struct rpccli_PNP_GetDeviceList_state);
1445 NTSTATUS status;
1446 TALLOC_CTX *mem_ctx;
1447
1448 if (state->out_mem_ctx) {
1449 mem_ctx = state->out_mem_ctx;
1450 } else {
1451 mem_ctx = state;
1452 }
1453
1454 status = state->dispatch_recv(subreq, mem_ctx);
1455 TALLOC_FREE(subreq);
1456 if (!NT_STATUS_IS_OK(status)) {
1457 tevent_req_nterror(req, status);
1458 return;
1459 }
1460
1461 /* Copy out parameters */
1462 if ((*state->tmp.out.length) > (*state->tmp.in.length)) {
1463 tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
1464 return;
1465 }
1466 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.length) * sizeof(*state->orig.out.buffer));
1467 *state->orig.out.length = *state->tmp.out.length;
1468
1469 /* Copy result */
1470 state->orig.out.result = state->tmp.out.result;
1471
1472 /* Reset temporary structure */
1473 ZERO_STRUCT(state->tmp);
1474
1475 tevent_req_done(req);
1476}
1477
1478NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req,
1479 TALLOC_CTX *mem_ctx,
1480 WERROR *result)
1481{
1482 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1483 req, struct rpccli_PNP_GetDeviceList_state);
1484 NTSTATUS status;
1485
1486 if (tevent_req_is_nterror(req, &status)) {
1487 tevent_req_received(req);
1488 return status;
1489 }
1490
1491 /* Steal possbile out parameters to the callers context */
1492 talloc_steal(mem_ctx, state->out_mem_ctx);
1493
1494 /* Return result */
1495 *result = state->orig.out.result;
1496
1497 tevent_req_received(req);
1498 return NT_STATUS_OK;
1499}
1500
1501NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
1502 TALLOC_CTX *mem_ctx,
1503 const char *filter /* [in] [unique,charset(UTF16)] */,
1504 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1505 uint32_t *length /* [in,out] [ref] */,
1506 uint32_t flags /* [in] */,
1507 WERROR *werror)
1508{
1509 struct PNP_GetDeviceList r;
1510 NTSTATUS status;
1511
1512 /* In parameters */
1513 r.in.filter = filter;
1514 r.in.length = length;
1515 r.in.flags = flags;
1516
1517 status = cli->dispatch(cli,
1518 mem_ctx,
1519 &ndr_table_ntsvcs,
1520 NDR_PNP_GETDEVICELIST,
1521 &r);
1522
1523 if (!NT_STATUS_IS_OK(status)) {
1524 return status;
1525 }
1526
1527 if (NT_STATUS_IS_ERR(status)) {
1528 return status;
1529 }
1530
1531 /* Return variables */
1532 if ((*r.out.length) > (*r.in.length)) {
1533 return NT_STATUS_INVALID_NETWORK_RESPONSE;
1534 }
1535 memcpy(buffer, r.out.buffer, (*r.out.length) * sizeof(*buffer));
1536 *length = *r.out.length;
1537
1538 /* Return result */
1539 if (werror) {
1540 *werror = r.out.result;
1541 }
1542
1543 return werror_to_ntstatus(r.out.result);
1544}
1545
1546struct rpccli_PNP_GetDeviceListSize_state {
1547 struct PNP_GetDeviceListSize orig;
1548 struct PNP_GetDeviceListSize tmp;
1549 TALLOC_CTX *out_mem_ctx;
1550 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1551};
1552
1553static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq);
1554
1555struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx,
1556 struct tevent_context *ev,
1557 struct rpc_pipe_client *cli,
1558 const char *_devicename /* [in] [unique,charset(UTF16)] */,
1559 uint32_t *_size /* [out] [ref] */,
1560 uint32_t _flags /* [in] */)
1561{
1562 struct tevent_req *req;
1563 struct rpccli_PNP_GetDeviceListSize_state *state;
1564 struct tevent_req *subreq;
1565
1566 req = tevent_req_create(mem_ctx, &state,
1567 struct rpccli_PNP_GetDeviceListSize_state);
1568 if (req == NULL) {
1569 return NULL;
1570 }
1571 state->out_mem_ctx = NULL;
1572 state->dispatch_recv = cli->dispatch_recv;
1573
1574 /* In parameters */
1575 state->orig.in.devicename = _devicename;
1576 state->orig.in.flags = _flags;
1577
1578 /* Out parameters */
1579 state->orig.out.size = _size;
1580
1581 /* Result */
1582 ZERO_STRUCT(state->orig.out.result);
1583
1584 state->out_mem_ctx = talloc_named_const(state, 0,
1585 "rpccli_PNP_GetDeviceListSize_out_memory");
1586 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1587 return tevent_req_post(req, ev);
1588 }
1589
1590 /* make a temporary copy, that we pass to the dispatch function */
1591 state->tmp = state->orig;
1592
1593 subreq = cli->dispatch_send(state, ev, cli,
1594 &ndr_table_ntsvcs,
1595 NDR_PNP_GETDEVICELISTSIZE,
1596 &state->tmp);
1597 if (tevent_req_nomem(subreq, req)) {
1598 return tevent_req_post(req, ev);
1599 }
1600 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceListSize_done, req);
1601 return req;
1602}
1603
1604static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq)
1605{
1606 struct tevent_req *req = tevent_req_callback_data(
1607 subreq, struct tevent_req);
1608 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1609 req, struct rpccli_PNP_GetDeviceListSize_state);
1610 NTSTATUS status;
1611 TALLOC_CTX *mem_ctx;
1612
1613 if (state->out_mem_ctx) {
1614 mem_ctx = state->out_mem_ctx;
1615 } else {
1616 mem_ctx = state;
1617 }
1618
1619 status = state->dispatch_recv(subreq, mem_ctx);
1620 TALLOC_FREE(subreq);
1621 if (!NT_STATUS_IS_OK(status)) {
1622 tevent_req_nterror(req, status);
1623 return;
1624 }
1625
1626 /* Copy out parameters */
1627 *state->orig.out.size = *state->tmp.out.size;
1628
1629 /* Copy result */
1630 state->orig.out.result = state->tmp.out.result;
1631
1632 /* Reset temporary structure */
1633 ZERO_STRUCT(state->tmp);
1634
1635 tevent_req_done(req);
1636}
1637
1638NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req,
1639 TALLOC_CTX *mem_ctx,
1640 WERROR *result)
1641{
1642 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1643 req, struct rpccli_PNP_GetDeviceListSize_state);
1644 NTSTATUS status;
1645
1646 if (tevent_req_is_nterror(req, &status)) {
1647 tevent_req_received(req);
1648 return status;
1649 }
1650
1651 /* Steal possbile out parameters to the callers context */
1652 talloc_steal(mem_ctx, state->out_mem_ctx);
1653
1654 /* Return result */
1655 *result = state->orig.out.result;
1656
1657 tevent_req_received(req);
1658 return NT_STATUS_OK;
1659}
1660
1661NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
1662 TALLOC_CTX *mem_ctx,
1663 const char *devicename /* [in] [unique,charset(UTF16)] */,
1664 uint32_t *size /* [out] [ref] */,
1665 uint32_t flags /* [in] */,
1666 WERROR *werror)
1667{
1668 struct PNP_GetDeviceListSize r;
1669 NTSTATUS status;
1670
1671 /* In parameters */
1672 r.in.devicename = devicename;
1673 r.in.flags = flags;
1674
1675 status = cli->dispatch(cli,
1676 mem_ctx,
1677 &ndr_table_ntsvcs,
1678 NDR_PNP_GETDEVICELISTSIZE,
1679 &r);
1680
1681 if (!NT_STATUS_IS_OK(status)) {
1682 return status;
1683 }
1684
1685 if (NT_STATUS_IS_ERR(status)) {
1686 return status;
1687 }
1688
1689 /* Return variables */
1690 *size = *r.out.size;
1691
1692 /* Return result */
1693 if (werror) {
1694 *werror = r.out.result;
1695 }
1696
1697 return werror_to_ntstatus(r.out.result);
1698}
1699
1700struct rpccli_PNP_GetDepth_state {
1701 struct PNP_GetDepth orig;
1702 struct PNP_GetDepth tmp;
1703 TALLOC_CTX *out_mem_ctx;
1704 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1705};
1706
1707static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq);
1708
1709struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx,
1710 struct tevent_context *ev,
1711 struct rpc_pipe_client *cli)
1712{
1713 struct tevent_req *req;
1714 struct rpccli_PNP_GetDepth_state *state;
1715 struct tevent_req *subreq;
1716
1717 req = tevent_req_create(mem_ctx, &state,
1718 struct rpccli_PNP_GetDepth_state);
1719 if (req == NULL) {
1720 return NULL;
1721 }
1722 state->out_mem_ctx = NULL;
1723 state->dispatch_recv = cli->dispatch_recv;
1724
1725 /* In parameters */
1726
1727 /* Out parameters */
1728
1729 /* Result */
1730 ZERO_STRUCT(state->orig.out.result);
1731
1732 /* make a temporary copy, that we pass to the dispatch function */
1733 state->tmp = state->orig;
1734
1735 subreq = cli->dispatch_send(state, ev, cli,
1736 &ndr_table_ntsvcs,
1737 NDR_PNP_GETDEPTH,
1738 &state->tmp);
1739 if (tevent_req_nomem(subreq, req)) {
1740 return tevent_req_post(req, ev);
1741 }
1742 tevent_req_set_callback(subreq, rpccli_PNP_GetDepth_done, req);
1743 return req;
1744}
1745
1746static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq)
1747{
1748 struct tevent_req *req = tevent_req_callback_data(
1749 subreq, struct tevent_req);
1750 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1751 req, struct rpccli_PNP_GetDepth_state);
1752 NTSTATUS status;
1753 TALLOC_CTX *mem_ctx;
1754
1755 if (state->out_mem_ctx) {
1756 mem_ctx = state->out_mem_ctx;
1757 } else {
1758 mem_ctx = state;
1759 }
1760
1761 status = state->dispatch_recv(subreq, mem_ctx);
1762 TALLOC_FREE(subreq);
1763 if (!NT_STATUS_IS_OK(status)) {
1764 tevent_req_nterror(req, status);
1765 return;
1766 }
1767
1768 /* Copy out parameters */
1769
1770 /* Copy result */
1771 state->orig.out.result = state->tmp.out.result;
1772
1773 /* Reset temporary structure */
1774 ZERO_STRUCT(state->tmp);
1775
1776 tevent_req_done(req);
1777}
1778
1779NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req,
1780 TALLOC_CTX *mem_ctx,
1781 WERROR *result)
1782{
1783 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1784 req, struct rpccli_PNP_GetDepth_state);
1785 NTSTATUS status;
1786
1787 if (tevent_req_is_nterror(req, &status)) {
1788 tevent_req_received(req);
1789 return status;
1790 }
1791
1792 /* Steal possbile out parameters to the callers context */
1793 talloc_steal(mem_ctx, state->out_mem_ctx);
1794
1795 /* Return result */
1796 *result = state->orig.out.result;
1797
1798 tevent_req_received(req);
1799 return NT_STATUS_OK;
1800}
1801
1802NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
1803 TALLOC_CTX *mem_ctx,
1804 WERROR *werror)
1805{
1806 struct PNP_GetDepth r;
1807 NTSTATUS status;
1808
1809 /* In parameters */
1810
1811 status = cli->dispatch(cli,
1812 mem_ctx,
1813 &ndr_table_ntsvcs,
1814 NDR_PNP_GETDEPTH,
1815 &r);
1816
1817 if (!NT_STATUS_IS_OK(status)) {
1818 return status;
1819 }
1820
1821 if (NT_STATUS_IS_ERR(status)) {
1822 return status;
1823 }
1824
1825 /* Return variables */
1826
1827 /* Return result */
1828 if (werror) {
1829 *werror = r.out.result;
1830 }
1831
1832 return werror_to_ntstatus(r.out.result);
1833}
1834
1835struct rpccli_PNP_GetDeviceRegProp_state {
1836 struct PNP_GetDeviceRegProp orig;
1837 struct PNP_GetDeviceRegProp tmp;
1838 TALLOC_CTX *out_mem_ctx;
1839 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1840};
1841
1842static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq);
1843
1844struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
1845 struct tevent_context *ev,
1846 struct rpc_pipe_client *cli,
1847 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
1848 uint32_t _property /* [in] */,
1849 enum winreg_Type *_reg_data_type /* [in,out] [ref] */,
1850 uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1851 uint32_t *_buffer_size /* [in,out] [ref] */,
1852 uint32_t *_needed /* [in,out] [ref] */,
1853 uint32_t _flags /* [in] */)
1854{
1855 struct tevent_req *req;
1856 struct rpccli_PNP_GetDeviceRegProp_state *state;
1857 struct tevent_req *subreq;
1858
1859 req = tevent_req_create(mem_ctx, &state,
1860 struct rpccli_PNP_GetDeviceRegProp_state);
1861 if (req == NULL) {
1862 return NULL;
1863 }
1864 state->out_mem_ctx = NULL;
1865 state->dispatch_recv = cli->dispatch_recv;
1866
1867 /* In parameters */
1868 state->orig.in.devicepath = _devicepath;
1869 state->orig.in.property = _property;
1870 state->orig.in.reg_data_type = _reg_data_type;
1871 state->orig.in.buffer_size = _buffer_size;
1872 state->orig.in.needed = _needed;
1873 state->orig.in.flags = _flags;
1874
1875 /* Out parameters */
1876 state->orig.out.reg_data_type = _reg_data_type;
1877 state->orig.out.buffer = _buffer;
1878 state->orig.out.buffer_size = _buffer_size;
1879 state->orig.out.needed = _needed;
1880
1881 /* Result */
1882 ZERO_STRUCT(state->orig.out.result);
1883
1884 state->out_mem_ctx = talloc_named_const(state, 0,
1885 "rpccli_PNP_GetDeviceRegProp_out_memory");
1886 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1887 return tevent_req_post(req, ev);
1888 }
1889
1890 /* make a temporary copy, that we pass to the dispatch function */
1891 state->tmp = state->orig;
1892
1893 subreq = cli->dispatch_send(state, ev, cli,
1894 &ndr_table_ntsvcs,
1895 NDR_PNP_GETDEVICEREGPROP,
1896 &state->tmp);
1897 if (tevent_req_nomem(subreq, req)) {
1898 return tevent_req_post(req, ev);
1899 }
1900 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceRegProp_done, req);
1901 return req;
1902}
1903
1904static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq)
1905{
1906 struct tevent_req *req = tevent_req_callback_data(
1907 subreq, struct tevent_req);
1908 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1909 req, struct rpccli_PNP_GetDeviceRegProp_state);
1910 NTSTATUS status;
1911 TALLOC_CTX *mem_ctx;
1912
1913 if (state->out_mem_ctx) {
1914 mem_ctx = state->out_mem_ctx;
1915 } else {
1916 mem_ctx = state;
1917 }
1918
1919 status = state->dispatch_recv(subreq, mem_ctx);
1920 TALLOC_FREE(subreq);
1921 if (!NT_STATUS_IS_OK(status)) {
1922 tevent_req_nterror(req, status);
1923 return;
1924 }
1925
1926 /* Copy out parameters */
1927 *state->orig.out.reg_data_type = *state->tmp.out.reg_data_type;
1928 if ((*state->tmp.out.buffer_size) > (*state->tmp.in.buffer_size)) {
1929 tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
1930 return;
1931 }
1932 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.buffer_size) * sizeof(*state->orig.out.buffer));
1933 *state->orig.out.buffer_size = *state->tmp.out.buffer_size;
1934 *state->orig.out.needed = *state->tmp.out.needed;
1935
1936 /* Copy result */
1937 state->orig.out.result = state->tmp.out.result;
1938
1939 /* Reset temporary structure */
1940 ZERO_STRUCT(state->tmp);
1941
1942 tevent_req_done(req);
1943}
1944
1945NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req,
1946 TALLOC_CTX *mem_ctx,
1947 WERROR *result)
1948{
1949 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1950 req, struct rpccli_PNP_GetDeviceRegProp_state);
1951 NTSTATUS status;
1952
1953 if (tevent_req_is_nterror(req, &status)) {
1954 tevent_req_received(req);
1955 return status;
1956 }
1957
1958 /* Steal possbile out parameters to the callers context */
1959 talloc_steal(mem_ctx, state->out_mem_ctx);
1960
1961 /* Return result */
1962 *result = state->orig.out.result;
1963
1964 tevent_req_received(req);
1965 return NT_STATUS_OK;
1966}
1967
1968NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
1969 TALLOC_CTX *mem_ctx,
1970 const char *devicepath /* [in] [ref,charset(UTF16)] */,
1971 uint32_t property /* [in] */,
1972 enum winreg_Type *reg_data_type /* [in,out] [ref] */,
1973 uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1974 uint32_t *buffer_size /* [in,out] [ref] */,
1975 uint32_t *needed /* [in,out] [ref] */,
1976 uint32_t flags /* [in] */,
1977 WERROR *werror)
1978{
1979 struct PNP_GetDeviceRegProp r;
1980 NTSTATUS status;
1981
1982 /* In parameters */
1983 r.in.devicepath = devicepath;
1984 r.in.property = property;
1985 r.in.reg_data_type = reg_data_type;
1986 r.in.buffer_size = buffer_size;
1987 r.in.needed = needed;
1988 r.in.flags = flags;
1989
1990 status = cli->dispatch(cli,
1991 mem_ctx,
1992 &ndr_table_ntsvcs,
1993 NDR_PNP_GETDEVICEREGPROP,
1994 &r);
1995
1996 if (!NT_STATUS_IS_OK(status)) {
1997 return status;
1998 }
1999
2000 if (NT_STATUS_IS_ERR(status)) {
2001 return status;
2002 }
2003
2004 /* Return variables */
2005 *reg_data_type = *r.out.reg_data_type;
2006 if ((*r.out.buffer_size) > (*r.in.buffer_size)) {
2007 return NT_STATUS_INVALID_NETWORK_RESPONSE;
2008 }
2009 memcpy(buffer, r.out.buffer, (*r.out.buffer_size) * sizeof(*buffer));
2010 *buffer_size = *r.out.buffer_size;
2011 *needed = *r.out.needed;
2012
2013 /* Return result */
2014 if (werror) {
2015 *werror = r.out.result;
2016 }
2017
2018 return werror_to_ntstatus(r.out.result);
2019}
2020
2021struct rpccli_PNP_SetDeviceRegProp_state {
2022 struct PNP_SetDeviceRegProp orig;
2023 struct PNP_SetDeviceRegProp tmp;
2024 TALLOC_CTX *out_mem_ctx;
2025 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2026};
2027
2028static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq);
2029
2030struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
2031 struct tevent_context *ev,
2032 struct rpc_pipe_client *cli)
2033{
2034 struct tevent_req *req;
2035 struct rpccli_PNP_SetDeviceRegProp_state *state;
2036 struct tevent_req *subreq;
2037
2038 req = tevent_req_create(mem_ctx, &state,
2039 struct rpccli_PNP_SetDeviceRegProp_state);
2040 if (req == NULL) {
2041 return NULL;
2042 }
2043 state->out_mem_ctx = NULL;
2044 state->dispatch_recv = cli->dispatch_recv;
2045
2046 /* In parameters */
2047
2048 /* Out parameters */
2049
2050 /* Result */
2051 ZERO_STRUCT(state->orig.out.result);
2052
2053 /* make a temporary copy, that we pass to the dispatch function */
2054 state->tmp = state->orig;
2055
2056 subreq = cli->dispatch_send(state, ev, cli,
2057 &ndr_table_ntsvcs,
2058 NDR_PNP_SETDEVICEREGPROP,
2059 &state->tmp);
2060 if (tevent_req_nomem(subreq, req)) {
2061 return tevent_req_post(req, ev);
2062 }
2063 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceRegProp_done, req);
2064 return req;
2065}
2066
2067static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq)
2068{
2069 struct tevent_req *req = tevent_req_callback_data(
2070 subreq, struct tevent_req);
2071 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2072 req, struct rpccli_PNP_SetDeviceRegProp_state);
2073 NTSTATUS status;
2074 TALLOC_CTX *mem_ctx;
2075
2076 if (state->out_mem_ctx) {
2077 mem_ctx = state->out_mem_ctx;
2078 } else {
2079 mem_ctx = state;
2080 }
2081
2082 status = state->dispatch_recv(subreq, mem_ctx);
2083 TALLOC_FREE(subreq);
2084 if (!NT_STATUS_IS_OK(status)) {
2085 tevent_req_nterror(req, status);
2086 return;
2087 }
2088
2089 /* Copy out parameters */
2090
2091 /* Copy result */
2092 state->orig.out.result = state->tmp.out.result;
2093
2094 /* Reset temporary structure */
2095 ZERO_STRUCT(state->tmp);
2096
2097 tevent_req_done(req);
2098}
2099
2100NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req,
2101 TALLOC_CTX *mem_ctx,
2102 WERROR *result)
2103{
2104 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2105 req, struct rpccli_PNP_SetDeviceRegProp_state);
2106 NTSTATUS status;
2107
2108 if (tevent_req_is_nterror(req, &status)) {
2109 tevent_req_received(req);
2110 return status;
2111 }
2112
2113 /* Steal possbile out parameters to the callers context */
2114 talloc_steal(mem_ctx, state->out_mem_ctx);
2115
2116 /* Return result */
2117 *result = state->orig.out.result;
2118
2119 tevent_req_received(req);
2120 return NT_STATUS_OK;
2121}
2122
2123NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
2124 TALLOC_CTX *mem_ctx,
2125 WERROR *werror)
2126{
2127 struct PNP_SetDeviceRegProp r;
2128 NTSTATUS status;
2129
2130 /* In parameters */
2131
2132 status = cli->dispatch(cli,
2133 mem_ctx,
2134 &ndr_table_ntsvcs,
2135 NDR_PNP_SETDEVICEREGPROP,
2136 &r);
2137
2138 if (!NT_STATUS_IS_OK(status)) {
2139 return status;
2140 }
2141
2142 if (NT_STATUS_IS_ERR(status)) {
2143 return status;
2144 }
2145
2146 /* Return variables */
2147
2148 /* Return result */
2149 if (werror) {
2150 *werror = r.out.result;
2151 }
2152
2153 return werror_to_ntstatus(r.out.result);
2154}
2155
2156struct rpccli_PNP_GetClassInstance_state {
2157 struct PNP_GetClassInstance orig;
2158 struct PNP_GetClassInstance tmp;
2159 TALLOC_CTX *out_mem_ctx;
2160 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2161};
2162
2163static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq);
2164
2165struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx,
2166 struct tevent_context *ev,
2167 struct rpc_pipe_client *cli)
2168{
2169 struct tevent_req *req;
2170 struct rpccli_PNP_GetClassInstance_state *state;
2171 struct tevent_req *subreq;
2172
2173 req = tevent_req_create(mem_ctx, &state,
2174 struct rpccli_PNP_GetClassInstance_state);
2175 if (req == NULL) {
2176 return NULL;
2177 }
2178 state->out_mem_ctx = NULL;
2179 state->dispatch_recv = cli->dispatch_recv;
2180
2181 /* In parameters */
2182
2183 /* Out parameters */
2184
2185 /* Result */
2186 ZERO_STRUCT(state->orig.out.result);
2187
2188 /* make a temporary copy, that we pass to the dispatch function */
2189 state->tmp = state->orig;
2190
2191 subreq = cli->dispatch_send(state, ev, cli,
2192 &ndr_table_ntsvcs,
2193 NDR_PNP_GETCLASSINSTANCE,
2194 &state->tmp);
2195 if (tevent_req_nomem(subreq, req)) {
2196 return tevent_req_post(req, ev);
2197 }
2198 tevent_req_set_callback(subreq, rpccli_PNP_GetClassInstance_done, req);
2199 return req;
2200}
2201
2202static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq)
2203{
2204 struct tevent_req *req = tevent_req_callback_data(
2205 subreq, struct tevent_req);
2206 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2207 req, struct rpccli_PNP_GetClassInstance_state);
2208 NTSTATUS status;
2209 TALLOC_CTX *mem_ctx;
2210
2211 if (state->out_mem_ctx) {
2212 mem_ctx = state->out_mem_ctx;
2213 } else {
2214 mem_ctx = state;
2215 }
2216
2217 status = state->dispatch_recv(subreq, mem_ctx);
2218 TALLOC_FREE(subreq);
2219 if (!NT_STATUS_IS_OK(status)) {
2220 tevent_req_nterror(req, status);
2221 return;
2222 }
2223
2224 /* Copy out parameters */
2225
2226 /* Copy result */
2227 state->orig.out.result = state->tmp.out.result;
2228
2229 /* Reset temporary structure */
2230 ZERO_STRUCT(state->tmp);
2231
2232 tevent_req_done(req);
2233}
2234
2235NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req,
2236 TALLOC_CTX *mem_ctx,
2237 WERROR *result)
2238{
2239 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2240 req, struct rpccli_PNP_GetClassInstance_state);
2241 NTSTATUS status;
2242
2243 if (tevent_req_is_nterror(req, &status)) {
2244 tevent_req_received(req);
2245 return status;
2246 }
2247
2248 /* Steal possbile out parameters to the callers context */
2249 talloc_steal(mem_ctx, state->out_mem_ctx);
2250
2251 /* Return result */
2252 *result = state->orig.out.result;
2253
2254 tevent_req_received(req);
2255 return NT_STATUS_OK;
2256}
2257
2258NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
2259 TALLOC_CTX *mem_ctx,
2260 WERROR *werror)
2261{
2262 struct PNP_GetClassInstance r;
2263 NTSTATUS status;
2264
2265 /* In parameters */
2266
2267 status = cli->dispatch(cli,
2268 mem_ctx,
2269 &ndr_table_ntsvcs,
2270 NDR_PNP_GETCLASSINSTANCE,
2271 &r);
2272
2273 if (!NT_STATUS_IS_OK(status)) {
2274 return status;
2275 }
2276
2277 if (NT_STATUS_IS_ERR(status)) {
2278 return status;
2279 }
2280
2281 /* Return variables */
2282
2283 /* Return result */
2284 if (werror) {
2285 *werror = r.out.result;
2286 }
2287
2288 return werror_to_ntstatus(r.out.result);
2289}
2290
2291struct rpccli_PNP_CreateKey_state {
2292 struct PNP_CreateKey orig;
2293 struct PNP_CreateKey tmp;
2294 TALLOC_CTX *out_mem_ctx;
2295 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2296};
2297
2298static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq);
2299
2300struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx,
2301 struct tevent_context *ev,
2302 struct rpc_pipe_client *cli)
2303{
2304 struct tevent_req *req;
2305 struct rpccli_PNP_CreateKey_state *state;
2306 struct tevent_req *subreq;
2307
2308 req = tevent_req_create(mem_ctx, &state,
2309 struct rpccli_PNP_CreateKey_state);
2310 if (req == NULL) {
2311 return NULL;
2312 }
2313 state->out_mem_ctx = NULL;
2314 state->dispatch_recv = cli->dispatch_recv;
2315
2316 /* In parameters */
2317
2318 /* Out parameters */
2319
2320 /* Result */
2321 ZERO_STRUCT(state->orig.out.result);
2322
2323 /* make a temporary copy, that we pass to the dispatch function */
2324 state->tmp = state->orig;
2325
2326 subreq = cli->dispatch_send(state, ev, cli,
2327 &ndr_table_ntsvcs,
2328 NDR_PNP_CREATEKEY,
2329 &state->tmp);
2330 if (tevent_req_nomem(subreq, req)) {
2331 return tevent_req_post(req, ev);
2332 }
2333 tevent_req_set_callback(subreq, rpccli_PNP_CreateKey_done, req);
2334 return req;
2335}
2336
2337static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq)
2338{
2339 struct tevent_req *req = tevent_req_callback_data(
2340 subreq, struct tevent_req);
2341 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2342 req, struct rpccli_PNP_CreateKey_state);
2343 NTSTATUS status;
2344 TALLOC_CTX *mem_ctx;
2345
2346 if (state->out_mem_ctx) {
2347 mem_ctx = state->out_mem_ctx;
2348 } else {
2349 mem_ctx = state;
2350 }
2351
2352 status = state->dispatch_recv(subreq, mem_ctx);
2353 TALLOC_FREE(subreq);
2354 if (!NT_STATUS_IS_OK(status)) {
2355 tevent_req_nterror(req, status);
2356 return;
2357 }
2358
2359 /* Copy out parameters */
2360
2361 /* Copy result */
2362 state->orig.out.result = state->tmp.out.result;
2363
2364 /* Reset temporary structure */
2365 ZERO_STRUCT(state->tmp);
2366
2367 tevent_req_done(req);
2368}
2369
2370NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req,
2371 TALLOC_CTX *mem_ctx,
2372 WERROR *result)
2373{
2374 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2375 req, struct rpccli_PNP_CreateKey_state);
2376 NTSTATUS status;
2377
2378 if (tevent_req_is_nterror(req, &status)) {
2379 tevent_req_received(req);
2380 return status;
2381 }
2382
2383 /* Steal possbile out parameters to the callers context */
2384 talloc_steal(mem_ctx, state->out_mem_ctx);
2385
2386 /* Return result */
2387 *result = state->orig.out.result;
2388
2389 tevent_req_received(req);
2390 return NT_STATUS_OK;
2391}
2392
2393NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
2394 TALLOC_CTX *mem_ctx,
2395 WERROR *werror)
2396{
2397 struct PNP_CreateKey r;
2398 NTSTATUS status;
2399
2400 /* In parameters */
2401
2402 status = cli->dispatch(cli,
2403 mem_ctx,
2404 &ndr_table_ntsvcs,
2405 NDR_PNP_CREATEKEY,
2406 &r);
2407
2408 if (!NT_STATUS_IS_OK(status)) {
2409 return status;
2410 }
2411
2412 if (NT_STATUS_IS_ERR(status)) {
2413 return status;
2414 }
2415
2416 /* Return variables */
2417
2418 /* Return result */
2419 if (werror) {
2420 *werror = r.out.result;
2421 }
2422
2423 return werror_to_ntstatus(r.out.result);
2424}
2425
2426struct rpccli_PNP_DeleteRegistryKey_state {
2427 struct PNP_DeleteRegistryKey orig;
2428 struct PNP_DeleteRegistryKey tmp;
2429 TALLOC_CTX *out_mem_ctx;
2430 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2431};
2432
2433static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq);
2434
2435struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx,
2436 struct tevent_context *ev,
2437 struct rpc_pipe_client *cli)
2438{
2439 struct tevent_req *req;
2440 struct rpccli_PNP_DeleteRegistryKey_state *state;
2441 struct tevent_req *subreq;
2442
2443 req = tevent_req_create(mem_ctx, &state,
2444 struct rpccli_PNP_DeleteRegistryKey_state);
2445 if (req == NULL) {
2446 return NULL;
2447 }
2448 state->out_mem_ctx = NULL;
2449 state->dispatch_recv = cli->dispatch_recv;
2450
2451 /* In parameters */
2452
2453 /* Out parameters */
2454
2455 /* Result */
2456 ZERO_STRUCT(state->orig.out.result);
2457
2458 /* make a temporary copy, that we pass to the dispatch function */
2459 state->tmp = state->orig;
2460
2461 subreq = cli->dispatch_send(state, ev, cli,
2462 &ndr_table_ntsvcs,
2463 NDR_PNP_DELETEREGISTRYKEY,
2464 &state->tmp);
2465 if (tevent_req_nomem(subreq, req)) {
2466 return tevent_req_post(req, ev);
2467 }
2468 tevent_req_set_callback(subreq, rpccli_PNP_DeleteRegistryKey_done, req);
2469 return req;
2470}
2471
2472static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq)
2473{
2474 struct tevent_req *req = tevent_req_callback_data(
2475 subreq, struct tevent_req);
2476 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2477 req, struct rpccli_PNP_DeleteRegistryKey_state);
2478 NTSTATUS status;
2479 TALLOC_CTX *mem_ctx;
2480
2481 if (state->out_mem_ctx) {
2482 mem_ctx = state->out_mem_ctx;
2483 } else {
2484 mem_ctx = state;
2485 }
2486
2487 status = state->dispatch_recv(subreq, mem_ctx);
2488 TALLOC_FREE(subreq);
2489 if (!NT_STATUS_IS_OK(status)) {
2490 tevent_req_nterror(req, status);
2491 return;
2492 }
2493
2494 /* Copy out parameters */
2495
2496 /* Copy result */
2497 state->orig.out.result = state->tmp.out.result;
2498
2499 /* Reset temporary structure */
2500 ZERO_STRUCT(state->tmp);
2501
2502 tevent_req_done(req);
2503}
2504
2505NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req,
2506 TALLOC_CTX *mem_ctx,
2507 WERROR *result)
2508{
2509 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2510 req, struct rpccli_PNP_DeleteRegistryKey_state);
2511 NTSTATUS status;
2512
2513 if (tevent_req_is_nterror(req, &status)) {
2514 tevent_req_received(req);
2515 return status;
2516 }
2517
2518 /* Steal possbile out parameters to the callers context */
2519 talloc_steal(mem_ctx, state->out_mem_ctx);
2520
2521 /* Return result */
2522 *result = state->orig.out.result;
2523
2524 tevent_req_received(req);
2525 return NT_STATUS_OK;
2526}
2527
2528NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
2529 TALLOC_CTX *mem_ctx,
2530 WERROR *werror)
2531{
2532 struct PNP_DeleteRegistryKey r;
2533 NTSTATUS status;
2534
2535 /* In parameters */
2536
2537 status = cli->dispatch(cli,
2538 mem_ctx,
2539 &ndr_table_ntsvcs,
2540 NDR_PNP_DELETEREGISTRYKEY,
2541 &r);
2542
2543 if (!NT_STATUS_IS_OK(status)) {
2544 return status;
2545 }
2546
2547 if (NT_STATUS_IS_ERR(status)) {
2548 return status;
2549 }
2550
2551 /* Return variables */
2552
2553 /* Return result */
2554 if (werror) {
2555 *werror = r.out.result;
2556 }
2557
2558 return werror_to_ntstatus(r.out.result);
2559}
2560
2561struct rpccli_PNP_GetClassCount_state {
2562 struct PNP_GetClassCount orig;
2563 struct PNP_GetClassCount tmp;
2564 TALLOC_CTX *out_mem_ctx;
2565 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2566};
2567
2568static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq);
2569
2570struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx,
2571 struct tevent_context *ev,
2572 struct rpc_pipe_client *cli)
2573{
2574 struct tevent_req *req;
2575 struct rpccli_PNP_GetClassCount_state *state;
2576 struct tevent_req *subreq;
2577
2578 req = tevent_req_create(mem_ctx, &state,
2579 struct rpccli_PNP_GetClassCount_state);
2580 if (req == NULL) {
2581 return NULL;
2582 }
2583 state->out_mem_ctx = NULL;
2584 state->dispatch_recv = cli->dispatch_recv;
2585
2586 /* In parameters */
2587
2588 /* Out parameters */
2589
2590 /* Result */
2591 ZERO_STRUCT(state->orig.out.result);
2592
2593 /* make a temporary copy, that we pass to the dispatch function */
2594 state->tmp = state->orig;
2595
2596 subreq = cli->dispatch_send(state, ev, cli,
2597 &ndr_table_ntsvcs,
2598 NDR_PNP_GETCLASSCOUNT,
2599 &state->tmp);
2600 if (tevent_req_nomem(subreq, req)) {
2601 return tevent_req_post(req, ev);
2602 }
2603 tevent_req_set_callback(subreq, rpccli_PNP_GetClassCount_done, req);
2604 return req;
2605}
2606
2607static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq)
2608{
2609 struct tevent_req *req = tevent_req_callback_data(
2610 subreq, struct tevent_req);
2611 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2612 req, struct rpccli_PNP_GetClassCount_state);
2613 NTSTATUS status;
2614 TALLOC_CTX *mem_ctx;
2615
2616 if (state->out_mem_ctx) {
2617 mem_ctx = state->out_mem_ctx;
2618 } else {
2619 mem_ctx = state;
2620 }
2621
2622 status = state->dispatch_recv(subreq, mem_ctx);
2623 TALLOC_FREE(subreq);
2624 if (!NT_STATUS_IS_OK(status)) {
2625 tevent_req_nterror(req, status);
2626 return;
2627 }
2628
2629 /* Copy out parameters */
2630
2631 /* Copy result */
2632 state->orig.out.result = state->tmp.out.result;
2633
2634 /* Reset temporary structure */
2635 ZERO_STRUCT(state->tmp);
2636
2637 tevent_req_done(req);
2638}
2639
2640NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req,
2641 TALLOC_CTX *mem_ctx,
2642 WERROR *result)
2643{
2644 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2645 req, struct rpccli_PNP_GetClassCount_state);
2646 NTSTATUS status;
2647
2648 if (tevent_req_is_nterror(req, &status)) {
2649 tevent_req_received(req);
2650 return status;
2651 }
2652
2653 /* Steal possbile out parameters to the callers context */
2654 talloc_steal(mem_ctx, state->out_mem_ctx);
2655
2656 /* Return result */
2657 *result = state->orig.out.result;
2658
2659 tevent_req_received(req);
2660 return NT_STATUS_OK;
2661}
2662
2663NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
2664 TALLOC_CTX *mem_ctx,
2665 WERROR *werror)
2666{
2667 struct PNP_GetClassCount r;
2668 NTSTATUS status;
2669
2670 /* In parameters */
2671
2672 status = cli->dispatch(cli,
2673 mem_ctx,
2674 &ndr_table_ntsvcs,
2675 NDR_PNP_GETCLASSCOUNT,
2676 &r);
2677
2678 if (!NT_STATUS_IS_OK(status)) {
2679 return status;
2680 }
2681
2682 if (NT_STATUS_IS_ERR(status)) {
2683 return status;
2684 }
2685
2686 /* Return variables */
2687
2688 /* Return result */
2689 if (werror) {
2690 *werror = r.out.result;
2691 }
2692
2693 return werror_to_ntstatus(r.out.result);
2694}
2695
2696struct rpccli_PNP_GetClassName_state {
2697 struct PNP_GetClassName orig;
2698 struct PNP_GetClassName tmp;
2699 TALLOC_CTX *out_mem_ctx;
2700 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2701};
2702
2703static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq);
2704
2705struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx,
2706 struct tevent_context *ev,
2707 struct rpc_pipe_client *cli)
2708{
2709 struct tevent_req *req;
2710 struct rpccli_PNP_GetClassName_state *state;
2711 struct tevent_req *subreq;
2712
2713 req = tevent_req_create(mem_ctx, &state,
2714 struct rpccli_PNP_GetClassName_state);
2715 if (req == NULL) {
2716 return NULL;
2717 }
2718 state->out_mem_ctx = NULL;
2719 state->dispatch_recv = cli->dispatch_recv;
2720
2721 /* In parameters */
2722
2723 /* Out parameters */
2724
2725 /* Result */
2726 ZERO_STRUCT(state->orig.out.result);
2727
2728 /* make a temporary copy, that we pass to the dispatch function */
2729 state->tmp = state->orig;
2730
2731 subreq = cli->dispatch_send(state, ev, cli,
2732 &ndr_table_ntsvcs,
2733 NDR_PNP_GETCLASSNAME,
2734 &state->tmp);
2735 if (tevent_req_nomem(subreq, req)) {
2736 return tevent_req_post(req, ev);
2737 }
2738 tevent_req_set_callback(subreq, rpccli_PNP_GetClassName_done, req);
2739 return req;
2740}
2741
2742static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq)
2743{
2744 struct tevent_req *req = tevent_req_callback_data(
2745 subreq, struct tevent_req);
2746 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2747 req, struct rpccli_PNP_GetClassName_state);
2748 NTSTATUS status;
2749 TALLOC_CTX *mem_ctx;
2750
2751 if (state->out_mem_ctx) {
2752 mem_ctx = state->out_mem_ctx;
2753 } else {
2754 mem_ctx = state;
2755 }
2756
2757 status = state->dispatch_recv(subreq, mem_ctx);
2758 TALLOC_FREE(subreq);
2759 if (!NT_STATUS_IS_OK(status)) {
2760 tevent_req_nterror(req, status);
2761 return;
2762 }
2763
2764 /* Copy out parameters */
2765
2766 /* Copy result */
2767 state->orig.out.result = state->tmp.out.result;
2768
2769 /* Reset temporary structure */
2770 ZERO_STRUCT(state->tmp);
2771
2772 tevent_req_done(req);
2773}
2774
2775NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req,
2776 TALLOC_CTX *mem_ctx,
2777 WERROR *result)
2778{
2779 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2780 req, struct rpccli_PNP_GetClassName_state);
2781 NTSTATUS status;
2782
2783 if (tevent_req_is_nterror(req, &status)) {
2784 tevent_req_received(req);
2785 return status;
2786 }
2787
2788 /* Steal possbile out parameters to the callers context */
2789 talloc_steal(mem_ctx, state->out_mem_ctx);
2790
2791 /* Return result */
2792 *result = state->orig.out.result;
2793
2794 tevent_req_received(req);
2795 return NT_STATUS_OK;
2796}
2797
2798NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
2799 TALLOC_CTX *mem_ctx,
2800 WERROR *werror)
2801{
2802 struct PNP_GetClassName r;
2803 NTSTATUS status;
2804
2805 /* In parameters */
2806
2807 status = cli->dispatch(cli,
2808 mem_ctx,
2809 &ndr_table_ntsvcs,
2810 NDR_PNP_GETCLASSNAME,
2811 &r);
2812
2813 if (!NT_STATUS_IS_OK(status)) {
2814 return status;
2815 }
2816
2817 if (NT_STATUS_IS_ERR(status)) {
2818 return status;
2819 }
2820
2821 /* Return variables */
2822
2823 /* Return result */
2824 if (werror) {
2825 *werror = r.out.result;
2826 }
2827
2828 return werror_to_ntstatus(r.out.result);
2829}
2830
2831struct rpccli_PNP_DeleteClassKey_state {
2832 struct PNP_DeleteClassKey orig;
2833 struct PNP_DeleteClassKey tmp;
2834 TALLOC_CTX *out_mem_ctx;
2835 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2836};
2837
2838static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq);
2839
2840struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx,
2841 struct tevent_context *ev,
2842 struct rpc_pipe_client *cli)
2843{
2844 struct tevent_req *req;
2845 struct rpccli_PNP_DeleteClassKey_state *state;
2846 struct tevent_req *subreq;
2847
2848 req = tevent_req_create(mem_ctx, &state,
2849 struct rpccli_PNP_DeleteClassKey_state);
2850 if (req == NULL) {
2851 return NULL;
2852 }
2853 state->out_mem_ctx = NULL;
2854 state->dispatch_recv = cli->dispatch_recv;
2855
2856 /* In parameters */
2857
2858 /* Out parameters */
2859
2860 /* Result */
2861 ZERO_STRUCT(state->orig.out.result);
2862
2863 /* make a temporary copy, that we pass to the dispatch function */
2864 state->tmp = state->orig;
2865
2866 subreq = cli->dispatch_send(state, ev, cli,
2867 &ndr_table_ntsvcs,
2868 NDR_PNP_DELETECLASSKEY,
2869 &state->tmp);
2870 if (tevent_req_nomem(subreq, req)) {
2871 return tevent_req_post(req, ev);
2872 }
2873 tevent_req_set_callback(subreq, rpccli_PNP_DeleteClassKey_done, req);
2874 return req;
2875}
2876
2877static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq)
2878{
2879 struct tevent_req *req = tevent_req_callback_data(
2880 subreq, struct tevent_req);
2881 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2882 req, struct rpccli_PNP_DeleteClassKey_state);
2883 NTSTATUS status;
2884 TALLOC_CTX *mem_ctx;
2885
2886 if (state->out_mem_ctx) {
2887 mem_ctx = state->out_mem_ctx;
2888 } else {
2889 mem_ctx = state;
2890 }
2891
2892 status = state->dispatch_recv(subreq, mem_ctx);
2893 TALLOC_FREE(subreq);
2894 if (!NT_STATUS_IS_OK(status)) {
2895 tevent_req_nterror(req, status);
2896 return;
2897 }
2898
2899 /* Copy out parameters */
2900
2901 /* Copy result */
2902 state->orig.out.result = state->tmp.out.result;
2903
2904 /* Reset temporary structure */
2905 ZERO_STRUCT(state->tmp);
2906
2907 tevent_req_done(req);
2908}
2909
2910NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req,
2911 TALLOC_CTX *mem_ctx,
2912 WERROR *result)
2913{
2914 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2915 req, struct rpccli_PNP_DeleteClassKey_state);
2916 NTSTATUS status;
2917
2918 if (tevent_req_is_nterror(req, &status)) {
2919 tevent_req_received(req);
2920 return status;
2921 }
2922
2923 /* Steal possbile out parameters to the callers context */
2924 talloc_steal(mem_ctx, state->out_mem_ctx);
2925
2926 /* Return result */
2927 *result = state->orig.out.result;
2928
2929 tevent_req_received(req);
2930 return NT_STATUS_OK;
2931}
2932
2933NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
2934 TALLOC_CTX *mem_ctx,
2935 WERROR *werror)
2936{
2937 struct PNP_DeleteClassKey r;
2938 NTSTATUS status;
2939
2940 /* In parameters */
2941
2942 status = cli->dispatch(cli,
2943 mem_ctx,
2944 &ndr_table_ntsvcs,
2945 NDR_PNP_DELETECLASSKEY,
2946 &r);
2947
2948 if (!NT_STATUS_IS_OK(status)) {
2949 return status;
2950 }
2951
2952 if (NT_STATUS_IS_ERR(status)) {
2953 return status;
2954 }
2955
2956 /* Return variables */
2957
2958 /* Return result */
2959 if (werror) {
2960 *werror = r.out.result;
2961 }
2962
2963 return werror_to_ntstatus(r.out.result);
2964}
2965
2966struct rpccli_PNP_GetInterfaceDeviceAlias_state {
2967 struct PNP_GetInterfaceDeviceAlias orig;
2968 struct PNP_GetInterfaceDeviceAlias tmp;
2969 TALLOC_CTX *out_mem_ctx;
2970 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2971};
2972
2973static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq);
2974
2975struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx,
2976 struct tevent_context *ev,
2977 struct rpc_pipe_client *cli)
2978{
2979 struct tevent_req *req;
2980 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state;
2981 struct tevent_req *subreq;
2982
2983 req = tevent_req_create(mem_ctx, &state,
2984 struct rpccli_PNP_GetInterfaceDeviceAlias_state);
2985 if (req == NULL) {
2986 return NULL;
2987 }
2988 state->out_mem_ctx = NULL;
2989 state->dispatch_recv = cli->dispatch_recv;
2990
2991 /* In parameters */
2992
2993 /* Out parameters */
2994
2995 /* Result */
2996 ZERO_STRUCT(state->orig.out.result);
2997
2998 /* make a temporary copy, that we pass to the dispatch function */
2999 state->tmp = state->orig;
3000
3001 subreq = cli->dispatch_send(state, ev, cli,
3002 &ndr_table_ntsvcs,
3003 NDR_PNP_GETINTERFACEDEVICEALIAS,
3004 &state->tmp);
3005 if (tevent_req_nomem(subreq, req)) {
3006 return tevent_req_post(req, ev);
3007 }
3008 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceAlias_done, req);
3009 return req;
3010}
3011
3012static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq)
3013{
3014 struct tevent_req *req = tevent_req_callback_data(
3015 subreq, struct tevent_req);
3016 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3017 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3018 NTSTATUS status;
3019 TALLOC_CTX *mem_ctx;
3020
3021 if (state->out_mem_ctx) {
3022 mem_ctx = state->out_mem_ctx;
3023 } else {
3024 mem_ctx = state;
3025 }
3026
3027 status = state->dispatch_recv(subreq, mem_ctx);
3028 TALLOC_FREE(subreq);
3029 if (!NT_STATUS_IS_OK(status)) {
3030 tevent_req_nterror(req, status);
3031 return;
3032 }
3033
3034 /* Copy out parameters */
3035
3036 /* Copy result */
3037 state->orig.out.result = state->tmp.out.result;
3038
3039 /* Reset temporary structure */
3040 ZERO_STRUCT(state->tmp);
3041
3042 tevent_req_done(req);
3043}
3044
3045NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req,
3046 TALLOC_CTX *mem_ctx,
3047 WERROR *result)
3048{
3049 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3050 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3051 NTSTATUS status;
3052
3053 if (tevent_req_is_nterror(req, &status)) {
3054 tevent_req_received(req);
3055 return status;
3056 }
3057
3058 /* Steal possbile out parameters to the callers context */
3059 talloc_steal(mem_ctx, state->out_mem_ctx);
3060
3061 /* Return result */
3062 *result = state->orig.out.result;
3063
3064 tevent_req_received(req);
3065 return NT_STATUS_OK;
3066}
3067
3068NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
3069 TALLOC_CTX *mem_ctx,
3070 WERROR *werror)
3071{
3072 struct PNP_GetInterfaceDeviceAlias r;
3073 NTSTATUS status;
3074
3075 /* In parameters */
3076
3077 status = cli->dispatch(cli,
3078 mem_ctx,
3079 &ndr_table_ntsvcs,
3080 NDR_PNP_GETINTERFACEDEVICEALIAS,
3081 &r);
3082
3083 if (!NT_STATUS_IS_OK(status)) {
3084 return status;
3085 }
3086
3087 if (NT_STATUS_IS_ERR(status)) {
3088 return status;
3089 }
3090
3091 /* Return variables */
3092
3093 /* Return result */
3094 if (werror) {
3095 *werror = r.out.result;
3096 }
3097
3098 return werror_to_ntstatus(r.out.result);
3099}
3100
3101struct rpccli_PNP_GetInterfaceDeviceList_state {
3102 struct PNP_GetInterfaceDeviceList orig;
3103 struct PNP_GetInterfaceDeviceList tmp;
3104 TALLOC_CTX *out_mem_ctx;
3105 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3106};
3107
3108static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq);
3109
3110struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx,
3111 struct tevent_context *ev,
3112 struct rpc_pipe_client *cli)
3113{
3114 struct tevent_req *req;
3115 struct rpccli_PNP_GetInterfaceDeviceList_state *state;
3116 struct tevent_req *subreq;
3117
3118 req = tevent_req_create(mem_ctx, &state,
3119 struct rpccli_PNP_GetInterfaceDeviceList_state);
3120 if (req == NULL) {
3121 return NULL;
3122 }
3123 state->out_mem_ctx = NULL;
3124 state->dispatch_recv = cli->dispatch_recv;
3125
3126 /* In parameters */
3127
3128 /* Out parameters */
3129
3130 /* Result */
3131 ZERO_STRUCT(state->orig.out.result);
3132
3133 /* make a temporary copy, that we pass to the dispatch function */
3134 state->tmp = state->orig;
3135
3136 subreq = cli->dispatch_send(state, ev, cli,
3137 &ndr_table_ntsvcs,
3138 NDR_PNP_GETINTERFACEDEVICELIST,
3139 &state->tmp);
3140 if (tevent_req_nomem(subreq, req)) {
3141 return tevent_req_post(req, ev);
3142 }
3143 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceList_done, req);
3144 return req;
3145}
3146
3147static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq)
3148{
3149 struct tevent_req *req = tevent_req_callback_data(
3150 subreq, struct tevent_req);
3151 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3152 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3153 NTSTATUS status;
3154 TALLOC_CTX *mem_ctx;
3155
3156 if (state->out_mem_ctx) {
3157 mem_ctx = state->out_mem_ctx;
3158 } else {
3159 mem_ctx = state;
3160 }
3161
3162 status = state->dispatch_recv(subreq, mem_ctx);
3163 TALLOC_FREE(subreq);
3164 if (!NT_STATUS_IS_OK(status)) {
3165 tevent_req_nterror(req, status);
3166 return;
3167 }
3168
3169 /* Copy out parameters */
3170
3171 /* Copy result */
3172 state->orig.out.result = state->tmp.out.result;
3173
3174 /* Reset temporary structure */
3175 ZERO_STRUCT(state->tmp);
3176
3177 tevent_req_done(req);
3178}
3179
3180NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req,
3181 TALLOC_CTX *mem_ctx,
3182 WERROR *result)
3183{
3184 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3185 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3186 NTSTATUS status;
3187
3188 if (tevent_req_is_nterror(req, &status)) {
3189 tevent_req_received(req);
3190 return status;
3191 }
3192
3193 /* Steal possbile out parameters to the callers context */
3194 talloc_steal(mem_ctx, state->out_mem_ctx);
3195
3196 /* Return result */
3197 *result = state->orig.out.result;
3198
3199 tevent_req_received(req);
3200 return NT_STATUS_OK;
3201}
3202
3203NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
3204 TALLOC_CTX *mem_ctx,
3205 WERROR *werror)
3206{
3207 struct PNP_GetInterfaceDeviceList r;
3208 NTSTATUS status;
3209
3210 /* In parameters */
3211
3212 status = cli->dispatch(cli,
3213 mem_ctx,
3214 &ndr_table_ntsvcs,
3215 NDR_PNP_GETINTERFACEDEVICELIST,
3216 &r);
3217
3218 if (!NT_STATUS_IS_OK(status)) {
3219 return status;
3220 }
3221
3222 if (NT_STATUS_IS_ERR(status)) {
3223 return status;
3224 }
3225
3226 /* Return variables */
3227
3228 /* Return result */
3229 if (werror) {
3230 *werror = r.out.result;
3231 }
3232
3233 return werror_to_ntstatus(r.out.result);
3234}
3235
3236struct rpccli_PNP_GetInterfaceDeviceListSize_state {
3237 struct PNP_GetInterfaceDeviceListSize orig;
3238 struct PNP_GetInterfaceDeviceListSize tmp;
3239 TALLOC_CTX *out_mem_ctx;
3240 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3241};
3242
3243static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq);
3244
3245struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx,
3246 struct tevent_context *ev,
3247 struct rpc_pipe_client *cli)
3248{
3249 struct tevent_req *req;
3250 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state;
3251 struct tevent_req *subreq;
3252
3253 req = tevent_req_create(mem_ctx, &state,
3254 struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3255 if (req == NULL) {
3256 return NULL;
3257 }
3258 state->out_mem_ctx = NULL;
3259 state->dispatch_recv = cli->dispatch_recv;
3260
3261 /* In parameters */
3262
3263 /* Out parameters */
3264
3265 /* Result */
3266 ZERO_STRUCT(state->orig.out.result);
3267
3268 /* make a temporary copy, that we pass to the dispatch function */
3269 state->tmp = state->orig;
3270
3271 subreq = cli->dispatch_send(state, ev, cli,
3272 &ndr_table_ntsvcs,
3273 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3274 &state->tmp);
3275 if (tevent_req_nomem(subreq, req)) {
3276 return tevent_req_post(req, ev);
3277 }
3278 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceListSize_done, req);
3279 return req;
3280}
3281
3282static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq)
3283{
3284 struct tevent_req *req = tevent_req_callback_data(
3285 subreq, struct tevent_req);
3286 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3287 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3288 NTSTATUS status;
3289 TALLOC_CTX *mem_ctx;
3290
3291 if (state->out_mem_ctx) {
3292 mem_ctx = state->out_mem_ctx;
3293 } else {
3294 mem_ctx = state;
3295 }
3296
3297 status = state->dispatch_recv(subreq, mem_ctx);
3298 TALLOC_FREE(subreq);
3299 if (!NT_STATUS_IS_OK(status)) {
3300 tevent_req_nterror(req, status);
3301 return;
3302 }
3303
3304 /* Copy out parameters */
3305
3306 /* Copy result */
3307 state->orig.out.result = state->tmp.out.result;
3308
3309 /* Reset temporary structure */
3310 ZERO_STRUCT(state->tmp);
3311
3312 tevent_req_done(req);
3313}
3314
3315NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req,
3316 TALLOC_CTX *mem_ctx,
3317 WERROR *result)
3318{
3319 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3320 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3321 NTSTATUS status;
3322
3323 if (tevent_req_is_nterror(req, &status)) {
3324 tevent_req_received(req);
3325 return status;
3326 }
3327
3328 /* Steal possbile out parameters to the callers context */
3329 talloc_steal(mem_ctx, state->out_mem_ctx);
3330
3331 /* Return result */
3332 *result = state->orig.out.result;
3333
3334 tevent_req_received(req);
3335 return NT_STATUS_OK;
3336}
3337
3338NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
3339 TALLOC_CTX *mem_ctx,
3340 WERROR *werror)
3341{
3342 struct PNP_GetInterfaceDeviceListSize r;
3343 NTSTATUS status;
3344
3345 /* In parameters */
3346
3347 status = cli->dispatch(cli,
3348 mem_ctx,
3349 &ndr_table_ntsvcs,
3350 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3351 &r);
3352
3353 if (!NT_STATUS_IS_OK(status)) {
3354 return status;
3355 }
3356
3357 if (NT_STATUS_IS_ERR(status)) {
3358 return status;
3359 }
3360
3361 /* Return variables */
3362
3363 /* Return result */
3364 if (werror) {
3365 *werror = r.out.result;
3366 }
3367
3368 return werror_to_ntstatus(r.out.result);
3369}
3370
3371struct rpccli_PNP_RegisterDeviceClassAssociation_state {
3372 struct PNP_RegisterDeviceClassAssociation orig;
3373 struct PNP_RegisterDeviceClassAssociation tmp;
3374 TALLOC_CTX *out_mem_ctx;
3375 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3376};
3377
3378static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq);
3379
3380struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3381 struct tevent_context *ev,
3382 struct rpc_pipe_client *cli)
3383{
3384 struct tevent_req *req;
3385 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state;
3386 struct tevent_req *subreq;
3387
3388 req = tevent_req_create(mem_ctx, &state,
3389 struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3390 if (req == NULL) {
3391 return NULL;
3392 }
3393 state->out_mem_ctx = NULL;
3394 state->dispatch_recv = cli->dispatch_recv;
3395
3396 /* In parameters */
3397
3398 /* Out parameters */
3399
3400 /* Result */
3401 ZERO_STRUCT(state->orig.out.result);
3402
3403 /* make a temporary copy, that we pass to the dispatch function */
3404 state->tmp = state->orig;
3405
3406 subreq = cli->dispatch_send(state, ev, cli,
3407 &ndr_table_ntsvcs,
3408 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3409 &state->tmp);
3410 if (tevent_req_nomem(subreq, req)) {
3411 return tevent_req_post(req, ev);
3412 }
3413 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDeviceClassAssociation_done, req);
3414 return req;
3415}
3416
3417static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq)
3418{
3419 struct tevent_req *req = tevent_req_callback_data(
3420 subreq, struct tevent_req);
3421 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3422 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3423 NTSTATUS status;
3424 TALLOC_CTX *mem_ctx;
3425
3426 if (state->out_mem_ctx) {
3427 mem_ctx = state->out_mem_ctx;
3428 } else {
3429 mem_ctx = state;
3430 }
3431
3432 status = state->dispatch_recv(subreq, mem_ctx);
3433 TALLOC_FREE(subreq);
3434 if (!NT_STATUS_IS_OK(status)) {
3435 tevent_req_nterror(req, status);
3436 return;
3437 }
3438
3439 /* Copy out parameters */
3440
3441 /* Copy result */
3442 state->orig.out.result = state->tmp.out.result;
3443
3444 /* Reset temporary structure */
3445 ZERO_STRUCT(state->tmp);
3446
3447 tevent_req_done(req);
3448}
3449
3450NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req,
3451 TALLOC_CTX *mem_ctx,
3452 WERROR *result)
3453{
3454 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3455 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3456 NTSTATUS status;
3457
3458 if (tevent_req_is_nterror(req, &status)) {
3459 tevent_req_received(req);
3460 return status;
3461 }
3462
3463 /* Steal possbile out parameters to the callers context */
3464 talloc_steal(mem_ctx, state->out_mem_ctx);
3465
3466 /* Return result */
3467 *result = state->orig.out.result;
3468
3469 tevent_req_received(req);
3470 return NT_STATUS_OK;
3471}
3472
3473NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3474 TALLOC_CTX *mem_ctx,
3475 WERROR *werror)
3476{
3477 struct PNP_RegisterDeviceClassAssociation r;
3478 NTSTATUS status;
3479
3480 /* In parameters */
3481
3482 status = cli->dispatch(cli,
3483 mem_ctx,
3484 &ndr_table_ntsvcs,
3485 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3486 &r);
3487
3488 if (!NT_STATUS_IS_OK(status)) {
3489 return status;
3490 }
3491
3492 if (NT_STATUS_IS_ERR(status)) {
3493 return status;
3494 }
3495
3496 /* Return variables */
3497
3498 /* Return result */
3499 if (werror) {
3500 *werror = r.out.result;
3501 }
3502
3503 return werror_to_ntstatus(r.out.result);
3504}
3505
3506struct rpccli_PNP_UnregisterDeviceClassAssociation_state {
3507 struct PNP_UnregisterDeviceClassAssociation orig;
3508 struct PNP_UnregisterDeviceClassAssociation tmp;
3509 TALLOC_CTX *out_mem_ctx;
3510 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3511};
3512
3513static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq);
3514
3515struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3516 struct tevent_context *ev,
3517 struct rpc_pipe_client *cli)
3518{
3519 struct tevent_req *req;
3520 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state;
3521 struct tevent_req *subreq;
3522
3523 req = tevent_req_create(mem_ctx, &state,
3524 struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3525 if (req == NULL) {
3526 return NULL;
3527 }
3528 state->out_mem_ctx = NULL;
3529 state->dispatch_recv = cli->dispatch_recv;
3530
3531 /* In parameters */
3532
3533 /* Out parameters */
3534
3535 /* Result */
3536 ZERO_STRUCT(state->orig.out.result);
3537
3538 /* make a temporary copy, that we pass to the dispatch function */
3539 state->tmp = state->orig;
3540
3541 subreq = cli->dispatch_send(state, ev, cli,
3542 &ndr_table_ntsvcs,
3543 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3544 &state->tmp);
3545 if (tevent_req_nomem(subreq, req)) {
3546 return tevent_req_post(req, ev);
3547 }
3548 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterDeviceClassAssociation_done, req);
3549 return req;
3550}
3551
3552static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq)
3553{
3554 struct tevent_req *req = tevent_req_callback_data(
3555 subreq, struct tevent_req);
3556 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3557 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3558 NTSTATUS status;
3559 TALLOC_CTX *mem_ctx;
3560
3561 if (state->out_mem_ctx) {
3562 mem_ctx = state->out_mem_ctx;
3563 } else {
3564 mem_ctx = state;
3565 }
3566
3567 status = state->dispatch_recv(subreq, mem_ctx);
3568 TALLOC_FREE(subreq);
3569 if (!NT_STATUS_IS_OK(status)) {
3570 tevent_req_nterror(req, status);
3571 return;
3572 }
3573
3574 /* Copy out parameters */
3575
3576 /* Copy result */
3577 state->orig.out.result = state->tmp.out.result;
3578
3579 /* Reset temporary structure */
3580 ZERO_STRUCT(state->tmp);
3581
3582 tevent_req_done(req);
3583}
3584
3585NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req,
3586 TALLOC_CTX *mem_ctx,
3587 WERROR *result)
3588{
3589 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3590 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3591 NTSTATUS status;
3592
3593 if (tevent_req_is_nterror(req, &status)) {
3594 tevent_req_received(req);
3595 return status;
3596 }
3597
3598 /* Steal possbile out parameters to the callers context */
3599 talloc_steal(mem_ctx, state->out_mem_ctx);
3600
3601 /* Return result */
3602 *result = state->orig.out.result;
3603
3604 tevent_req_received(req);
3605 return NT_STATUS_OK;
3606}
3607
3608NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3609 TALLOC_CTX *mem_ctx,
3610 WERROR *werror)
3611{
3612 struct PNP_UnregisterDeviceClassAssociation r;
3613 NTSTATUS status;
3614
3615 /* In parameters */
3616
3617 status = cli->dispatch(cli,
3618 mem_ctx,
3619 &ndr_table_ntsvcs,
3620 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3621 &r);
3622
3623 if (!NT_STATUS_IS_OK(status)) {
3624 return status;
3625 }
3626
3627 if (NT_STATUS_IS_ERR(status)) {
3628 return status;
3629 }
3630
3631 /* Return variables */
3632
3633 /* Return result */
3634 if (werror) {
3635 *werror = r.out.result;
3636 }
3637
3638 return werror_to_ntstatus(r.out.result);
3639}
3640
3641struct rpccli_PNP_GetClassRegProp_state {
3642 struct PNP_GetClassRegProp orig;
3643 struct PNP_GetClassRegProp tmp;
3644 TALLOC_CTX *out_mem_ctx;
3645 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3646};
3647
3648static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq);
3649
3650struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx,
3651 struct tevent_context *ev,
3652 struct rpc_pipe_client *cli)
3653{
3654 struct tevent_req *req;
3655 struct rpccli_PNP_GetClassRegProp_state *state;
3656 struct tevent_req *subreq;
3657
3658 req = tevent_req_create(mem_ctx, &state,
3659 struct rpccli_PNP_GetClassRegProp_state);
3660 if (req == NULL) {
3661 return NULL;
3662 }
3663 state->out_mem_ctx = NULL;
3664 state->dispatch_recv = cli->dispatch_recv;
3665
3666 /* In parameters */
3667
3668 /* Out parameters */
3669
3670 /* Result */
3671 ZERO_STRUCT(state->orig.out.result);
3672
3673 /* make a temporary copy, that we pass to the dispatch function */
3674 state->tmp = state->orig;
3675
3676 subreq = cli->dispatch_send(state, ev, cli,
3677 &ndr_table_ntsvcs,
3678 NDR_PNP_GETCLASSREGPROP,
3679 &state->tmp);
3680 if (tevent_req_nomem(subreq, req)) {
3681 return tevent_req_post(req, ev);
3682 }
3683 tevent_req_set_callback(subreq, rpccli_PNP_GetClassRegProp_done, req);
3684 return req;
3685}
3686
3687static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq)
3688{
3689 struct tevent_req *req = tevent_req_callback_data(
3690 subreq, struct tevent_req);
3691 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3692 req, struct rpccli_PNP_GetClassRegProp_state);
3693 NTSTATUS status;
3694 TALLOC_CTX *mem_ctx;
3695
3696 if (state->out_mem_ctx) {
3697 mem_ctx = state->out_mem_ctx;
3698 } else {
3699 mem_ctx = state;
3700 }
3701
3702 status = state->dispatch_recv(subreq, mem_ctx);
3703 TALLOC_FREE(subreq);
3704 if (!NT_STATUS_IS_OK(status)) {
3705 tevent_req_nterror(req, status);
3706 return;
3707 }
3708
3709 /* Copy out parameters */
3710
3711 /* Copy result */
3712 state->orig.out.result = state->tmp.out.result;
3713
3714 /* Reset temporary structure */
3715 ZERO_STRUCT(state->tmp);
3716
3717 tevent_req_done(req);
3718}
3719
3720NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req,
3721 TALLOC_CTX *mem_ctx,
3722 WERROR *result)
3723{
3724 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3725 req, struct rpccli_PNP_GetClassRegProp_state);
3726 NTSTATUS status;
3727
3728 if (tevent_req_is_nterror(req, &status)) {
3729 tevent_req_received(req);
3730 return status;
3731 }
3732
3733 /* Steal possbile out parameters to the callers context */
3734 talloc_steal(mem_ctx, state->out_mem_ctx);
3735
3736 /* Return result */
3737 *result = state->orig.out.result;
3738
3739 tevent_req_received(req);
3740 return NT_STATUS_OK;
3741}
3742
3743NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
3744 TALLOC_CTX *mem_ctx,
3745 WERROR *werror)
3746{
3747 struct PNP_GetClassRegProp r;
3748 NTSTATUS status;
3749
3750 /* In parameters */
3751
3752 status = cli->dispatch(cli,
3753 mem_ctx,
3754 &ndr_table_ntsvcs,
3755 NDR_PNP_GETCLASSREGPROP,
3756 &r);
3757
3758 if (!NT_STATUS_IS_OK(status)) {
3759 return status;
3760 }
3761
3762 if (NT_STATUS_IS_ERR(status)) {
3763 return status;
3764 }
3765
3766 /* Return variables */
3767
3768 /* Return result */
3769 if (werror) {
3770 *werror = r.out.result;
3771 }
3772
3773 return werror_to_ntstatus(r.out.result);
3774}
3775
3776struct rpccli_PNP_SetClassRegProp_state {
3777 struct PNP_SetClassRegProp orig;
3778 struct PNP_SetClassRegProp tmp;
3779 TALLOC_CTX *out_mem_ctx;
3780 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3781};
3782
3783static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq);
3784
3785struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx,
3786 struct tevent_context *ev,
3787 struct rpc_pipe_client *cli)
3788{
3789 struct tevent_req *req;
3790 struct rpccli_PNP_SetClassRegProp_state *state;
3791 struct tevent_req *subreq;
3792
3793 req = tevent_req_create(mem_ctx, &state,
3794 struct rpccli_PNP_SetClassRegProp_state);
3795 if (req == NULL) {
3796 return NULL;
3797 }
3798 state->out_mem_ctx = NULL;
3799 state->dispatch_recv = cli->dispatch_recv;
3800
3801 /* In parameters */
3802
3803 /* Out parameters */
3804
3805 /* Result */
3806 ZERO_STRUCT(state->orig.out.result);
3807
3808 /* make a temporary copy, that we pass to the dispatch function */
3809 state->tmp = state->orig;
3810
3811 subreq = cli->dispatch_send(state, ev, cli,
3812 &ndr_table_ntsvcs,
3813 NDR_PNP_SETCLASSREGPROP,
3814 &state->tmp);
3815 if (tevent_req_nomem(subreq, req)) {
3816 return tevent_req_post(req, ev);
3817 }
3818 tevent_req_set_callback(subreq, rpccli_PNP_SetClassRegProp_done, req);
3819 return req;
3820}
3821
3822static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq)
3823{
3824 struct tevent_req *req = tevent_req_callback_data(
3825 subreq, struct tevent_req);
3826 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3827 req, struct rpccli_PNP_SetClassRegProp_state);
3828 NTSTATUS status;
3829 TALLOC_CTX *mem_ctx;
3830
3831 if (state->out_mem_ctx) {
3832 mem_ctx = state->out_mem_ctx;
3833 } else {
3834 mem_ctx = state;
3835 }
3836
3837 status = state->dispatch_recv(subreq, mem_ctx);
3838 TALLOC_FREE(subreq);
3839 if (!NT_STATUS_IS_OK(status)) {
3840 tevent_req_nterror(req, status);
3841 return;
3842 }
3843
3844 /* Copy out parameters */
3845
3846 /* Copy result */
3847 state->orig.out.result = state->tmp.out.result;
3848
3849 /* Reset temporary structure */
3850 ZERO_STRUCT(state->tmp);
3851
3852 tevent_req_done(req);
3853}
3854
3855NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req,
3856 TALLOC_CTX *mem_ctx,
3857 WERROR *result)
3858{
3859 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3860 req, struct rpccli_PNP_SetClassRegProp_state);
3861 NTSTATUS status;
3862
3863 if (tevent_req_is_nterror(req, &status)) {
3864 tevent_req_received(req);
3865 return status;
3866 }
3867
3868 /* Steal possbile out parameters to the callers context */
3869 talloc_steal(mem_ctx, state->out_mem_ctx);
3870
3871 /* Return result */
3872 *result = state->orig.out.result;
3873
3874 tevent_req_received(req);
3875 return NT_STATUS_OK;
3876}
3877
3878NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
3879 TALLOC_CTX *mem_ctx,
3880 WERROR *werror)
3881{
3882 struct PNP_SetClassRegProp r;
3883 NTSTATUS status;
3884
3885 /* In parameters */
3886
3887 status = cli->dispatch(cli,
3888 mem_ctx,
3889 &ndr_table_ntsvcs,
3890 NDR_PNP_SETCLASSREGPROP,
3891 &r);
3892
3893 if (!NT_STATUS_IS_OK(status)) {
3894 return status;
3895 }
3896
3897 if (NT_STATUS_IS_ERR(status)) {
3898 return status;
3899 }
3900
3901 /* Return variables */
3902
3903 /* Return result */
3904 if (werror) {
3905 *werror = r.out.result;
3906 }
3907
3908 return werror_to_ntstatus(r.out.result);
3909}
3910
3911struct rpccli_PNP_CreateDevInst_state {
3912 struct PNP_CreateDevInst orig;
3913 struct PNP_CreateDevInst tmp;
3914 TALLOC_CTX *out_mem_ctx;
3915 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3916};
3917
3918static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq);
3919
3920struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx,
3921 struct tevent_context *ev,
3922 struct rpc_pipe_client *cli)
3923{
3924 struct tevent_req *req;
3925 struct rpccli_PNP_CreateDevInst_state *state;
3926 struct tevent_req *subreq;
3927
3928 req = tevent_req_create(mem_ctx, &state,
3929 struct rpccli_PNP_CreateDevInst_state);
3930 if (req == NULL) {
3931 return NULL;
3932 }
3933 state->out_mem_ctx = NULL;
3934 state->dispatch_recv = cli->dispatch_recv;
3935
3936 /* In parameters */
3937
3938 /* Out parameters */
3939
3940 /* Result */
3941 ZERO_STRUCT(state->orig.out.result);
3942
3943 /* make a temporary copy, that we pass to the dispatch function */
3944 state->tmp = state->orig;
3945
3946 subreq = cli->dispatch_send(state, ev, cli,
3947 &ndr_table_ntsvcs,
3948 NDR_PNP_CREATEDEVINST,
3949 &state->tmp);
3950 if (tevent_req_nomem(subreq, req)) {
3951 return tevent_req_post(req, ev);
3952 }
3953 tevent_req_set_callback(subreq, rpccli_PNP_CreateDevInst_done, req);
3954 return req;
3955}
3956
3957static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq)
3958{
3959 struct tevent_req *req = tevent_req_callback_data(
3960 subreq, struct tevent_req);
3961 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3962 req, struct rpccli_PNP_CreateDevInst_state);
3963 NTSTATUS status;
3964 TALLOC_CTX *mem_ctx;
3965
3966 if (state->out_mem_ctx) {
3967 mem_ctx = state->out_mem_ctx;
3968 } else {
3969 mem_ctx = state;
3970 }
3971
3972 status = state->dispatch_recv(subreq, mem_ctx);
3973 TALLOC_FREE(subreq);
3974 if (!NT_STATUS_IS_OK(status)) {
3975 tevent_req_nterror(req, status);
3976 return;
3977 }
3978
3979 /* Copy out parameters */
3980
3981 /* Copy result */
3982 state->orig.out.result = state->tmp.out.result;
3983
3984 /* Reset temporary structure */
3985 ZERO_STRUCT(state->tmp);
3986
3987 tevent_req_done(req);
3988}
3989
3990NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req,
3991 TALLOC_CTX *mem_ctx,
3992 WERROR *result)
3993{
3994 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3995 req, struct rpccli_PNP_CreateDevInst_state);
3996 NTSTATUS status;
3997
3998 if (tevent_req_is_nterror(req, &status)) {
3999 tevent_req_received(req);
4000 return status;
4001 }
4002
4003 /* Steal possbile out parameters to the callers context */
4004 talloc_steal(mem_ctx, state->out_mem_ctx);
4005
4006 /* Return result */
4007 *result = state->orig.out.result;
4008
4009 tevent_req_received(req);
4010 return NT_STATUS_OK;
4011}
4012
4013NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
4014 TALLOC_CTX *mem_ctx,
4015 WERROR *werror)
4016{
4017 struct PNP_CreateDevInst r;
4018 NTSTATUS status;
4019
4020 /* In parameters */
4021
4022 status = cli->dispatch(cli,
4023 mem_ctx,
4024 &ndr_table_ntsvcs,
4025 NDR_PNP_CREATEDEVINST,
4026 &r);
4027
4028 if (!NT_STATUS_IS_OK(status)) {
4029 return status;
4030 }
4031
4032 if (NT_STATUS_IS_ERR(status)) {
4033 return status;
4034 }
4035
4036 /* Return variables */
4037
4038 /* Return result */
4039 if (werror) {
4040 *werror = r.out.result;
4041 }
4042
4043 return werror_to_ntstatus(r.out.result);
4044}
4045
4046struct rpccli_PNP_DeviceInstanceAction_state {
4047 struct PNP_DeviceInstanceAction orig;
4048 struct PNP_DeviceInstanceAction tmp;
4049 TALLOC_CTX *out_mem_ctx;
4050 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4051};
4052
4053static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq);
4054
4055struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx,
4056 struct tevent_context *ev,
4057 struct rpc_pipe_client *cli)
4058{
4059 struct tevent_req *req;
4060 struct rpccli_PNP_DeviceInstanceAction_state *state;
4061 struct tevent_req *subreq;
4062
4063 req = tevent_req_create(mem_ctx, &state,
4064 struct rpccli_PNP_DeviceInstanceAction_state);
4065 if (req == NULL) {
4066 return NULL;
4067 }
4068 state->out_mem_ctx = NULL;
4069 state->dispatch_recv = cli->dispatch_recv;
4070
4071 /* In parameters */
4072
4073 /* Out parameters */
4074
4075 /* Result */
4076 ZERO_STRUCT(state->orig.out.result);
4077
4078 /* make a temporary copy, that we pass to the dispatch function */
4079 state->tmp = state->orig;
4080
4081 subreq = cli->dispatch_send(state, ev, cli,
4082 &ndr_table_ntsvcs,
4083 NDR_PNP_DEVICEINSTANCEACTION,
4084 &state->tmp);
4085 if (tevent_req_nomem(subreq, req)) {
4086 return tevent_req_post(req, ev);
4087 }
4088 tevent_req_set_callback(subreq, rpccli_PNP_DeviceInstanceAction_done, req);
4089 return req;
4090}
4091
4092static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq)
4093{
4094 struct tevent_req *req = tevent_req_callback_data(
4095 subreq, struct tevent_req);
4096 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4097 req, struct rpccli_PNP_DeviceInstanceAction_state);
4098 NTSTATUS status;
4099 TALLOC_CTX *mem_ctx;
4100
4101 if (state->out_mem_ctx) {
4102 mem_ctx = state->out_mem_ctx;
4103 } else {
4104 mem_ctx = state;
4105 }
4106
4107 status = state->dispatch_recv(subreq, mem_ctx);
4108 TALLOC_FREE(subreq);
4109 if (!NT_STATUS_IS_OK(status)) {
4110 tevent_req_nterror(req, status);
4111 return;
4112 }
4113
4114 /* Copy out parameters */
4115
4116 /* Copy result */
4117 state->orig.out.result = state->tmp.out.result;
4118
4119 /* Reset temporary structure */
4120 ZERO_STRUCT(state->tmp);
4121
4122 tevent_req_done(req);
4123}
4124
4125NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req,
4126 TALLOC_CTX *mem_ctx,
4127 WERROR *result)
4128{
4129 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4130 req, struct rpccli_PNP_DeviceInstanceAction_state);
4131 NTSTATUS status;
4132
4133 if (tevent_req_is_nterror(req, &status)) {
4134 tevent_req_received(req);
4135 return status;
4136 }
4137
4138 /* Steal possbile out parameters to the callers context */
4139 talloc_steal(mem_ctx, state->out_mem_ctx);
4140
4141 /* Return result */
4142 *result = state->orig.out.result;
4143
4144 tevent_req_received(req);
4145 return NT_STATUS_OK;
4146}
4147
4148NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
4149 TALLOC_CTX *mem_ctx,
4150 WERROR *werror)
4151{
4152 struct PNP_DeviceInstanceAction r;
4153 NTSTATUS status;
4154
4155 /* In parameters */
4156
4157 status = cli->dispatch(cli,
4158 mem_ctx,
4159 &ndr_table_ntsvcs,
4160 NDR_PNP_DEVICEINSTANCEACTION,
4161 &r);
4162
4163 if (!NT_STATUS_IS_OK(status)) {
4164 return status;
4165 }
4166
4167 if (NT_STATUS_IS_ERR(status)) {
4168 return status;
4169 }
4170
4171 /* Return variables */
4172
4173 /* Return result */
4174 if (werror) {
4175 *werror = r.out.result;
4176 }
4177
4178 return werror_to_ntstatus(r.out.result);
4179}
4180
4181struct rpccli_PNP_GetDeviceStatus_state {
4182 struct PNP_GetDeviceStatus orig;
4183 struct PNP_GetDeviceStatus tmp;
4184 TALLOC_CTX *out_mem_ctx;
4185 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4186};
4187
4188static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq);
4189
4190struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx,
4191 struct tevent_context *ev,
4192 struct rpc_pipe_client *cli)
4193{
4194 struct tevent_req *req;
4195 struct rpccli_PNP_GetDeviceStatus_state *state;
4196 struct tevent_req *subreq;
4197
4198 req = tevent_req_create(mem_ctx, &state,
4199 struct rpccli_PNP_GetDeviceStatus_state);
4200 if (req == NULL) {
4201 return NULL;
4202 }
4203 state->out_mem_ctx = NULL;
4204 state->dispatch_recv = cli->dispatch_recv;
4205
4206 /* In parameters */
4207
4208 /* Out parameters */
4209
4210 /* Result */
4211 ZERO_STRUCT(state->orig.out.result);
4212
4213 /* make a temporary copy, that we pass to the dispatch function */
4214 state->tmp = state->orig;
4215
4216 subreq = cli->dispatch_send(state, ev, cli,
4217 &ndr_table_ntsvcs,
4218 NDR_PNP_GETDEVICESTATUS,
4219 &state->tmp);
4220 if (tevent_req_nomem(subreq, req)) {
4221 return tevent_req_post(req, ev);
4222 }
4223 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceStatus_done, req);
4224 return req;
4225}
4226
4227static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq)
4228{
4229 struct tevent_req *req = tevent_req_callback_data(
4230 subreq, struct tevent_req);
4231 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4232 req, struct rpccli_PNP_GetDeviceStatus_state);
4233 NTSTATUS status;
4234 TALLOC_CTX *mem_ctx;
4235
4236 if (state->out_mem_ctx) {
4237 mem_ctx = state->out_mem_ctx;
4238 } else {
4239 mem_ctx = state;
4240 }
4241
4242 status = state->dispatch_recv(subreq, mem_ctx);
4243 TALLOC_FREE(subreq);
4244 if (!NT_STATUS_IS_OK(status)) {
4245 tevent_req_nterror(req, status);
4246 return;
4247 }
4248
4249 /* Copy out parameters */
4250
4251 /* Copy result */
4252 state->orig.out.result = state->tmp.out.result;
4253
4254 /* Reset temporary structure */
4255 ZERO_STRUCT(state->tmp);
4256
4257 tevent_req_done(req);
4258}
4259
4260NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req,
4261 TALLOC_CTX *mem_ctx,
4262 WERROR *result)
4263{
4264 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4265 req, struct rpccli_PNP_GetDeviceStatus_state);
4266 NTSTATUS status;
4267
4268 if (tevent_req_is_nterror(req, &status)) {
4269 tevent_req_received(req);
4270 return status;
4271 }
4272
4273 /* Steal possbile out parameters to the callers context */
4274 talloc_steal(mem_ctx, state->out_mem_ctx);
4275
4276 /* Return result */
4277 *result = state->orig.out.result;
4278
4279 tevent_req_received(req);
4280 return NT_STATUS_OK;
4281}
4282
4283NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
4284 TALLOC_CTX *mem_ctx,
4285 WERROR *werror)
4286{
4287 struct PNP_GetDeviceStatus r;
4288 NTSTATUS status;
4289
4290 /* In parameters */
4291
4292 status = cli->dispatch(cli,
4293 mem_ctx,
4294 &ndr_table_ntsvcs,
4295 NDR_PNP_GETDEVICESTATUS,
4296 &r);
4297
4298 if (!NT_STATUS_IS_OK(status)) {
4299 return status;
4300 }
4301
4302 if (NT_STATUS_IS_ERR(status)) {
4303 return status;
4304 }
4305
4306 /* Return variables */
4307
4308 /* Return result */
4309 if (werror) {
4310 *werror = r.out.result;
4311 }
4312
4313 return werror_to_ntstatus(r.out.result);
4314}
4315
4316struct rpccli_PNP_SetDeviceProblem_state {
4317 struct PNP_SetDeviceProblem orig;
4318 struct PNP_SetDeviceProblem tmp;
4319 TALLOC_CTX *out_mem_ctx;
4320 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4321};
4322
4323static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq);
4324
4325struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx,
4326 struct tevent_context *ev,
4327 struct rpc_pipe_client *cli)
4328{
4329 struct tevent_req *req;
4330 struct rpccli_PNP_SetDeviceProblem_state *state;
4331 struct tevent_req *subreq;
4332
4333 req = tevent_req_create(mem_ctx, &state,
4334 struct rpccli_PNP_SetDeviceProblem_state);
4335 if (req == NULL) {
4336 return NULL;
4337 }
4338 state->out_mem_ctx = NULL;
4339 state->dispatch_recv = cli->dispatch_recv;
4340
4341 /* In parameters */
4342
4343 /* Out parameters */
4344
4345 /* Result */
4346 ZERO_STRUCT(state->orig.out.result);
4347
4348 /* make a temporary copy, that we pass to the dispatch function */
4349 state->tmp = state->orig;
4350
4351 subreq = cli->dispatch_send(state, ev, cli,
4352 &ndr_table_ntsvcs,
4353 NDR_PNP_SETDEVICEPROBLEM,
4354 &state->tmp);
4355 if (tevent_req_nomem(subreq, req)) {
4356 return tevent_req_post(req, ev);
4357 }
4358 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceProblem_done, req);
4359 return req;
4360}
4361
4362static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq)
4363{
4364 struct tevent_req *req = tevent_req_callback_data(
4365 subreq, struct tevent_req);
4366 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4367 req, struct rpccli_PNP_SetDeviceProblem_state);
4368 NTSTATUS status;
4369 TALLOC_CTX *mem_ctx;
4370
4371 if (state->out_mem_ctx) {
4372 mem_ctx = state->out_mem_ctx;
4373 } else {
4374 mem_ctx = state;
4375 }
4376
4377 status = state->dispatch_recv(subreq, mem_ctx);
4378 TALLOC_FREE(subreq);
4379 if (!NT_STATUS_IS_OK(status)) {
4380 tevent_req_nterror(req, status);
4381 return;
4382 }
4383
4384 /* Copy out parameters */
4385
4386 /* Copy result */
4387 state->orig.out.result = state->tmp.out.result;
4388
4389 /* Reset temporary structure */
4390 ZERO_STRUCT(state->tmp);
4391
4392 tevent_req_done(req);
4393}
4394
4395NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req,
4396 TALLOC_CTX *mem_ctx,
4397 WERROR *result)
4398{
4399 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4400 req, struct rpccli_PNP_SetDeviceProblem_state);
4401 NTSTATUS status;
4402
4403 if (tevent_req_is_nterror(req, &status)) {
4404 tevent_req_received(req);
4405 return status;
4406 }
4407
4408 /* Steal possbile out parameters to the callers context */
4409 talloc_steal(mem_ctx, state->out_mem_ctx);
4410
4411 /* Return result */
4412 *result = state->orig.out.result;
4413
4414 tevent_req_received(req);
4415 return NT_STATUS_OK;
4416}
4417
4418NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
4419 TALLOC_CTX *mem_ctx,
4420 WERROR *werror)
4421{
4422 struct PNP_SetDeviceProblem r;
4423 NTSTATUS status;
4424
4425 /* In parameters */
4426
4427 status = cli->dispatch(cli,
4428 mem_ctx,
4429 &ndr_table_ntsvcs,
4430 NDR_PNP_SETDEVICEPROBLEM,
4431 &r);
4432
4433 if (!NT_STATUS_IS_OK(status)) {
4434 return status;
4435 }
4436
4437 if (NT_STATUS_IS_ERR(status)) {
4438 return status;
4439 }
4440
4441 /* Return variables */
4442
4443 /* Return result */
4444 if (werror) {
4445 *werror = r.out.result;
4446 }
4447
4448 return werror_to_ntstatus(r.out.result);
4449}
4450
4451struct rpccli_PNP_DisableDevInst_state {
4452 struct PNP_DisableDevInst orig;
4453 struct PNP_DisableDevInst tmp;
4454 TALLOC_CTX *out_mem_ctx;
4455 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4456};
4457
4458static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq);
4459
4460struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx,
4461 struct tevent_context *ev,
4462 struct rpc_pipe_client *cli)
4463{
4464 struct tevent_req *req;
4465 struct rpccli_PNP_DisableDevInst_state *state;
4466 struct tevent_req *subreq;
4467
4468 req = tevent_req_create(mem_ctx, &state,
4469 struct rpccli_PNP_DisableDevInst_state);
4470 if (req == NULL) {
4471 return NULL;
4472 }
4473 state->out_mem_ctx = NULL;
4474 state->dispatch_recv = cli->dispatch_recv;
4475
4476 /* In parameters */
4477
4478 /* Out parameters */
4479
4480 /* Result */
4481 ZERO_STRUCT(state->orig.out.result);
4482
4483 /* make a temporary copy, that we pass to the dispatch function */
4484 state->tmp = state->orig;
4485
4486 subreq = cli->dispatch_send(state, ev, cli,
4487 &ndr_table_ntsvcs,
4488 NDR_PNP_DISABLEDEVINST,
4489 &state->tmp);
4490 if (tevent_req_nomem(subreq, req)) {
4491 return tevent_req_post(req, ev);
4492 }
4493 tevent_req_set_callback(subreq, rpccli_PNP_DisableDevInst_done, req);
4494 return req;
4495}
4496
4497static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq)
4498{
4499 struct tevent_req *req = tevent_req_callback_data(
4500 subreq, struct tevent_req);
4501 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4502 req, struct rpccli_PNP_DisableDevInst_state);
4503 NTSTATUS status;
4504 TALLOC_CTX *mem_ctx;
4505
4506 if (state->out_mem_ctx) {
4507 mem_ctx = state->out_mem_ctx;
4508 } else {
4509 mem_ctx = state;
4510 }
4511
4512 status = state->dispatch_recv(subreq, mem_ctx);
4513 TALLOC_FREE(subreq);
4514 if (!NT_STATUS_IS_OK(status)) {
4515 tevent_req_nterror(req, status);
4516 return;
4517 }
4518
4519 /* Copy out parameters */
4520
4521 /* Copy result */
4522 state->orig.out.result = state->tmp.out.result;
4523
4524 /* Reset temporary structure */
4525 ZERO_STRUCT(state->tmp);
4526
4527 tevent_req_done(req);
4528}
4529
4530NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req,
4531 TALLOC_CTX *mem_ctx,
4532 WERROR *result)
4533{
4534 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4535 req, struct rpccli_PNP_DisableDevInst_state);
4536 NTSTATUS status;
4537
4538 if (tevent_req_is_nterror(req, &status)) {
4539 tevent_req_received(req);
4540 return status;
4541 }
4542
4543 /* Steal possbile out parameters to the callers context */
4544 talloc_steal(mem_ctx, state->out_mem_ctx);
4545
4546 /* Return result */
4547 *result = state->orig.out.result;
4548
4549 tevent_req_received(req);
4550 return NT_STATUS_OK;
4551}
4552
4553NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
4554 TALLOC_CTX *mem_ctx,
4555 WERROR *werror)
4556{
4557 struct PNP_DisableDevInst r;
4558 NTSTATUS status;
4559
4560 /* In parameters */
4561
4562 status = cli->dispatch(cli,
4563 mem_ctx,
4564 &ndr_table_ntsvcs,
4565 NDR_PNP_DISABLEDEVINST,
4566 &r);
4567
4568 if (!NT_STATUS_IS_OK(status)) {
4569 return status;
4570 }
4571
4572 if (NT_STATUS_IS_ERR(status)) {
4573 return status;
4574 }
4575
4576 /* Return variables */
4577
4578 /* Return result */
4579 if (werror) {
4580 *werror = r.out.result;
4581 }
4582
4583 return werror_to_ntstatus(r.out.result);
4584}
4585
4586struct rpccli_PNP_UninstallDevInst_state {
4587 struct PNP_UninstallDevInst orig;
4588 struct PNP_UninstallDevInst tmp;
4589 TALLOC_CTX *out_mem_ctx;
4590 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4591};
4592
4593static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq);
4594
4595struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx,
4596 struct tevent_context *ev,
4597 struct rpc_pipe_client *cli)
4598{
4599 struct tevent_req *req;
4600 struct rpccli_PNP_UninstallDevInst_state *state;
4601 struct tevent_req *subreq;
4602
4603 req = tevent_req_create(mem_ctx, &state,
4604 struct rpccli_PNP_UninstallDevInst_state);
4605 if (req == NULL) {
4606 return NULL;
4607 }
4608 state->out_mem_ctx = NULL;
4609 state->dispatch_recv = cli->dispatch_recv;
4610
4611 /* In parameters */
4612
4613 /* Out parameters */
4614
4615 /* Result */
4616 ZERO_STRUCT(state->orig.out.result);
4617
4618 /* make a temporary copy, that we pass to the dispatch function */
4619 state->tmp = state->orig;
4620
4621 subreq = cli->dispatch_send(state, ev, cli,
4622 &ndr_table_ntsvcs,
4623 NDR_PNP_UNINSTALLDEVINST,
4624 &state->tmp);
4625 if (tevent_req_nomem(subreq, req)) {
4626 return tevent_req_post(req, ev);
4627 }
4628 tevent_req_set_callback(subreq, rpccli_PNP_UninstallDevInst_done, req);
4629 return req;
4630}
4631
4632static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq)
4633{
4634 struct tevent_req *req = tevent_req_callback_data(
4635 subreq, struct tevent_req);
4636 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4637 req, struct rpccli_PNP_UninstallDevInst_state);
4638 NTSTATUS status;
4639 TALLOC_CTX *mem_ctx;
4640
4641 if (state->out_mem_ctx) {
4642 mem_ctx = state->out_mem_ctx;
4643 } else {
4644 mem_ctx = state;
4645 }
4646
4647 status = state->dispatch_recv(subreq, mem_ctx);
4648 TALLOC_FREE(subreq);
4649 if (!NT_STATUS_IS_OK(status)) {
4650 tevent_req_nterror(req, status);
4651 return;
4652 }
4653
4654 /* Copy out parameters */
4655
4656 /* Copy result */
4657 state->orig.out.result = state->tmp.out.result;
4658
4659 /* Reset temporary structure */
4660 ZERO_STRUCT(state->tmp);
4661
4662 tevent_req_done(req);
4663}
4664
4665NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req,
4666 TALLOC_CTX *mem_ctx,
4667 WERROR *result)
4668{
4669 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4670 req, struct rpccli_PNP_UninstallDevInst_state);
4671 NTSTATUS status;
4672
4673 if (tevent_req_is_nterror(req, &status)) {
4674 tevent_req_received(req);
4675 return status;
4676 }
4677
4678 /* Steal possbile out parameters to the callers context */
4679 talloc_steal(mem_ctx, state->out_mem_ctx);
4680
4681 /* Return result */
4682 *result = state->orig.out.result;
4683
4684 tevent_req_received(req);
4685 return NT_STATUS_OK;
4686}
4687
4688NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
4689 TALLOC_CTX *mem_ctx,
4690 WERROR *werror)
4691{
4692 struct PNP_UninstallDevInst r;
4693 NTSTATUS status;
4694
4695 /* In parameters */
4696
4697 status = cli->dispatch(cli,
4698 mem_ctx,
4699 &ndr_table_ntsvcs,
4700 NDR_PNP_UNINSTALLDEVINST,
4701 &r);
4702
4703 if (!NT_STATUS_IS_OK(status)) {
4704 return status;
4705 }
4706
4707 if (NT_STATUS_IS_ERR(status)) {
4708 return status;
4709 }
4710
4711 /* Return variables */
4712
4713 /* Return result */
4714 if (werror) {
4715 *werror = r.out.result;
4716 }
4717
4718 return werror_to_ntstatus(r.out.result);
4719}
4720
4721struct rpccli_PNP_AddID_state {
4722 struct PNP_AddID orig;
4723 struct PNP_AddID tmp;
4724 TALLOC_CTX *out_mem_ctx;
4725 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4726};
4727
4728static void rpccli_PNP_AddID_done(struct tevent_req *subreq);
4729
4730struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx,
4731 struct tevent_context *ev,
4732 struct rpc_pipe_client *cli)
4733{
4734 struct tevent_req *req;
4735 struct rpccli_PNP_AddID_state *state;
4736 struct tevent_req *subreq;
4737
4738 req = tevent_req_create(mem_ctx, &state,
4739 struct rpccli_PNP_AddID_state);
4740 if (req == NULL) {
4741 return NULL;
4742 }
4743 state->out_mem_ctx = NULL;
4744 state->dispatch_recv = cli->dispatch_recv;
4745
4746 /* In parameters */
4747
4748 /* Out parameters */
4749
4750 /* Result */
4751 ZERO_STRUCT(state->orig.out.result);
4752
4753 /* make a temporary copy, that we pass to the dispatch function */
4754 state->tmp = state->orig;
4755
4756 subreq = cli->dispatch_send(state, ev, cli,
4757 &ndr_table_ntsvcs,
4758 NDR_PNP_ADDID,
4759 &state->tmp);
4760 if (tevent_req_nomem(subreq, req)) {
4761 return tevent_req_post(req, ev);
4762 }
4763 tevent_req_set_callback(subreq, rpccli_PNP_AddID_done, req);
4764 return req;
4765}
4766
4767static void rpccli_PNP_AddID_done(struct tevent_req *subreq)
4768{
4769 struct tevent_req *req = tevent_req_callback_data(
4770 subreq, struct tevent_req);
4771 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4772 req, struct rpccli_PNP_AddID_state);
4773 NTSTATUS status;
4774 TALLOC_CTX *mem_ctx;
4775
4776 if (state->out_mem_ctx) {
4777 mem_ctx = state->out_mem_ctx;
4778 } else {
4779 mem_ctx = state;
4780 }
4781
4782 status = state->dispatch_recv(subreq, mem_ctx);
4783 TALLOC_FREE(subreq);
4784 if (!NT_STATUS_IS_OK(status)) {
4785 tevent_req_nterror(req, status);
4786 return;
4787 }
4788
4789 /* Copy out parameters */
4790
4791 /* Copy result */
4792 state->orig.out.result = state->tmp.out.result;
4793
4794 /* Reset temporary structure */
4795 ZERO_STRUCT(state->tmp);
4796
4797 tevent_req_done(req);
4798}
4799
4800NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req,
4801 TALLOC_CTX *mem_ctx,
4802 WERROR *result)
4803{
4804 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4805 req, struct rpccli_PNP_AddID_state);
4806 NTSTATUS status;
4807
4808 if (tevent_req_is_nterror(req, &status)) {
4809 tevent_req_received(req);
4810 return status;
4811 }
4812
4813 /* Steal possbile out parameters to the callers context */
4814 talloc_steal(mem_ctx, state->out_mem_ctx);
4815
4816 /* Return result */
4817 *result = state->orig.out.result;
4818
4819 tevent_req_received(req);
4820 return NT_STATUS_OK;
4821}
4822
4823NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
4824 TALLOC_CTX *mem_ctx,
4825 WERROR *werror)
4826{
4827 struct PNP_AddID r;
4828 NTSTATUS status;
4829
4830 /* In parameters */
4831
4832 status = cli->dispatch(cli,
4833 mem_ctx,
4834 &ndr_table_ntsvcs,
4835 NDR_PNP_ADDID,
4836 &r);
4837
4838 if (!NT_STATUS_IS_OK(status)) {
4839 return status;
4840 }
4841
4842 if (NT_STATUS_IS_ERR(status)) {
4843 return status;
4844 }
4845
4846 /* Return variables */
4847
4848 /* Return result */
4849 if (werror) {
4850 *werror = r.out.result;
4851 }
4852
4853 return werror_to_ntstatus(r.out.result);
4854}
4855
4856struct rpccli_PNP_RegisterDriver_state {
4857 struct PNP_RegisterDriver orig;
4858 struct PNP_RegisterDriver tmp;
4859 TALLOC_CTX *out_mem_ctx;
4860 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4861};
4862
4863static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq);
4864
4865struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx,
4866 struct tevent_context *ev,
4867 struct rpc_pipe_client *cli)
4868{
4869 struct tevent_req *req;
4870 struct rpccli_PNP_RegisterDriver_state *state;
4871 struct tevent_req *subreq;
4872
4873 req = tevent_req_create(mem_ctx, &state,
4874 struct rpccli_PNP_RegisterDriver_state);
4875 if (req == NULL) {
4876 return NULL;
4877 }
4878 state->out_mem_ctx = NULL;
4879 state->dispatch_recv = cli->dispatch_recv;
4880
4881 /* In parameters */
4882
4883 /* Out parameters */
4884
4885 /* Result */
4886 ZERO_STRUCT(state->orig.out.result);
4887
4888 /* make a temporary copy, that we pass to the dispatch function */
4889 state->tmp = state->orig;
4890
4891 subreq = cli->dispatch_send(state, ev, cli,
4892 &ndr_table_ntsvcs,
4893 NDR_PNP_REGISTERDRIVER,
4894 &state->tmp);
4895 if (tevent_req_nomem(subreq, req)) {
4896 return tevent_req_post(req, ev);
4897 }
4898 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDriver_done, req);
4899 return req;
4900}
4901
4902static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq)
4903{
4904 struct tevent_req *req = tevent_req_callback_data(
4905 subreq, struct tevent_req);
4906 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4907 req, struct rpccli_PNP_RegisterDriver_state);
4908 NTSTATUS status;
4909 TALLOC_CTX *mem_ctx;
4910
4911 if (state->out_mem_ctx) {
4912 mem_ctx = state->out_mem_ctx;
4913 } else {
4914 mem_ctx = state;
4915 }
4916
4917 status = state->dispatch_recv(subreq, mem_ctx);
4918 TALLOC_FREE(subreq);
4919 if (!NT_STATUS_IS_OK(status)) {
4920 tevent_req_nterror(req, status);
4921 return;
4922 }
4923
4924 /* Copy out parameters */
4925
4926 /* Copy result */
4927 state->orig.out.result = state->tmp.out.result;
4928
4929 /* Reset temporary structure */
4930 ZERO_STRUCT(state->tmp);
4931
4932 tevent_req_done(req);
4933}
4934
4935NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req,
4936 TALLOC_CTX *mem_ctx,
4937 WERROR *result)
4938{
4939 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4940 req, struct rpccli_PNP_RegisterDriver_state);
4941 NTSTATUS status;
4942
4943 if (tevent_req_is_nterror(req, &status)) {
4944 tevent_req_received(req);
4945 return status;
4946 }
4947
4948 /* Steal possbile out parameters to the callers context */
4949 talloc_steal(mem_ctx, state->out_mem_ctx);
4950
4951 /* Return result */
4952 *result = state->orig.out.result;
4953
4954 tevent_req_received(req);
4955 return NT_STATUS_OK;
4956}
4957
4958NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
4959 TALLOC_CTX *mem_ctx,
4960 WERROR *werror)
4961{
4962 struct PNP_RegisterDriver r;
4963 NTSTATUS status;
4964
4965 /* In parameters */
4966
4967 status = cli->dispatch(cli,
4968 mem_ctx,
4969 &ndr_table_ntsvcs,
4970 NDR_PNP_REGISTERDRIVER,
4971 &r);
4972
4973 if (!NT_STATUS_IS_OK(status)) {
4974 return status;
4975 }
4976
4977 if (NT_STATUS_IS_ERR(status)) {
4978 return status;
4979 }
4980
4981 /* Return variables */
4982
4983 /* Return result */
4984 if (werror) {
4985 *werror = r.out.result;
4986 }
4987
4988 return werror_to_ntstatus(r.out.result);
4989}
4990
4991struct rpccli_PNP_QueryRemove_state {
4992 struct PNP_QueryRemove orig;
4993 struct PNP_QueryRemove tmp;
4994 TALLOC_CTX *out_mem_ctx;
4995 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4996};
4997
4998static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq);
4999
5000struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx,
5001 struct tevent_context *ev,
5002 struct rpc_pipe_client *cli)
5003{
5004 struct tevent_req *req;
5005 struct rpccli_PNP_QueryRemove_state *state;
5006 struct tevent_req *subreq;
5007
5008 req = tevent_req_create(mem_ctx, &state,
5009 struct rpccli_PNP_QueryRemove_state);
5010 if (req == NULL) {
5011 return NULL;
5012 }
5013 state->out_mem_ctx = NULL;
5014 state->dispatch_recv = cli->dispatch_recv;
5015
5016 /* In parameters */
5017
5018 /* Out parameters */
5019
5020 /* Result */
5021 ZERO_STRUCT(state->orig.out.result);
5022
5023 /* make a temporary copy, that we pass to the dispatch function */
5024 state->tmp = state->orig;
5025
5026 subreq = cli->dispatch_send(state, ev, cli,
5027 &ndr_table_ntsvcs,
5028 NDR_PNP_QUERYREMOVE,
5029 &state->tmp);
5030 if (tevent_req_nomem(subreq, req)) {
5031 return tevent_req_post(req, ev);
5032 }
5033 tevent_req_set_callback(subreq, rpccli_PNP_QueryRemove_done, req);
5034 return req;
5035}
5036
5037static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq)
5038{
5039 struct tevent_req *req = tevent_req_callback_data(
5040 subreq, struct tevent_req);
5041 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5042 req, struct rpccli_PNP_QueryRemove_state);
5043 NTSTATUS status;
5044 TALLOC_CTX *mem_ctx;
5045
5046 if (state->out_mem_ctx) {
5047 mem_ctx = state->out_mem_ctx;
5048 } else {
5049 mem_ctx = state;
5050 }
5051
5052 status = state->dispatch_recv(subreq, mem_ctx);
5053 TALLOC_FREE(subreq);
5054 if (!NT_STATUS_IS_OK(status)) {
5055 tevent_req_nterror(req, status);
5056 return;
5057 }
5058
5059 /* Copy out parameters */
5060
5061 /* Copy result */
5062 state->orig.out.result = state->tmp.out.result;
5063
5064 /* Reset temporary structure */
5065 ZERO_STRUCT(state->tmp);
5066
5067 tevent_req_done(req);
5068}
5069
5070NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req,
5071 TALLOC_CTX *mem_ctx,
5072 WERROR *result)
5073{
5074 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5075 req, struct rpccli_PNP_QueryRemove_state);
5076 NTSTATUS status;
5077
5078 if (tevent_req_is_nterror(req, &status)) {
5079 tevent_req_received(req);
5080 return status;
5081 }
5082
5083 /* Steal possbile out parameters to the callers context */
5084 talloc_steal(mem_ctx, state->out_mem_ctx);
5085
5086 /* Return result */
5087 *result = state->orig.out.result;
5088
5089 tevent_req_received(req);
5090 return NT_STATUS_OK;
5091}
5092
5093NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
5094 TALLOC_CTX *mem_ctx,
5095 WERROR *werror)
5096{
5097 struct PNP_QueryRemove r;
5098 NTSTATUS status;
5099
5100 /* In parameters */
5101
5102 status = cli->dispatch(cli,
5103 mem_ctx,
5104 &ndr_table_ntsvcs,
5105 NDR_PNP_QUERYREMOVE,
5106 &r);
5107
5108 if (!NT_STATUS_IS_OK(status)) {
5109 return status;
5110 }
5111
5112 if (NT_STATUS_IS_ERR(status)) {
5113 return status;
5114 }
5115
5116 /* Return variables */
5117
5118 /* Return result */
5119 if (werror) {
5120 *werror = r.out.result;
5121 }
5122
5123 return werror_to_ntstatus(r.out.result);
5124}
5125
5126struct rpccli_PNP_RequestDeviceEject_state {
5127 struct PNP_RequestDeviceEject orig;
5128 struct PNP_RequestDeviceEject tmp;
5129 TALLOC_CTX *out_mem_ctx;
5130 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5131};
5132
5133static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq);
5134
5135struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx,
5136 struct tevent_context *ev,
5137 struct rpc_pipe_client *cli)
5138{
5139 struct tevent_req *req;
5140 struct rpccli_PNP_RequestDeviceEject_state *state;
5141 struct tevent_req *subreq;
5142
5143 req = tevent_req_create(mem_ctx, &state,
5144 struct rpccli_PNP_RequestDeviceEject_state);
5145 if (req == NULL) {
5146 return NULL;
5147 }
5148 state->out_mem_ctx = NULL;
5149 state->dispatch_recv = cli->dispatch_recv;
5150
5151 /* In parameters */
5152
5153 /* Out parameters */
5154
5155 /* Result */
5156 ZERO_STRUCT(state->orig.out.result);
5157
5158 /* make a temporary copy, that we pass to the dispatch function */
5159 state->tmp = state->orig;
5160
5161 subreq = cli->dispatch_send(state, ev, cli,
5162 &ndr_table_ntsvcs,
5163 NDR_PNP_REQUESTDEVICEEJECT,
5164 &state->tmp);
5165 if (tevent_req_nomem(subreq, req)) {
5166 return tevent_req_post(req, ev);
5167 }
5168 tevent_req_set_callback(subreq, rpccli_PNP_RequestDeviceEject_done, req);
5169 return req;
5170}
5171
5172static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq)
5173{
5174 struct tevent_req *req = tevent_req_callback_data(
5175 subreq, struct tevent_req);
5176 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5177 req, struct rpccli_PNP_RequestDeviceEject_state);
5178 NTSTATUS status;
5179 TALLOC_CTX *mem_ctx;
5180
5181 if (state->out_mem_ctx) {
5182 mem_ctx = state->out_mem_ctx;
5183 } else {
5184 mem_ctx = state;
5185 }
5186
5187 status = state->dispatch_recv(subreq, mem_ctx);
5188 TALLOC_FREE(subreq);
5189 if (!NT_STATUS_IS_OK(status)) {
5190 tevent_req_nterror(req, status);
5191 return;
5192 }
5193
5194 /* Copy out parameters */
5195
5196 /* Copy result */
5197 state->orig.out.result = state->tmp.out.result;
5198
5199 /* Reset temporary structure */
5200 ZERO_STRUCT(state->tmp);
5201
5202 tevent_req_done(req);
5203}
5204
5205NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req,
5206 TALLOC_CTX *mem_ctx,
5207 WERROR *result)
5208{
5209 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5210 req, struct rpccli_PNP_RequestDeviceEject_state);
5211 NTSTATUS status;
5212
5213 if (tevent_req_is_nterror(req, &status)) {
5214 tevent_req_received(req);
5215 return status;
5216 }
5217
5218 /* Steal possbile out parameters to the callers context */
5219 talloc_steal(mem_ctx, state->out_mem_ctx);
5220
5221 /* Return result */
5222 *result = state->orig.out.result;
5223
5224 tevent_req_received(req);
5225 return NT_STATUS_OK;
5226}
5227
5228NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
5229 TALLOC_CTX *mem_ctx,
5230 WERROR *werror)
5231{
5232 struct PNP_RequestDeviceEject r;
5233 NTSTATUS status;
5234
5235 /* In parameters */
5236
5237 status = cli->dispatch(cli,
5238 mem_ctx,
5239 &ndr_table_ntsvcs,
5240 NDR_PNP_REQUESTDEVICEEJECT,
5241 &r);
5242
5243 if (!NT_STATUS_IS_OK(status)) {
5244 return status;
5245 }
5246
5247 if (NT_STATUS_IS_ERR(status)) {
5248 return status;
5249 }
5250
5251 /* Return variables */
5252
5253 /* Return result */
5254 if (werror) {
5255 *werror = r.out.result;
5256 }
5257
5258 return werror_to_ntstatus(r.out.result);
5259}
5260
5261struct rpccli_PNP_IsDockStationPresent_state {
5262 struct PNP_IsDockStationPresent orig;
5263 struct PNP_IsDockStationPresent tmp;
5264 TALLOC_CTX *out_mem_ctx;
5265 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5266};
5267
5268static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq);
5269
5270struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx,
5271 struct tevent_context *ev,
5272 struct rpc_pipe_client *cli)
5273{
5274 struct tevent_req *req;
5275 struct rpccli_PNP_IsDockStationPresent_state *state;
5276 struct tevent_req *subreq;
5277
5278 req = tevent_req_create(mem_ctx, &state,
5279 struct rpccli_PNP_IsDockStationPresent_state);
5280 if (req == NULL) {
5281 return NULL;
5282 }
5283 state->out_mem_ctx = NULL;
5284 state->dispatch_recv = cli->dispatch_recv;
5285
5286 /* In parameters */
5287
5288 /* Out parameters */
5289
5290 /* Result */
5291 ZERO_STRUCT(state->orig.out.result);
5292
5293 /* make a temporary copy, that we pass to the dispatch function */
5294 state->tmp = state->orig;
5295
5296 subreq = cli->dispatch_send(state, ev, cli,
5297 &ndr_table_ntsvcs,
5298 NDR_PNP_ISDOCKSTATIONPRESENT,
5299 &state->tmp);
5300 if (tevent_req_nomem(subreq, req)) {
5301 return tevent_req_post(req, ev);
5302 }
5303 tevent_req_set_callback(subreq, rpccli_PNP_IsDockStationPresent_done, req);
5304 return req;
5305}
5306
5307static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq)
5308{
5309 struct tevent_req *req = tevent_req_callback_data(
5310 subreq, struct tevent_req);
5311 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5312 req, struct rpccli_PNP_IsDockStationPresent_state);
5313 NTSTATUS status;
5314 TALLOC_CTX *mem_ctx;
5315
5316 if (state->out_mem_ctx) {
5317 mem_ctx = state->out_mem_ctx;
5318 } else {
5319 mem_ctx = state;
5320 }
5321
5322 status = state->dispatch_recv(subreq, mem_ctx);
5323 TALLOC_FREE(subreq);
5324 if (!NT_STATUS_IS_OK(status)) {
5325 tevent_req_nterror(req, status);
5326 return;
5327 }
5328
5329 /* Copy out parameters */
5330
5331 /* Copy result */
5332 state->orig.out.result = state->tmp.out.result;
5333
5334 /* Reset temporary structure */
5335 ZERO_STRUCT(state->tmp);
5336
5337 tevent_req_done(req);
5338}
5339
5340NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req,
5341 TALLOC_CTX *mem_ctx,
5342 WERROR *result)
5343{
5344 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5345 req, struct rpccli_PNP_IsDockStationPresent_state);
5346 NTSTATUS status;
5347
5348 if (tevent_req_is_nterror(req, &status)) {
5349 tevent_req_received(req);
5350 return status;
5351 }
5352
5353 /* Steal possbile out parameters to the callers context */
5354 talloc_steal(mem_ctx, state->out_mem_ctx);
5355
5356 /* Return result */
5357 *result = state->orig.out.result;
5358
5359 tevent_req_received(req);
5360 return NT_STATUS_OK;
5361}
5362
5363NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
5364 TALLOC_CTX *mem_ctx,
5365 WERROR *werror)
5366{
5367 struct PNP_IsDockStationPresent r;
5368 NTSTATUS status;
5369
5370 /* In parameters */
5371
5372 status = cli->dispatch(cli,
5373 mem_ctx,
5374 &ndr_table_ntsvcs,
5375 NDR_PNP_ISDOCKSTATIONPRESENT,
5376 &r);
5377
5378 if (!NT_STATUS_IS_OK(status)) {
5379 return status;
5380 }
5381
5382 if (NT_STATUS_IS_ERR(status)) {
5383 return status;
5384 }
5385
5386 /* Return variables */
5387
5388 /* Return result */
5389 if (werror) {
5390 *werror = r.out.result;
5391 }
5392
5393 return werror_to_ntstatus(r.out.result);
5394}
5395
5396struct rpccli_PNP_RequestEjectPC_state {
5397 struct PNP_RequestEjectPC orig;
5398 struct PNP_RequestEjectPC tmp;
5399 TALLOC_CTX *out_mem_ctx;
5400 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5401};
5402
5403static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq);
5404
5405struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx,
5406 struct tevent_context *ev,
5407 struct rpc_pipe_client *cli)
5408{
5409 struct tevent_req *req;
5410 struct rpccli_PNP_RequestEjectPC_state *state;
5411 struct tevent_req *subreq;
5412
5413 req = tevent_req_create(mem_ctx, &state,
5414 struct rpccli_PNP_RequestEjectPC_state);
5415 if (req == NULL) {
5416 return NULL;
5417 }
5418 state->out_mem_ctx = NULL;
5419 state->dispatch_recv = cli->dispatch_recv;
5420
5421 /* In parameters */
5422
5423 /* Out parameters */
5424
5425 /* Result */
5426 ZERO_STRUCT(state->orig.out.result);
5427
5428 /* make a temporary copy, that we pass to the dispatch function */
5429 state->tmp = state->orig;
5430
5431 subreq = cli->dispatch_send(state, ev, cli,
5432 &ndr_table_ntsvcs,
5433 NDR_PNP_REQUESTEJECTPC,
5434 &state->tmp);
5435 if (tevent_req_nomem(subreq, req)) {
5436 return tevent_req_post(req, ev);
5437 }
5438 tevent_req_set_callback(subreq, rpccli_PNP_RequestEjectPC_done, req);
5439 return req;
5440}
5441
5442static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq)
5443{
5444 struct tevent_req *req = tevent_req_callback_data(
5445 subreq, struct tevent_req);
5446 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5447 req, struct rpccli_PNP_RequestEjectPC_state);
5448 NTSTATUS status;
5449 TALLOC_CTX *mem_ctx;
5450
5451 if (state->out_mem_ctx) {
5452 mem_ctx = state->out_mem_ctx;
5453 } else {
5454 mem_ctx = state;
5455 }
5456
5457 status = state->dispatch_recv(subreq, mem_ctx);
5458 TALLOC_FREE(subreq);
5459 if (!NT_STATUS_IS_OK(status)) {
5460 tevent_req_nterror(req, status);
5461 return;
5462 }
5463
5464 /* Copy out parameters */
5465
5466 /* Copy result */
5467 state->orig.out.result = state->tmp.out.result;
5468
5469 /* Reset temporary structure */
5470 ZERO_STRUCT(state->tmp);
5471
5472 tevent_req_done(req);
5473}
5474
5475NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req,
5476 TALLOC_CTX *mem_ctx,
5477 WERROR *result)
5478{
5479 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5480 req, struct rpccli_PNP_RequestEjectPC_state);
5481 NTSTATUS status;
5482
5483 if (tevent_req_is_nterror(req, &status)) {
5484 tevent_req_received(req);
5485 return status;
5486 }
5487
5488 /* Steal possbile out parameters to the callers context */
5489 talloc_steal(mem_ctx, state->out_mem_ctx);
5490
5491 /* Return result */
5492 *result = state->orig.out.result;
5493
5494 tevent_req_received(req);
5495 return NT_STATUS_OK;
5496}
5497
5498NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
5499 TALLOC_CTX *mem_ctx,
5500 WERROR *werror)
5501{
5502 struct PNP_RequestEjectPC r;
5503 NTSTATUS status;
5504
5505 /* In parameters */
5506
5507 status = cli->dispatch(cli,
5508 mem_ctx,
5509 &ndr_table_ntsvcs,
5510 NDR_PNP_REQUESTEJECTPC,
5511 &r);
5512
5513 if (!NT_STATUS_IS_OK(status)) {
5514 return status;
5515 }
5516
5517 if (NT_STATUS_IS_ERR(status)) {
5518 return status;
5519 }
5520
5521 /* Return variables */
5522
5523 /* Return result */
5524 if (werror) {
5525 *werror = r.out.result;
5526 }
5527
5528 return werror_to_ntstatus(r.out.result);
5529}
5530
5531struct rpccli_PNP_HwProfFlags_state {
5532 struct PNP_HwProfFlags orig;
5533 struct PNP_HwProfFlags tmp;
5534 TALLOC_CTX *out_mem_ctx;
5535 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5536};
5537
5538static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq);
5539
5540struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx,
5541 struct tevent_context *ev,
5542 struct rpc_pipe_client *cli,
5543 uint32_t _action /* [in] */,
5544 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
5545 uint32_t _config /* [in] */,
5546 uint32_t *_profile_flags /* [in,out] [ref] */,
5547 uint16_t *_veto_type /* [in,out] [unique] */,
5548 const char *_unknown5 /* [in] [unique,charset(UTF16)] */,
5549 const char **_unknown5a /* [out] [unique,charset(UTF16)] */,
5550 uint32_t _name_length /* [in] */,
5551 uint32_t _flags /* [in] */)
5552{
5553 struct tevent_req *req;
5554 struct rpccli_PNP_HwProfFlags_state *state;
5555 struct tevent_req *subreq;
5556
5557 req = tevent_req_create(mem_ctx, &state,
5558 struct rpccli_PNP_HwProfFlags_state);
5559 if (req == NULL) {
5560 return NULL;
5561 }
5562 state->out_mem_ctx = NULL;
5563 state->dispatch_recv = cli->dispatch_recv;
5564
5565 /* In parameters */
5566 state->orig.in.action = _action;
5567 state->orig.in.devicepath = _devicepath;
5568 state->orig.in.config = _config;
5569 state->orig.in.profile_flags = _profile_flags;
5570 state->orig.in.veto_type = _veto_type;
5571 state->orig.in.unknown5 = _unknown5;
5572 state->orig.in.name_length = _name_length;
5573 state->orig.in.flags = _flags;
5574
5575 /* Out parameters */
5576 state->orig.out.profile_flags = _profile_flags;
5577 state->orig.out.veto_type = _veto_type;
5578 state->orig.out.unknown5a = _unknown5a;
5579
5580 /* Result */
5581 ZERO_STRUCT(state->orig.out.result);
5582
5583 state->out_mem_ctx = talloc_named_const(state, 0,
5584 "rpccli_PNP_HwProfFlags_out_memory");
5585 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5586 return tevent_req_post(req, ev);
5587 }
5588
5589 /* make a temporary copy, that we pass to the dispatch function */
5590 state->tmp = state->orig;
5591
5592 subreq = cli->dispatch_send(state, ev, cli,
5593 &ndr_table_ntsvcs,
5594 NDR_PNP_HWPROFFLAGS,
5595 &state->tmp);
5596 if (tevent_req_nomem(subreq, req)) {
5597 return tevent_req_post(req, ev);
5598 }
5599 tevent_req_set_callback(subreq, rpccli_PNP_HwProfFlags_done, req);
5600 return req;
5601}
5602
5603static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq)
5604{
5605 struct tevent_req *req = tevent_req_callback_data(
5606 subreq, struct tevent_req);
5607 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5608 req, struct rpccli_PNP_HwProfFlags_state);
5609 NTSTATUS status;
5610 TALLOC_CTX *mem_ctx;
5611
5612 if (state->out_mem_ctx) {
5613 mem_ctx = state->out_mem_ctx;
5614 } else {
5615 mem_ctx = state;
5616 }
5617
5618 status = state->dispatch_recv(subreq, mem_ctx);
5619 TALLOC_FREE(subreq);
5620 if (!NT_STATUS_IS_OK(status)) {
5621 tevent_req_nterror(req, status);
5622 return;
5623 }
5624
5625 /* Copy out parameters */
5626 *state->orig.out.profile_flags = *state->tmp.out.profile_flags;
5627 if (state->orig.out.veto_type && state->tmp.out.veto_type) {
5628 *state->orig.out.veto_type = *state->tmp.out.veto_type;
5629 }
5630 if (state->orig.out.unknown5a && state->tmp.out.unknown5a) {
5631 *state->orig.out.unknown5a = *state->tmp.out.unknown5a;
5632 }
5633
5634 /* Copy result */
5635 state->orig.out.result = state->tmp.out.result;
5636
5637 /* Reset temporary structure */
5638 ZERO_STRUCT(state->tmp);
5639
5640 tevent_req_done(req);
5641}
5642
5643NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req,
5644 TALLOC_CTX *mem_ctx,
5645 WERROR *result)
5646{
5647 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5648 req, struct rpccli_PNP_HwProfFlags_state);
5649 NTSTATUS status;
5650
5651 if (tevent_req_is_nterror(req, &status)) {
5652 tevent_req_received(req);
5653 return status;
5654 }
5655
5656 /* Steal possbile out parameters to the callers context */
5657 talloc_steal(mem_ctx, state->out_mem_ctx);
5658
5659 /* Return result */
5660 *result = state->orig.out.result;
5661
5662 tevent_req_received(req);
5663 return NT_STATUS_OK;
5664}
5665
5666NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
5667 TALLOC_CTX *mem_ctx,
5668 uint32_t action /* [in] */,
5669 const char *devicepath /* [in] [ref,charset(UTF16)] */,
5670 uint32_t config /* [in] */,
5671 uint32_t *profile_flags /* [in,out] [ref] */,
5672 uint16_t *veto_type /* [in,out] [unique] */,
5673 const char *unknown5 /* [in] [unique,charset(UTF16)] */,
5674 const char **unknown5a /* [out] [unique,charset(UTF16)] */,
5675 uint32_t name_length /* [in] */,
5676 uint32_t flags /* [in] */,
5677 WERROR *werror)
5678{
5679 struct PNP_HwProfFlags r;
5680 NTSTATUS status;
5681
5682 /* In parameters */
5683 r.in.action = action;
5684 r.in.devicepath = devicepath;
5685 r.in.config = config;
5686 r.in.profile_flags = profile_flags;
5687 r.in.veto_type = veto_type;
5688 r.in.unknown5 = unknown5;
5689 r.in.name_length = name_length;
5690 r.in.flags = flags;
5691
5692 status = cli->dispatch(cli,
5693 mem_ctx,
5694 &ndr_table_ntsvcs,
5695 NDR_PNP_HWPROFFLAGS,
5696 &r);
5697
5698 if (!NT_STATUS_IS_OK(status)) {
5699 return status;
5700 }
5701
5702 if (NT_STATUS_IS_ERR(status)) {
5703 return status;
5704 }
5705
5706 /* Return variables */
5707 *profile_flags = *r.out.profile_flags;
5708 if (veto_type && r.out.veto_type) {
5709 *veto_type = *r.out.veto_type;
5710 }
5711 if (unknown5a && r.out.unknown5a) {
5712 *unknown5a = *r.out.unknown5a;
5713 }
5714
5715 /* Return result */
5716 if (werror) {
5717 *werror = r.out.result;
5718 }
5719
5720 return werror_to_ntstatus(r.out.result);
5721}
5722
5723struct rpccli_PNP_GetHwProfInfo_state {
5724 struct PNP_GetHwProfInfo orig;
5725 struct PNP_GetHwProfInfo tmp;
5726 TALLOC_CTX *out_mem_ctx;
5727 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5728};
5729
5730static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq);
5731
5732struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx,
5733 struct tevent_context *ev,
5734 struct rpc_pipe_client *cli,
5735 uint32_t _idx /* [in] */,
5736 struct PNP_HwProfInfo *_info /* [in,out] [ref] */,
5737 uint32_t _size /* [in] */,
5738 uint32_t _flags /* [in] */)
5739{
5740 struct tevent_req *req;
5741 struct rpccli_PNP_GetHwProfInfo_state *state;
5742 struct tevent_req *subreq;
5743
5744 req = tevent_req_create(mem_ctx, &state,
5745 struct rpccli_PNP_GetHwProfInfo_state);
5746 if (req == NULL) {
5747 return NULL;
5748 }
5749 state->out_mem_ctx = NULL;
5750 state->dispatch_recv = cli->dispatch_recv;
5751
5752 /* In parameters */
5753 state->orig.in.idx = _idx;
5754 state->orig.in.info = _info;
5755 state->orig.in.size = _size;
5756 state->orig.in.flags = _flags;
5757
5758 /* Out parameters */
5759 state->orig.out.info = _info;
5760
5761 /* Result */
5762 ZERO_STRUCT(state->orig.out.result);
5763
5764 state->out_mem_ctx = talloc_named_const(state, 0,
5765 "rpccli_PNP_GetHwProfInfo_out_memory");
5766 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5767 return tevent_req_post(req, ev);
5768 }
5769
5770 /* make a temporary copy, that we pass to the dispatch function */
5771 state->tmp = state->orig;
5772
5773 subreq = cli->dispatch_send(state, ev, cli,
5774 &ndr_table_ntsvcs,
5775 NDR_PNP_GETHWPROFINFO,
5776 &state->tmp);
5777 if (tevent_req_nomem(subreq, req)) {
5778 return tevent_req_post(req, ev);
5779 }
5780 tevent_req_set_callback(subreq, rpccli_PNP_GetHwProfInfo_done, req);
5781 return req;
5782}
5783
5784static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq)
5785{
5786 struct tevent_req *req = tevent_req_callback_data(
5787 subreq, struct tevent_req);
5788 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5789 req, struct rpccli_PNP_GetHwProfInfo_state);
5790 NTSTATUS status;
5791 TALLOC_CTX *mem_ctx;
5792
5793 if (state->out_mem_ctx) {
5794 mem_ctx = state->out_mem_ctx;
5795 } else {
5796 mem_ctx = state;
5797 }
5798
5799 status = state->dispatch_recv(subreq, mem_ctx);
5800 TALLOC_FREE(subreq);
5801 if (!NT_STATUS_IS_OK(status)) {
5802 tevent_req_nterror(req, status);
5803 return;
5804 }
5805
5806 /* Copy out parameters */
5807 *state->orig.out.info = *state->tmp.out.info;
5808
5809 /* Copy result */
5810 state->orig.out.result = state->tmp.out.result;
5811
5812 /* Reset temporary structure */
5813 ZERO_STRUCT(state->tmp);
5814
5815 tevent_req_done(req);
5816}
5817
5818NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req,
5819 TALLOC_CTX *mem_ctx,
5820 WERROR *result)
5821{
5822 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5823 req, struct rpccli_PNP_GetHwProfInfo_state);
5824 NTSTATUS status;
5825
5826 if (tevent_req_is_nterror(req, &status)) {
5827 tevent_req_received(req);
5828 return status;
5829 }
5830
5831 /* Steal possbile out parameters to the callers context */
5832 talloc_steal(mem_ctx, state->out_mem_ctx);
5833
5834 /* Return result */
5835 *result = state->orig.out.result;
5836
5837 tevent_req_received(req);
5838 return NT_STATUS_OK;
5839}
5840
5841NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
5842 TALLOC_CTX *mem_ctx,
5843 uint32_t idx /* [in] */,
5844 struct PNP_HwProfInfo *info /* [in,out] [ref] */,
5845 uint32_t size /* [in] */,
5846 uint32_t flags /* [in] */,
5847 WERROR *werror)
5848{
5849 struct PNP_GetHwProfInfo r;
5850 NTSTATUS status;
5851
5852 /* In parameters */
5853 r.in.idx = idx;
5854 r.in.info = info;
5855 r.in.size = size;
5856 r.in.flags = flags;
5857
5858 status = cli->dispatch(cli,
5859 mem_ctx,
5860 &ndr_table_ntsvcs,
5861 NDR_PNP_GETHWPROFINFO,
5862 &r);
5863
5864 if (!NT_STATUS_IS_OK(status)) {
5865 return status;
5866 }
5867
5868 if (NT_STATUS_IS_ERR(status)) {
5869 return status;
5870 }
5871
5872 /* Return variables */
5873 *info = *r.out.info;
5874
5875 /* Return result */
5876 if (werror) {
5877 *werror = r.out.result;
5878 }
5879
5880 return werror_to_ntstatus(r.out.result);
5881}
5882
5883struct rpccli_PNP_AddEmptyLogConf_state {
5884 struct PNP_AddEmptyLogConf orig;
5885 struct PNP_AddEmptyLogConf tmp;
5886 TALLOC_CTX *out_mem_ctx;
5887 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5888};
5889
5890static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq);
5891
5892struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx,
5893 struct tevent_context *ev,
5894 struct rpc_pipe_client *cli)
5895{
5896 struct tevent_req *req;
5897 struct rpccli_PNP_AddEmptyLogConf_state *state;
5898 struct tevent_req *subreq;
5899
5900 req = tevent_req_create(mem_ctx, &state,
5901 struct rpccli_PNP_AddEmptyLogConf_state);
5902 if (req == NULL) {
5903 return NULL;
5904 }
5905 state->out_mem_ctx = NULL;
5906 state->dispatch_recv = cli->dispatch_recv;
5907
5908 /* In parameters */
5909
5910 /* Out parameters */
5911
5912 /* Result */
5913 ZERO_STRUCT(state->orig.out.result);
5914
5915 /* make a temporary copy, that we pass to the dispatch function */
5916 state->tmp = state->orig;
5917
5918 subreq = cli->dispatch_send(state, ev, cli,
5919 &ndr_table_ntsvcs,
5920 NDR_PNP_ADDEMPTYLOGCONF,
5921 &state->tmp);
5922 if (tevent_req_nomem(subreq, req)) {
5923 return tevent_req_post(req, ev);
5924 }
5925 tevent_req_set_callback(subreq, rpccli_PNP_AddEmptyLogConf_done, req);
5926 return req;
5927}
5928
5929static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq)
5930{
5931 struct tevent_req *req = tevent_req_callback_data(
5932 subreq, struct tevent_req);
5933 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5934 req, struct rpccli_PNP_AddEmptyLogConf_state);
5935 NTSTATUS status;
5936 TALLOC_CTX *mem_ctx;
5937
5938 if (state->out_mem_ctx) {
5939 mem_ctx = state->out_mem_ctx;
5940 } else {
5941 mem_ctx = state;
5942 }
5943
5944 status = state->dispatch_recv(subreq, mem_ctx);
5945 TALLOC_FREE(subreq);
5946 if (!NT_STATUS_IS_OK(status)) {
5947 tevent_req_nterror(req, status);
5948 return;
5949 }
5950
5951 /* Copy out parameters */
5952
5953 /* Copy result */
5954 state->orig.out.result = state->tmp.out.result;
5955
5956 /* Reset temporary structure */
5957 ZERO_STRUCT(state->tmp);
5958
5959 tevent_req_done(req);
5960}
5961
5962NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req,
5963 TALLOC_CTX *mem_ctx,
5964 WERROR *result)
5965{
5966 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5967 req, struct rpccli_PNP_AddEmptyLogConf_state);
5968 NTSTATUS status;
5969
5970 if (tevent_req_is_nterror(req, &status)) {
5971 tevent_req_received(req);
5972 return status;
5973 }
5974
5975 /* Steal possbile out parameters to the callers context */
5976 talloc_steal(mem_ctx, state->out_mem_ctx);
5977
5978 /* Return result */
5979 *result = state->orig.out.result;
5980
5981 tevent_req_received(req);
5982 return NT_STATUS_OK;
5983}
5984
5985NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
5986 TALLOC_CTX *mem_ctx,
5987 WERROR *werror)
5988{
5989 struct PNP_AddEmptyLogConf r;
5990 NTSTATUS status;
5991
5992 /* In parameters */
5993
5994 status = cli->dispatch(cli,
5995 mem_ctx,
5996 &ndr_table_ntsvcs,
5997 NDR_PNP_ADDEMPTYLOGCONF,
5998 &r);
5999
6000 if (!NT_STATUS_IS_OK(status)) {
6001 return status;
6002 }
6003
6004 if (NT_STATUS_IS_ERR(status)) {
6005 return status;
6006 }
6007
6008 /* Return variables */
6009
6010 /* Return result */
6011 if (werror) {
6012 *werror = r.out.result;
6013 }
6014
6015 return werror_to_ntstatus(r.out.result);
6016}
6017
6018struct rpccli_PNP_FreeLogConf_state {
6019 struct PNP_FreeLogConf orig;
6020 struct PNP_FreeLogConf tmp;
6021 TALLOC_CTX *out_mem_ctx;
6022 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6023};
6024
6025static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq);
6026
6027struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx,
6028 struct tevent_context *ev,
6029 struct rpc_pipe_client *cli)
6030{
6031 struct tevent_req *req;
6032 struct rpccli_PNP_FreeLogConf_state *state;
6033 struct tevent_req *subreq;
6034
6035 req = tevent_req_create(mem_ctx, &state,
6036 struct rpccli_PNP_FreeLogConf_state);
6037 if (req == NULL) {
6038 return NULL;
6039 }
6040 state->out_mem_ctx = NULL;
6041 state->dispatch_recv = cli->dispatch_recv;
6042
6043 /* In parameters */
6044
6045 /* Out parameters */
6046
6047 /* Result */
6048 ZERO_STRUCT(state->orig.out.result);
6049
6050 /* make a temporary copy, that we pass to the dispatch function */
6051 state->tmp = state->orig;
6052
6053 subreq = cli->dispatch_send(state, ev, cli,
6054 &ndr_table_ntsvcs,
6055 NDR_PNP_FREELOGCONF,
6056 &state->tmp);
6057 if (tevent_req_nomem(subreq, req)) {
6058 return tevent_req_post(req, ev);
6059 }
6060 tevent_req_set_callback(subreq, rpccli_PNP_FreeLogConf_done, req);
6061 return req;
6062}
6063
6064static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq)
6065{
6066 struct tevent_req *req = tevent_req_callback_data(
6067 subreq, struct tevent_req);
6068 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6069 req, struct rpccli_PNP_FreeLogConf_state);
6070 NTSTATUS status;
6071 TALLOC_CTX *mem_ctx;
6072
6073 if (state->out_mem_ctx) {
6074 mem_ctx = state->out_mem_ctx;
6075 } else {
6076 mem_ctx = state;
6077 }
6078
6079 status = state->dispatch_recv(subreq, mem_ctx);
6080 TALLOC_FREE(subreq);
6081 if (!NT_STATUS_IS_OK(status)) {
6082 tevent_req_nterror(req, status);
6083 return;
6084 }
6085
6086 /* Copy out parameters */
6087
6088 /* Copy result */
6089 state->orig.out.result = state->tmp.out.result;
6090
6091 /* Reset temporary structure */
6092 ZERO_STRUCT(state->tmp);
6093
6094 tevent_req_done(req);
6095}
6096
6097NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req,
6098 TALLOC_CTX *mem_ctx,
6099 WERROR *result)
6100{
6101 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6102 req, struct rpccli_PNP_FreeLogConf_state);
6103 NTSTATUS status;
6104
6105 if (tevent_req_is_nterror(req, &status)) {
6106 tevent_req_received(req);
6107 return status;
6108 }
6109
6110 /* Steal possbile out parameters to the callers context */
6111 talloc_steal(mem_ctx, state->out_mem_ctx);
6112
6113 /* Return result */
6114 *result = state->orig.out.result;
6115
6116 tevent_req_received(req);
6117 return NT_STATUS_OK;
6118}
6119
6120NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
6121 TALLOC_CTX *mem_ctx,
6122 WERROR *werror)
6123{
6124 struct PNP_FreeLogConf r;
6125 NTSTATUS status;
6126
6127 /* In parameters */
6128
6129 status = cli->dispatch(cli,
6130 mem_ctx,
6131 &ndr_table_ntsvcs,
6132 NDR_PNP_FREELOGCONF,
6133 &r);
6134
6135 if (!NT_STATUS_IS_OK(status)) {
6136 return status;
6137 }
6138
6139 if (NT_STATUS_IS_ERR(status)) {
6140 return status;
6141 }
6142
6143 /* Return variables */
6144
6145 /* Return result */
6146 if (werror) {
6147 *werror = r.out.result;
6148 }
6149
6150 return werror_to_ntstatus(r.out.result);
6151}
6152
6153struct rpccli_PNP_GetFirstLogConf_state {
6154 struct PNP_GetFirstLogConf orig;
6155 struct PNP_GetFirstLogConf tmp;
6156 TALLOC_CTX *out_mem_ctx;
6157 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6158};
6159
6160static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq);
6161
6162struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx,
6163 struct tevent_context *ev,
6164 struct rpc_pipe_client *cli)
6165{
6166 struct tevent_req *req;
6167 struct rpccli_PNP_GetFirstLogConf_state *state;
6168 struct tevent_req *subreq;
6169
6170 req = tevent_req_create(mem_ctx, &state,
6171 struct rpccli_PNP_GetFirstLogConf_state);
6172 if (req == NULL) {
6173 return NULL;
6174 }
6175 state->out_mem_ctx = NULL;
6176 state->dispatch_recv = cli->dispatch_recv;
6177
6178 /* In parameters */
6179
6180 /* Out parameters */
6181
6182 /* Result */
6183 ZERO_STRUCT(state->orig.out.result);
6184
6185 /* make a temporary copy, that we pass to the dispatch function */
6186 state->tmp = state->orig;
6187
6188 subreq = cli->dispatch_send(state, ev, cli,
6189 &ndr_table_ntsvcs,
6190 NDR_PNP_GETFIRSTLOGCONF,
6191 &state->tmp);
6192 if (tevent_req_nomem(subreq, req)) {
6193 return tevent_req_post(req, ev);
6194 }
6195 tevent_req_set_callback(subreq, rpccli_PNP_GetFirstLogConf_done, req);
6196 return req;
6197}
6198
6199static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq)
6200{
6201 struct tevent_req *req = tevent_req_callback_data(
6202 subreq, struct tevent_req);
6203 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6204 req, struct rpccli_PNP_GetFirstLogConf_state);
6205 NTSTATUS status;
6206 TALLOC_CTX *mem_ctx;
6207
6208 if (state->out_mem_ctx) {
6209 mem_ctx = state->out_mem_ctx;
6210 } else {
6211 mem_ctx = state;
6212 }
6213
6214 status = state->dispatch_recv(subreq, mem_ctx);
6215 TALLOC_FREE(subreq);
6216 if (!NT_STATUS_IS_OK(status)) {
6217 tevent_req_nterror(req, status);
6218 return;
6219 }
6220
6221 /* Copy out parameters */
6222
6223 /* Copy result */
6224 state->orig.out.result = state->tmp.out.result;
6225
6226 /* Reset temporary structure */
6227 ZERO_STRUCT(state->tmp);
6228
6229 tevent_req_done(req);
6230}
6231
6232NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req,
6233 TALLOC_CTX *mem_ctx,
6234 WERROR *result)
6235{
6236 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6237 req, struct rpccli_PNP_GetFirstLogConf_state);
6238 NTSTATUS status;
6239
6240 if (tevent_req_is_nterror(req, &status)) {
6241 tevent_req_received(req);
6242 return status;
6243 }
6244
6245 /* Steal possbile out parameters to the callers context */
6246 talloc_steal(mem_ctx, state->out_mem_ctx);
6247
6248 /* Return result */
6249 *result = state->orig.out.result;
6250
6251 tevent_req_received(req);
6252 return NT_STATUS_OK;
6253}
6254
6255NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
6256 TALLOC_CTX *mem_ctx,
6257 WERROR *werror)
6258{
6259 struct PNP_GetFirstLogConf r;
6260 NTSTATUS status;
6261
6262 /* In parameters */
6263
6264 status = cli->dispatch(cli,
6265 mem_ctx,
6266 &ndr_table_ntsvcs,
6267 NDR_PNP_GETFIRSTLOGCONF,
6268 &r);
6269
6270 if (!NT_STATUS_IS_OK(status)) {
6271 return status;
6272 }
6273
6274 if (NT_STATUS_IS_ERR(status)) {
6275 return status;
6276 }
6277
6278 /* Return variables */
6279
6280 /* Return result */
6281 if (werror) {
6282 *werror = r.out.result;
6283 }
6284
6285 return werror_to_ntstatus(r.out.result);
6286}
6287
6288struct rpccli_PNP_GetNextLogConf_state {
6289 struct PNP_GetNextLogConf orig;
6290 struct PNP_GetNextLogConf tmp;
6291 TALLOC_CTX *out_mem_ctx;
6292 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6293};
6294
6295static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq);
6296
6297struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx,
6298 struct tevent_context *ev,
6299 struct rpc_pipe_client *cli)
6300{
6301 struct tevent_req *req;
6302 struct rpccli_PNP_GetNextLogConf_state *state;
6303 struct tevent_req *subreq;
6304
6305 req = tevent_req_create(mem_ctx, &state,
6306 struct rpccli_PNP_GetNextLogConf_state);
6307 if (req == NULL) {
6308 return NULL;
6309 }
6310 state->out_mem_ctx = NULL;
6311 state->dispatch_recv = cli->dispatch_recv;
6312
6313 /* In parameters */
6314
6315 /* Out parameters */
6316
6317 /* Result */
6318 ZERO_STRUCT(state->orig.out.result);
6319
6320 /* make a temporary copy, that we pass to the dispatch function */
6321 state->tmp = state->orig;
6322
6323 subreq = cli->dispatch_send(state, ev, cli,
6324 &ndr_table_ntsvcs,
6325 NDR_PNP_GETNEXTLOGCONF,
6326 &state->tmp);
6327 if (tevent_req_nomem(subreq, req)) {
6328 return tevent_req_post(req, ev);
6329 }
6330 tevent_req_set_callback(subreq, rpccli_PNP_GetNextLogConf_done, req);
6331 return req;
6332}
6333
6334static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq)
6335{
6336 struct tevent_req *req = tevent_req_callback_data(
6337 subreq, struct tevent_req);
6338 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6339 req, struct rpccli_PNP_GetNextLogConf_state);
6340 NTSTATUS status;
6341 TALLOC_CTX *mem_ctx;
6342
6343 if (state->out_mem_ctx) {
6344 mem_ctx = state->out_mem_ctx;
6345 } else {
6346 mem_ctx = state;
6347 }
6348
6349 status = state->dispatch_recv(subreq, mem_ctx);
6350 TALLOC_FREE(subreq);
6351 if (!NT_STATUS_IS_OK(status)) {
6352 tevent_req_nterror(req, status);
6353 return;
6354 }
6355
6356 /* Copy out parameters */
6357
6358 /* Copy result */
6359 state->orig.out.result = state->tmp.out.result;
6360
6361 /* Reset temporary structure */
6362 ZERO_STRUCT(state->tmp);
6363
6364 tevent_req_done(req);
6365}
6366
6367NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req,
6368 TALLOC_CTX *mem_ctx,
6369 WERROR *result)
6370{
6371 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6372 req, struct rpccli_PNP_GetNextLogConf_state);
6373 NTSTATUS status;
6374
6375 if (tevent_req_is_nterror(req, &status)) {
6376 tevent_req_received(req);
6377 return status;
6378 }
6379
6380 /* Steal possbile out parameters to the callers context */
6381 talloc_steal(mem_ctx, state->out_mem_ctx);
6382
6383 /* Return result */
6384 *result = state->orig.out.result;
6385
6386 tevent_req_received(req);
6387 return NT_STATUS_OK;
6388}
6389
6390NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
6391 TALLOC_CTX *mem_ctx,
6392 WERROR *werror)
6393{
6394 struct PNP_GetNextLogConf r;
6395 NTSTATUS status;
6396
6397 /* In parameters */
6398
6399 status = cli->dispatch(cli,
6400 mem_ctx,
6401 &ndr_table_ntsvcs,
6402 NDR_PNP_GETNEXTLOGCONF,
6403 &r);
6404
6405 if (!NT_STATUS_IS_OK(status)) {
6406 return status;
6407 }
6408
6409 if (NT_STATUS_IS_ERR(status)) {
6410 return status;
6411 }
6412
6413 /* Return variables */
6414
6415 /* Return result */
6416 if (werror) {
6417 *werror = r.out.result;
6418 }
6419
6420 return werror_to_ntstatus(r.out.result);
6421}
6422
6423struct rpccli_PNP_GetLogConfPriority_state {
6424 struct PNP_GetLogConfPriority orig;
6425 struct PNP_GetLogConfPriority tmp;
6426 TALLOC_CTX *out_mem_ctx;
6427 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6428};
6429
6430static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq);
6431
6432struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx,
6433 struct tevent_context *ev,
6434 struct rpc_pipe_client *cli)
6435{
6436 struct tevent_req *req;
6437 struct rpccli_PNP_GetLogConfPriority_state *state;
6438 struct tevent_req *subreq;
6439
6440 req = tevent_req_create(mem_ctx, &state,
6441 struct rpccli_PNP_GetLogConfPriority_state);
6442 if (req == NULL) {
6443 return NULL;
6444 }
6445 state->out_mem_ctx = NULL;
6446 state->dispatch_recv = cli->dispatch_recv;
6447
6448 /* In parameters */
6449
6450 /* Out parameters */
6451
6452 /* Result */
6453 ZERO_STRUCT(state->orig.out.result);
6454
6455 /* make a temporary copy, that we pass to the dispatch function */
6456 state->tmp = state->orig;
6457
6458 subreq = cli->dispatch_send(state, ev, cli,
6459 &ndr_table_ntsvcs,
6460 NDR_PNP_GETLOGCONFPRIORITY,
6461 &state->tmp);
6462 if (tevent_req_nomem(subreq, req)) {
6463 return tevent_req_post(req, ev);
6464 }
6465 tevent_req_set_callback(subreq, rpccli_PNP_GetLogConfPriority_done, req);
6466 return req;
6467}
6468
6469static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq)
6470{
6471 struct tevent_req *req = tevent_req_callback_data(
6472 subreq, struct tevent_req);
6473 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6474 req, struct rpccli_PNP_GetLogConfPriority_state);
6475 NTSTATUS status;
6476 TALLOC_CTX *mem_ctx;
6477
6478 if (state->out_mem_ctx) {
6479 mem_ctx = state->out_mem_ctx;
6480 } else {
6481 mem_ctx = state;
6482 }
6483
6484 status = state->dispatch_recv(subreq, mem_ctx);
6485 TALLOC_FREE(subreq);
6486 if (!NT_STATUS_IS_OK(status)) {
6487 tevent_req_nterror(req, status);
6488 return;
6489 }
6490
6491 /* Copy out parameters */
6492
6493 /* Copy result */
6494 state->orig.out.result = state->tmp.out.result;
6495
6496 /* Reset temporary structure */
6497 ZERO_STRUCT(state->tmp);
6498
6499 tevent_req_done(req);
6500}
6501
6502NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req,
6503 TALLOC_CTX *mem_ctx,
6504 WERROR *result)
6505{
6506 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6507 req, struct rpccli_PNP_GetLogConfPriority_state);
6508 NTSTATUS status;
6509
6510 if (tevent_req_is_nterror(req, &status)) {
6511 tevent_req_received(req);
6512 return status;
6513 }
6514
6515 /* Steal possbile out parameters to the callers context */
6516 talloc_steal(mem_ctx, state->out_mem_ctx);
6517
6518 /* Return result */
6519 *result = state->orig.out.result;
6520
6521 tevent_req_received(req);
6522 return NT_STATUS_OK;
6523}
6524
6525NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
6526 TALLOC_CTX *mem_ctx,
6527 WERROR *werror)
6528{
6529 struct PNP_GetLogConfPriority r;
6530 NTSTATUS status;
6531
6532 /* In parameters */
6533
6534 status = cli->dispatch(cli,
6535 mem_ctx,
6536 &ndr_table_ntsvcs,
6537 NDR_PNP_GETLOGCONFPRIORITY,
6538 &r);
6539
6540 if (!NT_STATUS_IS_OK(status)) {
6541 return status;
6542 }
6543
6544 if (NT_STATUS_IS_ERR(status)) {
6545 return status;
6546 }
6547
6548 /* Return variables */
6549
6550 /* Return result */
6551 if (werror) {
6552 *werror = r.out.result;
6553 }
6554
6555 return werror_to_ntstatus(r.out.result);
6556}
6557
6558struct rpccli_PNP_AddResDes_state {
6559 struct PNP_AddResDes orig;
6560 struct PNP_AddResDes tmp;
6561 TALLOC_CTX *out_mem_ctx;
6562 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6563};
6564
6565static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq);
6566
6567struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx,
6568 struct tevent_context *ev,
6569 struct rpc_pipe_client *cli)
6570{
6571 struct tevent_req *req;
6572 struct rpccli_PNP_AddResDes_state *state;
6573 struct tevent_req *subreq;
6574
6575 req = tevent_req_create(mem_ctx, &state,
6576 struct rpccli_PNP_AddResDes_state);
6577 if (req == NULL) {
6578 return NULL;
6579 }
6580 state->out_mem_ctx = NULL;
6581 state->dispatch_recv = cli->dispatch_recv;
6582
6583 /* In parameters */
6584
6585 /* Out parameters */
6586
6587 /* Result */
6588 ZERO_STRUCT(state->orig.out.result);
6589
6590 /* make a temporary copy, that we pass to the dispatch function */
6591 state->tmp = state->orig;
6592
6593 subreq = cli->dispatch_send(state, ev, cli,
6594 &ndr_table_ntsvcs,
6595 NDR_PNP_ADDRESDES,
6596 &state->tmp);
6597 if (tevent_req_nomem(subreq, req)) {
6598 return tevent_req_post(req, ev);
6599 }
6600 tevent_req_set_callback(subreq, rpccli_PNP_AddResDes_done, req);
6601 return req;
6602}
6603
6604static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq)
6605{
6606 struct tevent_req *req = tevent_req_callback_data(
6607 subreq, struct tevent_req);
6608 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6609 req, struct rpccli_PNP_AddResDes_state);
6610 NTSTATUS status;
6611 TALLOC_CTX *mem_ctx;
6612
6613 if (state->out_mem_ctx) {
6614 mem_ctx = state->out_mem_ctx;
6615 } else {
6616 mem_ctx = state;
6617 }
6618
6619 status = state->dispatch_recv(subreq, mem_ctx);
6620 TALLOC_FREE(subreq);
6621 if (!NT_STATUS_IS_OK(status)) {
6622 tevent_req_nterror(req, status);
6623 return;
6624 }
6625
6626 /* Copy out parameters */
6627
6628 /* Copy result */
6629 state->orig.out.result = state->tmp.out.result;
6630
6631 /* Reset temporary structure */
6632 ZERO_STRUCT(state->tmp);
6633
6634 tevent_req_done(req);
6635}
6636
6637NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req,
6638 TALLOC_CTX *mem_ctx,
6639 WERROR *result)
6640{
6641 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6642 req, struct rpccli_PNP_AddResDes_state);
6643 NTSTATUS status;
6644
6645 if (tevent_req_is_nterror(req, &status)) {
6646 tevent_req_received(req);
6647 return status;
6648 }
6649
6650 /* Steal possbile out parameters to the callers context */
6651 talloc_steal(mem_ctx, state->out_mem_ctx);
6652
6653 /* Return result */
6654 *result = state->orig.out.result;
6655
6656 tevent_req_received(req);
6657 return NT_STATUS_OK;
6658}
6659
6660NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
6661 TALLOC_CTX *mem_ctx,
6662 WERROR *werror)
6663{
6664 struct PNP_AddResDes r;
6665 NTSTATUS status;
6666
6667 /* In parameters */
6668
6669 status = cli->dispatch(cli,
6670 mem_ctx,
6671 &ndr_table_ntsvcs,
6672 NDR_PNP_ADDRESDES,
6673 &r);
6674
6675 if (!NT_STATUS_IS_OK(status)) {
6676 return status;
6677 }
6678
6679 if (NT_STATUS_IS_ERR(status)) {
6680 return status;
6681 }
6682
6683 /* Return variables */
6684
6685 /* Return result */
6686 if (werror) {
6687 *werror = r.out.result;
6688 }
6689
6690 return werror_to_ntstatus(r.out.result);
6691}
6692
6693struct rpccli_PNP_FreeResDes_state {
6694 struct PNP_FreeResDes orig;
6695 struct PNP_FreeResDes tmp;
6696 TALLOC_CTX *out_mem_ctx;
6697 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6698};
6699
6700static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq);
6701
6702struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx,
6703 struct tevent_context *ev,
6704 struct rpc_pipe_client *cli)
6705{
6706 struct tevent_req *req;
6707 struct rpccli_PNP_FreeResDes_state *state;
6708 struct tevent_req *subreq;
6709
6710 req = tevent_req_create(mem_ctx, &state,
6711 struct rpccli_PNP_FreeResDes_state);
6712 if (req == NULL) {
6713 return NULL;
6714 }
6715 state->out_mem_ctx = NULL;
6716 state->dispatch_recv = cli->dispatch_recv;
6717
6718 /* In parameters */
6719
6720 /* Out parameters */
6721
6722 /* Result */
6723 ZERO_STRUCT(state->orig.out.result);
6724
6725 /* make a temporary copy, that we pass to the dispatch function */
6726 state->tmp = state->orig;
6727
6728 subreq = cli->dispatch_send(state, ev, cli,
6729 &ndr_table_ntsvcs,
6730 NDR_PNP_FREERESDES,
6731 &state->tmp);
6732 if (tevent_req_nomem(subreq, req)) {
6733 return tevent_req_post(req, ev);
6734 }
6735 tevent_req_set_callback(subreq, rpccli_PNP_FreeResDes_done, req);
6736 return req;
6737}
6738
6739static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq)
6740{
6741 struct tevent_req *req = tevent_req_callback_data(
6742 subreq, struct tevent_req);
6743 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6744 req, struct rpccli_PNP_FreeResDes_state);
6745 NTSTATUS status;
6746 TALLOC_CTX *mem_ctx;
6747
6748 if (state->out_mem_ctx) {
6749 mem_ctx = state->out_mem_ctx;
6750 } else {
6751 mem_ctx = state;
6752 }
6753
6754 status = state->dispatch_recv(subreq, mem_ctx);
6755 TALLOC_FREE(subreq);
6756 if (!NT_STATUS_IS_OK(status)) {
6757 tevent_req_nterror(req, status);
6758 return;
6759 }
6760
6761 /* Copy out parameters */
6762
6763 /* Copy result */
6764 state->orig.out.result = state->tmp.out.result;
6765
6766 /* Reset temporary structure */
6767 ZERO_STRUCT(state->tmp);
6768
6769 tevent_req_done(req);
6770}
6771
6772NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req,
6773 TALLOC_CTX *mem_ctx,
6774 WERROR *result)
6775{
6776 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6777 req, struct rpccli_PNP_FreeResDes_state);
6778 NTSTATUS status;
6779
6780 if (tevent_req_is_nterror(req, &status)) {
6781 tevent_req_received(req);
6782 return status;
6783 }
6784
6785 /* Steal possbile out parameters to the callers context */
6786 talloc_steal(mem_ctx, state->out_mem_ctx);
6787
6788 /* Return result */
6789 *result = state->orig.out.result;
6790
6791 tevent_req_received(req);
6792 return NT_STATUS_OK;
6793}
6794
6795NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
6796 TALLOC_CTX *mem_ctx,
6797 WERROR *werror)
6798{
6799 struct PNP_FreeResDes r;
6800 NTSTATUS status;
6801
6802 /* In parameters */
6803
6804 status = cli->dispatch(cli,
6805 mem_ctx,
6806 &ndr_table_ntsvcs,
6807 NDR_PNP_FREERESDES,
6808 &r);
6809
6810 if (!NT_STATUS_IS_OK(status)) {
6811 return status;
6812 }
6813
6814 if (NT_STATUS_IS_ERR(status)) {
6815 return status;
6816 }
6817
6818 /* Return variables */
6819
6820 /* Return result */
6821 if (werror) {
6822 *werror = r.out.result;
6823 }
6824
6825 return werror_to_ntstatus(r.out.result);
6826}
6827
6828struct rpccli_PNP_GetNextResDes_state {
6829 struct PNP_GetNextResDes orig;
6830 struct PNP_GetNextResDes tmp;
6831 TALLOC_CTX *out_mem_ctx;
6832 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6833};
6834
6835static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq);
6836
6837struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx,
6838 struct tevent_context *ev,
6839 struct rpc_pipe_client *cli)
6840{
6841 struct tevent_req *req;
6842 struct rpccli_PNP_GetNextResDes_state *state;
6843 struct tevent_req *subreq;
6844
6845 req = tevent_req_create(mem_ctx, &state,
6846 struct rpccli_PNP_GetNextResDes_state);
6847 if (req == NULL) {
6848 return NULL;
6849 }
6850 state->out_mem_ctx = NULL;
6851 state->dispatch_recv = cli->dispatch_recv;
6852
6853 /* In parameters */
6854
6855 /* Out parameters */
6856
6857 /* Result */
6858 ZERO_STRUCT(state->orig.out.result);
6859
6860 /* make a temporary copy, that we pass to the dispatch function */
6861 state->tmp = state->orig;
6862
6863 subreq = cli->dispatch_send(state, ev, cli,
6864 &ndr_table_ntsvcs,
6865 NDR_PNP_GETNEXTRESDES,
6866 &state->tmp);
6867 if (tevent_req_nomem(subreq, req)) {
6868 return tevent_req_post(req, ev);
6869 }
6870 tevent_req_set_callback(subreq, rpccli_PNP_GetNextResDes_done, req);
6871 return req;
6872}
6873
6874static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq)
6875{
6876 struct tevent_req *req = tevent_req_callback_data(
6877 subreq, struct tevent_req);
6878 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6879 req, struct rpccli_PNP_GetNextResDes_state);
6880 NTSTATUS status;
6881 TALLOC_CTX *mem_ctx;
6882
6883 if (state->out_mem_ctx) {
6884 mem_ctx = state->out_mem_ctx;
6885 } else {
6886 mem_ctx = state;
6887 }
6888
6889 status = state->dispatch_recv(subreq, mem_ctx);
6890 TALLOC_FREE(subreq);
6891 if (!NT_STATUS_IS_OK(status)) {
6892 tevent_req_nterror(req, status);
6893 return;
6894 }
6895
6896 /* Copy out parameters */
6897
6898 /* Copy result */
6899 state->orig.out.result = state->tmp.out.result;
6900
6901 /* Reset temporary structure */
6902 ZERO_STRUCT(state->tmp);
6903
6904 tevent_req_done(req);
6905}
6906
6907NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req,
6908 TALLOC_CTX *mem_ctx,
6909 WERROR *result)
6910{
6911 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6912 req, struct rpccli_PNP_GetNextResDes_state);
6913 NTSTATUS status;
6914
6915 if (tevent_req_is_nterror(req, &status)) {
6916 tevent_req_received(req);
6917 return status;
6918 }
6919
6920 /* Steal possbile out parameters to the callers context */
6921 talloc_steal(mem_ctx, state->out_mem_ctx);
6922
6923 /* Return result */
6924 *result = state->orig.out.result;
6925
6926 tevent_req_received(req);
6927 return NT_STATUS_OK;
6928}
6929
6930NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
6931 TALLOC_CTX *mem_ctx,
6932 WERROR *werror)
6933{
6934 struct PNP_GetNextResDes r;
6935 NTSTATUS status;
6936
6937 /* In parameters */
6938
6939 status = cli->dispatch(cli,
6940 mem_ctx,
6941 &ndr_table_ntsvcs,
6942 NDR_PNP_GETNEXTRESDES,
6943 &r);
6944
6945 if (!NT_STATUS_IS_OK(status)) {
6946 return status;
6947 }
6948
6949 if (NT_STATUS_IS_ERR(status)) {
6950 return status;
6951 }
6952
6953 /* Return variables */
6954
6955 /* Return result */
6956 if (werror) {
6957 *werror = r.out.result;
6958 }
6959
6960 return werror_to_ntstatus(r.out.result);
6961}
6962
6963struct rpccli_PNP_GetResDesData_state {
6964 struct PNP_GetResDesData orig;
6965 struct PNP_GetResDesData tmp;
6966 TALLOC_CTX *out_mem_ctx;
6967 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6968};
6969
6970static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq);
6971
6972struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx,
6973 struct tevent_context *ev,
6974 struct rpc_pipe_client *cli)
6975{
6976 struct tevent_req *req;
6977 struct rpccli_PNP_GetResDesData_state *state;
6978 struct tevent_req *subreq;
6979
6980 req = tevent_req_create(mem_ctx, &state,
6981 struct rpccli_PNP_GetResDesData_state);
6982 if (req == NULL) {
6983 return NULL;
6984 }
6985 state->out_mem_ctx = NULL;
6986 state->dispatch_recv = cli->dispatch_recv;
6987
6988 /* In parameters */
6989
6990 /* Out parameters */
6991
6992 /* Result */
6993 ZERO_STRUCT(state->orig.out.result);
6994
6995 /* make a temporary copy, that we pass to the dispatch function */
6996 state->tmp = state->orig;
6997
6998 subreq = cli->dispatch_send(state, ev, cli,
6999 &ndr_table_ntsvcs,
7000 NDR_PNP_GETRESDESDATA,
7001 &state->tmp);
7002 if (tevent_req_nomem(subreq, req)) {
7003 return tevent_req_post(req, ev);
7004 }
7005 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesData_done, req);
7006 return req;
7007}
7008
7009static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq)
7010{
7011 struct tevent_req *req = tevent_req_callback_data(
7012 subreq, struct tevent_req);
7013 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7014 req, struct rpccli_PNP_GetResDesData_state);
7015 NTSTATUS status;
7016 TALLOC_CTX *mem_ctx;
7017
7018 if (state->out_mem_ctx) {
7019 mem_ctx = state->out_mem_ctx;
7020 } else {
7021 mem_ctx = state;
7022 }
7023
7024 status = state->dispatch_recv(subreq, mem_ctx);
7025 TALLOC_FREE(subreq);
7026 if (!NT_STATUS_IS_OK(status)) {
7027 tevent_req_nterror(req, status);
7028 return;
7029 }
7030
7031 /* Copy out parameters */
7032
7033 /* Copy result */
7034 state->orig.out.result = state->tmp.out.result;
7035
7036 /* Reset temporary structure */
7037 ZERO_STRUCT(state->tmp);
7038
7039 tevent_req_done(req);
7040}
7041
7042NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req,
7043 TALLOC_CTX *mem_ctx,
7044 WERROR *result)
7045{
7046 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7047 req, struct rpccli_PNP_GetResDesData_state);
7048 NTSTATUS status;
7049
7050 if (tevent_req_is_nterror(req, &status)) {
7051 tevent_req_received(req);
7052 return status;
7053 }
7054
7055 /* Steal possbile out parameters to the callers context */
7056 talloc_steal(mem_ctx, state->out_mem_ctx);
7057
7058 /* Return result */
7059 *result = state->orig.out.result;
7060
7061 tevent_req_received(req);
7062 return NT_STATUS_OK;
7063}
7064
7065NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
7066 TALLOC_CTX *mem_ctx,
7067 WERROR *werror)
7068{
7069 struct PNP_GetResDesData r;
7070 NTSTATUS status;
7071
7072 /* In parameters */
7073
7074 status = cli->dispatch(cli,
7075 mem_ctx,
7076 &ndr_table_ntsvcs,
7077 NDR_PNP_GETRESDESDATA,
7078 &r);
7079
7080 if (!NT_STATUS_IS_OK(status)) {
7081 return status;
7082 }
7083
7084 if (NT_STATUS_IS_ERR(status)) {
7085 return status;
7086 }
7087
7088 /* Return variables */
7089
7090 /* Return result */
7091 if (werror) {
7092 *werror = r.out.result;
7093 }
7094
7095 return werror_to_ntstatus(r.out.result);
7096}
7097
7098struct rpccli_PNP_GetResDesDataSize_state {
7099 struct PNP_GetResDesDataSize orig;
7100 struct PNP_GetResDesDataSize tmp;
7101 TALLOC_CTX *out_mem_ctx;
7102 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7103};
7104
7105static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq);
7106
7107struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx,
7108 struct tevent_context *ev,
7109 struct rpc_pipe_client *cli)
7110{
7111 struct tevent_req *req;
7112 struct rpccli_PNP_GetResDesDataSize_state *state;
7113 struct tevent_req *subreq;
7114
7115 req = tevent_req_create(mem_ctx, &state,
7116 struct rpccli_PNP_GetResDesDataSize_state);
7117 if (req == NULL) {
7118 return NULL;
7119 }
7120 state->out_mem_ctx = NULL;
7121 state->dispatch_recv = cli->dispatch_recv;
7122
7123 /* In parameters */
7124
7125 /* Out parameters */
7126
7127 /* Result */
7128 ZERO_STRUCT(state->orig.out.result);
7129
7130 /* make a temporary copy, that we pass to the dispatch function */
7131 state->tmp = state->orig;
7132
7133 subreq = cli->dispatch_send(state, ev, cli,
7134 &ndr_table_ntsvcs,
7135 NDR_PNP_GETRESDESDATASIZE,
7136 &state->tmp);
7137 if (tevent_req_nomem(subreq, req)) {
7138 return tevent_req_post(req, ev);
7139 }
7140 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesDataSize_done, req);
7141 return req;
7142}
7143
7144static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq)
7145{
7146 struct tevent_req *req = tevent_req_callback_data(
7147 subreq, struct tevent_req);
7148 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7149 req, struct rpccli_PNP_GetResDesDataSize_state);
7150 NTSTATUS status;
7151 TALLOC_CTX *mem_ctx;
7152
7153 if (state->out_mem_ctx) {
7154 mem_ctx = state->out_mem_ctx;
7155 } else {
7156 mem_ctx = state;
7157 }
7158
7159 status = state->dispatch_recv(subreq, mem_ctx);
7160 TALLOC_FREE(subreq);
7161 if (!NT_STATUS_IS_OK(status)) {
7162 tevent_req_nterror(req, status);
7163 return;
7164 }
7165
7166 /* Copy out parameters */
7167
7168 /* Copy result */
7169 state->orig.out.result = state->tmp.out.result;
7170
7171 /* Reset temporary structure */
7172 ZERO_STRUCT(state->tmp);
7173
7174 tevent_req_done(req);
7175}
7176
7177NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req,
7178 TALLOC_CTX *mem_ctx,
7179 WERROR *result)
7180{
7181 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7182 req, struct rpccli_PNP_GetResDesDataSize_state);
7183 NTSTATUS status;
7184
7185 if (tevent_req_is_nterror(req, &status)) {
7186 tevent_req_received(req);
7187 return status;
7188 }
7189
7190 /* Steal possbile out parameters to the callers context */
7191 talloc_steal(mem_ctx, state->out_mem_ctx);
7192
7193 /* Return result */
7194 *result = state->orig.out.result;
7195
7196 tevent_req_received(req);
7197 return NT_STATUS_OK;
7198}
7199
7200NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
7201 TALLOC_CTX *mem_ctx,
7202 WERROR *werror)
7203{
7204 struct PNP_GetResDesDataSize r;
7205 NTSTATUS status;
7206
7207 /* In parameters */
7208
7209 status = cli->dispatch(cli,
7210 mem_ctx,
7211 &ndr_table_ntsvcs,
7212 NDR_PNP_GETRESDESDATASIZE,
7213 &r);
7214
7215 if (!NT_STATUS_IS_OK(status)) {
7216 return status;
7217 }
7218
7219 if (NT_STATUS_IS_ERR(status)) {
7220 return status;
7221 }
7222
7223 /* Return variables */
7224
7225 /* Return result */
7226 if (werror) {
7227 *werror = r.out.result;
7228 }
7229
7230 return werror_to_ntstatus(r.out.result);
7231}
7232
7233struct rpccli_PNP_ModifyResDes_state {
7234 struct PNP_ModifyResDes orig;
7235 struct PNP_ModifyResDes tmp;
7236 TALLOC_CTX *out_mem_ctx;
7237 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7238};
7239
7240static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq);
7241
7242struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx,
7243 struct tevent_context *ev,
7244 struct rpc_pipe_client *cli)
7245{
7246 struct tevent_req *req;
7247 struct rpccli_PNP_ModifyResDes_state *state;
7248 struct tevent_req *subreq;
7249
7250 req = tevent_req_create(mem_ctx, &state,
7251 struct rpccli_PNP_ModifyResDes_state);
7252 if (req == NULL) {
7253 return NULL;
7254 }
7255 state->out_mem_ctx = NULL;
7256 state->dispatch_recv = cli->dispatch_recv;
7257
7258 /* In parameters */
7259
7260 /* Out parameters */
7261
7262 /* Result */
7263 ZERO_STRUCT(state->orig.out.result);
7264
7265 /* make a temporary copy, that we pass to the dispatch function */
7266 state->tmp = state->orig;
7267
7268 subreq = cli->dispatch_send(state, ev, cli,
7269 &ndr_table_ntsvcs,
7270 NDR_PNP_MODIFYRESDES,
7271 &state->tmp);
7272 if (tevent_req_nomem(subreq, req)) {
7273 return tevent_req_post(req, ev);
7274 }
7275 tevent_req_set_callback(subreq, rpccli_PNP_ModifyResDes_done, req);
7276 return req;
7277}
7278
7279static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq)
7280{
7281 struct tevent_req *req = tevent_req_callback_data(
7282 subreq, struct tevent_req);
7283 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7284 req, struct rpccli_PNP_ModifyResDes_state);
7285 NTSTATUS status;
7286 TALLOC_CTX *mem_ctx;
7287
7288 if (state->out_mem_ctx) {
7289 mem_ctx = state->out_mem_ctx;
7290 } else {
7291 mem_ctx = state;
7292 }
7293
7294 status = state->dispatch_recv(subreq, mem_ctx);
7295 TALLOC_FREE(subreq);
7296 if (!NT_STATUS_IS_OK(status)) {
7297 tevent_req_nterror(req, status);
7298 return;
7299 }
7300
7301 /* Copy out parameters */
7302
7303 /* Copy result */
7304 state->orig.out.result = state->tmp.out.result;
7305
7306 /* Reset temporary structure */
7307 ZERO_STRUCT(state->tmp);
7308
7309 tevent_req_done(req);
7310}
7311
7312NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req,
7313 TALLOC_CTX *mem_ctx,
7314 WERROR *result)
7315{
7316 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7317 req, struct rpccli_PNP_ModifyResDes_state);
7318 NTSTATUS status;
7319
7320 if (tevent_req_is_nterror(req, &status)) {
7321 tevent_req_received(req);
7322 return status;
7323 }
7324
7325 /* Steal possbile out parameters to the callers context */
7326 talloc_steal(mem_ctx, state->out_mem_ctx);
7327
7328 /* Return result */
7329 *result = state->orig.out.result;
7330
7331 tevent_req_received(req);
7332 return NT_STATUS_OK;
7333}
7334
7335NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
7336 TALLOC_CTX *mem_ctx,
7337 WERROR *werror)
7338{
7339 struct PNP_ModifyResDes r;
7340 NTSTATUS status;
7341
7342 /* In parameters */
7343
7344 status = cli->dispatch(cli,
7345 mem_ctx,
7346 &ndr_table_ntsvcs,
7347 NDR_PNP_MODIFYRESDES,
7348 &r);
7349
7350 if (!NT_STATUS_IS_OK(status)) {
7351 return status;
7352 }
7353
7354 if (NT_STATUS_IS_ERR(status)) {
7355 return status;
7356 }
7357
7358 /* Return variables */
7359
7360 /* Return result */
7361 if (werror) {
7362 *werror = r.out.result;
7363 }
7364
7365 return werror_to_ntstatus(r.out.result);
7366}
7367
7368struct rpccli_PNP_DetectResourceLimit_state {
7369 struct PNP_DetectResourceLimit orig;
7370 struct PNP_DetectResourceLimit tmp;
7371 TALLOC_CTX *out_mem_ctx;
7372 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7373};
7374
7375static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq);
7376
7377struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx,
7378 struct tevent_context *ev,
7379 struct rpc_pipe_client *cli)
7380{
7381 struct tevent_req *req;
7382 struct rpccli_PNP_DetectResourceLimit_state *state;
7383 struct tevent_req *subreq;
7384
7385 req = tevent_req_create(mem_ctx, &state,
7386 struct rpccli_PNP_DetectResourceLimit_state);
7387 if (req == NULL) {
7388 return NULL;
7389 }
7390 state->out_mem_ctx = NULL;
7391 state->dispatch_recv = cli->dispatch_recv;
7392
7393 /* In parameters */
7394
7395 /* Out parameters */
7396
7397 /* Result */
7398 ZERO_STRUCT(state->orig.out.result);
7399
7400 /* make a temporary copy, that we pass to the dispatch function */
7401 state->tmp = state->orig;
7402
7403 subreq = cli->dispatch_send(state, ev, cli,
7404 &ndr_table_ntsvcs,
7405 NDR_PNP_DETECTRESOURCELIMIT,
7406 &state->tmp);
7407 if (tevent_req_nomem(subreq, req)) {
7408 return tevent_req_post(req, ev);
7409 }
7410 tevent_req_set_callback(subreq, rpccli_PNP_DetectResourceLimit_done, req);
7411 return req;
7412}
7413
7414static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq)
7415{
7416 struct tevent_req *req = tevent_req_callback_data(
7417 subreq, struct tevent_req);
7418 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7419 req, struct rpccli_PNP_DetectResourceLimit_state);
7420 NTSTATUS status;
7421 TALLOC_CTX *mem_ctx;
7422
7423 if (state->out_mem_ctx) {
7424 mem_ctx = state->out_mem_ctx;
7425 } else {
7426 mem_ctx = state;
7427 }
7428
7429 status = state->dispatch_recv(subreq, mem_ctx);
7430 TALLOC_FREE(subreq);
7431 if (!NT_STATUS_IS_OK(status)) {
7432 tevent_req_nterror(req, status);
7433 return;
7434 }
7435
7436 /* Copy out parameters */
7437
7438 /* Copy result */
7439 state->orig.out.result = state->tmp.out.result;
7440
7441 /* Reset temporary structure */
7442 ZERO_STRUCT(state->tmp);
7443
7444 tevent_req_done(req);
7445}
7446
7447NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req,
7448 TALLOC_CTX *mem_ctx,
7449 WERROR *result)
7450{
7451 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7452 req, struct rpccli_PNP_DetectResourceLimit_state);
7453 NTSTATUS status;
7454
7455 if (tevent_req_is_nterror(req, &status)) {
7456 tevent_req_received(req);
7457 return status;
7458 }
7459
7460 /* Steal possbile out parameters to the callers context */
7461 talloc_steal(mem_ctx, state->out_mem_ctx);
7462
7463 /* Return result */
7464 *result = state->orig.out.result;
7465
7466 tevent_req_received(req);
7467 return NT_STATUS_OK;
7468}
7469
7470NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
7471 TALLOC_CTX *mem_ctx,
7472 WERROR *werror)
7473{
7474 struct PNP_DetectResourceLimit r;
7475 NTSTATUS status;
7476
7477 /* In parameters */
7478
7479 status = cli->dispatch(cli,
7480 mem_ctx,
7481 &ndr_table_ntsvcs,
7482 NDR_PNP_DETECTRESOURCELIMIT,
7483 &r);
7484
7485 if (!NT_STATUS_IS_OK(status)) {
7486 return status;
7487 }
7488
7489 if (NT_STATUS_IS_ERR(status)) {
7490 return status;
7491 }
7492
7493 /* Return variables */
7494
7495 /* Return result */
7496 if (werror) {
7497 *werror = r.out.result;
7498 }
7499
7500 return werror_to_ntstatus(r.out.result);
7501}
7502
7503struct rpccli_PNP_QueryResConfList_state {
7504 struct PNP_QueryResConfList orig;
7505 struct PNP_QueryResConfList tmp;
7506 TALLOC_CTX *out_mem_ctx;
7507 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7508};
7509
7510static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq);
7511
7512struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx,
7513 struct tevent_context *ev,
7514 struct rpc_pipe_client *cli)
7515{
7516 struct tevent_req *req;
7517 struct rpccli_PNP_QueryResConfList_state *state;
7518 struct tevent_req *subreq;
7519
7520 req = tevent_req_create(mem_ctx, &state,
7521 struct rpccli_PNP_QueryResConfList_state);
7522 if (req == NULL) {
7523 return NULL;
7524 }
7525 state->out_mem_ctx = NULL;
7526 state->dispatch_recv = cli->dispatch_recv;
7527
7528 /* In parameters */
7529
7530 /* Out parameters */
7531
7532 /* Result */
7533 ZERO_STRUCT(state->orig.out.result);
7534
7535 /* make a temporary copy, that we pass to the dispatch function */
7536 state->tmp = state->orig;
7537
7538 subreq = cli->dispatch_send(state, ev, cli,
7539 &ndr_table_ntsvcs,
7540 NDR_PNP_QUERYRESCONFLIST,
7541 &state->tmp);
7542 if (tevent_req_nomem(subreq, req)) {
7543 return tevent_req_post(req, ev);
7544 }
7545 tevent_req_set_callback(subreq, rpccli_PNP_QueryResConfList_done, req);
7546 return req;
7547}
7548
7549static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq)
7550{
7551 struct tevent_req *req = tevent_req_callback_data(
7552 subreq, struct tevent_req);
7553 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7554 req, struct rpccli_PNP_QueryResConfList_state);
7555 NTSTATUS status;
7556 TALLOC_CTX *mem_ctx;
7557
7558 if (state->out_mem_ctx) {
7559 mem_ctx = state->out_mem_ctx;
7560 } else {
7561 mem_ctx = state;
7562 }
7563
7564 status = state->dispatch_recv(subreq, mem_ctx);
7565 TALLOC_FREE(subreq);
7566 if (!NT_STATUS_IS_OK(status)) {
7567 tevent_req_nterror(req, status);
7568 return;
7569 }
7570
7571 /* Copy out parameters */
7572
7573 /* Copy result */
7574 state->orig.out.result = state->tmp.out.result;
7575
7576 /* Reset temporary structure */
7577 ZERO_STRUCT(state->tmp);
7578
7579 tevent_req_done(req);
7580}
7581
7582NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req,
7583 TALLOC_CTX *mem_ctx,
7584 WERROR *result)
7585{
7586 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7587 req, struct rpccli_PNP_QueryResConfList_state);
7588 NTSTATUS status;
7589
7590 if (tevent_req_is_nterror(req, &status)) {
7591 tevent_req_received(req);
7592 return status;
7593 }
7594
7595 /* Steal possbile out parameters to the callers context */
7596 talloc_steal(mem_ctx, state->out_mem_ctx);
7597
7598 /* Return result */
7599 *result = state->orig.out.result;
7600
7601 tevent_req_received(req);
7602 return NT_STATUS_OK;
7603}
7604
7605NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
7606 TALLOC_CTX *mem_ctx,
7607 WERROR *werror)
7608{
7609 struct PNP_QueryResConfList r;
7610 NTSTATUS status;
7611
7612 /* In parameters */
7613
7614 status = cli->dispatch(cli,
7615 mem_ctx,
7616 &ndr_table_ntsvcs,
7617 NDR_PNP_QUERYRESCONFLIST,
7618 &r);
7619
7620 if (!NT_STATUS_IS_OK(status)) {
7621 return status;
7622 }
7623
7624 if (NT_STATUS_IS_ERR(status)) {
7625 return status;
7626 }
7627
7628 /* Return variables */
7629
7630 /* Return result */
7631 if (werror) {
7632 *werror = r.out.result;
7633 }
7634
7635 return werror_to_ntstatus(r.out.result);
7636}
7637
7638struct rpccli_PNP_SetHwProf_state {
7639 struct PNP_SetHwProf orig;
7640 struct PNP_SetHwProf tmp;
7641 TALLOC_CTX *out_mem_ctx;
7642 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7643};
7644
7645static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq);
7646
7647struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx,
7648 struct tevent_context *ev,
7649 struct rpc_pipe_client *cli)
7650{
7651 struct tevent_req *req;
7652 struct rpccli_PNP_SetHwProf_state *state;
7653 struct tevent_req *subreq;
7654
7655 req = tevent_req_create(mem_ctx, &state,
7656 struct rpccli_PNP_SetHwProf_state);
7657 if (req == NULL) {
7658 return NULL;
7659 }
7660 state->out_mem_ctx = NULL;
7661 state->dispatch_recv = cli->dispatch_recv;
7662
7663 /* In parameters */
7664
7665 /* Out parameters */
7666
7667 /* Result */
7668 ZERO_STRUCT(state->orig.out.result);
7669
7670 /* make a temporary copy, that we pass to the dispatch function */
7671 state->tmp = state->orig;
7672
7673 subreq = cli->dispatch_send(state, ev, cli,
7674 &ndr_table_ntsvcs,
7675 NDR_PNP_SETHWPROF,
7676 &state->tmp);
7677 if (tevent_req_nomem(subreq, req)) {
7678 return tevent_req_post(req, ev);
7679 }
7680 tevent_req_set_callback(subreq, rpccli_PNP_SetHwProf_done, req);
7681 return req;
7682}
7683
7684static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq)
7685{
7686 struct tevent_req *req = tevent_req_callback_data(
7687 subreq, struct tevent_req);
7688 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7689 req, struct rpccli_PNP_SetHwProf_state);
7690 NTSTATUS status;
7691 TALLOC_CTX *mem_ctx;
7692
7693 if (state->out_mem_ctx) {
7694 mem_ctx = state->out_mem_ctx;
7695 } else {
7696 mem_ctx = state;
7697 }
7698
7699 status = state->dispatch_recv(subreq, mem_ctx);
7700 TALLOC_FREE(subreq);
7701 if (!NT_STATUS_IS_OK(status)) {
7702 tevent_req_nterror(req, status);
7703 return;
7704 }
7705
7706 /* Copy out parameters */
7707
7708 /* Copy result */
7709 state->orig.out.result = state->tmp.out.result;
7710
7711 /* Reset temporary structure */
7712 ZERO_STRUCT(state->tmp);
7713
7714 tevent_req_done(req);
7715}
7716
7717NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req,
7718 TALLOC_CTX *mem_ctx,
7719 WERROR *result)
7720{
7721 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7722 req, struct rpccli_PNP_SetHwProf_state);
7723 NTSTATUS status;
7724
7725 if (tevent_req_is_nterror(req, &status)) {
7726 tevent_req_received(req);
7727 return status;
7728 }
7729
7730 /* Steal possbile out parameters to the callers context */
7731 talloc_steal(mem_ctx, state->out_mem_ctx);
7732
7733 /* Return result */
7734 *result = state->orig.out.result;
7735
7736 tevent_req_received(req);
7737 return NT_STATUS_OK;
7738}
7739
7740NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
7741 TALLOC_CTX *mem_ctx,
7742 WERROR *werror)
7743{
7744 struct PNP_SetHwProf r;
7745 NTSTATUS status;
7746
7747 /* In parameters */
7748
7749 status = cli->dispatch(cli,
7750 mem_ctx,
7751 &ndr_table_ntsvcs,
7752 NDR_PNP_SETHWPROF,
7753 &r);
7754
7755 if (!NT_STATUS_IS_OK(status)) {
7756 return status;
7757 }
7758
7759 if (NT_STATUS_IS_ERR(status)) {
7760 return status;
7761 }
7762
7763 /* Return variables */
7764
7765 /* Return result */
7766 if (werror) {
7767 *werror = r.out.result;
7768 }
7769
7770 return werror_to_ntstatus(r.out.result);
7771}
7772
7773struct rpccli_PNP_QueryArbitratorFreeData_state {
7774 struct PNP_QueryArbitratorFreeData orig;
7775 struct PNP_QueryArbitratorFreeData tmp;
7776 TALLOC_CTX *out_mem_ctx;
7777 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7778};
7779
7780static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq);
7781
7782struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx,
7783 struct tevent_context *ev,
7784 struct rpc_pipe_client *cli)
7785{
7786 struct tevent_req *req;
7787 struct rpccli_PNP_QueryArbitratorFreeData_state *state;
7788 struct tevent_req *subreq;
7789
7790 req = tevent_req_create(mem_ctx, &state,
7791 struct rpccli_PNP_QueryArbitratorFreeData_state);
7792 if (req == NULL) {
7793 return NULL;
7794 }
7795 state->out_mem_ctx = NULL;
7796 state->dispatch_recv = cli->dispatch_recv;
7797
7798 /* In parameters */
7799
7800 /* Out parameters */
7801
7802 /* Result */
7803 ZERO_STRUCT(state->orig.out.result);
7804
7805 /* make a temporary copy, that we pass to the dispatch function */
7806 state->tmp = state->orig;
7807
7808 subreq = cli->dispatch_send(state, ev, cli,
7809 &ndr_table_ntsvcs,
7810 NDR_PNP_QUERYARBITRATORFREEDATA,
7811 &state->tmp);
7812 if (tevent_req_nomem(subreq, req)) {
7813 return tevent_req_post(req, ev);
7814 }
7815 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeData_done, req);
7816 return req;
7817}
7818
7819static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq)
7820{
7821 struct tevent_req *req = tevent_req_callback_data(
7822 subreq, struct tevent_req);
7823 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7824 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7825 NTSTATUS status;
7826 TALLOC_CTX *mem_ctx;
7827
7828 if (state->out_mem_ctx) {
7829 mem_ctx = state->out_mem_ctx;
7830 } else {
7831 mem_ctx = state;
7832 }
7833
7834 status = state->dispatch_recv(subreq, mem_ctx);
7835 TALLOC_FREE(subreq);
7836 if (!NT_STATUS_IS_OK(status)) {
7837 tevent_req_nterror(req, status);
7838 return;
7839 }
7840
7841 /* Copy out parameters */
7842
7843 /* Copy result */
7844 state->orig.out.result = state->tmp.out.result;
7845
7846 /* Reset temporary structure */
7847 ZERO_STRUCT(state->tmp);
7848
7849 tevent_req_done(req);
7850}
7851
7852NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req,
7853 TALLOC_CTX *mem_ctx,
7854 WERROR *result)
7855{
7856 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7857 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7858 NTSTATUS status;
7859
7860 if (tevent_req_is_nterror(req, &status)) {
7861 tevent_req_received(req);
7862 return status;
7863 }
7864
7865 /* Steal possbile out parameters to the callers context */
7866 talloc_steal(mem_ctx, state->out_mem_ctx);
7867
7868 /* Return result */
7869 *result = state->orig.out.result;
7870
7871 tevent_req_received(req);
7872 return NT_STATUS_OK;
7873}
7874
7875NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
7876 TALLOC_CTX *mem_ctx,
7877 WERROR *werror)
7878{
7879 struct PNP_QueryArbitratorFreeData r;
7880 NTSTATUS status;
7881
7882 /* In parameters */
7883
7884 status = cli->dispatch(cli,
7885 mem_ctx,
7886 &ndr_table_ntsvcs,
7887 NDR_PNP_QUERYARBITRATORFREEDATA,
7888 &r);
7889
7890 if (!NT_STATUS_IS_OK(status)) {
7891 return status;
7892 }
7893
7894 if (NT_STATUS_IS_ERR(status)) {
7895 return status;
7896 }
7897
7898 /* Return variables */
7899
7900 /* Return result */
7901 if (werror) {
7902 *werror = r.out.result;
7903 }
7904
7905 return werror_to_ntstatus(r.out.result);
7906}
7907
7908struct rpccli_PNP_QueryArbitratorFreeSize_state {
7909 struct PNP_QueryArbitratorFreeSize orig;
7910 struct PNP_QueryArbitratorFreeSize tmp;
7911 TALLOC_CTX *out_mem_ctx;
7912 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7913};
7914
7915static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq);
7916
7917struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx,
7918 struct tevent_context *ev,
7919 struct rpc_pipe_client *cli)
7920{
7921 struct tevent_req *req;
7922 struct rpccli_PNP_QueryArbitratorFreeSize_state *state;
7923 struct tevent_req *subreq;
7924
7925 req = tevent_req_create(mem_ctx, &state,
7926 struct rpccli_PNP_QueryArbitratorFreeSize_state);
7927 if (req == NULL) {
7928 return NULL;
7929 }
7930 state->out_mem_ctx = NULL;
7931 state->dispatch_recv = cli->dispatch_recv;
7932
7933 /* In parameters */
7934
7935 /* Out parameters */
7936
7937 /* Result */
7938 ZERO_STRUCT(state->orig.out.result);
7939
7940 /* make a temporary copy, that we pass to the dispatch function */
7941 state->tmp = state->orig;
7942
7943 subreq = cli->dispatch_send(state, ev, cli,
7944 &ndr_table_ntsvcs,
7945 NDR_PNP_QUERYARBITRATORFREESIZE,
7946 &state->tmp);
7947 if (tevent_req_nomem(subreq, req)) {
7948 return tevent_req_post(req, ev);
7949 }
7950 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeSize_done, req);
7951 return req;
7952}
7953
7954static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq)
7955{
7956 struct tevent_req *req = tevent_req_callback_data(
7957 subreq, struct tevent_req);
7958 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7959 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7960 NTSTATUS status;
7961 TALLOC_CTX *mem_ctx;
7962
7963 if (state->out_mem_ctx) {
7964 mem_ctx = state->out_mem_ctx;
7965 } else {
7966 mem_ctx = state;
7967 }
7968
7969 status = state->dispatch_recv(subreq, mem_ctx);
7970 TALLOC_FREE(subreq);
7971 if (!NT_STATUS_IS_OK(status)) {
7972 tevent_req_nterror(req, status);
7973 return;
7974 }
7975
7976 /* Copy out parameters */
7977
7978 /* Copy result */
7979 state->orig.out.result = state->tmp.out.result;
7980
7981 /* Reset temporary structure */
7982 ZERO_STRUCT(state->tmp);
7983
7984 tevent_req_done(req);
7985}
7986
7987NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req,
7988 TALLOC_CTX *mem_ctx,
7989 WERROR *result)
7990{
7991 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7992 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7993 NTSTATUS status;
7994
7995 if (tevent_req_is_nterror(req, &status)) {
7996 tevent_req_received(req);
7997 return status;
7998 }
7999
8000 /* Steal possbile out parameters to the callers context */
8001 talloc_steal(mem_ctx, state->out_mem_ctx);
8002
8003 /* Return result */
8004 *result = state->orig.out.result;
8005
8006 tevent_req_received(req);
8007 return NT_STATUS_OK;
8008}
8009
8010NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
8011 TALLOC_CTX *mem_ctx,
8012 WERROR *werror)
8013{
8014 struct PNP_QueryArbitratorFreeSize r;
8015 NTSTATUS status;
8016
8017 /* In parameters */
8018
8019 status = cli->dispatch(cli,
8020 mem_ctx,
8021 &ndr_table_ntsvcs,
8022 NDR_PNP_QUERYARBITRATORFREESIZE,
8023 &r);
8024
8025 if (!NT_STATUS_IS_OK(status)) {
8026 return status;
8027 }
8028
8029 if (NT_STATUS_IS_ERR(status)) {
8030 return status;
8031 }
8032
8033 /* Return variables */
8034
8035 /* Return result */
8036 if (werror) {
8037 *werror = r.out.result;
8038 }
8039
8040 return werror_to_ntstatus(r.out.result);
8041}
8042
8043struct rpccli_PNP_RunDetection_state {
8044 struct PNP_RunDetection orig;
8045 struct PNP_RunDetection tmp;
8046 TALLOC_CTX *out_mem_ctx;
8047 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8048};
8049
8050static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq);
8051
8052struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx,
8053 struct tevent_context *ev,
8054 struct rpc_pipe_client *cli)
8055{
8056 struct tevent_req *req;
8057 struct rpccli_PNP_RunDetection_state *state;
8058 struct tevent_req *subreq;
8059
8060 req = tevent_req_create(mem_ctx, &state,
8061 struct rpccli_PNP_RunDetection_state);
8062 if (req == NULL) {
8063 return NULL;
8064 }
8065 state->out_mem_ctx = NULL;
8066 state->dispatch_recv = cli->dispatch_recv;
8067
8068 /* In parameters */
8069
8070 /* Out parameters */
8071
8072 /* Result */
8073 ZERO_STRUCT(state->orig.out.result);
8074
8075 /* make a temporary copy, that we pass to the dispatch function */
8076 state->tmp = state->orig;
8077
8078 subreq = cli->dispatch_send(state, ev, cli,
8079 &ndr_table_ntsvcs,
8080 NDR_PNP_RUNDETECTION,
8081 &state->tmp);
8082 if (tevent_req_nomem(subreq, req)) {
8083 return tevent_req_post(req, ev);
8084 }
8085 tevent_req_set_callback(subreq, rpccli_PNP_RunDetection_done, req);
8086 return req;
8087}
8088
8089static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq)
8090{
8091 struct tevent_req *req = tevent_req_callback_data(
8092 subreq, struct tevent_req);
8093 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8094 req, struct rpccli_PNP_RunDetection_state);
8095 NTSTATUS status;
8096 TALLOC_CTX *mem_ctx;
8097
8098 if (state->out_mem_ctx) {
8099 mem_ctx = state->out_mem_ctx;
8100 } else {
8101 mem_ctx = state;
8102 }
8103
8104 status = state->dispatch_recv(subreq, mem_ctx);
8105 TALLOC_FREE(subreq);
8106 if (!NT_STATUS_IS_OK(status)) {
8107 tevent_req_nterror(req, status);
8108 return;
8109 }
8110
8111 /* Copy out parameters */
8112
8113 /* Copy result */
8114 state->orig.out.result = state->tmp.out.result;
8115
8116 /* Reset temporary structure */
8117 ZERO_STRUCT(state->tmp);
8118
8119 tevent_req_done(req);
8120}
8121
8122NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req,
8123 TALLOC_CTX *mem_ctx,
8124 WERROR *result)
8125{
8126 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8127 req, struct rpccli_PNP_RunDetection_state);
8128 NTSTATUS status;
8129
8130 if (tevent_req_is_nterror(req, &status)) {
8131 tevent_req_received(req);
8132 return status;
8133 }
8134
8135 /* Steal possbile out parameters to the callers context */
8136 talloc_steal(mem_ctx, state->out_mem_ctx);
8137
8138 /* Return result */
8139 *result = state->orig.out.result;
8140
8141 tevent_req_received(req);
8142 return NT_STATUS_OK;
8143}
8144
8145NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
8146 TALLOC_CTX *mem_ctx,
8147 WERROR *werror)
8148{
8149 struct PNP_RunDetection r;
8150 NTSTATUS status;
8151
8152 /* In parameters */
8153
8154 status = cli->dispatch(cli,
8155 mem_ctx,
8156 &ndr_table_ntsvcs,
8157 NDR_PNP_RUNDETECTION,
8158 &r);
8159
8160 if (!NT_STATUS_IS_OK(status)) {
8161 return status;
8162 }
8163
8164 if (NT_STATUS_IS_ERR(status)) {
8165 return status;
8166 }
8167
8168 /* Return variables */
8169
8170 /* Return result */
8171 if (werror) {
8172 *werror = r.out.result;
8173 }
8174
8175 return werror_to_ntstatus(r.out.result);
8176}
8177
8178struct rpccli_PNP_RegisterNotification_state {
8179 struct PNP_RegisterNotification orig;
8180 struct PNP_RegisterNotification tmp;
8181 TALLOC_CTX *out_mem_ctx;
8182 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8183};
8184
8185static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq);
8186
8187struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx,
8188 struct tevent_context *ev,
8189 struct rpc_pipe_client *cli)
8190{
8191 struct tevent_req *req;
8192 struct rpccli_PNP_RegisterNotification_state *state;
8193 struct tevent_req *subreq;
8194
8195 req = tevent_req_create(mem_ctx, &state,
8196 struct rpccli_PNP_RegisterNotification_state);
8197 if (req == NULL) {
8198 return NULL;
8199 }
8200 state->out_mem_ctx = NULL;
8201 state->dispatch_recv = cli->dispatch_recv;
8202
8203 /* In parameters */
8204
8205 /* Out parameters */
8206
8207 /* Result */
8208 ZERO_STRUCT(state->orig.out.result);
8209
8210 /* make a temporary copy, that we pass to the dispatch function */
8211 state->tmp = state->orig;
8212
8213 subreq = cli->dispatch_send(state, ev, cli,
8214 &ndr_table_ntsvcs,
8215 NDR_PNP_REGISTERNOTIFICATION,
8216 &state->tmp);
8217 if (tevent_req_nomem(subreq, req)) {
8218 return tevent_req_post(req, ev);
8219 }
8220 tevent_req_set_callback(subreq, rpccli_PNP_RegisterNotification_done, req);
8221 return req;
8222}
8223
8224static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq)
8225{
8226 struct tevent_req *req = tevent_req_callback_data(
8227 subreq, struct tevent_req);
8228 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8229 req, struct rpccli_PNP_RegisterNotification_state);
8230 NTSTATUS status;
8231 TALLOC_CTX *mem_ctx;
8232
8233 if (state->out_mem_ctx) {
8234 mem_ctx = state->out_mem_ctx;
8235 } else {
8236 mem_ctx = state;
8237 }
8238
8239 status = state->dispatch_recv(subreq, mem_ctx);
8240 TALLOC_FREE(subreq);
8241 if (!NT_STATUS_IS_OK(status)) {
8242 tevent_req_nterror(req, status);
8243 return;
8244 }
8245
8246 /* Copy out parameters */
8247
8248 /* Copy result */
8249 state->orig.out.result = state->tmp.out.result;
8250
8251 /* Reset temporary structure */
8252 ZERO_STRUCT(state->tmp);
8253
8254 tevent_req_done(req);
8255}
8256
8257NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req,
8258 TALLOC_CTX *mem_ctx,
8259 WERROR *result)
8260{
8261 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8262 req, struct rpccli_PNP_RegisterNotification_state);
8263 NTSTATUS status;
8264
8265 if (tevent_req_is_nterror(req, &status)) {
8266 tevent_req_received(req);
8267 return status;
8268 }
8269
8270 /* Steal possbile out parameters to the callers context */
8271 talloc_steal(mem_ctx, state->out_mem_ctx);
8272
8273 /* Return result */
8274 *result = state->orig.out.result;
8275
8276 tevent_req_received(req);
8277 return NT_STATUS_OK;
8278}
8279
8280NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
8281 TALLOC_CTX *mem_ctx,
8282 WERROR *werror)
8283{
8284 struct PNP_RegisterNotification r;
8285 NTSTATUS status;
8286
8287 /* In parameters */
8288
8289 status = cli->dispatch(cli,
8290 mem_ctx,
8291 &ndr_table_ntsvcs,
8292 NDR_PNP_REGISTERNOTIFICATION,
8293 &r);
8294
8295 if (!NT_STATUS_IS_OK(status)) {
8296 return status;
8297 }
8298
8299 if (NT_STATUS_IS_ERR(status)) {
8300 return status;
8301 }
8302
8303 /* Return variables */
8304
8305 /* Return result */
8306 if (werror) {
8307 *werror = r.out.result;
8308 }
8309
8310 return werror_to_ntstatus(r.out.result);
8311}
8312
8313struct rpccli_PNP_UnregisterNotification_state {
8314 struct PNP_UnregisterNotification orig;
8315 struct PNP_UnregisterNotification tmp;
8316 TALLOC_CTX *out_mem_ctx;
8317 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8318};
8319
8320static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq);
8321
8322struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx,
8323 struct tevent_context *ev,
8324 struct rpc_pipe_client *cli)
8325{
8326 struct tevent_req *req;
8327 struct rpccli_PNP_UnregisterNotification_state *state;
8328 struct tevent_req *subreq;
8329
8330 req = tevent_req_create(mem_ctx, &state,
8331 struct rpccli_PNP_UnregisterNotification_state);
8332 if (req == NULL) {
8333 return NULL;
8334 }
8335 state->out_mem_ctx = NULL;
8336 state->dispatch_recv = cli->dispatch_recv;
8337
8338 /* In parameters */
8339
8340 /* Out parameters */
8341
8342 /* Result */
8343 ZERO_STRUCT(state->orig.out.result);
8344
8345 /* make a temporary copy, that we pass to the dispatch function */
8346 state->tmp = state->orig;
8347
8348 subreq = cli->dispatch_send(state, ev, cli,
8349 &ndr_table_ntsvcs,
8350 NDR_PNP_UNREGISTERNOTIFICATION,
8351 &state->tmp);
8352 if (tevent_req_nomem(subreq, req)) {
8353 return tevent_req_post(req, ev);
8354 }
8355 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterNotification_done, req);
8356 return req;
8357}
8358
8359static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq)
8360{
8361 struct tevent_req *req = tevent_req_callback_data(
8362 subreq, struct tevent_req);
8363 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8364 req, struct rpccli_PNP_UnregisterNotification_state);
8365 NTSTATUS status;
8366 TALLOC_CTX *mem_ctx;
8367
8368 if (state->out_mem_ctx) {
8369 mem_ctx = state->out_mem_ctx;
8370 } else {
8371 mem_ctx = state;
8372 }
8373
8374 status = state->dispatch_recv(subreq, mem_ctx);
8375 TALLOC_FREE(subreq);
8376 if (!NT_STATUS_IS_OK(status)) {
8377 tevent_req_nterror(req, status);
8378 return;
8379 }
8380
8381 /* Copy out parameters */
8382
8383 /* Copy result */
8384 state->orig.out.result = state->tmp.out.result;
8385
8386 /* Reset temporary structure */
8387 ZERO_STRUCT(state->tmp);
8388
8389 tevent_req_done(req);
8390}
8391
8392NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req,
8393 TALLOC_CTX *mem_ctx,
8394 WERROR *result)
8395{
8396 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8397 req, struct rpccli_PNP_UnregisterNotification_state);
8398 NTSTATUS status;
8399
8400 if (tevent_req_is_nterror(req, &status)) {
8401 tevent_req_received(req);
8402 return status;
8403 }
8404
8405 /* Steal possbile out parameters to the callers context */
8406 talloc_steal(mem_ctx, state->out_mem_ctx);
8407
8408 /* Return result */
8409 *result = state->orig.out.result;
8410
8411 tevent_req_received(req);
8412 return NT_STATUS_OK;
8413}
8414
8415NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
8416 TALLOC_CTX *mem_ctx,
8417 WERROR *werror)
8418{
8419 struct PNP_UnregisterNotification r;
8420 NTSTATUS status;
8421
8422 /* In parameters */
8423
8424 status = cli->dispatch(cli,
8425 mem_ctx,
8426 &ndr_table_ntsvcs,
8427 NDR_PNP_UNREGISTERNOTIFICATION,
8428 &r);
8429
8430 if (!NT_STATUS_IS_OK(status)) {
8431 return status;
8432 }
8433
8434 if (NT_STATUS_IS_ERR(status)) {
8435 return status;
8436 }
8437
8438 /* Return variables */
8439
8440 /* Return result */
8441 if (werror) {
8442 *werror = r.out.result;
8443 }
8444
8445 return werror_to_ntstatus(r.out.result);
8446}
8447
8448struct rpccli_PNP_GetCustomDevProp_state {
8449 struct PNP_GetCustomDevProp orig;
8450 struct PNP_GetCustomDevProp tmp;
8451 TALLOC_CTX *out_mem_ctx;
8452 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8453};
8454
8455static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq);
8456
8457struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx,
8458 struct tevent_context *ev,
8459 struct rpc_pipe_client *cli)
8460{
8461 struct tevent_req *req;
8462 struct rpccli_PNP_GetCustomDevProp_state *state;
8463 struct tevent_req *subreq;
8464
8465 req = tevent_req_create(mem_ctx, &state,
8466 struct rpccli_PNP_GetCustomDevProp_state);
8467 if (req == NULL) {
8468 return NULL;
8469 }
8470 state->out_mem_ctx = NULL;
8471 state->dispatch_recv = cli->dispatch_recv;
8472
8473 /* In parameters */
8474
8475 /* Out parameters */
8476
8477 /* Result */
8478 ZERO_STRUCT(state->orig.out.result);
8479
8480 /* make a temporary copy, that we pass to the dispatch function */
8481 state->tmp = state->orig;
8482
8483 subreq = cli->dispatch_send(state, ev, cli,
8484 &ndr_table_ntsvcs,
8485 NDR_PNP_GETCUSTOMDEVPROP,
8486 &state->tmp);
8487 if (tevent_req_nomem(subreq, req)) {
8488 return tevent_req_post(req, ev);
8489 }
8490 tevent_req_set_callback(subreq, rpccli_PNP_GetCustomDevProp_done, req);
8491 return req;
8492}
8493
8494static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq)
8495{
8496 struct tevent_req *req = tevent_req_callback_data(
8497 subreq, struct tevent_req);
8498 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8499 req, struct rpccli_PNP_GetCustomDevProp_state);
8500 NTSTATUS status;
8501 TALLOC_CTX *mem_ctx;
8502
8503 if (state->out_mem_ctx) {
8504 mem_ctx = state->out_mem_ctx;
8505 } else {
8506 mem_ctx = state;
8507 }
8508
8509 status = state->dispatch_recv(subreq, mem_ctx);
8510 TALLOC_FREE(subreq);
8511 if (!NT_STATUS_IS_OK(status)) {
8512 tevent_req_nterror(req, status);
8513 return;
8514 }
8515
8516 /* Copy out parameters */
8517
8518 /* Copy result */
8519 state->orig.out.result = state->tmp.out.result;
8520
8521 /* Reset temporary structure */
8522 ZERO_STRUCT(state->tmp);
8523
8524 tevent_req_done(req);
8525}
8526
8527NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req,
8528 TALLOC_CTX *mem_ctx,
8529 WERROR *result)
8530{
8531 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8532 req, struct rpccli_PNP_GetCustomDevProp_state);
8533 NTSTATUS status;
8534
8535 if (tevent_req_is_nterror(req, &status)) {
8536 tevent_req_received(req);
8537 return status;
8538 }
8539
8540 /* Steal possbile out parameters to the callers context */
8541 talloc_steal(mem_ctx, state->out_mem_ctx);
8542
8543 /* Return result */
8544 *result = state->orig.out.result;
8545
8546 tevent_req_received(req);
8547 return NT_STATUS_OK;
8548}
8549
8550NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
8551 TALLOC_CTX *mem_ctx,
8552 WERROR *werror)
8553{
8554 struct PNP_GetCustomDevProp r;
8555 NTSTATUS status;
8556
8557 /* In parameters */
8558
8559 status = cli->dispatch(cli,
8560 mem_ctx,
8561 &ndr_table_ntsvcs,
8562 NDR_PNP_GETCUSTOMDEVPROP,
8563 &r);
8564
8565 if (!NT_STATUS_IS_OK(status)) {
8566 return status;
8567 }
8568
8569 if (NT_STATUS_IS_ERR(status)) {
8570 return status;
8571 }
8572
8573 /* Return variables */
8574
8575 /* Return result */
8576 if (werror) {
8577 *werror = r.out.result;
8578 }
8579
8580 return werror_to_ntstatus(r.out.result);
8581}
8582
8583struct rpccli_PNP_GetVersionInternal_state {
8584 struct PNP_GetVersionInternal orig;
8585 struct PNP_GetVersionInternal tmp;
8586 TALLOC_CTX *out_mem_ctx;
8587 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8588};
8589
8590static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq);
8591
8592struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx,
8593 struct tevent_context *ev,
8594 struct rpc_pipe_client *cli)
8595{
8596 struct tevent_req *req;
8597 struct rpccli_PNP_GetVersionInternal_state *state;
8598 struct tevent_req *subreq;
8599
8600 req = tevent_req_create(mem_ctx, &state,
8601 struct rpccli_PNP_GetVersionInternal_state);
8602 if (req == NULL) {
8603 return NULL;
8604 }
8605 state->out_mem_ctx = NULL;
8606 state->dispatch_recv = cli->dispatch_recv;
8607
8608 /* In parameters */
8609
8610 /* Out parameters */
8611
8612 /* Result */
8613 ZERO_STRUCT(state->orig.out.result);
8614
8615 /* make a temporary copy, that we pass to the dispatch function */
8616 state->tmp = state->orig;
8617
8618 subreq = cli->dispatch_send(state, ev, cli,
8619 &ndr_table_ntsvcs,
8620 NDR_PNP_GETVERSIONINTERNAL,
8621 &state->tmp);
8622 if (tevent_req_nomem(subreq, req)) {
8623 return tevent_req_post(req, ev);
8624 }
8625 tevent_req_set_callback(subreq, rpccli_PNP_GetVersionInternal_done, req);
8626 return req;
8627}
8628
8629static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq)
8630{
8631 struct tevent_req *req = tevent_req_callback_data(
8632 subreq, struct tevent_req);
8633 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8634 req, struct rpccli_PNP_GetVersionInternal_state);
8635 NTSTATUS status;
8636 TALLOC_CTX *mem_ctx;
8637
8638 if (state->out_mem_ctx) {
8639 mem_ctx = state->out_mem_ctx;
8640 } else {
8641 mem_ctx = state;
8642 }
8643
8644 status = state->dispatch_recv(subreq, mem_ctx);
8645 TALLOC_FREE(subreq);
8646 if (!NT_STATUS_IS_OK(status)) {
8647 tevent_req_nterror(req, status);
8648 return;
8649 }
8650
8651 /* Copy out parameters */
8652
8653 /* Copy result */
8654 state->orig.out.result = state->tmp.out.result;
8655
8656 /* Reset temporary structure */
8657 ZERO_STRUCT(state->tmp);
8658
8659 tevent_req_done(req);
8660}
8661
8662NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req,
8663 TALLOC_CTX *mem_ctx,
8664 WERROR *result)
8665{
8666 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8667 req, struct rpccli_PNP_GetVersionInternal_state);
8668 NTSTATUS status;
8669
8670 if (tevent_req_is_nterror(req, &status)) {
8671 tevent_req_received(req);
8672 return status;
8673 }
8674
8675 /* Steal possbile out parameters to the callers context */
8676 talloc_steal(mem_ctx, state->out_mem_ctx);
8677
8678 /* Return result */
8679 *result = state->orig.out.result;
8680
8681 tevent_req_received(req);
8682 return NT_STATUS_OK;
8683}
8684
8685NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
8686 TALLOC_CTX *mem_ctx,
8687 WERROR *werror)
8688{
8689 struct PNP_GetVersionInternal r;
8690 NTSTATUS status;
8691
8692 /* In parameters */
8693
8694 status = cli->dispatch(cli,
8695 mem_ctx,
8696 &ndr_table_ntsvcs,
8697 NDR_PNP_GETVERSIONINTERNAL,
8698 &r);
8699
8700 if (!NT_STATUS_IS_OK(status)) {
8701 return status;
8702 }
8703
8704 if (NT_STATUS_IS_ERR(status)) {
8705 return status;
8706 }
8707
8708 /* Return variables */
8709
8710 /* Return result */
8711 if (werror) {
8712 *werror = r.out.result;
8713 }
8714
8715 return werror_to_ntstatus(r.out.result);
8716}
8717
8718struct rpccli_PNP_GetBlockedDriverInfo_state {
8719 struct PNP_GetBlockedDriverInfo orig;
8720 struct PNP_GetBlockedDriverInfo tmp;
8721 TALLOC_CTX *out_mem_ctx;
8722 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8723};
8724
8725static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq);
8726
8727struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx,
8728 struct tevent_context *ev,
8729 struct rpc_pipe_client *cli)
8730{
8731 struct tevent_req *req;
8732 struct rpccli_PNP_GetBlockedDriverInfo_state *state;
8733 struct tevent_req *subreq;
8734
8735 req = tevent_req_create(mem_ctx, &state,
8736 struct rpccli_PNP_GetBlockedDriverInfo_state);
8737 if (req == NULL) {
8738 return NULL;
8739 }
8740 state->out_mem_ctx = NULL;
8741 state->dispatch_recv = cli->dispatch_recv;
8742
8743 /* In parameters */
8744
8745 /* Out parameters */
8746
8747 /* Result */
8748 ZERO_STRUCT(state->orig.out.result);
8749
8750 /* make a temporary copy, that we pass to the dispatch function */
8751 state->tmp = state->orig;
8752
8753 subreq = cli->dispatch_send(state, ev, cli,
8754 &ndr_table_ntsvcs,
8755 NDR_PNP_GETBLOCKEDDRIVERINFO,
8756 &state->tmp);
8757 if (tevent_req_nomem(subreq, req)) {
8758 return tevent_req_post(req, ev);
8759 }
8760 tevent_req_set_callback(subreq, rpccli_PNP_GetBlockedDriverInfo_done, req);
8761 return req;
8762}
8763
8764static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq)
8765{
8766 struct tevent_req *req = tevent_req_callback_data(
8767 subreq, struct tevent_req);
8768 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8769 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8770 NTSTATUS status;
8771 TALLOC_CTX *mem_ctx;
8772
8773 if (state->out_mem_ctx) {
8774 mem_ctx = state->out_mem_ctx;
8775 } else {
8776 mem_ctx = state;
8777 }
8778
8779 status = state->dispatch_recv(subreq, mem_ctx);
8780 TALLOC_FREE(subreq);
8781 if (!NT_STATUS_IS_OK(status)) {
8782 tevent_req_nterror(req, status);
8783 return;
8784 }
8785
8786 /* Copy out parameters */
8787
8788 /* Copy result */
8789 state->orig.out.result = state->tmp.out.result;
8790
8791 /* Reset temporary structure */
8792 ZERO_STRUCT(state->tmp);
8793
8794 tevent_req_done(req);
8795}
8796
8797NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req,
8798 TALLOC_CTX *mem_ctx,
8799 WERROR *result)
8800{
8801 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8802 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8803 NTSTATUS status;
8804
8805 if (tevent_req_is_nterror(req, &status)) {
8806 tevent_req_received(req);
8807 return status;
8808 }
8809
8810 /* Steal possbile out parameters to the callers context */
8811 talloc_steal(mem_ctx, state->out_mem_ctx);
8812
8813 /* Return result */
8814 *result = state->orig.out.result;
8815
8816 tevent_req_received(req);
8817 return NT_STATUS_OK;
8818}
8819
8820NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
8821 TALLOC_CTX *mem_ctx,
8822 WERROR *werror)
8823{
8824 struct PNP_GetBlockedDriverInfo r;
8825 NTSTATUS status;
8826
8827 /* In parameters */
8828
8829 status = cli->dispatch(cli,
8830 mem_ctx,
8831 &ndr_table_ntsvcs,
8832 NDR_PNP_GETBLOCKEDDRIVERINFO,
8833 &r);
8834
8835 if (!NT_STATUS_IS_OK(status)) {
8836 return status;
8837 }
8838
8839 if (NT_STATUS_IS_ERR(status)) {
8840 return status;
8841 }
8842
8843 /* Return variables */
8844
8845 /* Return result */
8846 if (werror) {
8847 *werror = r.out.result;
8848 }
8849
8850 return werror_to_ntstatus(r.out.result);
8851}
8852
8853struct rpccli_PNP_GetServerSideDeviceInstallFlags_state {
8854 struct PNP_GetServerSideDeviceInstallFlags orig;
8855 struct PNP_GetServerSideDeviceInstallFlags tmp;
8856 TALLOC_CTX *out_mem_ctx;
8857 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8858};
8859
8860static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq);
8861
8862struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx,
8863 struct tevent_context *ev,
8864 struct rpc_pipe_client *cli)
8865{
8866 struct tevent_req *req;
8867 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state;
8868 struct tevent_req *subreq;
8869
8870 req = tevent_req_create(mem_ctx, &state,
8871 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8872 if (req == NULL) {
8873 return NULL;
8874 }
8875 state->out_mem_ctx = NULL;
8876 state->dispatch_recv = cli->dispatch_recv;
8877
8878 /* In parameters */
8879
8880 /* Out parameters */
8881
8882 /* Result */
8883 ZERO_STRUCT(state->orig.out.result);
8884
8885 /* make a temporary copy, that we pass to the dispatch function */
8886 state->tmp = state->orig;
8887
8888 subreq = cli->dispatch_send(state, ev, cli,
8889 &ndr_table_ntsvcs,
8890 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8891 &state->tmp);
8892 if (tevent_req_nomem(subreq, req)) {
8893 return tevent_req_post(req, ev);
8894 }
8895 tevent_req_set_callback(subreq, rpccli_PNP_GetServerSideDeviceInstallFlags_done, req);
8896 return req;
8897}
8898
8899static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq)
8900{
8901 struct tevent_req *req = tevent_req_callback_data(
8902 subreq, struct tevent_req);
8903 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8904 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8905 NTSTATUS status;
8906 TALLOC_CTX *mem_ctx;
8907
8908 if (state->out_mem_ctx) {
8909 mem_ctx = state->out_mem_ctx;
8910 } else {
8911 mem_ctx = state;
8912 }
8913
8914 status = state->dispatch_recv(subreq, mem_ctx);
8915 TALLOC_FREE(subreq);
8916 if (!NT_STATUS_IS_OK(status)) {
8917 tevent_req_nterror(req, status);
8918 return;
8919 }
8920
8921 /* Copy out parameters */
8922
8923 /* Copy result */
8924 state->orig.out.result = state->tmp.out.result;
8925
8926 /* Reset temporary structure */
8927 ZERO_STRUCT(state->tmp);
8928
8929 tevent_req_done(req);
8930}
8931
8932NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req,
8933 TALLOC_CTX *mem_ctx,
8934 WERROR *result)
8935{
8936 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8937 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8938 NTSTATUS status;
8939
8940 if (tevent_req_is_nterror(req, &status)) {
8941 tevent_req_received(req);
8942 return status;
8943 }
8944
8945 /* Steal possbile out parameters to the callers context */
8946 talloc_steal(mem_ctx, state->out_mem_ctx);
8947
8948 /* Return result */
8949 *result = state->orig.out.result;
8950
8951 tevent_req_received(req);
8952 return NT_STATUS_OK;
8953}
8954
8955NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
8956 TALLOC_CTX *mem_ctx,
8957 WERROR *werror)
8958{
8959 struct PNP_GetServerSideDeviceInstallFlags r;
8960 NTSTATUS status;
8961
8962 /* In parameters */
8963
8964 status = cli->dispatch(cli,
8965 mem_ctx,
8966 &ndr_table_ntsvcs,
8967 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8968 &r);
8969
8970 if (!NT_STATUS_IS_OK(status)) {
8971 return status;
8972 }
8973
8974 if (NT_STATUS_IS_ERR(status)) {
8975 return status;
8976 }
8977
8978 /* Return variables */
8979
8980 /* Return result */
8981 if (werror) {
8982 *werror = r.out.result;
8983 }
8984
8985 return werror_to_ntstatus(r.out.result);
8986}
8987
Note: See TracBrowser for help on using the repository browser.