s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
[Samba/nascimento.git] / librpc / gen_ndr / cli_ntsvcs.c
blob760ce53591d3d9fbcf12132694168c6f1a0117c1
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_ntsvcs.h"
9 struct 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);
16 static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq);
18 struct tevent_req *rpccli_PNP_Disconnect_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli)
22 struct tevent_req *req;
23 struct rpccli_PNP_Disconnect_state *state;
24 struct tevent_req *subreq;
26 req = tevent_req_create(mem_ctx, &state,
27 struct rpccli_PNP_Disconnect_state);
28 if (req == NULL) {
29 return NULL;
31 state->out_mem_ctx = NULL;
32 state->dispatch_recv = cli->dispatch_recv;
34 /* In parameters */
36 /* Out parameters */
38 /* Result */
39 ZERO_STRUCT(state->orig.out.result);
41 /* make a temporary copy, that we pass to the dispatch function */
42 state->tmp = state->orig;
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);
51 tevent_req_set_callback(subreq, rpccli_PNP_Disconnect_done, req);
52 return req;
55 static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq)
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;
64 if (state->out_mem_ctx) {
65 mem_ctx = state->out_mem_ctx;
66 } else {
67 mem_ctx = state;
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;
77 /* Copy out parameters */
79 /* Copy result */
80 state->orig.out.result = state->tmp.out.result;
82 /* Reset temporary structure */
83 ZERO_STRUCT(state->tmp);
85 tevent_req_done(req);
88 NTSTATUS rpccli_PNP_Disconnect_recv(struct tevent_req *req,
89 TALLOC_CTX *mem_ctx,
90 WERROR *result)
92 struct rpccli_PNP_Disconnect_state *state = tevent_req_data(
93 req, struct rpccli_PNP_Disconnect_state);
94 NTSTATUS status;
96 if (tevent_req_is_nterror(req, &status)) {
97 tevent_req_received(req);
98 return status;
101 /* Steal possbile out parameters to the callers context */
102 talloc_steal(mem_ctx, state->out_mem_ctx);
104 /* Return result */
105 *result = state->orig.out.result;
107 tevent_req_received(req);
108 return NT_STATUS_OK;
111 NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
112 TALLOC_CTX *mem_ctx,
113 WERROR *werror)
115 struct PNP_Disconnect r;
116 NTSTATUS status;
118 /* In parameters */
120 status = cli->dispatch(cli,
121 mem_ctx,
122 &ndr_table_ntsvcs,
123 NDR_PNP_DISCONNECT,
124 &r);
126 if (!NT_STATUS_IS_OK(status)) {
127 return status;
130 if (NT_STATUS_IS_ERR(status)) {
131 return status;
134 /* Return variables */
136 /* Return result */
137 if (werror) {
138 *werror = r.out.result;
141 return werror_to_ntstatus(r.out.result);
144 struct 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);
151 static void rpccli_PNP_Connect_done(struct tevent_req *subreq);
153 struct tevent_req *rpccli_PNP_Connect_send(TALLOC_CTX *mem_ctx,
154 struct tevent_context *ev,
155 struct rpc_pipe_client *cli)
157 struct tevent_req *req;
158 struct rpccli_PNP_Connect_state *state;
159 struct tevent_req *subreq;
161 req = tevent_req_create(mem_ctx, &state,
162 struct rpccli_PNP_Connect_state);
163 if (req == NULL) {
164 return NULL;
166 state->out_mem_ctx = NULL;
167 state->dispatch_recv = cli->dispatch_recv;
169 /* In parameters */
171 /* Out parameters */
173 /* Result */
174 ZERO_STRUCT(state->orig.out.result);
176 /* make a temporary copy, that we pass to the dispatch function */
177 state->tmp = state->orig;
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);
186 tevent_req_set_callback(subreq, rpccli_PNP_Connect_done, req);
187 return req;
190 static void rpccli_PNP_Connect_done(struct tevent_req *subreq)
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;
199 if (state->out_mem_ctx) {
200 mem_ctx = state->out_mem_ctx;
201 } else {
202 mem_ctx = state;
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;
212 /* Copy out parameters */
214 /* Copy result */
215 state->orig.out.result = state->tmp.out.result;
217 /* Reset temporary structure */
218 ZERO_STRUCT(state->tmp);
220 tevent_req_done(req);
223 NTSTATUS rpccli_PNP_Connect_recv(struct tevent_req *req,
224 TALLOC_CTX *mem_ctx,
225 WERROR *result)
227 struct rpccli_PNP_Connect_state *state = tevent_req_data(
228 req, struct rpccli_PNP_Connect_state);
229 NTSTATUS status;
231 if (tevent_req_is_nterror(req, &status)) {
232 tevent_req_received(req);
233 return status;
236 /* Steal possbile out parameters to the callers context */
237 talloc_steal(mem_ctx, state->out_mem_ctx);
239 /* Return result */
240 *result = state->orig.out.result;
242 tevent_req_received(req);
243 return NT_STATUS_OK;
246 NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
247 TALLOC_CTX *mem_ctx,
248 WERROR *werror)
250 struct PNP_Connect r;
251 NTSTATUS status;
253 /* In parameters */
255 status = cli->dispatch(cli,
256 mem_ctx,
257 &ndr_table_ntsvcs,
258 NDR_PNP_CONNECT,
259 &r);
261 if (!NT_STATUS_IS_OK(status)) {
262 return status;
265 if (NT_STATUS_IS_ERR(status)) {
266 return status;
269 /* Return variables */
271 /* Return result */
272 if (werror) {
273 *werror = r.out.result;
276 return werror_to_ntstatus(r.out.result);
279 struct 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);
286 static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq);
288 struct 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] */)
293 struct tevent_req *req;
294 struct rpccli_PNP_GetVersion_state *state;
295 struct tevent_req *subreq;
297 req = tevent_req_create(mem_ctx, &state,
298 struct rpccli_PNP_GetVersion_state);
299 if (req == NULL) {
300 return NULL;
302 state->out_mem_ctx = NULL;
303 state->dispatch_recv = cli->dispatch_recv;
305 /* In parameters */
307 /* Out parameters */
308 state->orig.out.version = _version;
310 /* Result */
311 ZERO_STRUCT(state->orig.out.result);
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);
319 /* make a temporary copy, that we pass to the dispatch function */
320 state->tmp = state->orig;
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);
329 tevent_req_set_callback(subreq, rpccli_PNP_GetVersion_done, req);
330 return req;
333 static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq)
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;
342 if (state->out_mem_ctx) {
343 mem_ctx = state->out_mem_ctx;
344 } else {
345 mem_ctx = state;
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;
355 /* Copy out parameters */
356 *state->orig.out.version = *state->tmp.out.version;
358 /* Copy result */
359 state->orig.out.result = state->tmp.out.result;
361 /* Reset temporary structure */
362 ZERO_STRUCT(state->tmp);
364 tevent_req_done(req);
367 NTSTATUS rpccli_PNP_GetVersion_recv(struct tevent_req *req,
368 TALLOC_CTX *mem_ctx,
369 WERROR *result)
371 struct rpccli_PNP_GetVersion_state *state = tevent_req_data(
372 req, struct rpccli_PNP_GetVersion_state);
373 NTSTATUS status;
375 if (tevent_req_is_nterror(req, &status)) {
376 tevent_req_received(req);
377 return status;
380 /* Steal possbile out parameters to the callers context */
381 talloc_steal(mem_ctx, state->out_mem_ctx);
383 /* Return result */
384 *result = state->orig.out.result;
386 tevent_req_received(req);
387 return NT_STATUS_OK;
390 NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
391 TALLOC_CTX *mem_ctx,
392 uint16_t *version /* [out] [ref] */,
393 WERROR *werror)
395 struct PNP_GetVersion r;
396 NTSTATUS status;
398 /* In parameters */
400 status = cli->dispatch(cli,
401 mem_ctx,
402 &ndr_table_ntsvcs,
403 NDR_PNP_GETVERSION,
404 &r);
406 if (!NT_STATUS_IS_OK(status)) {
407 return status;
410 if (NT_STATUS_IS_ERR(status)) {
411 return status;
414 /* Return variables */
415 *version = *r.out.version;
417 /* Return result */
418 if (werror) {
419 *werror = r.out.result;
422 return werror_to_ntstatus(r.out.result);
425 struct 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);
432 static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq);
434 struct tevent_req *rpccli_PNP_GetGlobalState_send(TALLOC_CTX *mem_ctx,
435 struct tevent_context *ev,
436 struct rpc_pipe_client *cli)
438 struct tevent_req *req;
439 struct rpccli_PNP_GetGlobalState_state *state;
440 struct tevent_req *subreq;
442 req = tevent_req_create(mem_ctx, &state,
443 struct rpccli_PNP_GetGlobalState_state);
444 if (req == NULL) {
445 return NULL;
447 state->out_mem_ctx = NULL;
448 state->dispatch_recv = cli->dispatch_recv;
450 /* In parameters */
452 /* Out parameters */
454 /* Result */
455 ZERO_STRUCT(state->orig.out.result);
457 /* make a temporary copy, that we pass to the dispatch function */
458 state->tmp = state->orig;
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);
467 tevent_req_set_callback(subreq, rpccli_PNP_GetGlobalState_done, req);
468 return req;
471 static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq)
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;
480 if (state->out_mem_ctx) {
481 mem_ctx = state->out_mem_ctx;
482 } else {
483 mem_ctx = state;
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;
493 /* Copy out parameters */
495 /* Copy result */
496 state->orig.out.result = state->tmp.out.result;
498 /* Reset temporary structure */
499 ZERO_STRUCT(state->tmp);
501 tevent_req_done(req);
504 NTSTATUS rpccli_PNP_GetGlobalState_recv(struct tevent_req *req,
505 TALLOC_CTX *mem_ctx,
506 WERROR *result)
508 struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data(
509 req, struct rpccli_PNP_GetGlobalState_state);
510 NTSTATUS status;
512 if (tevent_req_is_nterror(req, &status)) {
513 tevent_req_received(req);
514 return status;
517 /* Steal possbile out parameters to the callers context */
518 talloc_steal(mem_ctx, state->out_mem_ctx);
520 /* Return result */
521 *result = state->orig.out.result;
523 tevent_req_received(req);
524 return NT_STATUS_OK;
527 NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
528 TALLOC_CTX *mem_ctx,
529 WERROR *werror)
531 struct PNP_GetGlobalState r;
532 NTSTATUS status;
534 /* In parameters */
536 status = cli->dispatch(cli,
537 mem_ctx,
538 &ndr_table_ntsvcs,
539 NDR_PNP_GETGLOBALSTATE,
540 &r);
542 if (!NT_STATUS_IS_OK(status)) {
543 return status;
546 if (NT_STATUS_IS_ERR(status)) {
547 return status;
550 /* Return variables */
552 /* Return result */
553 if (werror) {
554 *werror = r.out.result;
557 return werror_to_ntstatus(r.out.result);
560 struct 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);
567 static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq);
569 struct tevent_req *rpccli_PNP_InitDetection_send(TALLOC_CTX *mem_ctx,
570 struct tevent_context *ev,
571 struct rpc_pipe_client *cli)
573 struct tevent_req *req;
574 struct rpccli_PNP_InitDetection_state *state;
575 struct tevent_req *subreq;
577 req = tevent_req_create(mem_ctx, &state,
578 struct rpccli_PNP_InitDetection_state);
579 if (req == NULL) {
580 return NULL;
582 state->out_mem_ctx = NULL;
583 state->dispatch_recv = cli->dispatch_recv;
585 /* In parameters */
587 /* Out parameters */
589 /* Result */
590 ZERO_STRUCT(state->orig.out.result);
592 /* make a temporary copy, that we pass to the dispatch function */
593 state->tmp = state->orig;
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);
602 tevent_req_set_callback(subreq, rpccli_PNP_InitDetection_done, req);
603 return req;
606 static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq)
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;
615 if (state->out_mem_ctx) {
616 mem_ctx = state->out_mem_ctx;
617 } else {
618 mem_ctx = state;
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;
628 /* Copy out parameters */
630 /* Copy result */
631 state->orig.out.result = state->tmp.out.result;
633 /* Reset temporary structure */
634 ZERO_STRUCT(state->tmp);
636 tevent_req_done(req);
639 NTSTATUS rpccli_PNP_InitDetection_recv(struct tevent_req *req,
640 TALLOC_CTX *mem_ctx,
641 WERROR *result)
643 struct rpccli_PNP_InitDetection_state *state = tevent_req_data(
644 req, struct rpccli_PNP_InitDetection_state);
645 NTSTATUS status;
647 if (tevent_req_is_nterror(req, &status)) {
648 tevent_req_received(req);
649 return status;
652 /* Steal possbile out parameters to the callers context */
653 talloc_steal(mem_ctx, state->out_mem_ctx);
655 /* Return result */
656 *result = state->orig.out.result;
658 tevent_req_received(req);
659 return NT_STATUS_OK;
662 NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
663 TALLOC_CTX *mem_ctx,
664 WERROR *werror)
666 struct PNP_InitDetection r;
667 NTSTATUS status;
669 /* In parameters */
671 status = cli->dispatch(cli,
672 mem_ctx,
673 &ndr_table_ntsvcs,
674 NDR_PNP_INITDETECTION,
675 &r);
677 if (!NT_STATUS_IS_OK(status)) {
678 return status;
681 if (NT_STATUS_IS_ERR(status)) {
682 return status;
685 /* Return variables */
687 /* Return result */
688 if (werror) {
689 *werror = r.out.result;
692 return werror_to_ntstatus(r.out.result);
695 struct 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);
702 static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq);
704 struct tevent_req *rpccli_PNP_ReportLogOn_send(TALLOC_CTX *mem_ctx,
705 struct tevent_context *ev,
706 struct rpc_pipe_client *cli)
708 struct tevent_req *req;
709 struct rpccli_PNP_ReportLogOn_state *state;
710 struct tevent_req *subreq;
712 req = tevent_req_create(mem_ctx, &state,
713 struct rpccli_PNP_ReportLogOn_state);
714 if (req == NULL) {
715 return NULL;
717 state->out_mem_ctx = NULL;
718 state->dispatch_recv = cli->dispatch_recv;
720 /* In parameters */
722 /* Out parameters */
724 /* Result */
725 ZERO_STRUCT(state->orig.out.result);
727 /* make a temporary copy, that we pass to the dispatch function */
728 state->tmp = state->orig;
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);
737 tevent_req_set_callback(subreq, rpccli_PNP_ReportLogOn_done, req);
738 return req;
741 static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq)
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;
750 if (state->out_mem_ctx) {
751 mem_ctx = state->out_mem_ctx;
752 } else {
753 mem_ctx = state;
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;
763 /* Copy out parameters */
765 /* Copy result */
766 state->orig.out.result = state->tmp.out.result;
768 /* Reset temporary structure */
769 ZERO_STRUCT(state->tmp);
771 tevent_req_done(req);
774 NTSTATUS rpccli_PNP_ReportLogOn_recv(struct tevent_req *req,
775 TALLOC_CTX *mem_ctx,
776 WERROR *result)
778 struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data(
779 req, struct rpccli_PNP_ReportLogOn_state);
780 NTSTATUS status;
782 if (tevent_req_is_nterror(req, &status)) {
783 tevent_req_received(req);
784 return status;
787 /* Steal possbile out parameters to the callers context */
788 talloc_steal(mem_ctx, state->out_mem_ctx);
790 /* Return result */
791 *result = state->orig.out.result;
793 tevent_req_received(req);
794 return NT_STATUS_OK;
797 NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
798 TALLOC_CTX *mem_ctx,
799 WERROR *werror)
801 struct PNP_ReportLogOn r;
802 NTSTATUS status;
804 /* In parameters */
806 status = cli->dispatch(cli,
807 mem_ctx,
808 &ndr_table_ntsvcs,
809 NDR_PNP_REPORTLOGON,
810 &r);
812 if (!NT_STATUS_IS_OK(status)) {
813 return status;
816 if (NT_STATUS_IS_ERR(status)) {
817 return status;
820 /* Return variables */
822 /* Return result */
823 if (werror) {
824 *werror = r.out.result;
827 return werror_to_ntstatus(r.out.result);
830 struct 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);
837 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq);
839 struct 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] */)
845 struct tevent_req *req;
846 struct rpccli_PNP_ValidateDeviceInstance_state *state;
847 struct tevent_req *subreq;
849 req = tevent_req_create(mem_ctx, &state,
850 struct rpccli_PNP_ValidateDeviceInstance_state);
851 if (req == NULL) {
852 return NULL;
854 state->out_mem_ctx = NULL;
855 state->dispatch_recv = cli->dispatch_recv;
857 /* In parameters */
858 state->orig.in.devicepath = _devicepath;
859 state->orig.in.flags = _flags;
861 /* Out parameters */
863 /* Result */
864 ZERO_STRUCT(state->orig.out.result);
866 /* make a temporary copy, that we pass to the dispatch function */
867 state->tmp = state->orig;
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);
876 tevent_req_set_callback(subreq, rpccli_PNP_ValidateDeviceInstance_done, req);
877 return req;
880 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq)
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;
889 if (state->out_mem_ctx) {
890 mem_ctx = state->out_mem_ctx;
891 } else {
892 mem_ctx = state;
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;
902 /* Copy out parameters */
904 /* Copy result */
905 state->orig.out.result = state->tmp.out.result;
907 /* Reset temporary structure */
908 ZERO_STRUCT(state->tmp);
910 tevent_req_done(req);
913 NTSTATUS rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req *req,
914 TALLOC_CTX *mem_ctx,
915 WERROR *result)
917 struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data(
918 req, struct rpccli_PNP_ValidateDeviceInstance_state);
919 NTSTATUS status;
921 if (tevent_req_is_nterror(req, &status)) {
922 tevent_req_received(req);
923 return status;
926 /* Steal possbile out parameters to the callers context */
927 talloc_steal(mem_ctx, state->out_mem_ctx);
929 /* Return result */
930 *result = state->orig.out.result;
932 tevent_req_received(req);
933 return NT_STATUS_OK;
936 NTSTATUS 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)
942 struct PNP_ValidateDeviceInstance r;
943 NTSTATUS status;
945 /* In parameters */
946 r.in.devicepath = devicepath;
947 r.in.flags = flags;
949 status = cli->dispatch(cli,
950 mem_ctx,
951 &ndr_table_ntsvcs,
952 NDR_PNP_VALIDATEDEVICEINSTANCE,
953 &r);
955 if (!NT_STATUS_IS_OK(status)) {
956 return status;
959 if (NT_STATUS_IS_ERR(status)) {
960 return status;
963 /* Return variables */
965 /* Return result */
966 if (werror) {
967 *werror = r.out.result;
970 return werror_to_ntstatus(r.out.result);
973 struct 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);
980 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq);
982 struct tevent_req *rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX *mem_ctx,
983 struct tevent_context *ev,
984 struct rpc_pipe_client *cli)
986 struct tevent_req *req;
987 struct rpccli_PNP_GetRootDeviceInstance_state *state;
988 struct tevent_req *subreq;
990 req = tevent_req_create(mem_ctx, &state,
991 struct rpccli_PNP_GetRootDeviceInstance_state);
992 if (req == NULL) {
993 return NULL;
995 state->out_mem_ctx = NULL;
996 state->dispatch_recv = cli->dispatch_recv;
998 /* In parameters */
1000 /* Out parameters */
1002 /* Result */
1003 ZERO_STRUCT(state->orig.out.result);
1005 /* make a temporary copy, that we pass to the dispatch function */
1006 state->tmp = state->orig;
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);
1015 tevent_req_set_callback(subreq, rpccli_PNP_GetRootDeviceInstance_done, req);
1016 return req;
1019 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq)
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;
1028 if (state->out_mem_ctx) {
1029 mem_ctx = state->out_mem_ctx;
1030 } else {
1031 mem_ctx = state;
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;
1041 /* Copy out parameters */
1043 /* Copy result */
1044 state->orig.out.result = state->tmp.out.result;
1046 /* Reset temporary structure */
1047 ZERO_STRUCT(state->tmp);
1049 tevent_req_done(req);
1052 NTSTATUS rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req *req,
1053 TALLOC_CTX *mem_ctx,
1054 WERROR *result)
1056 struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data(
1057 req, struct rpccli_PNP_GetRootDeviceInstance_state);
1058 NTSTATUS status;
1060 if (tevent_req_is_nterror(req, &status)) {
1061 tevent_req_received(req);
1062 return status;
1065 /* Steal possbile out parameters to the callers context */
1066 talloc_steal(mem_ctx, state->out_mem_ctx);
1068 /* Return result */
1069 *result = state->orig.out.result;
1071 tevent_req_received(req);
1072 return NT_STATUS_OK;
1075 NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
1076 TALLOC_CTX *mem_ctx,
1077 WERROR *werror)
1079 struct PNP_GetRootDeviceInstance r;
1080 NTSTATUS status;
1082 /* In parameters */
1084 status = cli->dispatch(cli,
1085 mem_ctx,
1086 &ndr_table_ntsvcs,
1087 NDR_PNP_GETROOTDEVICEINSTANCE,
1088 &r);
1090 if (!NT_STATUS_IS_OK(status)) {
1091 return status;
1094 if (NT_STATUS_IS_ERR(status)) {
1095 return status;
1098 /* Return variables */
1100 /* Return result */
1101 if (werror) {
1102 *werror = r.out.result;
1105 return werror_to_ntstatus(r.out.result);
1108 struct 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);
1115 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq);
1117 struct tevent_req *rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX *mem_ctx,
1118 struct tevent_context *ev,
1119 struct rpc_pipe_client *cli)
1121 struct tevent_req *req;
1122 struct rpccli_PNP_GetRelatedDeviceInstance_state *state;
1123 struct tevent_req *subreq;
1125 req = tevent_req_create(mem_ctx, &state,
1126 struct rpccli_PNP_GetRelatedDeviceInstance_state);
1127 if (req == NULL) {
1128 return NULL;
1130 state->out_mem_ctx = NULL;
1131 state->dispatch_recv = cli->dispatch_recv;
1133 /* In parameters */
1135 /* Out parameters */
1137 /* Result */
1138 ZERO_STRUCT(state->orig.out.result);
1140 /* make a temporary copy, that we pass to the dispatch function */
1141 state->tmp = state->orig;
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);
1150 tevent_req_set_callback(subreq, rpccli_PNP_GetRelatedDeviceInstance_done, req);
1151 return req;
1154 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq)
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;
1163 if (state->out_mem_ctx) {
1164 mem_ctx = state->out_mem_ctx;
1165 } else {
1166 mem_ctx = state;
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;
1176 /* Copy out parameters */
1178 /* Copy result */
1179 state->orig.out.result = state->tmp.out.result;
1181 /* Reset temporary structure */
1182 ZERO_STRUCT(state->tmp);
1184 tevent_req_done(req);
1187 NTSTATUS rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req *req,
1188 TALLOC_CTX *mem_ctx,
1189 WERROR *result)
1191 struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data(
1192 req, struct rpccli_PNP_GetRelatedDeviceInstance_state);
1193 NTSTATUS status;
1195 if (tevent_req_is_nterror(req, &status)) {
1196 tevent_req_received(req);
1197 return status;
1200 /* Steal possbile out parameters to the callers context */
1201 talloc_steal(mem_ctx, state->out_mem_ctx);
1203 /* Return result */
1204 *result = state->orig.out.result;
1206 tevent_req_received(req);
1207 return NT_STATUS_OK;
1210 NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
1211 TALLOC_CTX *mem_ctx,
1212 WERROR *werror)
1214 struct PNP_GetRelatedDeviceInstance r;
1215 NTSTATUS status;
1217 /* In parameters */
1219 status = cli->dispatch(cli,
1220 mem_ctx,
1221 &ndr_table_ntsvcs,
1222 NDR_PNP_GETRELATEDDEVICEINSTANCE,
1223 &r);
1225 if (!NT_STATUS_IS_OK(status)) {
1226 return status;
1229 if (NT_STATUS_IS_ERR(status)) {
1230 return status;
1233 /* Return variables */
1235 /* Return result */
1236 if (werror) {
1237 *werror = r.out.result;
1240 return werror_to_ntstatus(r.out.result);
1243 struct 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);
1250 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq);
1252 struct tevent_req *rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX *mem_ctx,
1253 struct tevent_context *ev,
1254 struct rpc_pipe_client *cli)
1256 struct tevent_req *req;
1257 struct rpccli_PNP_EnumerateSubKeys_state *state;
1258 struct tevent_req *subreq;
1260 req = tevent_req_create(mem_ctx, &state,
1261 struct rpccli_PNP_EnumerateSubKeys_state);
1262 if (req == NULL) {
1263 return NULL;
1265 state->out_mem_ctx = NULL;
1266 state->dispatch_recv = cli->dispatch_recv;
1268 /* In parameters */
1270 /* Out parameters */
1272 /* Result */
1273 ZERO_STRUCT(state->orig.out.result);
1275 /* make a temporary copy, that we pass to the dispatch function */
1276 state->tmp = state->orig;
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);
1285 tevent_req_set_callback(subreq, rpccli_PNP_EnumerateSubKeys_done, req);
1286 return req;
1289 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq)
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;
1298 if (state->out_mem_ctx) {
1299 mem_ctx = state->out_mem_ctx;
1300 } else {
1301 mem_ctx = state;
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;
1311 /* Copy out parameters */
1313 /* Copy result */
1314 state->orig.out.result = state->tmp.out.result;
1316 /* Reset temporary structure */
1317 ZERO_STRUCT(state->tmp);
1319 tevent_req_done(req);
1322 NTSTATUS rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req *req,
1323 TALLOC_CTX *mem_ctx,
1324 WERROR *result)
1326 struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data(
1327 req, struct rpccli_PNP_EnumerateSubKeys_state);
1328 NTSTATUS status;
1330 if (tevent_req_is_nterror(req, &status)) {
1331 tevent_req_received(req);
1332 return status;
1335 /* Steal possbile out parameters to the callers context */
1336 talloc_steal(mem_ctx, state->out_mem_ctx);
1338 /* Return result */
1339 *result = state->orig.out.result;
1341 tevent_req_received(req);
1342 return NT_STATUS_OK;
1345 NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
1346 TALLOC_CTX *mem_ctx,
1347 WERROR *werror)
1349 struct PNP_EnumerateSubKeys r;
1350 NTSTATUS status;
1352 /* In parameters */
1354 status = cli->dispatch(cli,
1355 mem_ctx,
1356 &ndr_table_ntsvcs,
1357 NDR_PNP_ENUMERATESUBKEYS,
1358 &r);
1360 if (!NT_STATUS_IS_OK(status)) {
1361 return status;
1364 if (NT_STATUS_IS_ERR(status)) {
1365 return status;
1368 /* Return variables */
1370 /* Return result */
1371 if (werror) {
1372 *werror = r.out.result;
1375 return werror_to_ntstatus(r.out.result);
1378 struct 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);
1385 static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq);
1387 struct 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] */)
1395 struct tevent_req *req;
1396 struct rpccli_PNP_GetDeviceList_state *state;
1397 struct tevent_req *subreq;
1399 req = tevent_req_create(mem_ctx, &state,
1400 struct rpccli_PNP_GetDeviceList_state);
1401 if (req == NULL) {
1402 return NULL;
1404 state->out_mem_ctx = NULL;
1405 state->dispatch_recv = cli->dispatch_recv;
1407 /* In parameters */
1408 state->orig.in.filter = _filter;
1409 state->orig.in.length = _length;
1410 state->orig.in.flags = _flags;
1412 /* Out parameters */
1413 state->orig.out.buffer = _buffer;
1414 state->orig.out.length = _length;
1416 /* Result */
1417 ZERO_STRUCT(state->orig.out.result);
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);
1425 /* make a temporary copy, that we pass to the dispatch function */
1426 state->tmp = state->orig;
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);
1435 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceList_done, req);
1436 return req;
1439 static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq)
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;
1448 if (state->out_mem_ctx) {
1449 mem_ctx = state->out_mem_ctx;
1450 } else {
1451 mem_ctx = state;
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;
1461 /* Copy out parameters */
1462 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.in.length) * sizeof(*state->orig.out.buffer));
1463 *state->orig.out.length = *state->tmp.out.length;
1465 /* Copy result */
1466 state->orig.out.result = state->tmp.out.result;
1468 /* Reset temporary structure */
1469 ZERO_STRUCT(state->tmp);
1471 tevent_req_done(req);
1474 NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req,
1475 TALLOC_CTX *mem_ctx,
1476 WERROR *result)
1478 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1479 req, struct rpccli_PNP_GetDeviceList_state);
1480 NTSTATUS status;
1482 if (tevent_req_is_nterror(req, &status)) {
1483 tevent_req_received(req);
1484 return status;
1487 /* Steal possbile out parameters to the callers context */
1488 talloc_steal(mem_ctx, state->out_mem_ctx);
1490 /* Return result */
1491 *result = state->orig.out.result;
1493 tevent_req_received(req);
1494 return NT_STATUS_OK;
1497 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
1498 TALLOC_CTX *mem_ctx,
1499 const char *filter /* [in] [unique,charset(UTF16)] */,
1500 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1501 uint32_t *length /* [in,out] [ref] */,
1502 uint32_t flags /* [in] */,
1503 WERROR *werror)
1505 struct PNP_GetDeviceList r;
1506 NTSTATUS status;
1508 /* In parameters */
1509 r.in.filter = filter;
1510 r.in.length = length;
1511 r.in.flags = flags;
1513 status = cli->dispatch(cli,
1514 mem_ctx,
1515 &ndr_table_ntsvcs,
1516 NDR_PNP_GETDEVICELIST,
1517 &r);
1519 if (!NT_STATUS_IS_OK(status)) {
1520 return status;
1523 if (NT_STATUS_IS_ERR(status)) {
1524 return status;
1527 /* Return variables */
1528 memcpy(buffer, r.out.buffer, (*r.in.length) * sizeof(*buffer));
1529 *length = *r.out.length;
1531 /* Return result */
1532 if (werror) {
1533 *werror = r.out.result;
1536 return werror_to_ntstatus(r.out.result);
1539 struct rpccli_PNP_GetDeviceListSize_state {
1540 struct PNP_GetDeviceListSize orig;
1541 struct PNP_GetDeviceListSize tmp;
1542 TALLOC_CTX *out_mem_ctx;
1543 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1546 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq);
1548 struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx,
1549 struct tevent_context *ev,
1550 struct rpc_pipe_client *cli,
1551 const char *_devicename /* [in] [unique,charset(UTF16)] */,
1552 uint32_t *_size /* [out] [ref] */,
1553 uint32_t _flags /* [in] */)
1555 struct tevent_req *req;
1556 struct rpccli_PNP_GetDeviceListSize_state *state;
1557 struct tevent_req *subreq;
1559 req = tevent_req_create(mem_ctx, &state,
1560 struct rpccli_PNP_GetDeviceListSize_state);
1561 if (req == NULL) {
1562 return NULL;
1564 state->out_mem_ctx = NULL;
1565 state->dispatch_recv = cli->dispatch_recv;
1567 /* In parameters */
1568 state->orig.in.devicename = _devicename;
1569 state->orig.in.flags = _flags;
1571 /* Out parameters */
1572 state->orig.out.size = _size;
1574 /* Result */
1575 ZERO_STRUCT(state->orig.out.result);
1577 state->out_mem_ctx = talloc_named_const(state, 0,
1578 "rpccli_PNP_GetDeviceListSize_out_memory");
1579 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1580 return tevent_req_post(req, ev);
1583 /* make a temporary copy, that we pass to the dispatch function */
1584 state->tmp = state->orig;
1586 subreq = cli->dispatch_send(state, ev, cli,
1587 &ndr_table_ntsvcs,
1588 NDR_PNP_GETDEVICELISTSIZE,
1589 &state->tmp);
1590 if (tevent_req_nomem(subreq, req)) {
1591 return tevent_req_post(req, ev);
1593 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceListSize_done, req);
1594 return req;
1597 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq)
1599 struct tevent_req *req = tevent_req_callback_data(
1600 subreq, struct tevent_req);
1601 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1602 req, struct rpccli_PNP_GetDeviceListSize_state);
1603 NTSTATUS status;
1604 TALLOC_CTX *mem_ctx;
1606 if (state->out_mem_ctx) {
1607 mem_ctx = state->out_mem_ctx;
1608 } else {
1609 mem_ctx = state;
1612 status = state->dispatch_recv(subreq, mem_ctx);
1613 TALLOC_FREE(subreq);
1614 if (!NT_STATUS_IS_OK(status)) {
1615 tevent_req_nterror(req, status);
1616 return;
1619 /* Copy out parameters */
1620 *state->orig.out.size = *state->tmp.out.size;
1622 /* Copy result */
1623 state->orig.out.result = state->tmp.out.result;
1625 /* Reset temporary structure */
1626 ZERO_STRUCT(state->tmp);
1628 tevent_req_done(req);
1631 NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req,
1632 TALLOC_CTX *mem_ctx,
1633 WERROR *result)
1635 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1636 req, struct rpccli_PNP_GetDeviceListSize_state);
1637 NTSTATUS status;
1639 if (tevent_req_is_nterror(req, &status)) {
1640 tevent_req_received(req);
1641 return status;
1644 /* Steal possbile out parameters to the callers context */
1645 talloc_steal(mem_ctx, state->out_mem_ctx);
1647 /* Return result */
1648 *result = state->orig.out.result;
1650 tevent_req_received(req);
1651 return NT_STATUS_OK;
1654 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
1655 TALLOC_CTX *mem_ctx,
1656 const char *devicename /* [in] [unique,charset(UTF16)] */,
1657 uint32_t *size /* [out] [ref] */,
1658 uint32_t flags /* [in] */,
1659 WERROR *werror)
1661 struct PNP_GetDeviceListSize r;
1662 NTSTATUS status;
1664 /* In parameters */
1665 r.in.devicename = devicename;
1666 r.in.flags = flags;
1668 status = cli->dispatch(cli,
1669 mem_ctx,
1670 &ndr_table_ntsvcs,
1671 NDR_PNP_GETDEVICELISTSIZE,
1672 &r);
1674 if (!NT_STATUS_IS_OK(status)) {
1675 return status;
1678 if (NT_STATUS_IS_ERR(status)) {
1679 return status;
1682 /* Return variables */
1683 *size = *r.out.size;
1685 /* Return result */
1686 if (werror) {
1687 *werror = r.out.result;
1690 return werror_to_ntstatus(r.out.result);
1693 struct rpccli_PNP_GetDepth_state {
1694 struct PNP_GetDepth orig;
1695 struct PNP_GetDepth tmp;
1696 TALLOC_CTX *out_mem_ctx;
1697 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1700 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq);
1702 struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx,
1703 struct tevent_context *ev,
1704 struct rpc_pipe_client *cli)
1706 struct tevent_req *req;
1707 struct rpccli_PNP_GetDepth_state *state;
1708 struct tevent_req *subreq;
1710 req = tevent_req_create(mem_ctx, &state,
1711 struct rpccli_PNP_GetDepth_state);
1712 if (req == NULL) {
1713 return NULL;
1715 state->out_mem_ctx = NULL;
1716 state->dispatch_recv = cli->dispatch_recv;
1718 /* In parameters */
1720 /* Out parameters */
1722 /* Result */
1723 ZERO_STRUCT(state->orig.out.result);
1725 /* make a temporary copy, that we pass to the dispatch function */
1726 state->tmp = state->orig;
1728 subreq = cli->dispatch_send(state, ev, cli,
1729 &ndr_table_ntsvcs,
1730 NDR_PNP_GETDEPTH,
1731 &state->tmp);
1732 if (tevent_req_nomem(subreq, req)) {
1733 return tevent_req_post(req, ev);
1735 tevent_req_set_callback(subreq, rpccli_PNP_GetDepth_done, req);
1736 return req;
1739 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq)
1741 struct tevent_req *req = tevent_req_callback_data(
1742 subreq, struct tevent_req);
1743 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1744 req, struct rpccli_PNP_GetDepth_state);
1745 NTSTATUS status;
1746 TALLOC_CTX *mem_ctx;
1748 if (state->out_mem_ctx) {
1749 mem_ctx = state->out_mem_ctx;
1750 } else {
1751 mem_ctx = state;
1754 status = state->dispatch_recv(subreq, mem_ctx);
1755 TALLOC_FREE(subreq);
1756 if (!NT_STATUS_IS_OK(status)) {
1757 tevent_req_nterror(req, status);
1758 return;
1761 /* Copy out parameters */
1763 /* Copy result */
1764 state->orig.out.result = state->tmp.out.result;
1766 /* Reset temporary structure */
1767 ZERO_STRUCT(state->tmp);
1769 tevent_req_done(req);
1772 NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req,
1773 TALLOC_CTX *mem_ctx,
1774 WERROR *result)
1776 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1777 req, struct rpccli_PNP_GetDepth_state);
1778 NTSTATUS status;
1780 if (tevent_req_is_nterror(req, &status)) {
1781 tevent_req_received(req);
1782 return status;
1785 /* Steal possbile out parameters to the callers context */
1786 talloc_steal(mem_ctx, state->out_mem_ctx);
1788 /* Return result */
1789 *result = state->orig.out.result;
1791 tevent_req_received(req);
1792 return NT_STATUS_OK;
1795 NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
1796 TALLOC_CTX *mem_ctx,
1797 WERROR *werror)
1799 struct PNP_GetDepth r;
1800 NTSTATUS status;
1802 /* In parameters */
1804 status = cli->dispatch(cli,
1805 mem_ctx,
1806 &ndr_table_ntsvcs,
1807 NDR_PNP_GETDEPTH,
1808 &r);
1810 if (!NT_STATUS_IS_OK(status)) {
1811 return status;
1814 if (NT_STATUS_IS_ERR(status)) {
1815 return status;
1818 /* Return variables */
1820 /* Return result */
1821 if (werror) {
1822 *werror = r.out.result;
1825 return werror_to_ntstatus(r.out.result);
1828 struct rpccli_PNP_GetDeviceRegProp_state {
1829 struct PNP_GetDeviceRegProp orig;
1830 struct PNP_GetDeviceRegProp tmp;
1831 TALLOC_CTX *out_mem_ctx;
1832 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1835 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq);
1837 struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
1838 struct tevent_context *ev,
1839 struct rpc_pipe_client *cli,
1840 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
1841 uint32_t _property /* [in] */,
1842 enum winreg_Type *_reg_data_type /* [in,out] [ref] */,
1843 uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1844 uint32_t *_buffer_size /* [in,out] [ref] */,
1845 uint32_t *_needed /* [in,out] [ref] */,
1846 uint32_t _flags /* [in] */)
1848 struct tevent_req *req;
1849 struct rpccli_PNP_GetDeviceRegProp_state *state;
1850 struct tevent_req *subreq;
1852 req = tevent_req_create(mem_ctx, &state,
1853 struct rpccli_PNP_GetDeviceRegProp_state);
1854 if (req == NULL) {
1855 return NULL;
1857 state->out_mem_ctx = NULL;
1858 state->dispatch_recv = cli->dispatch_recv;
1860 /* In parameters */
1861 state->orig.in.devicepath = _devicepath;
1862 state->orig.in.property = _property;
1863 state->orig.in.reg_data_type = _reg_data_type;
1864 state->orig.in.buffer_size = _buffer_size;
1865 state->orig.in.needed = _needed;
1866 state->orig.in.flags = _flags;
1868 /* Out parameters */
1869 state->orig.out.reg_data_type = _reg_data_type;
1870 state->orig.out.buffer = _buffer;
1871 state->orig.out.buffer_size = _buffer_size;
1872 state->orig.out.needed = _needed;
1874 /* Result */
1875 ZERO_STRUCT(state->orig.out.result);
1877 state->out_mem_ctx = talloc_named_const(state, 0,
1878 "rpccli_PNP_GetDeviceRegProp_out_memory");
1879 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1880 return tevent_req_post(req, ev);
1883 /* make a temporary copy, that we pass to the dispatch function */
1884 state->tmp = state->orig;
1886 subreq = cli->dispatch_send(state, ev, cli,
1887 &ndr_table_ntsvcs,
1888 NDR_PNP_GETDEVICEREGPROP,
1889 &state->tmp);
1890 if (tevent_req_nomem(subreq, req)) {
1891 return tevent_req_post(req, ev);
1893 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceRegProp_done, req);
1894 return req;
1897 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq)
1899 struct tevent_req *req = tevent_req_callback_data(
1900 subreq, struct tevent_req);
1901 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1902 req, struct rpccli_PNP_GetDeviceRegProp_state);
1903 NTSTATUS status;
1904 TALLOC_CTX *mem_ctx;
1906 if (state->out_mem_ctx) {
1907 mem_ctx = state->out_mem_ctx;
1908 } else {
1909 mem_ctx = state;
1912 status = state->dispatch_recv(subreq, mem_ctx);
1913 TALLOC_FREE(subreq);
1914 if (!NT_STATUS_IS_OK(status)) {
1915 tevent_req_nterror(req, status);
1916 return;
1919 /* Copy out parameters */
1920 *state->orig.out.reg_data_type = *state->tmp.out.reg_data_type;
1921 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.in.buffer_size) * sizeof(*state->orig.out.buffer));
1922 *state->orig.out.buffer_size = *state->tmp.out.buffer_size;
1923 *state->orig.out.needed = *state->tmp.out.needed;
1925 /* Copy result */
1926 state->orig.out.result = state->tmp.out.result;
1928 /* Reset temporary structure */
1929 ZERO_STRUCT(state->tmp);
1931 tevent_req_done(req);
1934 NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req,
1935 TALLOC_CTX *mem_ctx,
1936 WERROR *result)
1938 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1939 req, struct rpccli_PNP_GetDeviceRegProp_state);
1940 NTSTATUS status;
1942 if (tevent_req_is_nterror(req, &status)) {
1943 tevent_req_received(req);
1944 return status;
1947 /* Steal possbile out parameters to the callers context */
1948 talloc_steal(mem_ctx, state->out_mem_ctx);
1950 /* Return result */
1951 *result = state->orig.out.result;
1953 tevent_req_received(req);
1954 return NT_STATUS_OK;
1957 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
1958 TALLOC_CTX *mem_ctx,
1959 const char *devicepath /* [in] [ref,charset(UTF16)] */,
1960 uint32_t property /* [in] */,
1961 enum winreg_Type *reg_data_type /* [in,out] [ref] */,
1962 uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1963 uint32_t *buffer_size /* [in,out] [ref] */,
1964 uint32_t *needed /* [in,out] [ref] */,
1965 uint32_t flags /* [in] */,
1966 WERROR *werror)
1968 struct PNP_GetDeviceRegProp r;
1969 NTSTATUS status;
1971 /* In parameters */
1972 r.in.devicepath = devicepath;
1973 r.in.property = property;
1974 r.in.reg_data_type = reg_data_type;
1975 r.in.buffer_size = buffer_size;
1976 r.in.needed = needed;
1977 r.in.flags = flags;
1979 status = cli->dispatch(cli,
1980 mem_ctx,
1981 &ndr_table_ntsvcs,
1982 NDR_PNP_GETDEVICEREGPROP,
1983 &r);
1985 if (!NT_STATUS_IS_OK(status)) {
1986 return status;
1989 if (NT_STATUS_IS_ERR(status)) {
1990 return status;
1993 /* Return variables */
1994 *reg_data_type = *r.out.reg_data_type;
1995 memcpy(buffer, r.out.buffer, (*r.in.buffer_size) * sizeof(*buffer));
1996 *buffer_size = *r.out.buffer_size;
1997 *needed = *r.out.needed;
1999 /* Return result */
2000 if (werror) {
2001 *werror = r.out.result;
2004 return werror_to_ntstatus(r.out.result);
2007 struct rpccli_PNP_SetDeviceRegProp_state {
2008 struct PNP_SetDeviceRegProp orig;
2009 struct PNP_SetDeviceRegProp tmp;
2010 TALLOC_CTX *out_mem_ctx;
2011 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2014 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq);
2016 struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
2017 struct tevent_context *ev,
2018 struct rpc_pipe_client *cli)
2020 struct tevent_req *req;
2021 struct rpccli_PNP_SetDeviceRegProp_state *state;
2022 struct tevent_req *subreq;
2024 req = tevent_req_create(mem_ctx, &state,
2025 struct rpccli_PNP_SetDeviceRegProp_state);
2026 if (req == NULL) {
2027 return NULL;
2029 state->out_mem_ctx = NULL;
2030 state->dispatch_recv = cli->dispatch_recv;
2032 /* In parameters */
2034 /* Out parameters */
2036 /* Result */
2037 ZERO_STRUCT(state->orig.out.result);
2039 /* make a temporary copy, that we pass to the dispatch function */
2040 state->tmp = state->orig;
2042 subreq = cli->dispatch_send(state, ev, cli,
2043 &ndr_table_ntsvcs,
2044 NDR_PNP_SETDEVICEREGPROP,
2045 &state->tmp);
2046 if (tevent_req_nomem(subreq, req)) {
2047 return tevent_req_post(req, ev);
2049 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceRegProp_done, req);
2050 return req;
2053 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq)
2055 struct tevent_req *req = tevent_req_callback_data(
2056 subreq, struct tevent_req);
2057 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2058 req, struct rpccli_PNP_SetDeviceRegProp_state);
2059 NTSTATUS status;
2060 TALLOC_CTX *mem_ctx;
2062 if (state->out_mem_ctx) {
2063 mem_ctx = state->out_mem_ctx;
2064 } else {
2065 mem_ctx = state;
2068 status = state->dispatch_recv(subreq, mem_ctx);
2069 TALLOC_FREE(subreq);
2070 if (!NT_STATUS_IS_OK(status)) {
2071 tevent_req_nterror(req, status);
2072 return;
2075 /* Copy out parameters */
2077 /* Copy result */
2078 state->orig.out.result = state->tmp.out.result;
2080 /* Reset temporary structure */
2081 ZERO_STRUCT(state->tmp);
2083 tevent_req_done(req);
2086 NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req,
2087 TALLOC_CTX *mem_ctx,
2088 WERROR *result)
2090 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2091 req, struct rpccli_PNP_SetDeviceRegProp_state);
2092 NTSTATUS status;
2094 if (tevent_req_is_nterror(req, &status)) {
2095 tevent_req_received(req);
2096 return status;
2099 /* Steal possbile out parameters to the callers context */
2100 talloc_steal(mem_ctx, state->out_mem_ctx);
2102 /* Return result */
2103 *result = state->orig.out.result;
2105 tevent_req_received(req);
2106 return NT_STATUS_OK;
2109 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
2110 TALLOC_CTX *mem_ctx,
2111 WERROR *werror)
2113 struct PNP_SetDeviceRegProp r;
2114 NTSTATUS status;
2116 /* In parameters */
2118 status = cli->dispatch(cli,
2119 mem_ctx,
2120 &ndr_table_ntsvcs,
2121 NDR_PNP_SETDEVICEREGPROP,
2122 &r);
2124 if (!NT_STATUS_IS_OK(status)) {
2125 return status;
2128 if (NT_STATUS_IS_ERR(status)) {
2129 return status;
2132 /* Return variables */
2134 /* Return result */
2135 if (werror) {
2136 *werror = r.out.result;
2139 return werror_to_ntstatus(r.out.result);
2142 struct rpccli_PNP_GetClassInstance_state {
2143 struct PNP_GetClassInstance orig;
2144 struct PNP_GetClassInstance tmp;
2145 TALLOC_CTX *out_mem_ctx;
2146 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2149 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq);
2151 struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx,
2152 struct tevent_context *ev,
2153 struct rpc_pipe_client *cli)
2155 struct tevent_req *req;
2156 struct rpccli_PNP_GetClassInstance_state *state;
2157 struct tevent_req *subreq;
2159 req = tevent_req_create(mem_ctx, &state,
2160 struct rpccli_PNP_GetClassInstance_state);
2161 if (req == NULL) {
2162 return NULL;
2164 state->out_mem_ctx = NULL;
2165 state->dispatch_recv = cli->dispatch_recv;
2167 /* In parameters */
2169 /* Out parameters */
2171 /* Result */
2172 ZERO_STRUCT(state->orig.out.result);
2174 /* make a temporary copy, that we pass to the dispatch function */
2175 state->tmp = state->orig;
2177 subreq = cli->dispatch_send(state, ev, cli,
2178 &ndr_table_ntsvcs,
2179 NDR_PNP_GETCLASSINSTANCE,
2180 &state->tmp);
2181 if (tevent_req_nomem(subreq, req)) {
2182 return tevent_req_post(req, ev);
2184 tevent_req_set_callback(subreq, rpccli_PNP_GetClassInstance_done, req);
2185 return req;
2188 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq)
2190 struct tevent_req *req = tevent_req_callback_data(
2191 subreq, struct tevent_req);
2192 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2193 req, struct rpccli_PNP_GetClassInstance_state);
2194 NTSTATUS status;
2195 TALLOC_CTX *mem_ctx;
2197 if (state->out_mem_ctx) {
2198 mem_ctx = state->out_mem_ctx;
2199 } else {
2200 mem_ctx = state;
2203 status = state->dispatch_recv(subreq, mem_ctx);
2204 TALLOC_FREE(subreq);
2205 if (!NT_STATUS_IS_OK(status)) {
2206 tevent_req_nterror(req, status);
2207 return;
2210 /* Copy out parameters */
2212 /* Copy result */
2213 state->orig.out.result = state->tmp.out.result;
2215 /* Reset temporary structure */
2216 ZERO_STRUCT(state->tmp);
2218 tevent_req_done(req);
2221 NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req,
2222 TALLOC_CTX *mem_ctx,
2223 WERROR *result)
2225 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2226 req, struct rpccli_PNP_GetClassInstance_state);
2227 NTSTATUS status;
2229 if (tevent_req_is_nterror(req, &status)) {
2230 tevent_req_received(req);
2231 return status;
2234 /* Steal possbile out parameters to the callers context */
2235 talloc_steal(mem_ctx, state->out_mem_ctx);
2237 /* Return result */
2238 *result = state->orig.out.result;
2240 tevent_req_received(req);
2241 return NT_STATUS_OK;
2244 NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
2245 TALLOC_CTX *mem_ctx,
2246 WERROR *werror)
2248 struct PNP_GetClassInstance r;
2249 NTSTATUS status;
2251 /* In parameters */
2253 status = cli->dispatch(cli,
2254 mem_ctx,
2255 &ndr_table_ntsvcs,
2256 NDR_PNP_GETCLASSINSTANCE,
2257 &r);
2259 if (!NT_STATUS_IS_OK(status)) {
2260 return status;
2263 if (NT_STATUS_IS_ERR(status)) {
2264 return status;
2267 /* Return variables */
2269 /* Return result */
2270 if (werror) {
2271 *werror = r.out.result;
2274 return werror_to_ntstatus(r.out.result);
2277 struct rpccli_PNP_CreateKey_state {
2278 struct PNP_CreateKey orig;
2279 struct PNP_CreateKey tmp;
2280 TALLOC_CTX *out_mem_ctx;
2281 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2284 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq);
2286 struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx,
2287 struct tevent_context *ev,
2288 struct rpc_pipe_client *cli)
2290 struct tevent_req *req;
2291 struct rpccli_PNP_CreateKey_state *state;
2292 struct tevent_req *subreq;
2294 req = tevent_req_create(mem_ctx, &state,
2295 struct rpccli_PNP_CreateKey_state);
2296 if (req == NULL) {
2297 return NULL;
2299 state->out_mem_ctx = NULL;
2300 state->dispatch_recv = cli->dispatch_recv;
2302 /* In parameters */
2304 /* Out parameters */
2306 /* Result */
2307 ZERO_STRUCT(state->orig.out.result);
2309 /* make a temporary copy, that we pass to the dispatch function */
2310 state->tmp = state->orig;
2312 subreq = cli->dispatch_send(state, ev, cli,
2313 &ndr_table_ntsvcs,
2314 NDR_PNP_CREATEKEY,
2315 &state->tmp);
2316 if (tevent_req_nomem(subreq, req)) {
2317 return tevent_req_post(req, ev);
2319 tevent_req_set_callback(subreq, rpccli_PNP_CreateKey_done, req);
2320 return req;
2323 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq)
2325 struct tevent_req *req = tevent_req_callback_data(
2326 subreq, struct tevent_req);
2327 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2328 req, struct rpccli_PNP_CreateKey_state);
2329 NTSTATUS status;
2330 TALLOC_CTX *mem_ctx;
2332 if (state->out_mem_ctx) {
2333 mem_ctx = state->out_mem_ctx;
2334 } else {
2335 mem_ctx = state;
2338 status = state->dispatch_recv(subreq, mem_ctx);
2339 TALLOC_FREE(subreq);
2340 if (!NT_STATUS_IS_OK(status)) {
2341 tevent_req_nterror(req, status);
2342 return;
2345 /* Copy out parameters */
2347 /* Copy result */
2348 state->orig.out.result = state->tmp.out.result;
2350 /* Reset temporary structure */
2351 ZERO_STRUCT(state->tmp);
2353 tevent_req_done(req);
2356 NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req,
2357 TALLOC_CTX *mem_ctx,
2358 WERROR *result)
2360 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2361 req, struct rpccli_PNP_CreateKey_state);
2362 NTSTATUS status;
2364 if (tevent_req_is_nterror(req, &status)) {
2365 tevent_req_received(req);
2366 return status;
2369 /* Steal possbile out parameters to the callers context */
2370 talloc_steal(mem_ctx, state->out_mem_ctx);
2372 /* Return result */
2373 *result = state->orig.out.result;
2375 tevent_req_received(req);
2376 return NT_STATUS_OK;
2379 NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
2380 TALLOC_CTX *mem_ctx,
2381 WERROR *werror)
2383 struct PNP_CreateKey r;
2384 NTSTATUS status;
2386 /* In parameters */
2388 status = cli->dispatch(cli,
2389 mem_ctx,
2390 &ndr_table_ntsvcs,
2391 NDR_PNP_CREATEKEY,
2392 &r);
2394 if (!NT_STATUS_IS_OK(status)) {
2395 return status;
2398 if (NT_STATUS_IS_ERR(status)) {
2399 return status;
2402 /* Return variables */
2404 /* Return result */
2405 if (werror) {
2406 *werror = r.out.result;
2409 return werror_to_ntstatus(r.out.result);
2412 struct rpccli_PNP_DeleteRegistryKey_state {
2413 struct PNP_DeleteRegistryKey orig;
2414 struct PNP_DeleteRegistryKey tmp;
2415 TALLOC_CTX *out_mem_ctx;
2416 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2419 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq);
2421 struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx,
2422 struct tevent_context *ev,
2423 struct rpc_pipe_client *cli)
2425 struct tevent_req *req;
2426 struct rpccli_PNP_DeleteRegistryKey_state *state;
2427 struct tevent_req *subreq;
2429 req = tevent_req_create(mem_ctx, &state,
2430 struct rpccli_PNP_DeleteRegistryKey_state);
2431 if (req == NULL) {
2432 return NULL;
2434 state->out_mem_ctx = NULL;
2435 state->dispatch_recv = cli->dispatch_recv;
2437 /* In parameters */
2439 /* Out parameters */
2441 /* Result */
2442 ZERO_STRUCT(state->orig.out.result);
2444 /* make a temporary copy, that we pass to the dispatch function */
2445 state->tmp = state->orig;
2447 subreq = cli->dispatch_send(state, ev, cli,
2448 &ndr_table_ntsvcs,
2449 NDR_PNP_DELETEREGISTRYKEY,
2450 &state->tmp);
2451 if (tevent_req_nomem(subreq, req)) {
2452 return tevent_req_post(req, ev);
2454 tevent_req_set_callback(subreq, rpccli_PNP_DeleteRegistryKey_done, req);
2455 return req;
2458 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq)
2460 struct tevent_req *req = tevent_req_callback_data(
2461 subreq, struct tevent_req);
2462 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2463 req, struct rpccli_PNP_DeleteRegistryKey_state);
2464 NTSTATUS status;
2465 TALLOC_CTX *mem_ctx;
2467 if (state->out_mem_ctx) {
2468 mem_ctx = state->out_mem_ctx;
2469 } else {
2470 mem_ctx = state;
2473 status = state->dispatch_recv(subreq, mem_ctx);
2474 TALLOC_FREE(subreq);
2475 if (!NT_STATUS_IS_OK(status)) {
2476 tevent_req_nterror(req, status);
2477 return;
2480 /* Copy out parameters */
2482 /* Copy result */
2483 state->orig.out.result = state->tmp.out.result;
2485 /* Reset temporary structure */
2486 ZERO_STRUCT(state->tmp);
2488 tevent_req_done(req);
2491 NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req,
2492 TALLOC_CTX *mem_ctx,
2493 WERROR *result)
2495 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2496 req, struct rpccli_PNP_DeleteRegistryKey_state);
2497 NTSTATUS status;
2499 if (tevent_req_is_nterror(req, &status)) {
2500 tevent_req_received(req);
2501 return status;
2504 /* Steal possbile out parameters to the callers context */
2505 talloc_steal(mem_ctx, state->out_mem_ctx);
2507 /* Return result */
2508 *result = state->orig.out.result;
2510 tevent_req_received(req);
2511 return NT_STATUS_OK;
2514 NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
2515 TALLOC_CTX *mem_ctx,
2516 WERROR *werror)
2518 struct PNP_DeleteRegistryKey r;
2519 NTSTATUS status;
2521 /* In parameters */
2523 status = cli->dispatch(cli,
2524 mem_ctx,
2525 &ndr_table_ntsvcs,
2526 NDR_PNP_DELETEREGISTRYKEY,
2527 &r);
2529 if (!NT_STATUS_IS_OK(status)) {
2530 return status;
2533 if (NT_STATUS_IS_ERR(status)) {
2534 return status;
2537 /* Return variables */
2539 /* Return result */
2540 if (werror) {
2541 *werror = r.out.result;
2544 return werror_to_ntstatus(r.out.result);
2547 struct rpccli_PNP_GetClassCount_state {
2548 struct PNP_GetClassCount orig;
2549 struct PNP_GetClassCount tmp;
2550 TALLOC_CTX *out_mem_ctx;
2551 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2554 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq);
2556 struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx,
2557 struct tevent_context *ev,
2558 struct rpc_pipe_client *cli)
2560 struct tevent_req *req;
2561 struct rpccli_PNP_GetClassCount_state *state;
2562 struct tevent_req *subreq;
2564 req = tevent_req_create(mem_ctx, &state,
2565 struct rpccli_PNP_GetClassCount_state);
2566 if (req == NULL) {
2567 return NULL;
2569 state->out_mem_ctx = NULL;
2570 state->dispatch_recv = cli->dispatch_recv;
2572 /* In parameters */
2574 /* Out parameters */
2576 /* Result */
2577 ZERO_STRUCT(state->orig.out.result);
2579 /* make a temporary copy, that we pass to the dispatch function */
2580 state->tmp = state->orig;
2582 subreq = cli->dispatch_send(state, ev, cli,
2583 &ndr_table_ntsvcs,
2584 NDR_PNP_GETCLASSCOUNT,
2585 &state->tmp);
2586 if (tevent_req_nomem(subreq, req)) {
2587 return tevent_req_post(req, ev);
2589 tevent_req_set_callback(subreq, rpccli_PNP_GetClassCount_done, req);
2590 return req;
2593 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq)
2595 struct tevent_req *req = tevent_req_callback_data(
2596 subreq, struct tevent_req);
2597 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2598 req, struct rpccli_PNP_GetClassCount_state);
2599 NTSTATUS status;
2600 TALLOC_CTX *mem_ctx;
2602 if (state->out_mem_ctx) {
2603 mem_ctx = state->out_mem_ctx;
2604 } else {
2605 mem_ctx = state;
2608 status = state->dispatch_recv(subreq, mem_ctx);
2609 TALLOC_FREE(subreq);
2610 if (!NT_STATUS_IS_OK(status)) {
2611 tevent_req_nterror(req, status);
2612 return;
2615 /* Copy out parameters */
2617 /* Copy result */
2618 state->orig.out.result = state->tmp.out.result;
2620 /* Reset temporary structure */
2621 ZERO_STRUCT(state->tmp);
2623 tevent_req_done(req);
2626 NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req,
2627 TALLOC_CTX *mem_ctx,
2628 WERROR *result)
2630 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2631 req, struct rpccli_PNP_GetClassCount_state);
2632 NTSTATUS status;
2634 if (tevent_req_is_nterror(req, &status)) {
2635 tevent_req_received(req);
2636 return status;
2639 /* Steal possbile out parameters to the callers context */
2640 talloc_steal(mem_ctx, state->out_mem_ctx);
2642 /* Return result */
2643 *result = state->orig.out.result;
2645 tevent_req_received(req);
2646 return NT_STATUS_OK;
2649 NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
2650 TALLOC_CTX *mem_ctx,
2651 WERROR *werror)
2653 struct PNP_GetClassCount r;
2654 NTSTATUS status;
2656 /* In parameters */
2658 status = cli->dispatch(cli,
2659 mem_ctx,
2660 &ndr_table_ntsvcs,
2661 NDR_PNP_GETCLASSCOUNT,
2662 &r);
2664 if (!NT_STATUS_IS_OK(status)) {
2665 return status;
2668 if (NT_STATUS_IS_ERR(status)) {
2669 return status;
2672 /* Return variables */
2674 /* Return result */
2675 if (werror) {
2676 *werror = r.out.result;
2679 return werror_to_ntstatus(r.out.result);
2682 struct rpccli_PNP_GetClassName_state {
2683 struct PNP_GetClassName orig;
2684 struct PNP_GetClassName tmp;
2685 TALLOC_CTX *out_mem_ctx;
2686 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2689 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq);
2691 struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx,
2692 struct tevent_context *ev,
2693 struct rpc_pipe_client *cli)
2695 struct tevent_req *req;
2696 struct rpccli_PNP_GetClassName_state *state;
2697 struct tevent_req *subreq;
2699 req = tevent_req_create(mem_ctx, &state,
2700 struct rpccli_PNP_GetClassName_state);
2701 if (req == NULL) {
2702 return NULL;
2704 state->out_mem_ctx = NULL;
2705 state->dispatch_recv = cli->dispatch_recv;
2707 /* In parameters */
2709 /* Out parameters */
2711 /* Result */
2712 ZERO_STRUCT(state->orig.out.result);
2714 /* make a temporary copy, that we pass to the dispatch function */
2715 state->tmp = state->orig;
2717 subreq = cli->dispatch_send(state, ev, cli,
2718 &ndr_table_ntsvcs,
2719 NDR_PNP_GETCLASSNAME,
2720 &state->tmp);
2721 if (tevent_req_nomem(subreq, req)) {
2722 return tevent_req_post(req, ev);
2724 tevent_req_set_callback(subreq, rpccli_PNP_GetClassName_done, req);
2725 return req;
2728 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq)
2730 struct tevent_req *req = tevent_req_callback_data(
2731 subreq, struct tevent_req);
2732 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2733 req, struct rpccli_PNP_GetClassName_state);
2734 NTSTATUS status;
2735 TALLOC_CTX *mem_ctx;
2737 if (state->out_mem_ctx) {
2738 mem_ctx = state->out_mem_ctx;
2739 } else {
2740 mem_ctx = state;
2743 status = state->dispatch_recv(subreq, mem_ctx);
2744 TALLOC_FREE(subreq);
2745 if (!NT_STATUS_IS_OK(status)) {
2746 tevent_req_nterror(req, status);
2747 return;
2750 /* Copy out parameters */
2752 /* Copy result */
2753 state->orig.out.result = state->tmp.out.result;
2755 /* Reset temporary structure */
2756 ZERO_STRUCT(state->tmp);
2758 tevent_req_done(req);
2761 NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req,
2762 TALLOC_CTX *mem_ctx,
2763 WERROR *result)
2765 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2766 req, struct rpccli_PNP_GetClassName_state);
2767 NTSTATUS status;
2769 if (tevent_req_is_nterror(req, &status)) {
2770 tevent_req_received(req);
2771 return status;
2774 /* Steal possbile out parameters to the callers context */
2775 talloc_steal(mem_ctx, state->out_mem_ctx);
2777 /* Return result */
2778 *result = state->orig.out.result;
2780 tevent_req_received(req);
2781 return NT_STATUS_OK;
2784 NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
2785 TALLOC_CTX *mem_ctx,
2786 WERROR *werror)
2788 struct PNP_GetClassName r;
2789 NTSTATUS status;
2791 /* In parameters */
2793 status = cli->dispatch(cli,
2794 mem_ctx,
2795 &ndr_table_ntsvcs,
2796 NDR_PNP_GETCLASSNAME,
2797 &r);
2799 if (!NT_STATUS_IS_OK(status)) {
2800 return status;
2803 if (NT_STATUS_IS_ERR(status)) {
2804 return status;
2807 /* Return variables */
2809 /* Return result */
2810 if (werror) {
2811 *werror = r.out.result;
2814 return werror_to_ntstatus(r.out.result);
2817 struct rpccli_PNP_DeleteClassKey_state {
2818 struct PNP_DeleteClassKey orig;
2819 struct PNP_DeleteClassKey tmp;
2820 TALLOC_CTX *out_mem_ctx;
2821 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2824 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq);
2826 struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx,
2827 struct tevent_context *ev,
2828 struct rpc_pipe_client *cli)
2830 struct tevent_req *req;
2831 struct rpccli_PNP_DeleteClassKey_state *state;
2832 struct tevent_req *subreq;
2834 req = tevent_req_create(mem_ctx, &state,
2835 struct rpccli_PNP_DeleteClassKey_state);
2836 if (req == NULL) {
2837 return NULL;
2839 state->out_mem_ctx = NULL;
2840 state->dispatch_recv = cli->dispatch_recv;
2842 /* In parameters */
2844 /* Out parameters */
2846 /* Result */
2847 ZERO_STRUCT(state->orig.out.result);
2849 /* make a temporary copy, that we pass to the dispatch function */
2850 state->tmp = state->orig;
2852 subreq = cli->dispatch_send(state, ev, cli,
2853 &ndr_table_ntsvcs,
2854 NDR_PNP_DELETECLASSKEY,
2855 &state->tmp);
2856 if (tevent_req_nomem(subreq, req)) {
2857 return tevent_req_post(req, ev);
2859 tevent_req_set_callback(subreq, rpccli_PNP_DeleteClassKey_done, req);
2860 return req;
2863 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq)
2865 struct tevent_req *req = tevent_req_callback_data(
2866 subreq, struct tevent_req);
2867 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2868 req, struct rpccli_PNP_DeleteClassKey_state);
2869 NTSTATUS status;
2870 TALLOC_CTX *mem_ctx;
2872 if (state->out_mem_ctx) {
2873 mem_ctx = state->out_mem_ctx;
2874 } else {
2875 mem_ctx = state;
2878 status = state->dispatch_recv(subreq, mem_ctx);
2879 TALLOC_FREE(subreq);
2880 if (!NT_STATUS_IS_OK(status)) {
2881 tevent_req_nterror(req, status);
2882 return;
2885 /* Copy out parameters */
2887 /* Copy result */
2888 state->orig.out.result = state->tmp.out.result;
2890 /* Reset temporary structure */
2891 ZERO_STRUCT(state->tmp);
2893 tevent_req_done(req);
2896 NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req,
2897 TALLOC_CTX *mem_ctx,
2898 WERROR *result)
2900 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2901 req, struct rpccli_PNP_DeleteClassKey_state);
2902 NTSTATUS status;
2904 if (tevent_req_is_nterror(req, &status)) {
2905 tevent_req_received(req);
2906 return status;
2909 /* Steal possbile out parameters to the callers context */
2910 talloc_steal(mem_ctx, state->out_mem_ctx);
2912 /* Return result */
2913 *result = state->orig.out.result;
2915 tevent_req_received(req);
2916 return NT_STATUS_OK;
2919 NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
2920 TALLOC_CTX *mem_ctx,
2921 WERROR *werror)
2923 struct PNP_DeleteClassKey r;
2924 NTSTATUS status;
2926 /* In parameters */
2928 status = cli->dispatch(cli,
2929 mem_ctx,
2930 &ndr_table_ntsvcs,
2931 NDR_PNP_DELETECLASSKEY,
2932 &r);
2934 if (!NT_STATUS_IS_OK(status)) {
2935 return status;
2938 if (NT_STATUS_IS_ERR(status)) {
2939 return status;
2942 /* Return variables */
2944 /* Return result */
2945 if (werror) {
2946 *werror = r.out.result;
2949 return werror_to_ntstatus(r.out.result);
2952 struct rpccli_PNP_GetInterfaceDeviceAlias_state {
2953 struct PNP_GetInterfaceDeviceAlias orig;
2954 struct PNP_GetInterfaceDeviceAlias tmp;
2955 TALLOC_CTX *out_mem_ctx;
2956 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2959 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq);
2961 struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx,
2962 struct tevent_context *ev,
2963 struct rpc_pipe_client *cli)
2965 struct tevent_req *req;
2966 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state;
2967 struct tevent_req *subreq;
2969 req = tevent_req_create(mem_ctx, &state,
2970 struct rpccli_PNP_GetInterfaceDeviceAlias_state);
2971 if (req == NULL) {
2972 return NULL;
2974 state->out_mem_ctx = NULL;
2975 state->dispatch_recv = cli->dispatch_recv;
2977 /* In parameters */
2979 /* Out parameters */
2981 /* Result */
2982 ZERO_STRUCT(state->orig.out.result);
2984 /* make a temporary copy, that we pass to the dispatch function */
2985 state->tmp = state->orig;
2987 subreq = cli->dispatch_send(state, ev, cli,
2988 &ndr_table_ntsvcs,
2989 NDR_PNP_GETINTERFACEDEVICEALIAS,
2990 &state->tmp);
2991 if (tevent_req_nomem(subreq, req)) {
2992 return tevent_req_post(req, ev);
2994 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceAlias_done, req);
2995 return req;
2998 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq)
3000 struct tevent_req *req = tevent_req_callback_data(
3001 subreq, struct tevent_req);
3002 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3003 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3004 NTSTATUS status;
3005 TALLOC_CTX *mem_ctx;
3007 if (state->out_mem_ctx) {
3008 mem_ctx = state->out_mem_ctx;
3009 } else {
3010 mem_ctx = state;
3013 status = state->dispatch_recv(subreq, mem_ctx);
3014 TALLOC_FREE(subreq);
3015 if (!NT_STATUS_IS_OK(status)) {
3016 tevent_req_nterror(req, status);
3017 return;
3020 /* Copy out parameters */
3022 /* Copy result */
3023 state->orig.out.result = state->tmp.out.result;
3025 /* Reset temporary structure */
3026 ZERO_STRUCT(state->tmp);
3028 tevent_req_done(req);
3031 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req,
3032 TALLOC_CTX *mem_ctx,
3033 WERROR *result)
3035 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3036 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3037 NTSTATUS status;
3039 if (tevent_req_is_nterror(req, &status)) {
3040 tevent_req_received(req);
3041 return status;
3044 /* Steal possbile out parameters to the callers context */
3045 talloc_steal(mem_ctx, state->out_mem_ctx);
3047 /* Return result */
3048 *result = state->orig.out.result;
3050 tevent_req_received(req);
3051 return NT_STATUS_OK;
3054 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
3055 TALLOC_CTX *mem_ctx,
3056 WERROR *werror)
3058 struct PNP_GetInterfaceDeviceAlias r;
3059 NTSTATUS status;
3061 /* In parameters */
3063 status = cli->dispatch(cli,
3064 mem_ctx,
3065 &ndr_table_ntsvcs,
3066 NDR_PNP_GETINTERFACEDEVICEALIAS,
3067 &r);
3069 if (!NT_STATUS_IS_OK(status)) {
3070 return status;
3073 if (NT_STATUS_IS_ERR(status)) {
3074 return status;
3077 /* Return variables */
3079 /* Return result */
3080 if (werror) {
3081 *werror = r.out.result;
3084 return werror_to_ntstatus(r.out.result);
3087 struct rpccli_PNP_GetInterfaceDeviceList_state {
3088 struct PNP_GetInterfaceDeviceList orig;
3089 struct PNP_GetInterfaceDeviceList tmp;
3090 TALLOC_CTX *out_mem_ctx;
3091 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3094 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq);
3096 struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx,
3097 struct tevent_context *ev,
3098 struct rpc_pipe_client *cli)
3100 struct tevent_req *req;
3101 struct rpccli_PNP_GetInterfaceDeviceList_state *state;
3102 struct tevent_req *subreq;
3104 req = tevent_req_create(mem_ctx, &state,
3105 struct rpccli_PNP_GetInterfaceDeviceList_state);
3106 if (req == NULL) {
3107 return NULL;
3109 state->out_mem_ctx = NULL;
3110 state->dispatch_recv = cli->dispatch_recv;
3112 /* In parameters */
3114 /* Out parameters */
3116 /* Result */
3117 ZERO_STRUCT(state->orig.out.result);
3119 /* make a temporary copy, that we pass to the dispatch function */
3120 state->tmp = state->orig;
3122 subreq = cli->dispatch_send(state, ev, cli,
3123 &ndr_table_ntsvcs,
3124 NDR_PNP_GETINTERFACEDEVICELIST,
3125 &state->tmp);
3126 if (tevent_req_nomem(subreq, req)) {
3127 return tevent_req_post(req, ev);
3129 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceList_done, req);
3130 return req;
3133 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq)
3135 struct tevent_req *req = tevent_req_callback_data(
3136 subreq, struct tevent_req);
3137 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3138 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3139 NTSTATUS status;
3140 TALLOC_CTX *mem_ctx;
3142 if (state->out_mem_ctx) {
3143 mem_ctx = state->out_mem_ctx;
3144 } else {
3145 mem_ctx = state;
3148 status = state->dispatch_recv(subreq, mem_ctx);
3149 TALLOC_FREE(subreq);
3150 if (!NT_STATUS_IS_OK(status)) {
3151 tevent_req_nterror(req, status);
3152 return;
3155 /* Copy out parameters */
3157 /* Copy result */
3158 state->orig.out.result = state->tmp.out.result;
3160 /* Reset temporary structure */
3161 ZERO_STRUCT(state->tmp);
3163 tevent_req_done(req);
3166 NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req,
3167 TALLOC_CTX *mem_ctx,
3168 WERROR *result)
3170 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3171 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3172 NTSTATUS status;
3174 if (tevent_req_is_nterror(req, &status)) {
3175 tevent_req_received(req);
3176 return status;
3179 /* Steal possbile out parameters to the callers context */
3180 talloc_steal(mem_ctx, state->out_mem_ctx);
3182 /* Return result */
3183 *result = state->orig.out.result;
3185 tevent_req_received(req);
3186 return NT_STATUS_OK;
3189 NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
3190 TALLOC_CTX *mem_ctx,
3191 WERROR *werror)
3193 struct PNP_GetInterfaceDeviceList r;
3194 NTSTATUS status;
3196 /* In parameters */
3198 status = cli->dispatch(cli,
3199 mem_ctx,
3200 &ndr_table_ntsvcs,
3201 NDR_PNP_GETINTERFACEDEVICELIST,
3202 &r);
3204 if (!NT_STATUS_IS_OK(status)) {
3205 return status;
3208 if (NT_STATUS_IS_ERR(status)) {
3209 return status;
3212 /* Return variables */
3214 /* Return result */
3215 if (werror) {
3216 *werror = r.out.result;
3219 return werror_to_ntstatus(r.out.result);
3222 struct rpccli_PNP_GetInterfaceDeviceListSize_state {
3223 struct PNP_GetInterfaceDeviceListSize orig;
3224 struct PNP_GetInterfaceDeviceListSize tmp;
3225 TALLOC_CTX *out_mem_ctx;
3226 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3229 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq);
3231 struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx,
3232 struct tevent_context *ev,
3233 struct rpc_pipe_client *cli)
3235 struct tevent_req *req;
3236 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state;
3237 struct tevent_req *subreq;
3239 req = tevent_req_create(mem_ctx, &state,
3240 struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3241 if (req == NULL) {
3242 return NULL;
3244 state->out_mem_ctx = NULL;
3245 state->dispatch_recv = cli->dispatch_recv;
3247 /* In parameters */
3249 /* Out parameters */
3251 /* Result */
3252 ZERO_STRUCT(state->orig.out.result);
3254 /* make a temporary copy, that we pass to the dispatch function */
3255 state->tmp = state->orig;
3257 subreq = cli->dispatch_send(state, ev, cli,
3258 &ndr_table_ntsvcs,
3259 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3260 &state->tmp);
3261 if (tevent_req_nomem(subreq, req)) {
3262 return tevent_req_post(req, ev);
3264 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceListSize_done, req);
3265 return req;
3268 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq)
3270 struct tevent_req *req = tevent_req_callback_data(
3271 subreq, struct tevent_req);
3272 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3273 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3274 NTSTATUS status;
3275 TALLOC_CTX *mem_ctx;
3277 if (state->out_mem_ctx) {
3278 mem_ctx = state->out_mem_ctx;
3279 } else {
3280 mem_ctx = state;
3283 status = state->dispatch_recv(subreq, mem_ctx);
3284 TALLOC_FREE(subreq);
3285 if (!NT_STATUS_IS_OK(status)) {
3286 tevent_req_nterror(req, status);
3287 return;
3290 /* Copy out parameters */
3292 /* Copy result */
3293 state->orig.out.result = state->tmp.out.result;
3295 /* Reset temporary structure */
3296 ZERO_STRUCT(state->tmp);
3298 tevent_req_done(req);
3301 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req,
3302 TALLOC_CTX *mem_ctx,
3303 WERROR *result)
3305 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3306 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3307 NTSTATUS status;
3309 if (tevent_req_is_nterror(req, &status)) {
3310 tevent_req_received(req);
3311 return status;
3314 /* Steal possbile out parameters to the callers context */
3315 talloc_steal(mem_ctx, state->out_mem_ctx);
3317 /* Return result */
3318 *result = state->orig.out.result;
3320 tevent_req_received(req);
3321 return NT_STATUS_OK;
3324 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
3325 TALLOC_CTX *mem_ctx,
3326 WERROR *werror)
3328 struct PNP_GetInterfaceDeviceListSize r;
3329 NTSTATUS status;
3331 /* In parameters */
3333 status = cli->dispatch(cli,
3334 mem_ctx,
3335 &ndr_table_ntsvcs,
3336 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3337 &r);
3339 if (!NT_STATUS_IS_OK(status)) {
3340 return status;
3343 if (NT_STATUS_IS_ERR(status)) {
3344 return status;
3347 /* Return variables */
3349 /* Return result */
3350 if (werror) {
3351 *werror = r.out.result;
3354 return werror_to_ntstatus(r.out.result);
3357 struct rpccli_PNP_RegisterDeviceClassAssociation_state {
3358 struct PNP_RegisterDeviceClassAssociation orig;
3359 struct PNP_RegisterDeviceClassAssociation tmp;
3360 TALLOC_CTX *out_mem_ctx;
3361 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3364 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq);
3366 struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3367 struct tevent_context *ev,
3368 struct rpc_pipe_client *cli)
3370 struct tevent_req *req;
3371 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state;
3372 struct tevent_req *subreq;
3374 req = tevent_req_create(mem_ctx, &state,
3375 struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3376 if (req == NULL) {
3377 return NULL;
3379 state->out_mem_ctx = NULL;
3380 state->dispatch_recv = cli->dispatch_recv;
3382 /* In parameters */
3384 /* Out parameters */
3386 /* Result */
3387 ZERO_STRUCT(state->orig.out.result);
3389 /* make a temporary copy, that we pass to the dispatch function */
3390 state->tmp = state->orig;
3392 subreq = cli->dispatch_send(state, ev, cli,
3393 &ndr_table_ntsvcs,
3394 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3395 &state->tmp);
3396 if (tevent_req_nomem(subreq, req)) {
3397 return tevent_req_post(req, ev);
3399 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDeviceClassAssociation_done, req);
3400 return req;
3403 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq)
3405 struct tevent_req *req = tevent_req_callback_data(
3406 subreq, struct tevent_req);
3407 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3408 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3409 NTSTATUS status;
3410 TALLOC_CTX *mem_ctx;
3412 if (state->out_mem_ctx) {
3413 mem_ctx = state->out_mem_ctx;
3414 } else {
3415 mem_ctx = state;
3418 status = state->dispatch_recv(subreq, mem_ctx);
3419 TALLOC_FREE(subreq);
3420 if (!NT_STATUS_IS_OK(status)) {
3421 tevent_req_nterror(req, status);
3422 return;
3425 /* Copy out parameters */
3427 /* Copy result */
3428 state->orig.out.result = state->tmp.out.result;
3430 /* Reset temporary structure */
3431 ZERO_STRUCT(state->tmp);
3433 tevent_req_done(req);
3436 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req,
3437 TALLOC_CTX *mem_ctx,
3438 WERROR *result)
3440 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3441 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3442 NTSTATUS status;
3444 if (tevent_req_is_nterror(req, &status)) {
3445 tevent_req_received(req);
3446 return status;
3449 /* Steal possbile out parameters to the callers context */
3450 talloc_steal(mem_ctx, state->out_mem_ctx);
3452 /* Return result */
3453 *result = state->orig.out.result;
3455 tevent_req_received(req);
3456 return NT_STATUS_OK;
3459 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3460 TALLOC_CTX *mem_ctx,
3461 WERROR *werror)
3463 struct PNP_RegisterDeviceClassAssociation r;
3464 NTSTATUS status;
3466 /* In parameters */
3468 status = cli->dispatch(cli,
3469 mem_ctx,
3470 &ndr_table_ntsvcs,
3471 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3472 &r);
3474 if (!NT_STATUS_IS_OK(status)) {
3475 return status;
3478 if (NT_STATUS_IS_ERR(status)) {
3479 return status;
3482 /* Return variables */
3484 /* Return result */
3485 if (werror) {
3486 *werror = r.out.result;
3489 return werror_to_ntstatus(r.out.result);
3492 struct rpccli_PNP_UnregisterDeviceClassAssociation_state {
3493 struct PNP_UnregisterDeviceClassAssociation orig;
3494 struct PNP_UnregisterDeviceClassAssociation tmp;
3495 TALLOC_CTX *out_mem_ctx;
3496 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3499 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq);
3501 struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3502 struct tevent_context *ev,
3503 struct rpc_pipe_client *cli)
3505 struct tevent_req *req;
3506 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state;
3507 struct tevent_req *subreq;
3509 req = tevent_req_create(mem_ctx, &state,
3510 struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3511 if (req == NULL) {
3512 return NULL;
3514 state->out_mem_ctx = NULL;
3515 state->dispatch_recv = cli->dispatch_recv;
3517 /* In parameters */
3519 /* Out parameters */
3521 /* Result */
3522 ZERO_STRUCT(state->orig.out.result);
3524 /* make a temporary copy, that we pass to the dispatch function */
3525 state->tmp = state->orig;
3527 subreq = cli->dispatch_send(state, ev, cli,
3528 &ndr_table_ntsvcs,
3529 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3530 &state->tmp);
3531 if (tevent_req_nomem(subreq, req)) {
3532 return tevent_req_post(req, ev);
3534 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterDeviceClassAssociation_done, req);
3535 return req;
3538 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq)
3540 struct tevent_req *req = tevent_req_callback_data(
3541 subreq, struct tevent_req);
3542 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3543 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3544 NTSTATUS status;
3545 TALLOC_CTX *mem_ctx;
3547 if (state->out_mem_ctx) {
3548 mem_ctx = state->out_mem_ctx;
3549 } else {
3550 mem_ctx = state;
3553 status = state->dispatch_recv(subreq, mem_ctx);
3554 TALLOC_FREE(subreq);
3555 if (!NT_STATUS_IS_OK(status)) {
3556 tevent_req_nterror(req, status);
3557 return;
3560 /* Copy out parameters */
3562 /* Copy result */
3563 state->orig.out.result = state->tmp.out.result;
3565 /* Reset temporary structure */
3566 ZERO_STRUCT(state->tmp);
3568 tevent_req_done(req);
3571 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req,
3572 TALLOC_CTX *mem_ctx,
3573 WERROR *result)
3575 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3576 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3577 NTSTATUS status;
3579 if (tevent_req_is_nterror(req, &status)) {
3580 tevent_req_received(req);
3581 return status;
3584 /* Steal possbile out parameters to the callers context */
3585 talloc_steal(mem_ctx, state->out_mem_ctx);
3587 /* Return result */
3588 *result = state->orig.out.result;
3590 tevent_req_received(req);
3591 return NT_STATUS_OK;
3594 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3595 TALLOC_CTX *mem_ctx,
3596 WERROR *werror)
3598 struct PNP_UnregisterDeviceClassAssociation r;
3599 NTSTATUS status;
3601 /* In parameters */
3603 status = cli->dispatch(cli,
3604 mem_ctx,
3605 &ndr_table_ntsvcs,
3606 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3607 &r);
3609 if (!NT_STATUS_IS_OK(status)) {
3610 return status;
3613 if (NT_STATUS_IS_ERR(status)) {
3614 return status;
3617 /* Return variables */
3619 /* Return result */
3620 if (werror) {
3621 *werror = r.out.result;
3624 return werror_to_ntstatus(r.out.result);
3627 struct rpccli_PNP_GetClassRegProp_state {
3628 struct PNP_GetClassRegProp orig;
3629 struct PNP_GetClassRegProp tmp;
3630 TALLOC_CTX *out_mem_ctx;
3631 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3634 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq);
3636 struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx,
3637 struct tevent_context *ev,
3638 struct rpc_pipe_client *cli)
3640 struct tevent_req *req;
3641 struct rpccli_PNP_GetClassRegProp_state *state;
3642 struct tevent_req *subreq;
3644 req = tevent_req_create(mem_ctx, &state,
3645 struct rpccli_PNP_GetClassRegProp_state);
3646 if (req == NULL) {
3647 return NULL;
3649 state->out_mem_ctx = NULL;
3650 state->dispatch_recv = cli->dispatch_recv;
3652 /* In parameters */
3654 /* Out parameters */
3656 /* Result */
3657 ZERO_STRUCT(state->orig.out.result);
3659 /* make a temporary copy, that we pass to the dispatch function */
3660 state->tmp = state->orig;
3662 subreq = cli->dispatch_send(state, ev, cli,
3663 &ndr_table_ntsvcs,
3664 NDR_PNP_GETCLASSREGPROP,
3665 &state->tmp);
3666 if (tevent_req_nomem(subreq, req)) {
3667 return tevent_req_post(req, ev);
3669 tevent_req_set_callback(subreq, rpccli_PNP_GetClassRegProp_done, req);
3670 return req;
3673 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq)
3675 struct tevent_req *req = tevent_req_callback_data(
3676 subreq, struct tevent_req);
3677 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3678 req, struct rpccli_PNP_GetClassRegProp_state);
3679 NTSTATUS status;
3680 TALLOC_CTX *mem_ctx;
3682 if (state->out_mem_ctx) {
3683 mem_ctx = state->out_mem_ctx;
3684 } else {
3685 mem_ctx = state;
3688 status = state->dispatch_recv(subreq, mem_ctx);
3689 TALLOC_FREE(subreq);
3690 if (!NT_STATUS_IS_OK(status)) {
3691 tevent_req_nterror(req, status);
3692 return;
3695 /* Copy out parameters */
3697 /* Copy result */
3698 state->orig.out.result = state->tmp.out.result;
3700 /* Reset temporary structure */
3701 ZERO_STRUCT(state->tmp);
3703 tevent_req_done(req);
3706 NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req,
3707 TALLOC_CTX *mem_ctx,
3708 WERROR *result)
3710 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3711 req, struct rpccli_PNP_GetClassRegProp_state);
3712 NTSTATUS status;
3714 if (tevent_req_is_nterror(req, &status)) {
3715 tevent_req_received(req);
3716 return status;
3719 /* Steal possbile out parameters to the callers context */
3720 talloc_steal(mem_ctx, state->out_mem_ctx);
3722 /* Return result */
3723 *result = state->orig.out.result;
3725 tevent_req_received(req);
3726 return NT_STATUS_OK;
3729 NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
3730 TALLOC_CTX *mem_ctx,
3731 WERROR *werror)
3733 struct PNP_GetClassRegProp r;
3734 NTSTATUS status;
3736 /* In parameters */
3738 status = cli->dispatch(cli,
3739 mem_ctx,
3740 &ndr_table_ntsvcs,
3741 NDR_PNP_GETCLASSREGPROP,
3742 &r);
3744 if (!NT_STATUS_IS_OK(status)) {
3745 return status;
3748 if (NT_STATUS_IS_ERR(status)) {
3749 return status;
3752 /* Return variables */
3754 /* Return result */
3755 if (werror) {
3756 *werror = r.out.result;
3759 return werror_to_ntstatus(r.out.result);
3762 struct rpccli_PNP_SetClassRegProp_state {
3763 struct PNP_SetClassRegProp orig;
3764 struct PNP_SetClassRegProp tmp;
3765 TALLOC_CTX *out_mem_ctx;
3766 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3769 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq);
3771 struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx,
3772 struct tevent_context *ev,
3773 struct rpc_pipe_client *cli)
3775 struct tevent_req *req;
3776 struct rpccli_PNP_SetClassRegProp_state *state;
3777 struct tevent_req *subreq;
3779 req = tevent_req_create(mem_ctx, &state,
3780 struct rpccli_PNP_SetClassRegProp_state);
3781 if (req == NULL) {
3782 return NULL;
3784 state->out_mem_ctx = NULL;
3785 state->dispatch_recv = cli->dispatch_recv;
3787 /* In parameters */
3789 /* Out parameters */
3791 /* Result */
3792 ZERO_STRUCT(state->orig.out.result);
3794 /* make a temporary copy, that we pass to the dispatch function */
3795 state->tmp = state->orig;
3797 subreq = cli->dispatch_send(state, ev, cli,
3798 &ndr_table_ntsvcs,
3799 NDR_PNP_SETCLASSREGPROP,
3800 &state->tmp);
3801 if (tevent_req_nomem(subreq, req)) {
3802 return tevent_req_post(req, ev);
3804 tevent_req_set_callback(subreq, rpccli_PNP_SetClassRegProp_done, req);
3805 return req;
3808 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq)
3810 struct tevent_req *req = tevent_req_callback_data(
3811 subreq, struct tevent_req);
3812 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3813 req, struct rpccli_PNP_SetClassRegProp_state);
3814 NTSTATUS status;
3815 TALLOC_CTX *mem_ctx;
3817 if (state->out_mem_ctx) {
3818 mem_ctx = state->out_mem_ctx;
3819 } else {
3820 mem_ctx = state;
3823 status = state->dispatch_recv(subreq, mem_ctx);
3824 TALLOC_FREE(subreq);
3825 if (!NT_STATUS_IS_OK(status)) {
3826 tevent_req_nterror(req, status);
3827 return;
3830 /* Copy out parameters */
3832 /* Copy result */
3833 state->orig.out.result = state->tmp.out.result;
3835 /* Reset temporary structure */
3836 ZERO_STRUCT(state->tmp);
3838 tevent_req_done(req);
3841 NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req,
3842 TALLOC_CTX *mem_ctx,
3843 WERROR *result)
3845 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3846 req, struct rpccli_PNP_SetClassRegProp_state);
3847 NTSTATUS status;
3849 if (tevent_req_is_nterror(req, &status)) {
3850 tevent_req_received(req);
3851 return status;
3854 /* Steal possbile out parameters to the callers context */
3855 talloc_steal(mem_ctx, state->out_mem_ctx);
3857 /* Return result */
3858 *result = state->orig.out.result;
3860 tevent_req_received(req);
3861 return NT_STATUS_OK;
3864 NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
3865 TALLOC_CTX *mem_ctx,
3866 WERROR *werror)
3868 struct PNP_SetClassRegProp r;
3869 NTSTATUS status;
3871 /* In parameters */
3873 status = cli->dispatch(cli,
3874 mem_ctx,
3875 &ndr_table_ntsvcs,
3876 NDR_PNP_SETCLASSREGPROP,
3877 &r);
3879 if (!NT_STATUS_IS_OK(status)) {
3880 return status;
3883 if (NT_STATUS_IS_ERR(status)) {
3884 return status;
3887 /* Return variables */
3889 /* Return result */
3890 if (werror) {
3891 *werror = r.out.result;
3894 return werror_to_ntstatus(r.out.result);
3897 struct rpccli_PNP_CreateDevInst_state {
3898 struct PNP_CreateDevInst orig;
3899 struct PNP_CreateDevInst tmp;
3900 TALLOC_CTX *out_mem_ctx;
3901 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3904 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq);
3906 struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx,
3907 struct tevent_context *ev,
3908 struct rpc_pipe_client *cli)
3910 struct tevent_req *req;
3911 struct rpccli_PNP_CreateDevInst_state *state;
3912 struct tevent_req *subreq;
3914 req = tevent_req_create(mem_ctx, &state,
3915 struct rpccli_PNP_CreateDevInst_state);
3916 if (req == NULL) {
3917 return NULL;
3919 state->out_mem_ctx = NULL;
3920 state->dispatch_recv = cli->dispatch_recv;
3922 /* In parameters */
3924 /* Out parameters */
3926 /* Result */
3927 ZERO_STRUCT(state->orig.out.result);
3929 /* make a temporary copy, that we pass to the dispatch function */
3930 state->tmp = state->orig;
3932 subreq = cli->dispatch_send(state, ev, cli,
3933 &ndr_table_ntsvcs,
3934 NDR_PNP_CREATEDEVINST,
3935 &state->tmp);
3936 if (tevent_req_nomem(subreq, req)) {
3937 return tevent_req_post(req, ev);
3939 tevent_req_set_callback(subreq, rpccli_PNP_CreateDevInst_done, req);
3940 return req;
3943 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq)
3945 struct tevent_req *req = tevent_req_callback_data(
3946 subreq, struct tevent_req);
3947 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3948 req, struct rpccli_PNP_CreateDevInst_state);
3949 NTSTATUS status;
3950 TALLOC_CTX *mem_ctx;
3952 if (state->out_mem_ctx) {
3953 mem_ctx = state->out_mem_ctx;
3954 } else {
3955 mem_ctx = state;
3958 status = state->dispatch_recv(subreq, mem_ctx);
3959 TALLOC_FREE(subreq);
3960 if (!NT_STATUS_IS_OK(status)) {
3961 tevent_req_nterror(req, status);
3962 return;
3965 /* Copy out parameters */
3967 /* Copy result */
3968 state->orig.out.result = state->tmp.out.result;
3970 /* Reset temporary structure */
3971 ZERO_STRUCT(state->tmp);
3973 tevent_req_done(req);
3976 NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req,
3977 TALLOC_CTX *mem_ctx,
3978 WERROR *result)
3980 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3981 req, struct rpccli_PNP_CreateDevInst_state);
3982 NTSTATUS status;
3984 if (tevent_req_is_nterror(req, &status)) {
3985 tevent_req_received(req);
3986 return status;
3989 /* Steal possbile out parameters to the callers context */
3990 talloc_steal(mem_ctx, state->out_mem_ctx);
3992 /* Return result */
3993 *result = state->orig.out.result;
3995 tevent_req_received(req);
3996 return NT_STATUS_OK;
3999 NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
4000 TALLOC_CTX *mem_ctx,
4001 WERROR *werror)
4003 struct PNP_CreateDevInst r;
4004 NTSTATUS status;
4006 /* In parameters */
4008 status = cli->dispatch(cli,
4009 mem_ctx,
4010 &ndr_table_ntsvcs,
4011 NDR_PNP_CREATEDEVINST,
4012 &r);
4014 if (!NT_STATUS_IS_OK(status)) {
4015 return status;
4018 if (NT_STATUS_IS_ERR(status)) {
4019 return status;
4022 /* Return variables */
4024 /* Return result */
4025 if (werror) {
4026 *werror = r.out.result;
4029 return werror_to_ntstatus(r.out.result);
4032 struct rpccli_PNP_DeviceInstanceAction_state {
4033 struct PNP_DeviceInstanceAction orig;
4034 struct PNP_DeviceInstanceAction tmp;
4035 TALLOC_CTX *out_mem_ctx;
4036 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4039 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq);
4041 struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx,
4042 struct tevent_context *ev,
4043 struct rpc_pipe_client *cli)
4045 struct tevent_req *req;
4046 struct rpccli_PNP_DeviceInstanceAction_state *state;
4047 struct tevent_req *subreq;
4049 req = tevent_req_create(mem_ctx, &state,
4050 struct rpccli_PNP_DeviceInstanceAction_state);
4051 if (req == NULL) {
4052 return NULL;
4054 state->out_mem_ctx = NULL;
4055 state->dispatch_recv = cli->dispatch_recv;
4057 /* In parameters */
4059 /* Out parameters */
4061 /* Result */
4062 ZERO_STRUCT(state->orig.out.result);
4064 /* make a temporary copy, that we pass to the dispatch function */
4065 state->tmp = state->orig;
4067 subreq = cli->dispatch_send(state, ev, cli,
4068 &ndr_table_ntsvcs,
4069 NDR_PNP_DEVICEINSTANCEACTION,
4070 &state->tmp);
4071 if (tevent_req_nomem(subreq, req)) {
4072 return tevent_req_post(req, ev);
4074 tevent_req_set_callback(subreq, rpccli_PNP_DeviceInstanceAction_done, req);
4075 return req;
4078 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq)
4080 struct tevent_req *req = tevent_req_callback_data(
4081 subreq, struct tevent_req);
4082 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4083 req, struct rpccli_PNP_DeviceInstanceAction_state);
4084 NTSTATUS status;
4085 TALLOC_CTX *mem_ctx;
4087 if (state->out_mem_ctx) {
4088 mem_ctx = state->out_mem_ctx;
4089 } else {
4090 mem_ctx = state;
4093 status = state->dispatch_recv(subreq, mem_ctx);
4094 TALLOC_FREE(subreq);
4095 if (!NT_STATUS_IS_OK(status)) {
4096 tevent_req_nterror(req, status);
4097 return;
4100 /* Copy out parameters */
4102 /* Copy result */
4103 state->orig.out.result = state->tmp.out.result;
4105 /* Reset temporary structure */
4106 ZERO_STRUCT(state->tmp);
4108 tevent_req_done(req);
4111 NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req,
4112 TALLOC_CTX *mem_ctx,
4113 WERROR *result)
4115 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4116 req, struct rpccli_PNP_DeviceInstanceAction_state);
4117 NTSTATUS status;
4119 if (tevent_req_is_nterror(req, &status)) {
4120 tevent_req_received(req);
4121 return status;
4124 /* Steal possbile out parameters to the callers context */
4125 talloc_steal(mem_ctx, state->out_mem_ctx);
4127 /* Return result */
4128 *result = state->orig.out.result;
4130 tevent_req_received(req);
4131 return NT_STATUS_OK;
4134 NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
4135 TALLOC_CTX *mem_ctx,
4136 WERROR *werror)
4138 struct PNP_DeviceInstanceAction r;
4139 NTSTATUS status;
4141 /* In parameters */
4143 status = cli->dispatch(cli,
4144 mem_ctx,
4145 &ndr_table_ntsvcs,
4146 NDR_PNP_DEVICEINSTANCEACTION,
4147 &r);
4149 if (!NT_STATUS_IS_OK(status)) {
4150 return status;
4153 if (NT_STATUS_IS_ERR(status)) {
4154 return status;
4157 /* Return variables */
4159 /* Return result */
4160 if (werror) {
4161 *werror = r.out.result;
4164 return werror_to_ntstatus(r.out.result);
4167 struct rpccli_PNP_GetDeviceStatus_state {
4168 struct PNP_GetDeviceStatus orig;
4169 struct PNP_GetDeviceStatus tmp;
4170 TALLOC_CTX *out_mem_ctx;
4171 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4174 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq);
4176 struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx,
4177 struct tevent_context *ev,
4178 struct rpc_pipe_client *cli)
4180 struct tevent_req *req;
4181 struct rpccli_PNP_GetDeviceStatus_state *state;
4182 struct tevent_req *subreq;
4184 req = tevent_req_create(mem_ctx, &state,
4185 struct rpccli_PNP_GetDeviceStatus_state);
4186 if (req == NULL) {
4187 return NULL;
4189 state->out_mem_ctx = NULL;
4190 state->dispatch_recv = cli->dispatch_recv;
4192 /* In parameters */
4194 /* Out parameters */
4196 /* Result */
4197 ZERO_STRUCT(state->orig.out.result);
4199 /* make a temporary copy, that we pass to the dispatch function */
4200 state->tmp = state->orig;
4202 subreq = cli->dispatch_send(state, ev, cli,
4203 &ndr_table_ntsvcs,
4204 NDR_PNP_GETDEVICESTATUS,
4205 &state->tmp);
4206 if (tevent_req_nomem(subreq, req)) {
4207 return tevent_req_post(req, ev);
4209 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceStatus_done, req);
4210 return req;
4213 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq)
4215 struct tevent_req *req = tevent_req_callback_data(
4216 subreq, struct tevent_req);
4217 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4218 req, struct rpccli_PNP_GetDeviceStatus_state);
4219 NTSTATUS status;
4220 TALLOC_CTX *mem_ctx;
4222 if (state->out_mem_ctx) {
4223 mem_ctx = state->out_mem_ctx;
4224 } else {
4225 mem_ctx = state;
4228 status = state->dispatch_recv(subreq, mem_ctx);
4229 TALLOC_FREE(subreq);
4230 if (!NT_STATUS_IS_OK(status)) {
4231 tevent_req_nterror(req, status);
4232 return;
4235 /* Copy out parameters */
4237 /* Copy result */
4238 state->orig.out.result = state->tmp.out.result;
4240 /* Reset temporary structure */
4241 ZERO_STRUCT(state->tmp);
4243 tevent_req_done(req);
4246 NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req,
4247 TALLOC_CTX *mem_ctx,
4248 WERROR *result)
4250 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4251 req, struct rpccli_PNP_GetDeviceStatus_state);
4252 NTSTATUS status;
4254 if (tevent_req_is_nterror(req, &status)) {
4255 tevent_req_received(req);
4256 return status;
4259 /* Steal possbile out parameters to the callers context */
4260 talloc_steal(mem_ctx, state->out_mem_ctx);
4262 /* Return result */
4263 *result = state->orig.out.result;
4265 tevent_req_received(req);
4266 return NT_STATUS_OK;
4269 NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
4270 TALLOC_CTX *mem_ctx,
4271 WERROR *werror)
4273 struct PNP_GetDeviceStatus r;
4274 NTSTATUS status;
4276 /* In parameters */
4278 status = cli->dispatch(cli,
4279 mem_ctx,
4280 &ndr_table_ntsvcs,
4281 NDR_PNP_GETDEVICESTATUS,
4282 &r);
4284 if (!NT_STATUS_IS_OK(status)) {
4285 return status;
4288 if (NT_STATUS_IS_ERR(status)) {
4289 return status;
4292 /* Return variables */
4294 /* Return result */
4295 if (werror) {
4296 *werror = r.out.result;
4299 return werror_to_ntstatus(r.out.result);
4302 struct rpccli_PNP_SetDeviceProblem_state {
4303 struct PNP_SetDeviceProblem orig;
4304 struct PNP_SetDeviceProblem tmp;
4305 TALLOC_CTX *out_mem_ctx;
4306 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4309 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq);
4311 struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx,
4312 struct tevent_context *ev,
4313 struct rpc_pipe_client *cli)
4315 struct tevent_req *req;
4316 struct rpccli_PNP_SetDeviceProblem_state *state;
4317 struct tevent_req *subreq;
4319 req = tevent_req_create(mem_ctx, &state,
4320 struct rpccli_PNP_SetDeviceProblem_state);
4321 if (req == NULL) {
4322 return NULL;
4324 state->out_mem_ctx = NULL;
4325 state->dispatch_recv = cli->dispatch_recv;
4327 /* In parameters */
4329 /* Out parameters */
4331 /* Result */
4332 ZERO_STRUCT(state->orig.out.result);
4334 /* make a temporary copy, that we pass to the dispatch function */
4335 state->tmp = state->orig;
4337 subreq = cli->dispatch_send(state, ev, cli,
4338 &ndr_table_ntsvcs,
4339 NDR_PNP_SETDEVICEPROBLEM,
4340 &state->tmp);
4341 if (tevent_req_nomem(subreq, req)) {
4342 return tevent_req_post(req, ev);
4344 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceProblem_done, req);
4345 return req;
4348 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq)
4350 struct tevent_req *req = tevent_req_callback_data(
4351 subreq, struct tevent_req);
4352 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4353 req, struct rpccli_PNP_SetDeviceProblem_state);
4354 NTSTATUS status;
4355 TALLOC_CTX *mem_ctx;
4357 if (state->out_mem_ctx) {
4358 mem_ctx = state->out_mem_ctx;
4359 } else {
4360 mem_ctx = state;
4363 status = state->dispatch_recv(subreq, mem_ctx);
4364 TALLOC_FREE(subreq);
4365 if (!NT_STATUS_IS_OK(status)) {
4366 tevent_req_nterror(req, status);
4367 return;
4370 /* Copy out parameters */
4372 /* Copy result */
4373 state->orig.out.result = state->tmp.out.result;
4375 /* Reset temporary structure */
4376 ZERO_STRUCT(state->tmp);
4378 tevent_req_done(req);
4381 NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req,
4382 TALLOC_CTX *mem_ctx,
4383 WERROR *result)
4385 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4386 req, struct rpccli_PNP_SetDeviceProblem_state);
4387 NTSTATUS status;
4389 if (tevent_req_is_nterror(req, &status)) {
4390 tevent_req_received(req);
4391 return status;
4394 /* Steal possbile out parameters to the callers context */
4395 talloc_steal(mem_ctx, state->out_mem_ctx);
4397 /* Return result */
4398 *result = state->orig.out.result;
4400 tevent_req_received(req);
4401 return NT_STATUS_OK;
4404 NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
4405 TALLOC_CTX *mem_ctx,
4406 WERROR *werror)
4408 struct PNP_SetDeviceProblem r;
4409 NTSTATUS status;
4411 /* In parameters */
4413 status = cli->dispatch(cli,
4414 mem_ctx,
4415 &ndr_table_ntsvcs,
4416 NDR_PNP_SETDEVICEPROBLEM,
4417 &r);
4419 if (!NT_STATUS_IS_OK(status)) {
4420 return status;
4423 if (NT_STATUS_IS_ERR(status)) {
4424 return status;
4427 /* Return variables */
4429 /* Return result */
4430 if (werror) {
4431 *werror = r.out.result;
4434 return werror_to_ntstatus(r.out.result);
4437 struct rpccli_PNP_DisableDevInst_state {
4438 struct PNP_DisableDevInst orig;
4439 struct PNP_DisableDevInst tmp;
4440 TALLOC_CTX *out_mem_ctx;
4441 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4444 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq);
4446 struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx,
4447 struct tevent_context *ev,
4448 struct rpc_pipe_client *cli)
4450 struct tevent_req *req;
4451 struct rpccli_PNP_DisableDevInst_state *state;
4452 struct tevent_req *subreq;
4454 req = tevent_req_create(mem_ctx, &state,
4455 struct rpccli_PNP_DisableDevInst_state);
4456 if (req == NULL) {
4457 return NULL;
4459 state->out_mem_ctx = NULL;
4460 state->dispatch_recv = cli->dispatch_recv;
4462 /* In parameters */
4464 /* Out parameters */
4466 /* Result */
4467 ZERO_STRUCT(state->orig.out.result);
4469 /* make a temporary copy, that we pass to the dispatch function */
4470 state->tmp = state->orig;
4472 subreq = cli->dispatch_send(state, ev, cli,
4473 &ndr_table_ntsvcs,
4474 NDR_PNP_DISABLEDEVINST,
4475 &state->tmp);
4476 if (tevent_req_nomem(subreq, req)) {
4477 return tevent_req_post(req, ev);
4479 tevent_req_set_callback(subreq, rpccli_PNP_DisableDevInst_done, req);
4480 return req;
4483 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq)
4485 struct tevent_req *req = tevent_req_callback_data(
4486 subreq, struct tevent_req);
4487 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4488 req, struct rpccli_PNP_DisableDevInst_state);
4489 NTSTATUS status;
4490 TALLOC_CTX *mem_ctx;
4492 if (state->out_mem_ctx) {
4493 mem_ctx = state->out_mem_ctx;
4494 } else {
4495 mem_ctx = state;
4498 status = state->dispatch_recv(subreq, mem_ctx);
4499 TALLOC_FREE(subreq);
4500 if (!NT_STATUS_IS_OK(status)) {
4501 tevent_req_nterror(req, status);
4502 return;
4505 /* Copy out parameters */
4507 /* Copy result */
4508 state->orig.out.result = state->tmp.out.result;
4510 /* Reset temporary structure */
4511 ZERO_STRUCT(state->tmp);
4513 tevent_req_done(req);
4516 NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req,
4517 TALLOC_CTX *mem_ctx,
4518 WERROR *result)
4520 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4521 req, struct rpccli_PNP_DisableDevInst_state);
4522 NTSTATUS status;
4524 if (tevent_req_is_nterror(req, &status)) {
4525 tevent_req_received(req);
4526 return status;
4529 /* Steal possbile out parameters to the callers context */
4530 talloc_steal(mem_ctx, state->out_mem_ctx);
4532 /* Return result */
4533 *result = state->orig.out.result;
4535 tevent_req_received(req);
4536 return NT_STATUS_OK;
4539 NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
4540 TALLOC_CTX *mem_ctx,
4541 WERROR *werror)
4543 struct PNP_DisableDevInst r;
4544 NTSTATUS status;
4546 /* In parameters */
4548 status = cli->dispatch(cli,
4549 mem_ctx,
4550 &ndr_table_ntsvcs,
4551 NDR_PNP_DISABLEDEVINST,
4552 &r);
4554 if (!NT_STATUS_IS_OK(status)) {
4555 return status;
4558 if (NT_STATUS_IS_ERR(status)) {
4559 return status;
4562 /* Return variables */
4564 /* Return result */
4565 if (werror) {
4566 *werror = r.out.result;
4569 return werror_to_ntstatus(r.out.result);
4572 struct rpccli_PNP_UninstallDevInst_state {
4573 struct PNP_UninstallDevInst orig;
4574 struct PNP_UninstallDevInst tmp;
4575 TALLOC_CTX *out_mem_ctx;
4576 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4579 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq);
4581 struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx,
4582 struct tevent_context *ev,
4583 struct rpc_pipe_client *cli)
4585 struct tevent_req *req;
4586 struct rpccli_PNP_UninstallDevInst_state *state;
4587 struct tevent_req *subreq;
4589 req = tevent_req_create(mem_ctx, &state,
4590 struct rpccli_PNP_UninstallDevInst_state);
4591 if (req == NULL) {
4592 return NULL;
4594 state->out_mem_ctx = NULL;
4595 state->dispatch_recv = cli->dispatch_recv;
4597 /* In parameters */
4599 /* Out parameters */
4601 /* Result */
4602 ZERO_STRUCT(state->orig.out.result);
4604 /* make a temporary copy, that we pass to the dispatch function */
4605 state->tmp = state->orig;
4607 subreq = cli->dispatch_send(state, ev, cli,
4608 &ndr_table_ntsvcs,
4609 NDR_PNP_UNINSTALLDEVINST,
4610 &state->tmp);
4611 if (tevent_req_nomem(subreq, req)) {
4612 return tevent_req_post(req, ev);
4614 tevent_req_set_callback(subreq, rpccli_PNP_UninstallDevInst_done, req);
4615 return req;
4618 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq)
4620 struct tevent_req *req = tevent_req_callback_data(
4621 subreq, struct tevent_req);
4622 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4623 req, struct rpccli_PNP_UninstallDevInst_state);
4624 NTSTATUS status;
4625 TALLOC_CTX *mem_ctx;
4627 if (state->out_mem_ctx) {
4628 mem_ctx = state->out_mem_ctx;
4629 } else {
4630 mem_ctx = state;
4633 status = state->dispatch_recv(subreq, mem_ctx);
4634 TALLOC_FREE(subreq);
4635 if (!NT_STATUS_IS_OK(status)) {
4636 tevent_req_nterror(req, status);
4637 return;
4640 /* Copy out parameters */
4642 /* Copy result */
4643 state->orig.out.result = state->tmp.out.result;
4645 /* Reset temporary structure */
4646 ZERO_STRUCT(state->tmp);
4648 tevent_req_done(req);
4651 NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req,
4652 TALLOC_CTX *mem_ctx,
4653 WERROR *result)
4655 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4656 req, struct rpccli_PNP_UninstallDevInst_state);
4657 NTSTATUS status;
4659 if (tevent_req_is_nterror(req, &status)) {
4660 tevent_req_received(req);
4661 return status;
4664 /* Steal possbile out parameters to the callers context */
4665 talloc_steal(mem_ctx, state->out_mem_ctx);
4667 /* Return result */
4668 *result = state->orig.out.result;
4670 tevent_req_received(req);
4671 return NT_STATUS_OK;
4674 NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
4675 TALLOC_CTX *mem_ctx,
4676 WERROR *werror)
4678 struct PNP_UninstallDevInst r;
4679 NTSTATUS status;
4681 /* In parameters */
4683 status = cli->dispatch(cli,
4684 mem_ctx,
4685 &ndr_table_ntsvcs,
4686 NDR_PNP_UNINSTALLDEVINST,
4687 &r);
4689 if (!NT_STATUS_IS_OK(status)) {
4690 return status;
4693 if (NT_STATUS_IS_ERR(status)) {
4694 return status;
4697 /* Return variables */
4699 /* Return result */
4700 if (werror) {
4701 *werror = r.out.result;
4704 return werror_to_ntstatus(r.out.result);
4707 struct rpccli_PNP_AddID_state {
4708 struct PNP_AddID orig;
4709 struct PNP_AddID tmp;
4710 TALLOC_CTX *out_mem_ctx;
4711 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4714 static void rpccli_PNP_AddID_done(struct tevent_req *subreq);
4716 struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx,
4717 struct tevent_context *ev,
4718 struct rpc_pipe_client *cli)
4720 struct tevent_req *req;
4721 struct rpccli_PNP_AddID_state *state;
4722 struct tevent_req *subreq;
4724 req = tevent_req_create(mem_ctx, &state,
4725 struct rpccli_PNP_AddID_state);
4726 if (req == NULL) {
4727 return NULL;
4729 state->out_mem_ctx = NULL;
4730 state->dispatch_recv = cli->dispatch_recv;
4732 /* In parameters */
4734 /* Out parameters */
4736 /* Result */
4737 ZERO_STRUCT(state->orig.out.result);
4739 /* make a temporary copy, that we pass to the dispatch function */
4740 state->tmp = state->orig;
4742 subreq = cli->dispatch_send(state, ev, cli,
4743 &ndr_table_ntsvcs,
4744 NDR_PNP_ADDID,
4745 &state->tmp);
4746 if (tevent_req_nomem(subreq, req)) {
4747 return tevent_req_post(req, ev);
4749 tevent_req_set_callback(subreq, rpccli_PNP_AddID_done, req);
4750 return req;
4753 static void rpccli_PNP_AddID_done(struct tevent_req *subreq)
4755 struct tevent_req *req = tevent_req_callback_data(
4756 subreq, struct tevent_req);
4757 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4758 req, struct rpccli_PNP_AddID_state);
4759 NTSTATUS status;
4760 TALLOC_CTX *mem_ctx;
4762 if (state->out_mem_ctx) {
4763 mem_ctx = state->out_mem_ctx;
4764 } else {
4765 mem_ctx = state;
4768 status = state->dispatch_recv(subreq, mem_ctx);
4769 TALLOC_FREE(subreq);
4770 if (!NT_STATUS_IS_OK(status)) {
4771 tevent_req_nterror(req, status);
4772 return;
4775 /* Copy out parameters */
4777 /* Copy result */
4778 state->orig.out.result = state->tmp.out.result;
4780 /* Reset temporary structure */
4781 ZERO_STRUCT(state->tmp);
4783 tevent_req_done(req);
4786 NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req,
4787 TALLOC_CTX *mem_ctx,
4788 WERROR *result)
4790 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4791 req, struct rpccli_PNP_AddID_state);
4792 NTSTATUS status;
4794 if (tevent_req_is_nterror(req, &status)) {
4795 tevent_req_received(req);
4796 return status;
4799 /* Steal possbile out parameters to the callers context */
4800 talloc_steal(mem_ctx, state->out_mem_ctx);
4802 /* Return result */
4803 *result = state->orig.out.result;
4805 tevent_req_received(req);
4806 return NT_STATUS_OK;
4809 NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
4810 TALLOC_CTX *mem_ctx,
4811 WERROR *werror)
4813 struct PNP_AddID r;
4814 NTSTATUS status;
4816 /* In parameters */
4818 status = cli->dispatch(cli,
4819 mem_ctx,
4820 &ndr_table_ntsvcs,
4821 NDR_PNP_ADDID,
4822 &r);
4824 if (!NT_STATUS_IS_OK(status)) {
4825 return status;
4828 if (NT_STATUS_IS_ERR(status)) {
4829 return status;
4832 /* Return variables */
4834 /* Return result */
4835 if (werror) {
4836 *werror = r.out.result;
4839 return werror_to_ntstatus(r.out.result);
4842 struct rpccli_PNP_RegisterDriver_state {
4843 struct PNP_RegisterDriver orig;
4844 struct PNP_RegisterDriver tmp;
4845 TALLOC_CTX *out_mem_ctx;
4846 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4849 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq);
4851 struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx,
4852 struct tevent_context *ev,
4853 struct rpc_pipe_client *cli)
4855 struct tevent_req *req;
4856 struct rpccli_PNP_RegisterDriver_state *state;
4857 struct tevent_req *subreq;
4859 req = tevent_req_create(mem_ctx, &state,
4860 struct rpccli_PNP_RegisterDriver_state);
4861 if (req == NULL) {
4862 return NULL;
4864 state->out_mem_ctx = NULL;
4865 state->dispatch_recv = cli->dispatch_recv;
4867 /* In parameters */
4869 /* Out parameters */
4871 /* Result */
4872 ZERO_STRUCT(state->orig.out.result);
4874 /* make a temporary copy, that we pass to the dispatch function */
4875 state->tmp = state->orig;
4877 subreq = cli->dispatch_send(state, ev, cli,
4878 &ndr_table_ntsvcs,
4879 NDR_PNP_REGISTERDRIVER,
4880 &state->tmp);
4881 if (tevent_req_nomem(subreq, req)) {
4882 return tevent_req_post(req, ev);
4884 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDriver_done, req);
4885 return req;
4888 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq)
4890 struct tevent_req *req = tevent_req_callback_data(
4891 subreq, struct tevent_req);
4892 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4893 req, struct rpccli_PNP_RegisterDriver_state);
4894 NTSTATUS status;
4895 TALLOC_CTX *mem_ctx;
4897 if (state->out_mem_ctx) {
4898 mem_ctx = state->out_mem_ctx;
4899 } else {
4900 mem_ctx = state;
4903 status = state->dispatch_recv(subreq, mem_ctx);
4904 TALLOC_FREE(subreq);
4905 if (!NT_STATUS_IS_OK(status)) {
4906 tevent_req_nterror(req, status);
4907 return;
4910 /* Copy out parameters */
4912 /* Copy result */
4913 state->orig.out.result = state->tmp.out.result;
4915 /* Reset temporary structure */
4916 ZERO_STRUCT(state->tmp);
4918 tevent_req_done(req);
4921 NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req,
4922 TALLOC_CTX *mem_ctx,
4923 WERROR *result)
4925 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4926 req, struct rpccli_PNP_RegisterDriver_state);
4927 NTSTATUS status;
4929 if (tevent_req_is_nterror(req, &status)) {
4930 tevent_req_received(req);
4931 return status;
4934 /* Steal possbile out parameters to the callers context */
4935 talloc_steal(mem_ctx, state->out_mem_ctx);
4937 /* Return result */
4938 *result = state->orig.out.result;
4940 tevent_req_received(req);
4941 return NT_STATUS_OK;
4944 NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
4945 TALLOC_CTX *mem_ctx,
4946 WERROR *werror)
4948 struct PNP_RegisterDriver r;
4949 NTSTATUS status;
4951 /* In parameters */
4953 status = cli->dispatch(cli,
4954 mem_ctx,
4955 &ndr_table_ntsvcs,
4956 NDR_PNP_REGISTERDRIVER,
4957 &r);
4959 if (!NT_STATUS_IS_OK(status)) {
4960 return status;
4963 if (NT_STATUS_IS_ERR(status)) {
4964 return status;
4967 /* Return variables */
4969 /* Return result */
4970 if (werror) {
4971 *werror = r.out.result;
4974 return werror_to_ntstatus(r.out.result);
4977 struct rpccli_PNP_QueryRemove_state {
4978 struct PNP_QueryRemove orig;
4979 struct PNP_QueryRemove tmp;
4980 TALLOC_CTX *out_mem_ctx;
4981 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4984 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq);
4986 struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx,
4987 struct tevent_context *ev,
4988 struct rpc_pipe_client *cli)
4990 struct tevent_req *req;
4991 struct rpccli_PNP_QueryRemove_state *state;
4992 struct tevent_req *subreq;
4994 req = tevent_req_create(mem_ctx, &state,
4995 struct rpccli_PNP_QueryRemove_state);
4996 if (req == NULL) {
4997 return NULL;
4999 state->out_mem_ctx = NULL;
5000 state->dispatch_recv = cli->dispatch_recv;
5002 /* In parameters */
5004 /* Out parameters */
5006 /* Result */
5007 ZERO_STRUCT(state->orig.out.result);
5009 /* make a temporary copy, that we pass to the dispatch function */
5010 state->tmp = state->orig;
5012 subreq = cli->dispatch_send(state, ev, cli,
5013 &ndr_table_ntsvcs,
5014 NDR_PNP_QUERYREMOVE,
5015 &state->tmp);
5016 if (tevent_req_nomem(subreq, req)) {
5017 return tevent_req_post(req, ev);
5019 tevent_req_set_callback(subreq, rpccli_PNP_QueryRemove_done, req);
5020 return req;
5023 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq)
5025 struct tevent_req *req = tevent_req_callback_data(
5026 subreq, struct tevent_req);
5027 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5028 req, struct rpccli_PNP_QueryRemove_state);
5029 NTSTATUS status;
5030 TALLOC_CTX *mem_ctx;
5032 if (state->out_mem_ctx) {
5033 mem_ctx = state->out_mem_ctx;
5034 } else {
5035 mem_ctx = state;
5038 status = state->dispatch_recv(subreq, mem_ctx);
5039 TALLOC_FREE(subreq);
5040 if (!NT_STATUS_IS_OK(status)) {
5041 tevent_req_nterror(req, status);
5042 return;
5045 /* Copy out parameters */
5047 /* Copy result */
5048 state->orig.out.result = state->tmp.out.result;
5050 /* Reset temporary structure */
5051 ZERO_STRUCT(state->tmp);
5053 tevent_req_done(req);
5056 NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req,
5057 TALLOC_CTX *mem_ctx,
5058 WERROR *result)
5060 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5061 req, struct rpccli_PNP_QueryRemove_state);
5062 NTSTATUS status;
5064 if (tevent_req_is_nterror(req, &status)) {
5065 tevent_req_received(req);
5066 return status;
5069 /* Steal possbile out parameters to the callers context */
5070 talloc_steal(mem_ctx, state->out_mem_ctx);
5072 /* Return result */
5073 *result = state->orig.out.result;
5075 tevent_req_received(req);
5076 return NT_STATUS_OK;
5079 NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
5080 TALLOC_CTX *mem_ctx,
5081 WERROR *werror)
5083 struct PNP_QueryRemove r;
5084 NTSTATUS status;
5086 /* In parameters */
5088 status = cli->dispatch(cli,
5089 mem_ctx,
5090 &ndr_table_ntsvcs,
5091 NDR_PNP_QUERYREMOVE,
5092 &r);
5094 if (!NT_STATUS_IS_OK(status)) {
5095 return status;
5098 if (NT_STATUS_IS_ERR(status)) {
5099 return status;
5102 /* Return variables */
5104 /* Return result */
5105 if (werror) {
5106 *werror = r.out.result;
5109 return werror_to_ntstatus(r.out.result);
5112 struct rpccli_PNP_RequestDeviceEject_state {
5113 struct PNP_RequestDeviceEject orig;
5114 struct PNP_RequestDeviceEject tmp;
5115 TALLOC_CTX *out_mem_ctx;
5116 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5119 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq);
5121 struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx,
5122 struct tevent_context *ev,
5123 struct rpc_pipe_client *cli)
5125 struct tevent_req *req;
5126 struct rpccli_PNP_RequestDeviceEject_state *state;
5127 struct tevent_req *subreq;
5129 req = tevent_req_create(mem_ctx, &state,
5130 struct rpccli_PNP_RequestDeviceEject_state);
5131 if (req == NULL) {
5132 return NULL;
5134 state->out_mem_ctx = NULL;
5135 state->dispatch_recv = cli->dispatch_recv;
5137 /* In parameters */
5139 /* Out parameters */
5141 /* Result */
5142 ZERO_STRUCT(state->orig.out.result);
5144 /* make a temporary copy, that we pass to the dispatch function */
5145 state->tmp = state->orig;
5147 subreq = cli->dispatch_send(state, ev, cli,
5148 &ndr_table_ntsvcs,
5149 NDR_PNP_REQUESTDEVICEEJECT,
5150 &state->tmp);
5151 if (tevent_req_nomem(subreq, req)) {
5152 return tevent_req_post(req, ev);
5154 tevent_req_set_callback(subreq, rpccli_PNP_RequestDeviceEject_done, req);
5155 return req;
5158 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq)
5160 struct tevent_req *req = tevent_req_callback_data(
5161 subreq, struct tevent_req);
5162 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5163 req, struct rpccli_PNP_RequestDeviceEject_state);
5164 NTSTATUS status;
5165 TALLOC_CTX *mem_ctx;
5167 if (state->out_mem_ctx) {
5168 mem_ctx = state->out_mem_ctx;
5169 } else {
5170 mem_ctx = state;
5173 status = state->dispatch_recv(subreq, mem_ctx);
5174 TALLOC_FREE(subreq);
5175 if (!NT_STATUS_IS_OK(status)) {
5176 tevent_req_nterror(req, status);
5177 return;
5180 /* Copy out parameters */
5182 /* Copy result */
5183 state->orig.out.result = state->tmp.out.result;
5185 /* Reset temporary structure */
5186 ZERO_STRUCT(state->tmp);
5188 tevent_req_done(req);
5191 NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req,
5192 TALLOC_CTX *mem_ctx,
5193 WERROR *result)
5195 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5196 req, struct rpccli_PNP_RequestDeviceEject_state);
5197 NTSTATUS status;
5199 if (tevent_req_is_nterror(req, &status)) {
5200 tevent_req_received(req);
5201 return status;
5204 /* Steal possbile out parameters to the callers context */
5205 talloc_steal(mem_ctx, state->out_mem_ctx);
5207 /* Return result */
5208 *result = state->orig.out.result;
5210 tevent_req_received(req);
5211 return NT_STATUS_OK;
5214 NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
5215 TALLOC_CTX *mem_ctx,
5216 WERROR *werror)
5218 struct PNP_RequestDeviceEject r;
5219 NTSTATUS status;
5221 /* In parameters */
5223 status = cli->dispatch(cli,
5224 mem_ctx,
5225 &ndr_table_ntsvcs,
5226 NDR_PNP_REQUESTDEVICEEJECT,
5227 &r);
5229 if (!NT_STATUS_IS_OK(status)) {
5230 return status;
5233 if (NT_STATUS_IS_ERR(status)) {
5234 return status;
5237 /* Return variables */
5239 /* Return result */
5240 if (werror) {
5241 *werror = r.out.result;
5244 return werror_to_ntstatus(r.out.result);
5247 struct rpccli_PNP_IsDockStationPresent_state {
5248 struct PNP_IsDockStationPresent orig;
5249 struct PNP_IsDockStationPresent tmp;
5250 TALLOC_CTX *out_mem_ctx;
5251 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5254 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq);
5256 struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx,
5257 struct tevent_context *ev,
5258 struct rpc_pipe_client *cli)
5260 struct tevent_req *req;
5261 struct rpccli_PNP_IsDockStationPresent_state *state;
5262 struct tevent_req *subreq;
5264 req = tevent_req_create(mem_ctx, &state,
5265 struct rpccli_PNP_IsDockStationPresent_state);
5266 if (req == NULL) {
5267 return NULL;
5269 state->out_mem_ctx = NULL;
5270 state->dispatch_recv = cli->dispatch_recv;
5272 /* In parameters */
5274 /* Out parameters */
5276 /* Result */
5277 ZERO_STRUCT(state->orig.out.result);
5279 /* make a temporary copy, that we pass to the dispatch function */
5280 state->tmp = state->orig;
5282 subreq = cli->dispatch_send(state, ev, cli,
5283 &ndr_table_ntsvcs,
5284 NDR_PNP_ISDOCKSTATIONPRESENT,
5285 &state->tmp);
5286 if (tevent_req_nomem(subreq, req)) {
5287 return tevent_req_post(req, ev);
5289 tevent_req_set_callback(subreq, rpccli_PNP_IsDockStationPresent_done, req);
5290 return req;
5293 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq)
5295 struct tevent_req *req = tevent_req_callback_data(
5296 subreq, struct tevent_req);
5297 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5298 req, struct rpccli_PNP_IsDockStationPresent_state);
5299 NTSTATUS status;
5300 TALLOC_CTX *mem_ctx;
5302 if (state->out_mem_ctx) {
5303 mem_ctx = state->out_mem_ctx;
5304 } else {
5305 mem_ctx = state;
5308 status = state->dispatch_recv(subreq, mem_ctx);
5309 TALLOC_FREE(subreq);
5310 if (!NT_STATUS_IS_OK(status)) {
5311 tevent_req_nterror(req, status);
5312 return;
5315 /* Copy out parameters */
5317 /* Copy result */
5318 state->orig.out.result = state->tmp.out.result;
5320 /* Reset temporary structure */
5321 ZERO_STRUCT(state->tmp);
5323 tevent_req_done(req);
5326 NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req,
5327 TALLOC_CTX *mem_ctx,
5328 WERROR *result)
5330 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5331 req, struct rpccli_PNP_IsDockStationPresent_state);
5332 NTSTATUS status;
5334 if (tevent_req_is_nterror(req, &status)) {
5335 tevent_req_received(req);
5336 return status;
5339 /* Steal possbile out parameters to the callers context */
5340 talloc_steal(mem_ctx, state->out_mem_ctx);
5342 /* Return result */
5343 *result = state->orig.out.result;
5345 tevent_req_received(req);
5346 return NT_STATUS_OK;
5349 NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
5350 TALLOC_CTX *mem_ctx,
5351 WERROR *werror)
5353 struct PNP_IsDockStationPresent r;
5354 NTSTATUS status;
5356 /* In parameters */
5358 status = cli->dispatch(cli,
5359 mem_ctx,
5360 &ndr_table_ntsvcs,
5361 NDR_PNP_ISDOCKSTATIONPRESENT,
5362 &r);
5364 if (!NT_STATUS_IS_OK(status)) {
5365 return status;
5368 if (NT_STATUS_IS_ERR(status)) {
5369 return status;
5372 /* Return variables */
5374 /* Return result */
5375 if (werror) {
5376 *werror = r.out.result;
5379 return werror_to_ntstatus(r.out.result);
5382 struct rpccli_PNP_RequestEjectPC_state {
5383 struct PNP_RequestEjectPC orig;
5384 struct PNP_RequestEjectPC tmp;
5385 TALLOC_CTX *out_mem_ctx;
5386 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5389 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq);
5391 struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx,
5392 struct tevent_context *ev,
5393 struct rpc_pipe_client *cli)
5395 struct tevent_req *req;
5396 struct rpccli_PNP_RequestEjectPC_state *state;
5397 struct tevent_req *subreq;
5399 req = tevent_req_create(mem_ctx, &state,
5400 struct rpccli_PNP_RequestEjectPC_state);
5401 if (req == NULL) {
5402 return NULL;
5404 state->out_mem_ctx = NULL;
5405 state->dispatch_recv = cli->dispatch_recv;
5407 /* In parameters */
5409 /* Out parameters */
5411 /* Result */
5412 ZERO_STRUCT(state->orig.out.result);
5414 /* make a temporary copy, that we pass to the dispatch function */
5415 state->tmp = state->orig;
5417 subreq = cli->dispatch_send(state, ev, cli,
5418 &ndr_table_ntsvcs,
5419 NDR_PNP_REQUESTEJECTPC,
5420 &state->tmp);
5421 if (tevent_req_nomem(subreq, req)) {
5422 return tevent_req_post(req, ev);
5424 tevent_req_set_callback(subreq, rpccli_PNP_RequestEjectPC_done, req);
5425 return req;
5428 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq)
5430 struct tevent_req *req = tevent_req_callback_data(
5431 subreq, struct tevent_req);
5432 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5433 req, struct rpccli_PNP_RequestEjectPC_state);
5434 NTSTATUS status;
5435 TALLOC_CTX *mem_ctx;
5437 if (state->out_mem_ctx) {
5438 mem_ctx = state->out_mem_ctx;
5439 } else {
5440 mem_ctx = state;
5443 status = state->dispatch_recv(subreq, mem_ctx);
5444 TALLOC_FREE(subreq);
5445 if (!NT_STATUS_IS_OK(status)) {
5446 tevent_req_nterror(req, status);
5447 return;
5450 /* Copy out parameters */
5452 /* Copy result */
5453 state->orig.out.result = state->tmp.out.result;
5455 /* Reset temporary structure */
5456 ZERO_STRUCT(state->tmp);
5458 tevent_req_done(req);
5461 NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req,
5462 TALLOC_CTX *mem_ctx,
5463 WERROR *result)
5465 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5466 req, struct rpccli_PNP_RequestEjectPC_state);
5467 NTSTATUS status;
5469 if (tevent_req_is_nterror(req, &status)) {
5470 tevent_req_received(req);
5471 return status;
5474 /* Steal possbile out parameters to the callers context */
5475 talloc_steal(mem_ctx, state->out_mem_ctx);
5477 /* Return result */
5478 *result = state->orig.out.result;
5480 tevent_req_received(req);
5481 return NT_STATUS_OK;
5484 NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
5485 TALLOC_CTX *mem_ctx,
5486 WERROR *werror)
5488 struct PNP_RequestEjectPC r;
5489 NTSTATUS status;
5491 /* In parameters */
5493 status = cli->dispatch(cli,
5494 mem_ctx,
5495 &ndr_table_ntsvcs,
5496 NDR_PNP_REQUESTEJECTPC,
5497 &r);
5499 if (!NT_STATUS_IS_OK(status)) {
5500 return status;
5503 if (NT_STATUS_IS_ERR(status)) {
5504 return status;
5507 /* Return variables */
5509 /* Return result */
5510 if (werror) {
5511 *werror = r.out.result;
5514 return werror_to_ntstatus(r.out.result);
5517 struct rpccli_PNP_HwProfFlags_state {
5518 struct PNP_HwProfFlags orig;
5519 struct PNP_HwProfFlags tmp;
5520 TALLOC_CTX *out_mem_ctx;
5521 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5524 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq);
5526 struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx,
5527 struct tevent_context *ev,
5528 struct rpc_pipe_client *cli,
5529 uint32_t _action /* [in] */,
5530 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
5531 uint32_t _config /* [in] */,
5532 uint32_t *_profile_flags /* [in,out] [ref] */,
5533 uint16_t *_veto_type /* [in,out] [unique] */,
5534 const char *_unknown5 /* [in] [unique,charset(UTF16)] */,
5535 const char **_unknown5a /* [out] [unique,charset(UTF16)] */,
5536 uint32_t _name_length /* [in] */,
5537 uint32_t _flags /* [in] */)
5539 struct tevent_req *req;
5540 struct rpccli_PNP_HwProfFlags_state *state;
5541 struct tevent_req *subreq;
5543 req = tevent_req_create(mem_ctx, &state,
5544 struct rpccli_PNP_HwProfFlags_state);
5545 if (req == NULL) {
5546 return NULL;
5548 state->out_mem_ctx = NULL;
5549 state->dispatch_recv = cli->dispatch_recv;
5551 /* In parameters */
5552 state->orig.in.action = _action;
5553 state->orig.in.devicepath = _devicepath;
5554 state->orig.in.config = _config;
5555 state->orig.in.profile_flags = _profile_flags;
5556 state->orig.in.veto_type = _veto_type;
5557 state->orig.in.unknown5 = _unknown5;
5558 state->orig.in.name_length = _name_length;
5559 state->orig.in.flags = _flags;
5561 /* Out parameters */
5562 state->orig.out.profile_flags = _profile_flags;
5563 state->orig.out.veto_type = _veto_type;
5564 state->orig.out.unknown5a = _unknown5a;
5566 /* Result */
5567 ZERO_STRUCT(state->orig.out.result);
5569 state->out_mem_ctx = talloc_named_const(state, 0,
5570 "rpccli_PNP_HwProfFlags_out_memory");
5571 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5572 return tevent_req_post(req, ev);
5575 /* make a temporary copy, that we pass to the dispatch function */
5576 state->tmp = state->orig;
5578 subreq = cli->dispatch_send(state, ev, cli,
5579 &ndr_table_ntsvcs,
5580 NDR_PNP_HWPROFFLAGS,
5581 &state->tmp);
5582 if (tevent_req_nomem(subreq, req)) {
5583 return tevent_req_post(req, ev);
5585 tevent_req_set_callback(subreq, rpccli_PNP_HwProfFlags_done, req);
5586 return req;
5589 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq)
5591 struct tevent_req *req = tevent_req_callback_data(
5592 subreq, struct tevent_req);
5593 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5594 req, struct rpccli_PNP_HwProfFlags_state);
5595 NTSTATUS status;
5596 TALLOC_CTX *mem_ctx;
5598 if (state->out_mem_ctx) {
5599 mem_ctx = state->out_mem_ctx;
5600 } else {
5601 mem_ctx = state;
5604 status = state->dispatch_recv(subreq, mem_ctx);
5605 TALLOC_FREE(subreq);
5606 if (!NT_STATUS_IS_OK(status)) {
5607 tevent_req_nterror(req, status);
5608 return;
5611 /* Copy out parameters */
5612 *state->orig.out.profile_flags = *state->tmp.out.profile_flags;
5613 if (state->orig.out.veto_type && state->tmp.out.veto_type) {
5614 *state->orig.out.veto_type = *state->tmp.out.veto_type;
5616 if (state->orig.out.unknown5a && state->tmp.out.unknown5a) {
5617 *state->orig.out.unknown5a = *state->tmp.out.unknown5a;
5620 /* Copy result */
5621 state->orig.out.result = state->tmp.out.result;
5623 /* Reset temporary structure */
5624 ZERO_STRUCT(state->tmp);
5626 tevent_req_done(req);
5629 NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req,
5630 TALLOC_CTX *mem_ctx,
5631 WERROR *result)
5633 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5634 req, struct rpccli_PNP_HwProfFlags_state);
5635 NTSTATUS status;
5637 if (tevent_req_is_nterror(req, &status)) {
5638 tevent_req_received(req);
5639 return status;
5642 /* Steal possbile out parameters to the callers context */
5643 talloc_steal(mem_ctx, state->out_mem_ctx);
5645 /* Return result */
5646 *result = state->orig.out.result;
5648 tevent_req_received(req);
5649 return NT_STATUS_OK;
5652 NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
5653 TALLOC_CTX *mem_ctx,
5654 uint32_t action /* [in] */,
5655 const char *devicepath /* [in] [ref,charset(UTF16)] */,
5656 uint32_t config /* [in] */,
5657 uint32_t *profile_flags /* [in,out] [ref] */,
5658 uint16_t *veto_type /* [in,out] [unique] */,
5659 const char *unknown5 /* [in] [unique,charset(UTF16)] */,
5660 const char **unknown5a /* [out] [unique,charset(UTF16)] */,
5661 uint32_t name_length /* [in] */,
5662 uint32_t flags /* [in] */,
5663 WERROR *werror)
5665 struct PNP_HwProfFlags r;
5666 NTSTATUS status;
5668 /* In parameters */
5669 r.in.action = action;
5670 r.in.devicepath = devicepath;
5671 r.in.config = config;
5672 r.in.profile_flags = profile_flags;
5673 r.in.veto_type = veto_type;
5674 r.in.unknown5 = unknown5;
5675 r.in.name_length = name_length;
5676 r.in.flags = flags;
5678 status = cli->dispatch(cli,
5679 mem_ctx,
5680 &ndr_table_ntsvcs,
5681 NDR_PNP_HWPROFFLAGS,
5682 &r);
5684 if (!NT_STATUS_IS_OK(status)) {
5685 return status;
5688 if (NT_STATUS_IS_ERR(status)) {
5689 return status;
5692 /* Return variables */
5693 *profile_flags = *r.out.profile_flags;
5694 if (veto_type && r.out.veto_type) {
5695 *veto_type = *r.out.veto_type;
5697 if (unknown5a && r.out.unknown5a) {
5698 *unknown5a = *r.out.unknown5a;
5701 /* Return result */
5702 if (werror) {
5703 *werror = r.out.result;
5706 return werror_to_ntstatus(r.out.result);
5709 struct rpccli_PNP_GetHwProfInfo_state {
5710 struct PNP_GetHwProfInfo orig;
5711 struct PNP_GetHwProfInfo tmp;
5712 TALLOC_CTX *out_mem_ctx;
5713 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5716 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq);
5718 struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx,
5719 struct tevent_context *ev,
5720 struct rpc_pipe_client *cli,
5721 uint32_t _idx /* [in] */,
5722 struct PNP_HwProfInfo *_info /* [in,out] [ref] */,
5723 uint32_t _size /* [in] */,
5724 uint32_t _flags /* [in] */)
5726 struct tevent_req *req;
5727 struct rpccli_PNP_GetHwProfInfo_state *state;
5728 struct tevent_req *subreq;
5730 req = tevent_req_create(mem_ctx, &state,
5731 struct rpccli_PNP_GetHwProfInfo_state);
5732 if (req == NULL) {
5733 return NULL;
5735 state->out_mem_ctx = NULL;
5736 state->dispatch_recv = cli->dispatch_recv;
5738 /* In parameters */
5739 state->orig.in.idx = _idx;
5740 state->orig.in.info = _info;
5741 state->orig.in.size = _size;
5742 state->orig.in.flags = _flags;
5744 /* Out parameters */
5745 state->orig.out.info = _info;
5747 /* Result */
5748 ZERO_STRUCT(state->orig.out.result);
5750 state->out_mem_ctx = talloc_named_const(state, 0,
5751 "rpccli_PNP_GetHwProfInfo_out_memory");
5752 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5753 return tevent_req_post(req, ev);
5756 /* make a temporary copy, that we pass to the dispatch function */
5757 state->tmp = state->orig;
5759 subreq = cli->dispatch_send(state, ev, cli,
5760 &ndr_table_ntsvcs,
5761 NDR_PNP_GETHWPROFINFO,
5762 &state->tmp);
5763 if (tevent_req_nomem(subreq, req)) {
5764 return tevent_req_post(req, ev);
5766 tevent_req_set_callback(subreq, rpccli_PNP_GetHwProfInfo_done, req);
5767 return req;
5770 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq)
5772 struct tevent_req *req = tevent_req_callback_data(
5773 subreq, struct tevent_req);
5774 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5775 req, struct rpccli_PNP_GetHwProfInfo_state);
5776 NTSTATUS status;
5777 TALLOC_CTX *mem_ctx;
5779 if (state->out_mem_ctx) {
5780 mem_ctx = state->out_mem_ctx;
5781 } else {
5782 mem_ctx = state;
5785 status = state->dispatch_recv(subreq, mem_ctx);
5786 TALLOC_FREE(subreq);
5787 if (!NT_STATUS_IS_OK(status)) {
5788 tevent_req_nterror(req, status);
5789 return;
5792 /* Copy out parameters */
5793 *state->orig.out.info = *state->tmp.out.info;
5795 /* Copy result */
5796 state->orig.out.result = state->tmp.out.result;
5798 /* Reset temporary structure */
5799 ZERO_STRUCT(state->tmp);
5801 tevent_req_done(req);
5804 NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req,
5805 TALLOC_CTX *mem_ctx,
5806 WERROR *result)
5808 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5809 req, struct rpccli_PNP_GetHwProfInfo_state);
5810 NTSTATUS status;
5812 if (tevent_req_is_nterror(req, &status)) {
5813 tevent_req_received(req);
5814 return status;
5817 /* Steal possbile out parameters to the callers context */
5818 talloc_steal(mem_ctx, state->out_mem_ctx);
5820 /* Return result */
5821 *result = state->orig.out.result;
5823 tevent_req_received(req);
5824 return NT_STATUS_OK;
5827 NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
5828 TALLOC_CTX *mem_ctx,
5829 uint32_t idx /* [in] */,
5830 struct PNP_HwProfInfo *info /* [in,out] [ref] */,
5831 uint32_t size /* [in] */,
5832 uint32_t flags /* [in] */,
5833 WERROR *werror)
5835 struct PNP_GetHwProfInfo r;
5836 NTSTATUS status;
5838 /* In parameters */
5839 r.in.idx = idx;
5840 r.in.info = info;
5841 r.in.size = size;
5842 r.in.flags = flags;
5844 status = cli->dispatch(cli,
5845 mem_ctx,
5846 &ndr_table_ntsvcs,
5847 NDR_PNP_GETHWPROFINFO,
5848 &r);
5850 if (!NT_STATUS_IS_OK(status)) {
5851 return status;
5854 if (NT_STATUS_IS_ERR(status)) {
5855 return status;
5858 /* Return variables */
5859 *info = *r.out.info;
5861 /* Return result */
5862 if (werror) {
5863 *werror = r.out.result;
5866 return werror_to_ntstatus(r.out.result);
5869 struct rpccli_PNP_AddEmptyLogConf_state {
5870 struct PNP_AddEmptyLogConf orig;
5871 struct PNP_AddEmptyLogConf tmp;
5872 TALLOC_CTX *out_mem_ctx;
5873 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5876 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq);
5878 struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx,
5879 struct tevent_context *ev,
5880 struct rpc_pipe_client *cli)
5882 struct tevent_req *req;
5883 struct rpccli_PNP_AddEmptyLogConf_state *state;
5884 struct tevent_req *subreq;
5886 req = tevent_req_create(mem_ctx, &state,
5887 struct rpccli_PNP_AddEmptyLogConf_state);
5888 if (req == NULL) {
5889 return NULL;
5891 state->out_mem_ctx = NULL;
5892 state->dispatch_recv = cli->dispatch_recv;
5894 /* In parameters */
5896 /* Out parameters */
5898 /* Result */
5899 ZERO_STRUCT(state->orig.out.result);
5901 /* make a temporary copy, that we pass to the dispatch function */
5902 state->tmp = state->orig;
5904 subreq = cli->dispatch_send(state, ev, cli,
5905 &ndr_table_ntsvcs,
5906 NDR_PNP_ADDEMPTYLOGCONF,
5907 &state->tmp);
5908 if (tevent_req_nomem(subreq, req)) {
5909 return tevent_req_post(req, ev);
5911 tevent_req_set_callback(subreq, rpccli_PNP_AddEmptyLogConf_done, req);
5912 return req;
5915 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq)
5917 struct tevent_req *req = tevent_req_callback_data(
5918 subreq, struct tevent_req);
5919 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5920 req, struct rpccli_PNP_AddEmptyLogConf_state);
5921 NTSTATUS status;
5922 TALLOC_CTX *mem_ctx;
5924 if (state->out_mem_ctx) {
5925 mem_ctx = state->out_mem_ctx;
5926 } else {
5927 mem_ctx = state;
5930 status = state->dispatch_recv(subreq, mem_ctx);
5931 TALLOC_FREE(subreq);
5932 if (!NT_STATUS_IS_OK(status)) {
5933 tevent_req_nterror(req, status);
5934 return;
5937 /* Copy out parameters */
5939 /* Copy result */
5940 state->orig.out.result = state->tmp.out.result;
5942 /* Reset temporary structure */
5943 ZERO_STRUCT(state->tmp);
5945 tevent_req_done(req);
5948 NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req,
5949 TALLOC_CTX *mem_ctx,
5950 WERROR *result)
5952 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5953 req, struct rpccli_PNP_AddEmptyLogConf_state);
5954 NTSTATUS status;
5956 if (tevent_req_is_nterror(req, &status)) {
5957 tevent_req_received(req);
5958 return status;
5961 /* Steal possbile out parameters to the callers context */
5962 talloc_steal(mem_ctx, state->out_mem_ctx);
5964 /* Return result */
5965 *result = state->orig.out.result;
5967 tevent_req_received(req);
5968 return NT_STATUS_OK;
5971 NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
5972 TALLOC_CTX *mem_ctx,
5973 WERROR *werror)
5975 struct PNP_AddEmptyLogConf r;
5976 NTSTATUS status;
5978 /* In parameters */
5980 status = cli->dispatch(cli,
5981 mem_ctx,
5982 &ndr_table_ntsvcs,
5983 NDR_PNP_ADDEMPTYLOGCONF,
5984 &r);
5986 if (!NT_STATUS_IS_OK(status)) {
5987 return status;
5990 if (NT_STATUS_IS_ERR(status)) {
5991 return status;
5994 /* Return variables */
5996 /* Return result */
5997 if (werror) {
5998 *werror = r.out.result;
6001 return werror_to_ntstatus(r.out.result);
6004 struct rpccli_PNP_FreeLogConf_state {
6005 struct PNP_FreeLogConf orig;
6006 struct PNP_FreeLogConf tmp;
6007 TALLOC_CTX *out_mem_ctx;
6008 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6011 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq);
6013 struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx,
6014 struct tevent_context *ev,
6015 struct rpc_pipe_client *cli)
6017 struct tevent_req *req;
6018 struct rpccli_PNP_FreeLogConf_state *state;
6019 struct tevent_req *subreq;
6021 req = tevent_req_create(mem_ctx, &state,
6022 struct rpccli_PNP_FreeLogConf_state);
6023 if (req == NULL) {
6024 return NULL;
6026 state->out_mem_ctx = NULL;
6027 state->dispatch_recv = cli->dispatch_recv;
6029 /* In parameters */
6031 /* Out parameters */
6033 /* Result */
6034 ZERO_STRUCT(state->orig.out.result);
6036 /* make a temporary copy, that we pass to the dispatch function */
6037 state->tmp = state->orig;
6039 subreq = cli->dispatch_send(state, ev, cli,
6040 &ndr_table_ntsvcs,
6041 NDR_PNP_FREELOGCONF,
6042 &state->tmp);
6043 if (tevent_req_nomem(subreq, req)) {
6044 return tevent_req_post(req, ev);
6046 tevent_req_set_callback(subreq, rpccli_PNP_FreeLogConf_done, req);
6047 return req;
6050 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq)
6052 struct tevent_req *req = tevent_req_callback_data(
6053 subreq, struct tevent_req);
6054 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6055 req, struct rpccli_PNP_FreeLogConf_state);
6056 NTSTATUS status;
6057 TALLOC_CTX *mem_ctx;
6059 if (state->out_mem_ctx) {
6060 mem_ctx = state->out_mem_ctx;
6061 } else {
6062 mem_ctx = state;
6065 status = state->dispatch_recv(subreq, mem_ctx);
6066 TALLOC_FREE(subreq);
6067 if (!NT_STATUS_IS_OK(status)) {
6068 tevent_req_nterror(req, status);
6069 return;
6072 /* Copy out parameters */
6074 /* Copy result */
6075 state->orig.out.result = state->tmp.out.result;
6077 /* Reset temporary structure */
6078 ZERO_STRUCT(state->tmp);
6080 tevent_req_done(req);
6083 NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req,
6084 TALLOC_CTX *mem_ctx,
6085 WERROR *result)
6087 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6088 req, struct rpccli_PNP_FreeLogConf_state);
6089 NTSTATUS status;
6091 if (tevent_req_is_nterror(req, &status)) {
6092 tevent_req_received(req);
6093 return status;
6096 /* Steal possbile out parameters to the callers context */
6097 talloc_steal(mem_ctx, state->out_mem_ctx);
6099 /* Return result */
6100 *result = state->orig.out.result;
6102 tevent_req_received(req);
6103 return NT_STATUS_OK;
6106 NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
6107 TALLOC_CTX *mem_ctx,
6108 WERROR *werror)
6110 struct PNP_FreeLogConf r;
6111 NTSTATUS status;
6113 /* In parameters */
6115 status = cli->dispatch(cli,
6116 mem_ctx,
6117 &ndr_table_ntsvcs,
6118 NDR_PNP_FREELOGCONF,
6119 &r);
6121 if (!NT_STATUS_IS_OK(status)) {
6122 return status;
6125 if (NT_STATUS_IS_ERR(status)) {
6126 return status;
6129 /* Return variables */
6131 /* Return result */
6132 if (werror) {
6133 *werror = r.out.result;
6136 return werror_to_ntstatus(r.out.result);
6139 struct rpccli_PNP_GetFirstLogConf_state {
6140 struct PNP_GetFirstLogConf orig;
6141 struct PNP_GetFirstLogConf tmp;
6142 TALLOC_CTX *out_mem_ctx;
6143 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6146 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq);
6148 struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx,
6149 struct tevent_context *ev,
6150 struct rpc_pipe_client *cli)
6152 struct tevent_req *req;
6153 struct rpccli_PNP_GetFirstLogConf_state *state;
6154 struct tevent_req *subreq;
6156 req = tevent_req_create(mem_ctx, &state,
6157 struct rpccli_PNP_GetFirstLogConf_state);
6158 if (req == NULL) {
6159 return NULL;
6161 state->out_mem_ctx = NULL;
6162 state->dispatch_recv = cli->dispatch_recv;
6164 /* In parameters */
6166 /* Out parameters */
6168 /* Result */
6169 ZERO_STRUCT(state->orig.out.result);
6171 /* make a temporary copy, that we pass to the dispatch function */
6172 state->tmp = state->orig;
6174 subreq = cli->dispatch_send(state, ev, cli,
6175 &ndr_table_ntsvcs,
6176 NDR_PNP_GETFIRSTLOGCONF,
6177 &state->tmp);
6178 if (tevent_req_nomem(subreq, req)) {
6179 return tevent_req_post(req, ev);
6181 tevent_req_set_callback(subreq, rpccli_PNP_GetFirstLogConf_done, req);
6182 return req;
6185 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq)
6187 struct tevent_req *req = tevent_req_callback_data(
6188 subreq, struct tevent_req);
6189 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6190 req, struct rpccli_PNP_GetFirstLogConf_state);
6191 NTSTATUS status;
6192 TALLOC_CTX *mem_ctx;
6194 if (state->out_mem_ctx) {
6195 mem_ctx = state->out_mem_ctx;
6196 } else {
6197 mem_ctx = state;
6200 status = state->dispatch_recv(subreq, mem_ctx);
6201 TALLOC_FREE(subreq);
6202 if (!NT_STATUS_IS_OK(status)) {
6203 tevent_req_nterror(req, status);
6204 return;
6207 /* Copy out parameters */
6209 /* Copy result */
6210 state->orig.out.result = state->tmp.out.result;
6212 /* Reset temporary structure */
6213 ZERO_STRUCT(state->tmp);
6215 tevent_req_done(req);
6218 NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req,
6219 TALLOC_CTX *mem_ctx,
6220 WERROR *result)
6222 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6223 req, struct rpccli_PNP_GetFirstLogConf_state);
6224 NTSTATUS status;
6226 if (tevent_req_is_nterror(req, &status)) {
6227 tevent_req_received(req);
6228 return status;
6231 /* Steal possbile out parameters to the callers context */
6232 talloc_steal(mem_ctx, state->out_mem_ctx);
6234 /* Return result */
6235 *result = state->orig.out.result;
6237 tevent_req_received(req);
6238 return NT_STATUS_OK;
6241 NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
6242 TALLOC_CTX *mem_ctx,
6243 WERROR *werror)
6245 struct PNP_GetFirstLogConf r;
6246 NTSTATUS status;
6248 /* In parameters */
6250 status = cli->dispatch(cli,
6251 mem_ctx,
6252 &ndr_table_ntsvcs,
6253 NDR_PNP_GETFIRSTLOGCONF,
6254 &r);
6256 if (!NT_STATUS_IS_OK(status)) {
6257 return status;
6260 if (NT_STATUS_IS_ERR(status)) {
6261 return status;
6264 /* Return variables */
6266 /* Return result */
6267 if (werror) {
6268 *werror = r.out.result;
6271 return werror_to_ntstatus(r.out.result);
6274 struct rpccli_PNP_GetNextLogConf_state {
6275 struct PNP_GetNextLogConf orig;
6276 struct PNP_GetNextLogConf tmp;
6277 TALLOC_CTX *out_mem_ctx;
6278 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6281 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq);
6283 struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx,
6284 struct tevent_context *ev,
6285 struct rpc_pipe_client *cli)
6287 struct tevent_req *req;
6288 struct rpccli_PNP_GetNextLogConf_state *state;
6289 struct tevent_req *subreq;
6291 req = tevent_req_create(mem_ctx, &state,
6292 struct rpccli_PNP_GetNextLogConf_state);
6293 if (req == NULL) {
6294 return NULL;
6296 state->out_mem_ctx = NULL;
6297 state->dispatch_recv = cli->dispatch_recv;
6299 /* In parameters */
6301 /* Out parameters */
6303 /* Result */
6304 ZERO_STRUCT(state->orig.out.result);
6306 /* make a temporary copy, that we pass to the dispatch function */
6307 state->tmp = state->orig;
6309 subreq = cli->dispatch_send(state, ev, cli,
6310 &ndr_table_ntsvcs,
6311 NDR_PNP_GETNEXTLOGCONF,
6312 &state->tmp);
6313 if (tevent_req_nomem(subreq, req)) {
6314 return tevent_req_post(req, ev);
6316 tevent_req_set_callback(subreq, rpccli_PNP_GetNextLogConf_done, req);
6317 return req;
6320 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq)
6322 struct tevent_req *req = tevent_req_callback_data(
6323 subreq, struct tevent_req);
6324 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6325 req, struct rpccli_PNP_GetNextLogConf_state);
6326 NTSTATUS status;
6327 TALLOC_CTX *mem_ctx;
6329 if (state->out_mem_ctx) {
6330 mem_ctx = state->out_mem_ctx;
6331 } else {
6332 mem_ctx = state;
6335 status = state->dispatch_recv(subreq, mem_ctx);
6336 TALLOC_FREE(subreq);
6337 if (!NT_STATUS_IS_OK(status)) {
6338 tevent_req_nterror(req, status);
6339 return;
6342 /* Copy out parameters */
6344 /* Copy result */
6345 state->orig.out.result = state->tmp.out.result;
6347 /* Reset temporary structure */
6348 ZERO_STRUCT(state->tmp);
6350 tevent_req_done(req);
6353 NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req,
6354 TALLOC_CTX *mem_ctx,
6355 WERROR *result)
6357 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6358 req, struct rpccli_PNP_GetNextLogConf_state);
6359 NTSTATUS status;
6361 if (tevent_req_is_nterror(req, &status)) {
6362 tevent_req_received(req);
6363 return status;
6366 /* Steal possbile out parameters to the callers context */
6367 talloc_steal(mem_ctx, state->out_mem_ctx);
6369 /* Return result */
6370 *result = state->orig.out.result;
6372 tevent_req_received(req);
6373 return NT_STATUS_OK;
6376 NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
6377 TALLOC_CTX *mem_ctx,
6378 WERROR *werror)
6380 struct PNP_GetNextLogConf r;
6381 NTSTATUS status;
6383 /* In parameters */
6385 status = cli->dispatch(cli,
6386 mem_ctx,
6387 &ndr_table_ntsvcs,
6388 NDR_PNP_GETNEXTLOGCONF,
6389 &r);
6391 if (!NT_STATUS_IS_OK(status)) {
6392 return status;
6395 if (NT_STATUS_IS_ERR(status)) {
6396 return status;
6399 /* Return variables */
6401 /* Return result */
6402 if (werror) {
6403 *werror = r.out.result;
6406 return werror_to_ntstatus(r.out.result);
6409 struct rpccli_PNP_GetLogConfPriority_state {
6410 struct PNP_GetLogConfPriority orig;
6411 struct PNP_GetLogConfPriority tmp;
6412 TALLOC_CTX *out_mem_ctx;
6413 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6416 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq);
6418 struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx,
6419 struct tevent_context *ev,
6420 struct rpc_pipe_client *cli)
6422 struct tevent_req *req;
6423 struct rpccli_PNP_GetLogConfPriority_state *state;
6424 struct tevent_req *subreq;
6426 req = tevent_req_create(mem_ctx, &state,
6427 struct rpccli_PNP_GetLogConfPriority_state);
6428 if (req == NULL) {
6429 return NULL;
6431 state->out_mem_ctx = NULL;
6432 state->dispatch_recv = cli->dispatch_recv;
6434 /* In parameters */
6436 /* Out parameters */
6438 /* Result */
6439 ZERO_STRUCT(state->orig.out.result);
6441 /* make a temporary copy, that we pass to the dispatch function */
6442 state->tmp = state->orig;
6444 subreq = cli->dispatch_send(state, ev, cli,
6445 &ndr_table_ntsvcs,
6446 NDR_PNP_GETLOGCONFPRIORITY,
6447 &state->tmp);
6448 if (tevent_req_nomem(subreq, req)) {
6449 return tevent_req_post(req, ev);
6451 tevent_req_set_callback(subreq, rpccli_PNP_GetLogConfPriority_done, req);
6452 return req;
6455 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq)
6457 struct tevent_req *req = tevent_req_callback_data(
6458 subreq, struct tevent_req);
6459 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6460 req, struct rpccli_PNP_GetLogConfPriority_state);
6461 NTSTATUS status;
6462 TALLOC_CTX *mem_ctx;
6464 if (state->out_mem_ctx) {
6465 mem_ctx = state->out_mem_ctx;
6466 } else {
6467 mem_ctx = state;
6470 status = state->dispatch_recv(subreq, mem_ctx);
6471 TALLOC_FREE(subreq);
6472 if (!NT_STATUS_IS_OK(status)) {
6473 tevent_req_nterror(req, status);
6474 return;
6477 /* Copy out parameters */
6479 /* Copy result */
6480 state->orig.out.result = state->tmp.out.result;
6482 /* Reset temporary structure */
6483 ZERO_STRUCT(state->tmp);
6485 tevent_req_done(req);
6488 NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req,
6489 TALLOC_CTX *mem_ctx,
6490 WERROR *result)
6492 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6493 req, struct rpccli_PNP_GetLogConfPriority_state);
6494 NTSTATUS status;
6496 if (tevent_req_is_nterror(req, &status)) {
6497 tevent_req_received(req);
6498 return status;
6501 /* Steal possbile out parameters to the callers context */
6502 talloc_steal(mem_ctx, state->out_mem_ctx);
6504 /* Return result */
6505 *result = state->orig.out.result;
6507 tevent_req_received(req);
6508 return NT_STATUS_OK;
6511 NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
6512 TALLOC_CTX *mem_ctx,
6513 WERROR *werror)
6515 struct PNP_GetLogConfPriority r;
6516 NTSTATUS status;
6518 /* In parameters */
6520 status = cli->dispatch(cli,
6521 mem_ctx,
6522 &ndr_table_ntsvcs,
6523 NDR_PNP_GETLOGCONFPRIORITY,
6524 &r);
6526 if (!NT_STATUS_IS_OK(status)) {
6527 return status;
6530 if (NT_STATUS_IS_ERR(status)) {
6531 return status;
6534 /* Return variables */
6536 /* Return result */
6537 if (werror) {
6538 *werror = r.out.result;
6541 return werror_to_ntstatus(r.out.result);
6544 struct rpccli_PNP_AddResDes_state {
6545 struct PNP_AddResDes orig;
6546 struct PNP_AddResDes tmp;
6547 TALLOC_CTX *out_mem_ctx;
6548 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6551 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq);
6553 struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx,
6554 struct tevent_context *ev,
6555 struct rpc_pipe_client *cli)
6557 struct tevent_req *req;
6558 struct rpccli_PNP_AddResDes_state *state;
6559 struct tevent_req *subreq;
6561 req = tevent_req_create(mem_ctx, &state,
6562 struct rpccli_PNP_AddResDes_state);
6563 if (req == NULL) {
6564 return NULL;
6566 state->out_mem_ctx = NULL;
6567 state->dispatch_recv = cli->dispatch_recv;
6569 /* In parameters */
6571 /* Out parameters */
6573 /* Result */
6574 ZERO_STRUCT(state->orig.out.result);
6576 /* make a temporary copy, that we pass to the dispatch function */
6577 state->tmp = state->orig;
6579 subreq = cli->dispatch_send(state, ev, cli,
6580 &ndr_table_ntsvcs,
6581 NDR_PNP_ADDRESDES,
6582 &state->tmp);
6583 if (tevent_req_nomem(subreq, req)) {
6584 return tevent_req_post(req, ev);
6586 tevent_req_set_callback(subreq, rpccli_PNP_AddResDes_done, req);
6587 return req;
6590 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq)
6592 struct tevent_req *req = tevent_req_callback_data(
6593 subreq, struct tevent_req);
6594 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6595 req, struct rpccli_PNP_AddResDes_state);
6596 NTSTATUS status;
6597 TALLOC_CTX *mem_ctx;
6599 if (state->out_mem_ctx) {
6600 mem_ctx = state->out_mem_ctx;
6601 } else {
6602 mem_ctx = state;
6605 status = state->dispatch_recv(subreq, mem_ctx);
6606 TALLOC_FREE(subreq);
6607 if (!NT_STATUS_IS_OK(status)) {
6608 tevent_req_nterror(req, status);
6609 return;
6612 /* Copy out parameters */
6614 /* Copy result */
6615 state->orig.out.result = state->tmp.out.result;
6617 /* Reset temporary structure */
6618 ZERO_STRUCT(state->tmp);
6620 tevent_req_done(req);
6623 NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req,
6624 TALLOC_CTX *mem_ctx,
6625 WERROR *result)
6627 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6628 req, struct rpccli_PNP_AddResDes_state);
6629 NTSTATUS status;
6631 if (tevent_req_is_nterror(req, &status)) {
6632 tevent_req_received(req);
6633 return status;
6636 /* Steal possbile out parameters to the callers context */
6637 talloc_steal(mem_ctx, state->out_mem_ctx);
6639 /* Return result */
6640 *result = state->orig.out.result;
6642 tevent_req_received(req);
6643 return NT_STATUS_OK;
6646 NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
6647 TALLOC_CTX *mem_ctx,
6648 WERROR *werror)
6650 struct PNP_AddResDes r;
6651 NTSTATUS status;
6653 /* In parameters */
6655 status = cli->dispatch(cli,
6656 mem_ctx,
6657 &ndr_table_ntsvcs,
6658 NDR_PNP_ADDRESDES,
6659 &r);
6661 if (!NT_STATUS_IS_OK(status)) {
6662 return status;
6665 if (NT_STATUS_IS_ERR(status)) {
6666 return status;
6669 /* Return variables */
6671 /* Return result */
6672 if (werror) {
6673 *werror = r.out.result;
6676 return werror_to_ntstatus(r.out.result);
6679 struct rpccli_PNP_FreeResDes_state {
6680 struct PNP_FreeResDes orig;
6681 struct PNP_FreeResDes tmp;
6682 TALLOC_CTX *out_mem_ctx;
6683 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6686 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq);
6688 struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx,
6689 struct tevent_context *ev,
6690 struct rpc_pipe_client *cli)
6692 struct tevent_req *req;
6693 struct rpccli_PNP_FreeResDes_state *state;
6694 struct tevent_req *subreq;
6696 req = tevent_req_create(mem_ctx, &state,
6697 struct rpccli_PNP_FreeResDes_state);
6698 if (req == NULL) {
6699 return NULL;
6701 state->out_mem_ctx = NULL;
6702 state->dispatch_recv = cli->dispatch_recv;
6704 /* In parameters */
6706 /* Out parameters */
6708 /* Result */
6709 ZERO_STRUCT(state->orig.out.result);
6711 /* make a temporary copy, that we pass to the dispatch function */
6712 state->tmp = state->orig;
6714 subreq = cli->dispatch_send(state, ev, cli,
6715 &ndr_table_ntsvcs,
6716 NDR_PNP_FREERESDES,
6717 &state->tmp);
6718 if (tevent_req_nomem(subreq, req)) {
6719 return tevent_req_post(req, ev);
6721 tevent_req_set_callback(subreq, rpccli_PNP_FreeResDes_done, req);
6722 return req;
6725 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq)
6727 struct tevent_req *req = tevent_req_callback_data(
6728 subreq, struct tevent_req);
6729 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6730 req, struct rpccli_PNP_FreeResDes_state);
6731 NTSTATUS status;
6732 TALLOC_CTX *mem_ctx;
6734 if (state->out_mem_ctx) {
6735 mem_ctx = state->out_mem_ctx;
6736 } else {
6737 mem_ctx = state;
6740 status = state->dispatch_recv(subreq, mem_ctx);
6741 TALLOC_FREE(subreq);
6742 if (!NT_STATUS_IS_OK(status)) {
6743 tevent_req_nterror(req, status);
6744 return;
6747 /* Copy out parameters */
6749 /* Copy result */
6750 state->orig.out.result = state->tmp.out.result;
6752 /* Reset temporary structure */
6753 ZERO_STRUCT(state->tmp);
6755 tevent_req_done(req);
6758 NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req,
6759 TALLOC_CTX *mem_ctx,
6760 WERROR *result)
6762 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6763 req, struct rpccli_PNP_FreeResDes_state);
6764 NTSTATUS status;
6766 if (tevent_req_is_nterror(req, &status)) {
6767 tevent_req_received(req);
6768 return status;
6771 /* Steal possbile out parameters to the callers context */
6772 talloc_steal(mem_ctx, state->out_mem_ctx);
6774 /* Return result */
6775 *result = state->orig.out.result;
6777 tevent_req_received(req);
6778 return NT_STATUS_OK;
6781 NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
6782 TALLOC_CTX *mem_ctx,
6783 WERROR *werror)
6785 struct PNP_FreeResDes r;
6786 NTSTATUS status;
6788 /* In parameters */
6790 status = cli->dispatch(cli,
6791 mem_ctx,
6792 &ndr_table_ntsvcs,
6793 NDR_PNP_FREERESDES,
6794 &r);
6796 if (!NT_STATUS_IS_OK(status)) {
6797 return status;
6800 if (NT_STATUS_IS_ERR(status)) {
6801 return status;
6804 /* Return variables */
6806 /* Return result */
6807 if (werror) {
6808 *werror = r.out.result;
6811 return werror_to_ntstatus(r.out.result);
6814 struct rpccli_PNP_GetNextResDes_state {
6815 struct PNP_GetNextResDes orig;
6816 struct PNP_GetNextResDes tmp;
6817 TALLOC_CTX *out_mem_ctx;
6818 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6821 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq);
6823 struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx,
6824 struct tevent_context *ev,
6825 struct rpc_pipe_client *cli)
6827 struct tevent_req *req;
6828 struct rpccli_PNP_GetNextResDes_state *state;
6829 struct tevent_req *subreq;
6831 req = tevent_req_create(mem_ctx, &state,
6832 struct rpccli_PNP_GetNextResDes_state);
6833 if (req == NULL) {
6834 return NULL;
6836 state->out_mem_ctx = NULL;
6837 state->dispatch_recv = cli->dispatch_recv;
6839 /* In parameters */
6841 /* Out parameters */
6843 /* Result */
6844 ZERO_STRUCT(state->orig.out.result);
6846 /* make a temporary copy, that we pass to the dispatch function */
6847 state->tmp = state->orig;
6849 subreq = cli->dispatch_send(state, ev, cli,
6850 &ndr_table_ntsvcs,
6851 NDR_PNP_GETNEXTRESDES,
6852 &state->tmp);
6853 if (tevent_req_nomem(subreq, req)) {
6854 return tevent_req_post(req, ev);
6856 tevent_req_set_callback(subreq, rpccli_PNP_GetNextResDes_done, req);
6857 return req;
6860 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq)
6862 struct tevent_req *req = tevent_req_callback_data(
6863 subreq, struct tevent_req);
6864 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6865 req, struct rpccli_PNP_GetNextResDes_state);
6866 NTSTATUS status;
6867 TALLOC_CTX *mem_ctx;
6869 if (state->out_mem_ctx) {
6870 mem_ctx = state->out_mem_ctx;
6871 } else {
6872 mem_ctx = state;
6875 status = state->dispatch_recv(subreq, mem_ctx);
6876 TALLOC_FREE(subreq);
6877 if (!NT_STATUS_IS_OK(status)) {
6878 tevent_req_nterror(req, status);
6879 return;
6882 /* Copy out parameters */
6884 /* Copy result */
6885 state->orig.out.result = state->tmp.out.result;
6887 /* Reset temporary structure */
6888 ZERO_STRUCT(state->tmp);
6890 tevent_req_done(req);
6893 NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req,
6894 TALLOC_CTX *mem_ctx,
6895 WERROR *result)
6897 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6898 req, struct rpccli_PNP_GetNextResDes_state);
6899 NTSTATUS status;
6901 if (tevent_req_is_nterror(req, &status)) {
6902 tevent_req_received(req);
6903 return status;
6906 /* Steal possbile out parameters to the callers context */
6907 talloc_steal(mem_ctx, state->out_mem_ctx);
6909 /* Return result */
6910 *result = state->orig.out.result;
6912 tevent_req_received(req);
6913 return NT_STATUS_OK;
6916 NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
6917 TALLOC_CTX *mem_ctx,
6918 WERROR *werror)
6920 struct PNP_GetNextResDes r;
6921 NTSTATUS status;
6923 /* In parameters */
6925 status = cli->dispatch(cli,
6926 mem_ctx,
6927 &ndr_table_ntsvcs,
6928 NDR_PNP_GETNEXTRESDES,
6929 &r);
6931 if (!NT_STATUS_IS_OK(status)) {
6932 return status;
6935 if (NT_STATUS_IS_ERR(status)) {
6936 return status;
6939 /* Return variables */
6941 /* Return result */
6942 if (werror) {
6943 *werror = r.out.result;
6946 return werror_to_ntstatus(r.out.result);
6949 struct rpccli_PNP_GetResDesData_state {
6950 struct PNP_GetResDesData orig;
6951 struct PNP_GetResDesData tmp;
6952 TALLOC_CTX *out_mem_ctx;
6953 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6956 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq);
6958 struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx,
6959 struct tevent_context *ev,
6960 struct rpc_pipe_client *cli)
6962 struct tevent_req *req;
6963 struct rpccli_PNP_GetResDesData_state *state;
6964 struct tevent_req *subreq;
6966 req = tevent_req_create(mem_ctx, &state,
6967 struct rpccli_PNP_GetResDesData_state);
6968 if (req == NULL) {
6969 return NULL;
6971 state->out_mem_ctx = NULL;
6972 state->dispatch_recv = cli->dispatch_recv;
6974 /* In parameters */
6976 /* Out parameters */
6978 /* Result */
6979 ZERO_STRUCT(state->orig.out.result);
6981 /* make a temporary copy, that we pass to the dispatch function */
6982 state->tmp = state->orig;
6984 subreq = cli->dispatch_send(state, ev, cli,
6985 &ndr_table_ntsvcs,
6986 NDR_PNP_GETRESDESDATA,
6987 &state->tmp);
6988 if (tevent_req_nomem(subreq, req)) {
6989 return tevent_req_post(req, ev);
6991 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesData_done, req);
6992 return req;
6995 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq)
6997 struct tevent_req *req = tevent_req_callback_data(
6998 subreq, struct tevent_req);
6999 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7000 req, struct rpccli_PNP_GetResDesData_state);
7001 NTSTATUS status;
7002 TALLOC_CTX *mem_ctx;
7004 if (state->out_mem_ctx) {
7005 mem_ctx = state->out_mem_ctx;
7006 } else {
7007 mem_ctx = state;
7010 status = state->dispatch_recv(subreq, mem_ctx);
7011 TALLOC_FREE(subreq);
7012 if (!NT_STATUS_IS_OK(status)) {
7013 tevent_req_nterror(req, status);
7014 return;
7017 /* Copy out parameters */
7019 /* Copy result */
7020 state->orig.out.result = state->tmp.out.result;
7022 /* Reset temporary structure */
7023 ZERO_STRUCT(state->tmp);
7025 tevent_req_done(req);
7028 NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req,
7029 TALLOC_CTX *mem_ctx,
7030 WERROR *result)
7032 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7033 req, struct rpccli_PNP_GetResDesData_state);
7034 NTSTATUS status;
7036 if (tevent_req_is_nterror(req, &status)) {
7037 tevent_req_received(req);
7038 return status;
7041 /* Steal possbile out parameters to the callers context */
7042 talloc_steal(mem_ctx, state->out_mem_ctx);
7044 /* Return result */
7045 *result = state->orig.out.result;
7047 tevent_req_received(req);
7048 return NT_STATUS_OK;
7051 NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
7052 TALLOC_CTX *mem_ctx,
7053 WERROR *werror)
7055 struct PNP_GetResDesData r;
7056 NTSTATUS status;
7058 /* In parameters */
7060 status = cli->dispatch(cli,
7061 mem_ctx,
7062 &ndr_table_ntsvcs,
7063 NDR_PNP_GETRESDESDATA,
7064 &r);
7066 if (!NT_STATUS_IS_OK(status)) {
7067 return status;
7070 if (NT_STATUS_IS_ERR(status)) {
7071 return status;
7074 /* Return variables */
7076 /* Return result */
7077 if (werror) {
7078 *werror = r.out.result;
7081 return werror_to_ntstatus(r.out.result);
7084 struct rpccli_PNP_GetResDesDataSize_state {
7085 struct PNP_GetResDesDataSize orig;
7086 struct PNP_GetResDesDataSize tmp;
7087 TALLOC_CTX *out_mem_ctx;
7088 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7091 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq);
7093 struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx,
7094 struct tevent_context *ev,
7095 struct rpc_pipe_client *cli)
7097 struct tevent_req *req;
7098 struct rpccli_PNP_GetResDesDataSize_state *state;
7099 struct tevent_req *subreq;
7101 req = tevent_req_create(mem_ctx, &state,
7102 struct rpccli_PNP_GetResDesDataSize_state);
7103 if (req == NULL) {
7104 return NULL;
7106 state->out_mem_ctx = NULL;
7107 state->dispatch_recv = cli->dispatch_recv;
7109 /* In parameters */
7111 /* Out parameters */
7113 /* Result */
7114 ZERO_STRUCT(state->orig.out.result);
7116 /* make a temporary copy, that we pass to the dispatch function */
7117 state->tmp = state->orig;
7119 subreq = cli->dispatch_send(state, ev, cli,
7120 &ndr_table_ntsvcs,
7121 NDR_PNP_GETRESDESDATASIZE,
7122 &state->tmp);
7123 if (tevent_req_nomem(subreq, req)) {
7124 return tevent_req_post(req, ev);
7126 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesDataSize_done, req);
7127 return req;
7130 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq)
7132 struct tevent_req *req = tevent_req_callback_data(
7133 subreq, struct tevent_req);
7134 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7135 req, struct rpccli_PNP_GetResDesDataSize_state);
7136 NTSTATUS status;
7137 TALLOC_CTX *mem_ctx;
7139 if (state->out_mem_ctx) {
7140 mem_ctx = state->out_mem_ctx;
7141 } else {
7142 mem_ctx = state;
7145 status = state->dispatch_recv(subreq, mem_ctx);
7146 TALLOC_FREE(subreq);
7147 if (!NT_STATUS_IS_OK(status)) {
7148 tevent_req_nterror(req, status);
7149 return;
7152 /* Copy out parameters */
7154 /* Copy result */
7155 state->orig.out.result = state->tmp.out.result;
7157 /* Reset temporary structure */
7158 ZERO_STRUCT(state->tmp);
7160 tevent_req_done(req);
7163 NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req,
7164 TALLOC_CTX *mem_ctx,
7165 WERROR *result)
7167 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7168 req, struct rpccli_PNP_GetResDesDataSize_state);
7169 NTSTATUS status;
7171 if (tevent_req_is_nterror(req, &status)) {
7172 tevent_req_received(req);
7173 return status;
7176 /* Steal possbile out parameters to the callers context */
7177 talloc_steal(mem_ctx, state->out_mem_ctx);
7179 /* Return result */
7180 *result = state->orig.out.result;
7182 tevent_req_received(req);
7183 return NT_STATUS_OK;
7186 NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
7187 TALLOC_CTX *mem_ctx,
7188 WERROR *werror)
7190 struct PNP_GetResDesDataSize r;
7191 NTSTATUS status;
7193 /* In parameters */
7195 status = cli->dispatch(cli,
7196 mem_ctx,
7197 &ndr_table_ntsvcs,
7198 NDR_PNP_GETRESDESDATASIZE,
7199 &r);
7201 if (!NT_STATUS_IS_OK(status)) {
7202 return status;
7205 if (NT_STATUS_IS_ERR(status)) {
7206 return status;
7209 /* Return variables */
7211 /* Return result */
7212 if (werror) {
7213 *werror = r.out.result;
7216 return werror_to_ntstatus(r.out.result);
7219 struct rpccli_PNP_ModifyResDes_state {
7220 struct PNP_ModifyResDes orig;
7221 struct PNP_ModifyResDes tmp;
7222 TALLOC_CTX *out_mem_ctx;
7223 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7226 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq);
7228 struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx,
7229 struct tevent_context *ev,
7230 struct rpc_pipe_client *cli)
7232 struct tevent_req *req;
7233 struct rpccli_PNP_ModifyResDes_state *state;
7234 struct tevent_req *subreq;
7236 req = tevent_req_create(mem_ctx, &state,
7237 struct rpccli_PNP_ModifyResDes_state);
7238 if (req == NULL) {
7239 return NULL;
7241 state->out_mem_ctx = NULL;
7242 state->dispatch_recv = cli->dispatch_recv;
7244 /* In parameters */
7246 /* Out parameters */
7248 /* Result */
7249 ZERO_STRUCT(state->orig.out.result);
7251 /* make a temporary copy, that we pass to the dispatch function */
7252 state->tmp = state->orig;
7254 subreq = cli->dispatch_send(state, ev, cli,
7255 &ndr_table_ntsvcs,
7256 NDR_PNP_MODIFYRESDES,
7257 &state->tmp);
7258 if (tevent_req_nomem(subreq, req)) {
7259 return tevent_req_post(req, ev);
7261 tevent_req_set_callback(subreq, rpccli_PNP_ModifyResDes_done, req);
7262 return req;
7265 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq)
7267 struct tevent_req *req = tevent_req_callback_data(
7268 subreq, struct tevent_req);
7269 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7270 req, struct rpccli_PNP_ModifyResDes_state);
7271 NTSTATUS status;
7272 TALLOC_CTX *mem_ctx;
7274 if (state->out_mem_ctx) {
7275 mem_ctx = state->out_mem_ctx;
7276 } else {
7277 mem_ctx = state;
7280 status = state->dispatch_recv(subreq, mem_ctx);
7281 TALLOC_FREE(subreq);
7282 if (!NT_STATUS_IS_OK(status)) {
7283 tevent_req_nterror(req, status);
7284 return;
7287 /* Copy out parameters */
7289 /* Copy result */
7290 state->orig.out.result = state->tmp.out.result;
7292 /* Reset temporary structure */
7293 ZERO_STRUCT(state->tmp);
7295 tevent_req_done(req);
7298 NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req,
7299 TALLOC_CTX *mem_ctx,
7300 WERROR *result)
7302 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7303 req, struct rpccli_PNP_ModifyResDes_state);
7304 NTSTATUS status;
7306 if (tevent_req_is_nterror(req, &status)) {
7307 tevent_req_received(req);
7308 return status;
7311 /* Steal possbile out parameters to the callers context */
7312 talloc_steal(mem_ctx, state->out_mem_ctx);
7314 /* Return result */
7315 *result = state->orig.out.result;
7317 tevent_req_received(req);
7318 return NT_STATUS_OK;
7321 NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
7322 TALLOC_CTX *mem_ctx,
7323 WERROR *werror)
7325 struct PNP_ModifyResDes r;
7326 NTSTATUS status;
7328 /* In parameters */
7330 status = cli->dispatch(cli,
7331 mem_ctx,
7332 &ndr_table_ntsvcs,
7333 NDR_PNP_MODIFYRESDES,
7334 &r);
7336 if (!NT_STATUS_IS_OK(status)) {
7337 return status;
7340 if (NT_STATUS_IS_ERR(status)) {
7341 return status;
7344 /* Return variables */
7346 /* Return result */
7347 if (werror) {
7348 *werror = r.out.result;
7351 return werror_to_ntstatus(r.out.result);
7354 struct rpccli_PNP_DetectResourceLimit_state {
7355 struct PNP_DetectResourceLimit orig;
7356 struct PNP_DetectResourceLimit tmp;
7357 TALLOC_CTX *out_mem_ctx;
7358 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7361 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq);
7363 struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx,
7364 struct tevent_context *ev,
7365 struct rpc_pipe_client *cli)
7367 struct tevent_req *req;
7368 struct rpccli_PNP_DetectResourceLimit_state *state;
7369 struct tevent_req *subreq;
7371 req = tevent_req_create(mem_ctx, &state,
7372 struct rpccli_PNP_DetectResourceLimit_state);
7373 if (req == NULL) {
7374 return NULL;
7376 state->out_mem_ctx = NULL;
7377 state->dispatch_recv = cli->dispatch_recv;
7379 /* In parameters */
7381 /* Out parameters */
7383 /* Result */
7384 ZERO_STRUCT(state->orig.out.result);
7386 /* make a temporary copy, that we pass to the dispatch function */
7387 state->tmp = state->orig;
7389 subreq = cli->dispatch_send(state, ev, cli,
7390 &ndr_table_ntsvcs,
7391 NDR_PNP_DETECTRESOURCELIMIT,
7392 &state->tmp);
7393 if (tevent_req_nomem(subreq, req)) {
7394 return tevent_req_post(req, ev);
7396 tevent_req_set_callback(subreq, rpccli_PNP_DetectResourceLimit_done, req);
7397 return req;
7400 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq)
7402 struct tevent_req *req = tevent_req_callback_data(
7403 subreq, struct tevent_req);
7404 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7405 req, struct rpccli_PNP_DetectResourceLimit_state);
7406 NTSTATUS status;
7407 TALLOC_CTX *mem_ctx;
7409 if (state->out_mem_ctx) {
7410 mem_ctx = state->out_mem_ctx;
7411 } else {
7412 mem_ctx = state;
7415 status = state->dispatch_recv(subreq, mem_ctx);
7416 TALLOC_FREE(subreq);
7417 if (!NT_STATUS_IS_OK(status)) {
7418 tevent_req_nterror(req, status);
7419 return;
7422 /* Copy out parameters */
7424 /* Copy result */
7425 state->orig.out.result = state->tmp.out.result;
7427 /* Reset temporary structure */
7428 ZERO_STRUCT(state->tmp);
7430 tevent_req_done(req);
7433 NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req,
7434 TALLOC_CTX *mem_ctx,
7435 WERROR *result)
7437 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7438 req, struct rpccli_PNP_DetectResourceLimit_state);
7439 NTSTATUS status;
7441 if (tevent_req_is_nterror(req, &status)) {
7442 tevent_req_received(req);
7443 return status;
7446 /* Steal possbile out parameters to the callers context */
7447 talloc_steal(mem_ctx, state->out_mem_ctx);
7449 /* Return result */
7450 *result = state->orig.out.result;
7452 tevent_req_received(req);
7453 return NT_STATUS_OK;
7456 NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
7457 TALLOC_CTX *mem_ctx,
7458 WERROR *werror)
7460 struct PNP_DetectResourceLimit r;
7461 NTSTATUS status;
7463 /* In parameters */
7465 status = cli->dispatch(cli,
7466 mem_ctx,
7467 &ndr_table_ntsvcs,
7468 NDR_PNP_DETECTRESOURCELIMIT,
7469 &r);
7471 if (!NT_STATUS_IS_OK(status)) {
7472 return status;
7475 if (NT_STATUS_IS_ERR(status)) {
7476 return status;
7479 /* Return variables */
7481 /* Return result */
7482 if (werror) {
7483 *werror = r.out.result;
7486 return werror_to_ntstatus(r.out.result);
7489 struct rpccli_PNP_QueryResConfList_state {
7490 struct PNP_QueryResConfList orig;
7491 struct PNP_QueryResConfList tmp;
7492 TALLOC_CTX *out_mem_ctx;
7493 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7496 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq);
7498 struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx,
7499 struct tevent_context *ev,
7500 struct rpc_pipe_client *cli)
7502 struct tevent_req *req;
7503 struct rpccli_PNP_QueryResConfList_state *state;
7504 struct tevent_req *subreq;
7506 req = tevent_req_create(mem_ctx, &state,
7507 struct rpccli_PNP_QueryResConfList_state);
7508 if (req == NULL) {
7509 return NULL;
7511 state->out_mem_ctx = NULL;
7512 state->dispatch_recv = cli->dispatch_recv;
7514 /* In parameters */
7516 /* Out parameters */
7518 /* Result */
7519 ZERO_STRUCT(state->orig.out.result);
7521 /* make a temporary copy, that we pass to the dispatch function */
7522 state->tmp = state->orig;
7524 subreq = cli->dispatch_send(state, ev, cli,
7525 &ndr_table_ntsvcs,
7526 NDR_PNP_QUERYRESCONFLIST,
7527 &state->tmp);
7528 if (tevent_req_nomem(subreq, req)) {
7529 return tevent_req_post(req, ev);
7531 tevent_req_set_callback(subreq, rpccli_PNP_QueryResConfList_done, req);
7532 return req;
7535 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq)
7537 struct tevent_req *req = tevent_req_callback_data(
7538 subreq, struct tevent_req);
7539 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7540 req, struct rpccli_PNP_QueryResConfList_state);
7541 NTSTATUS status;
7542 TALLOC_CTX *mem_ctx;
7544 if (state->out_mem_ctx) {
7545 mem_ctx = state->out_mem_ctx;
7546 } else {
7547 mem_ctx = state;
7550 status = state->dispatch_recv(subreq, mem_ctx);
7551 TALLOC_FREE(subreq);
7552 if (!NT_STATUS_IS_OK(status)) {
7553 tevent_req_nterror(req, status);
7554 return;
7557 /* Copy out parameters */
7559 /* Copy result */
7560 state->orig.out.result = state->tmp.out.result;
7562 /* Reset temporary structure */
7563 ZERO_STRUCT(state->tmp);
7565 tevent_req_done(req);
7568 NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req,
7569 TALLOC_CTX *mem_ctx,
7570 WERROR *result)
7572 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7573 req, struct rpccli_PNP_QueryResConfList_state);
7574 NTSTATUS status;
7576 if (tevent_req_is_nterror(req, &status)) {
7577 tevent_req_received(req);
7578 return status;
7581 /* Steal possbile out parameters to the callers context */
7582 talloc_steal(mem_ctx, state->out_mem_ctx);
7584 /* Return result */
7585 *result = state->orig.out.result;
7587 tevent_req_received(req);
7588 return NT_STATUS_OK;
7591 NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
7592 TALLOC_CTX *mem_ctx,
7593 WERROR *werror)
7595 struct PNP_QueryResConfList r;
7596 NTSTATUS status;
7598 /* In parameters */
7600 status = cli->dispatch(cli,
7601 mem_ctx,
7602 &ndr_table_ntsvcs,
7603 NDR_PNP_QUERYRESCONFLIST,
7604 &r);
7606 if (!NT_STATUS_IS_OK(status)) {
7607 return status;
7610 if (NT_STATUS_IS_ERR(status)) {
7611 return status;
7614 /* Return variables */
7616 /* Return result */
7617 if (werror) {
7618 *werror = r.out.result;
7621 return werror_to_ntstatus(r.out.result);
7624 struct rpccli_PNP_SetHwProf_state {
7625 struct PNP_SetHwProf orig;
7626 struct PNP_SetHwProf tmp;
7627 TALLOC_CTX *out_mem_ctx;
7628 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7631 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq);
7633 struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx,
7634 struct tevent_context *ev,
7635 struct rpc_pipe_client *cli)
7637 struct tevent_req *req;
7638 struct rpccli_PNP_SetHwProf_state *state;
7639 struct tevent_req *subreq;
7641 req = tevent_req_create(mem_ctx, &state,
7642 struct rpccli_PNP_SetHwProf_state);
7643 if (req == NULL) {
7644 return NULL;
7646 state->out_mem_ctx = NULL;
7647 state->dispatch_recv = cli->dispatch_recv;
7649 /* In parameters */
7651 /* Out parameters */
7653 /* Result */
7654 ZERO_STRUCT(state->orig.out.result);
7656 /* make a temporary copy, that we pass to the dispatch function */
7657 state->tmp = state->orig;
7659 subreq = cli->dispatch_send(state, ev, cli,
7660 &ndr_table_ntsvcs,
7661 NDR_PNP_SETHWPROF,
7662 &state->tmp);
7663 if (tevent_req_nomem(subreq, req)) {
7664 return tevent_req_post(req, ev);
7666 tevent_req_set_callback(subreq, rpccli_PNP_SetHwProf_done, req);
7667 return req;
7670 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq)
7672 struct tevent_req *req = tevent_req_callback_data(
7673 subreq, struct tevent_req);
7674 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7675 req, struct rpccli_PNP_SetHwProf_state);
7676 NTSTATUS status;
7677 TALLOC_CTX *mem_ctx;
7679 if (state->out_mem_ctx) {
7680 mem_ctx = state->out_mem_ctx;
7681 } else {
7682 mem_ctx = state;
7685 status = state->dispatch_recv(subreq, mem_ctx);
7686 TALLOC_FREE(subreq);
7687 if (!NT_STATUS_IS_OK(status)) {
7688 tevent_req_nterror(req, status);
7689 return;
7692 /* Copy out parameters */
7694 /* Copy result */
7695 state->orig.out.result = state->tmp.out.result;
7697 /* Reset temporary structure */
7698 ZERO_STRUCT(state->tmp);
7700 tevent_req_done(req);
7703 NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req,
7704 TALLOC_CTX *mem_ctx,
7705 WERROR *result)
7707 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7708 req, struct rpccli_PNP_SetHwProf_state);
7709 NTSTATUS status;
7711 if (tevent_req_is_nterror(req, &status)) {
7712 tevent_req_received(req);
7713 return status;
7716 /* Steal possbile out parameters to the callers context */
7717 talloc_steal(mem_ctx, state->out_mem_ctx);
7719 /* Return result */
7720 *result = state->orig.out.result;
7722 tevent_req_received(req);
7723 return NT_STATUS_OK;
7726 NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
7727 TALLOC_CTX *mem_ctx,
7728 WERROR *werror)
7730 struct PNP_SetHwProf r;
7731 NTSTATUS status;
7733 /* In parameters */
7735 status = cli->dispatch(cli,
7736 mem_ctx,
7737 &ndr_table_ntsvcs,
7738 NDR_PNP_SETHWPROF,
7739 &r);
7741 if (!NT_STATUS_IS_OK(status)) {
7742 return status;
7745 if (NT_STATUS_IS_ERR(status)) {
7746 return status;
7749 /* Return variables */
7751 /* Return result */
7752 if (werror) {
7753 *werror = r.out.result;
7756 return werror_to_ntstatus(r.out.result);
7759 struct rpccli_PNP_QueryArbitratorFreeData_state {
7760 struct PNP_QueryArbitratorFreeData orig;
7761 struct PNP_QueryArbitratorFreeData tmp;
7762 TALLOC_CTX *out_mem_ctx;
7763 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7766 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq);
7768 struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx,
7769 struct tevent_context *ev,
7770 struct rpc_pipe_client *cli)
7772 struct tevent_req *req;
7773 struct rpccli_PNP_QueryArbitratorFreeData_state *state;
7774 struct tevent_req *subreq;
7776 req = tevent_req_create(mem_ctx, &state,
7777 struct rpccli_PNP_QueryArbitratorFreeData_state);
7778 if (req == NULL) {
7779 return NULL;
7781 state->out_mem_ctx = NULL;
7782 state->dispatch_recv = cli->dispatch_recv;
7784 /* In parameters */
7786 /* Out parameters */
7788 /* Result */
7789 ZERO_STRUCT(state->orig.out.result);
7791 /* make a temporary copy, that we pass to the dispatch function */
7792 state->tmp = state->orig;
7794 subreq = cli->dispatch_send(state, ev, cli,
7795 &ndr_table_ntsvcs,
7796 NDR_PNP_QUERYARBITRATORFREEDATA,
7797 &state->tmp);
7798 if (tevent_req_nomem(subreq, req)) {
7799 return tevent_req_post(req, ev);
7801 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeData_done, req);
7802 return req;
7805 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq)
7807 struct tevent_req *req = tevent_req_callback_data(
7808 subreq, struct tevent_req);
7809 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7810 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7811 NTSTATUS status;
7812 TALLOC_CTX *mem_ctx;
7814 if (state->out_mem_ctx) {
7815 mem_ctx = state->out_mem_ctx;
7816 } else {
7817 mem_ctx = state;
7820 status = state->dispatch_recv(subreq, mem_ctx);
7821 TALLOC_FREE(subreq);
7822 if (!NT_STATUS_IS_OK(status)) {
7823 tevent_req_nterror(req, status);
7824 return;
7827 /* Copy out parameters */
7829 /* Copy result */
7830 state->orig.out.result = state->tmp.out.result;
7832 /* Reset temporary structure */
7833 ZERO_STRUCT(state->tmp);
7835 tevent_req_done(req);
7838 NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req,
7839 TALLOC_CTX *mem_ctx,
7840 WERROR *result)
7842 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7843 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7844 NTSTATUS status;
7846 if (tevent_req_is_nterror(req, &status)) {
7847 tevent_req_received(req);
7848 return status;
7851 /* Steal possbile out parameters to the callers context */
7852 talloc_steal(mem_ctx, state->out_mem_ctx);
7854 /* Return result */
7855 *result = state->orig.out.result;
7857 tevent_req_received(req);
7858 return NT_STATUS_OK;
7861 NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
7862 TALLOC_CTX *mem_ctx,
7863 WERROR *werror)
7865 struct PNP_QueryArbitratorFreeData r;
7866 NTSTATUS status;
7868 /* In parameters */
7870 status = cli->dispatch(cli,
7871 mem_ctx,
7872 &ndr_table_ntsvcs,
7873 NDR_PNP_QUERYARBITRATORFREEDATA,
7874 &r);
7876 if (!NT_STATUS_IS_OK(status)) {
7877 return status;
7880 if (NT_STATUS_IS_ERR(status)) {
7881 return status;
7884 /* Return variables */
7886 /* Return result */
7887 if (werror) {
7888 *werror = r.out.result;
7891 return werror_to_ntstatus(r.out.result);
7894 struct rpccli_PNP_QueryArbitratorFreeSize_state {
7895 struct PNP_QueryArbitratorFreeSize orig;
7896 struct PNP_QueryArbitratorFreeSize tmp;
7897 TALLOC_CTX *out_mem_ctx;
7898 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7901 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq);
7903 struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx,
7904 struct tevent_context *ev,
7905 struct rpc_pipe_client *cli)
7907 struct tevent_req *req;
7908 struct rpccli_PNP_QueryArbitratorFreeSize_state *state;
7909 struct tevent_req *subreq;
7911 req = tevent_req_create(mem_ctx, &state,
7912 struct rpccli_PNP_QueryArbitratorFreeSize_state);
7913 if (req == NULL) {
7914 return NULL;
7916 state->out_mem_ctx = NULL;
7917 state->dispatch_recv = cli->dispatch_recv;
7919 /* In parameters */
7921 /* Out parameters */
7923 /* Result */
7924 ZERO_STRUCT(state->orig.out.result);
7926 /* make a temporary copy, that we pass to the dispatch function */
7927 state->tmp = state->orig;
7929 subreq = cli->dispatch_send(state, ev, cli,
7930 &ndr_table_ntsvcs,
7931 NDR_PNP_QUERYARBITRATORFREESIZE,
7932 &state->tmp);
7933 if (tevent_req_nomem(subreq, req)) {
7934 return tevent_req_post(req, ev);
7936 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeSize_done, req);
7937 return req;
7940 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq)
7942 struct tevent_req *req = tevent_req_callback_data(
7943 subreq, struct tevent_req);
7944 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7945 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7946 NTSTATUS status;
7947 TALLOC_CTX *mem_ctx;
7949 if (state->out_mem_ctx) {
7950 mem_ctx = state->out_mem_ctx;
7951 } else {
7952 mem_ctx = state;
7955 status = state->dispatch_recv(subreq, mem_ctx);
7956 TALLOC_FREE(subreq);
7957 if (!NT_STATUS_IS_OK(status)) {
7958 tevent_req_nterror(req, status);
7959 return;
7962 /* Copy out parameters */
7964 /* Copy result */
7965 state->orig.out.result = state->tmp.out.result;
7967 /* Reset temporary structure */
7968 ZERO_STRUCT(state->tmp);
7970 tevent_req_done(req);
7973 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req,
7974 TALLOC_CTX *mem_ctx,
7975 WERROR *result)
7977 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7978 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7979 NTSTATUS status;
7981 if (tevent_req_is_nterror(req, &status)) {
7982 tevent_req_received(req);
7983 return status;
7986 /* Steal possbile out parameters to the callers context */
7987 talloc_steal(mem_ctx, state->out_mem_ctx);
7989 /* Return result */
7990 *result = state->orig.out.result;
7992 tevent_req_received(req);
7993 return NT_STATUS_OK;
7996 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
7997 TALLOC_CTX *mem_ctx,
7998 WERROR *werror)
8000 struct PNP_QueryArbitratorFreeSize r;
8001 NTSTATUS status;
8003 /* In parameters */
8005 status = cli->dispatch(cli,
8006 mem_ctx,
8007 &ndr_table_ntsvcs,
8008 NDR_PNP_QUERYARBITRATORFREESIZE,
8009 &r);
8011 if (!NT_STATUS_IS_OK(status)) {
8012 return status;
8015 if (NT_STATUS_IS_ERR(status)) {
8016 return status;
8019 /* Return variables */
8021 /* Return result */
8022 if (werror) {
8023 *werror = r.out.result;
8026 return werror_to_ntstatus(r.out.result);
8029 struct rpccli_PNP_RunDetection_state {
8030 struct PNP_RunDetection orig;
8031 struct PNP_RunDetection tmp;
8032 TALLOC_CTX *out_mem_ctx;
8033 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8036 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq);
8038 struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx,
8039 struct tevent_context *ev,
8040 struct rpc_pipe_client *cli)
8042 struct tevent_req *req;
8043 struct rpccli_PNP_RunDetection_state *state;
8044 struct tevent_req *subreq;
8046 req = tevent_req_create(mem_ctx, &state,
8047 struct rpccli_PNP_RunDetection_state);
8048 if (req == NULL) {
8049 return NULL;
8051 state->out_mem_ctx = NULL;
8052 state->dispatch_recv = cli->dispatch_recv;
8054 /* In parameters */
8056 /* Out parameters */
8058 /* Result */
8059 ZERO_STRUCT(state->orig.out.result);
8061 /* make a temporary copy, that we pass to the dispatch function */
8062 state->tmp = state->orig;
8064 subreq = cli->dispatch_send(state, ev, cli,
8065 &ndr_table_ntsvcs,
8066 NDR_PNP_RUNDETECTION,
8067 &state->tmp);
8068 if (tevent_req_nomem(subreq, req)) {
8069 return tevent_req_post(req, ev);
8071 tevent_req_set_callback(subreq, rpccli_PNP_RunDetection_done, req);
8072 return req;
8075 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq)
8077 struct tevent_req *req = tevent_req_callback_data(
8078 subreq, struct tevent_req);
8079 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8080 req, struct rpccli_PNP_RunDetection_state);
8081 NTSTATUS status;
8082 TALLOC_CTX *mem_ctx;
8084 if (state->out_mem_ctx) {
8085 mem_ctx = state->out_mem_ctx;
8086 } else {
8087 mem_ctx = state;
8090 status = state->dispatch_recv(subreq, mem_ctx);
8091 TALLOC_FREE(subreq);
8092 if (!NT_STATUS_IS_OK(status)) {
8093 tevent_req_nterror(req, status);
8094 return;
8097 /* Copy out parameters */
8099 /* Copy result */
8100 state->orig.out.result = state->tmp.out.result;
8102 /* Reset temporary structure */
8103 ZERO_STRUCT(state->tmp);
8105 tevent_req_done(req);
8108 NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req,
8109 TALLOC_CTX *mem_ctx,
8110 WERROR *result)
8112 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8113 req, struct rpccli_PNP_RunDetection_state);
8114 NTSTATUS status;
8116 if (tevent_req_is_nterror(req, &status)) {
8117 tevent_req_received(req);
8118 return status;
8121 /* Steal possbile out parameters to the callers context */
8122 talloc_steal(mem_ctx, state->out_mem_ctx);
8124 /* Return result */
8125 *result = state->orig.out.result;
8127 tevent_req_received(req);
8128 return NT_STATUS_OK;
8131 NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
8132 TALLOC_CTX *mem_ctx,
8133 WERROR *werror)
8135 struct PNP_RunDetection r;
8136 NTSTATUS status;
8138 /* In parameters */
8140 status = cli->dispatch(cli,
8141 mem_ctx,
8142 &ndr_table_ntsvcs,
8143 NDR_PNP_RUNDETECTION,
8144 &r);
8146 if (!NT_STATUS_IS_OK(status)) {
8147 return status;
8150 if (NT_STATUS_IS_ERR(status)) {
8151 return status;
8154 /* Return variables */
8156 /* Return result */
8157 if (werror) {
8158 *werror = r.out.result;
8161 return werror_to_ntstatus(r.out.result);
8164 struct rpccli_PNP_RegisterNotification_state {
8165 struct PNP_RegisterNotification orig;
8166 struct PNP_RegisterNotification tmp;
8167 TALLOC_CTX *out_mem_ctx;
8168 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8171 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq);
8173 struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx,
8174 struct tevent_context *ev,
8175 struct rpc_pipe_client *cli)
8177 struct tevent_req *req;
8178 struct rpccli_PNP_RegisterNotification_state *state;
8179 struct tevent_req *subreq;
8181 req = tevent_req_create(mem_ctx, &state,
8182 struct rpccli_PNP_RegisterNotification_state);
8183 if (req == NULL) {
8184 return NULL;
8186 state->out_mem_ctx = NULL;
8187 state->dispatch_recv = cli->dispatch_recv;
8189 /* In parameters */
8191 /* Out parameters */
8193 /* Result */
8194 ZERO_STRUCT(state->orig.out.result);
8196 /* make a temporary copy, that we pass to the dispatch function */
8197 state->tmp = state->orig;
8199 subreq = cli->dispatch_send(state, ev, cli,
8200 &ndr_table_ntsvcs,
8201 NDR_PNP_REGISTERNOTIFICATION,
8202 &state->tmp);
8203 if (tevent_req_nomem(subreq, req)) {
8204 return tevent_req_post(req, ev);
8206 tevent_req_set_callback(subreq, rpccli_PNP_RegisterNotification_done, req);
8207 return req;
8210 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq)
8212 struct tevent_req *req = tevent_req_callback_data(
8213 subreq, struct tevent_req);
8214 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8215 req, struct rpccli_PNP_RegisterNotification_state);
8216 NTSTATUS status;
8217 TALLOC_CTX *mem_ctx;
8219 if (state->out_mem_ctx) {
8220 mem_ctx = state->out_mem_ctx;
8221 } else {
8222 mem_ctx = state;
8225 status = state->dispatch_recv(subreq, mem_ctx);
8226 TALLOC_FREE(subreq);
8227 if (!NT_STATUS_IS_OK(status)) {
8228 tevent_req_nterror(req, status);
8229 return;
8232 /* Copy out parameters */
8234 /* Copy result */
8235 state->orig.out.result = state->tmp.out.result;
8237 /* Reset temporary structure */
8238 ZERO_STRUCT(state->tmp);
8240 tevent_req_done(req);
8243 NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req,
8244 TALLOC_CTX *mem_ctx,
8245 WERROR *result)
8247 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8248 req, struct rpccli_PNP_RegisterNotification_state);
8249 NTSTATUS status;
8251 if (tevent_req_is_nterror(req, &status)) {
8252 tevent_req_received(req);
8253 return status;
8256 /* Steal possbile out parameters to the callers context */
8257 talloc_steal(mem_ctx, state->out_mem_ctx);
8259 /* Return result */
8260 *result = state->orig.out.result;
8262 tevent_req_received(req);
8263 return NT_STATUS_OK;
8266 NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
8267 TALLOC_CTX *mem_ctx,
8268 WERROR *werror)
8270 struct PNP_RegisterNotification r;
8271 NTSTATUS status;
8273 /* In parameters */
8275 status = cli->dispatch(cli,
8276 mem_ctx,
8277 &ndr_table_ntsvcs,
8278 NDR_PNP_REGISTERNOTIFICATION,
8279 &r);
8281 if (!NT_STATUS_IS_OK(status)) {
8282 return status;
8285 if (NT_STATUS_IS_ERR(status)) {
8286 return status;
8289 /* Return variables */
8291 /* Return result */
8292 if (werror) {
8293 *werror = r.out.result;
8296 return werror_to_ntstatus(r.out.result);
8299 struct rpccli_PNP_UnregisterNotification_state {
8300 struct PNP_UnregisterNotification orig;
8301 struct PNP_UnregisterNotification tmp;
8302 TALLOC_CTX *out_mem_ctx;
8303 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8306 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq);
8308 struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx,
8309 struct tevent_context *ev,
8310 struct rpc_pipe_client *cli)
8312 struct tevent_req *req;
8313 struct rpccli_PNP_UnregisterNotification_state *state;
8314 struct tevent_req *subreq;
8316 req = tevent_req_create(mem_ctx, &state,
8317 struct rpccli_PNP_UnregisterNotification_state);
8318 if (req == NULL) {
8319 return NULL;
8321 state->out_mem_ctx = NULL;
8322 state->dispatch_recv = cli->dispatch_recv;
8324 /* In parameters */
8326 /* Out parameters */
8328 /* Result */
8329 ZERO_STRUCT(state->orig.out.result);
8331 /* make a temporary copy, that we pass to the dispatch function */
8332 state->tmp = state->orig;
8334 subreq = cli->dispatch_send(state, ev, cli,
8335 &ndr_table_ntsvcs,
8336 NDR_PNP_UNREGISTERNOTIFICATION,
8337 &state->tmp);
8338 if (tevent_req_nomem(subreq, req)) {
8339 return tevent_req_post(req, ev);
8341 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterNotification_done, req);
8342 return req;
8345 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq)
8347 struct tevent_req *req = tevent_req_callback_data(
8348 subreq, struct tevent_req);
8349 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8350 req, struct rpccli_PNP_UnregisterNotification_state);
8351 NTSTATUS status;
8352 TALLOC_CTX *mem_ctx;
8354 if (state->out_mem_ctx) {
8355 mem_ctx = state->out_mem_ctx;
8356 } else {
8357 mem_ctx = state;
8360 status = state->dispatch_recv(subreq, mem_ctx);
8361 TALLOC_FREE(subreq);
8362 if (!NT_STATUS_IS_OK(status)) {
8363 tevent_req_nterror(req, status);
8364 return;
8367 /* Copy out parameters */
8369 /* Copy result */
8370 state->orig.out.result = state->tmp.out.result;
8372 /* Reset temporary structure */
8373 ZERO_STRUCT(state->tmp);
8375 tevent_req_done(req);
8378 NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req,
8379 TALLOC_CTX *mem_ctx,
8380 WERROR *result)
8382 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8383 req, struct rpccli_PNP_UnregisterNotification_state);
8384 NTSTATUS status;
8386 if (tevent_req_is_nterror(req, &status)) {
8387 tevent_req_received(req);
8388 return status;
8391 /* Steal possbile out parameters to the callers context */
8392 talloc_steal(mem_ctx, state->out_mem_ctx);
8394 /* Return result */
8395 *result = state->orig.out.result;
8397 tevent_req_received(req);
8398 return NT_STATUS_OK;
8401 NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
8402 TALLOC_CTX *mem_ctx,
8403 WERROR *werror)
8405 struct PNP_UnregisterNotification r;
8406 NTSTATUS status;
8408 /* In parameters */
8410 status = cli->dispatch(cli,
8411 mem_ctx,
8412 &ndr_table_ntsvcs,
8413 NDR_PNP_UNREGISTERNOTIFICATION,
8414 &r);
8416 if (!NT_STATUS_IS_OK(status)) {
8417 return status;
8420 if (NT_STATUS_IS_ERR(status)) {
8421 return status;
8424 /* Return variables */
8426 /* Return result */
8427 if (werror) {
8428 *werror = r.out.result;
8431 return werror_to_ntstatus(r.out.result);
8434 struct rpccli_PNP_GetCustomDevProp_state {
8435 struct PNP_GetCustomDevProp orig;
8436 struct PNP_GetCustomDevProp tmp;
8437 TALLOC_CTX *out_mem_ctx;
8438 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8441 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq);
8443 struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx,
8444 struct tevent_context *ev,
8445 struct rpc_pipe_client *cli)
8447 struct tevent_req *req;
8448 struct rpccli_PNP_GetCustomDevProp_state *state;
8449 struct tevent_req *subreq;
8451 req = tevent_req_create(mem_ctx, &state,
8452 struct rpccli_PNP_GetCustomDevProp_state);
8453 if (req == NULL) {
8454 return NULL;
8456 state->out_mem_ctx = NULL;
8457 state->dispatch_recv = cli->dispatch_recv;
8459 /* In parameters */
8461 /* Out parameters */
8463 /* Result */
8464 ZERO_STRUCT(state->orig.out.result);
8466 /* make a temporary copy, that we pass to the dispatch function */
8467 state->tmp = state->orig;
8469 subreq = cli->dispatch_send(state, ev, cli,
8470 &ndr_table_ntsvcs,
8471 NDR_PNP_GETCUSTOMDEVPROP,
8472 &state->tmp);
8473 if (tevent_req_nomem(subreq, req)) {
8474 return tevent_req_post(req, ev);
8476 tevent_req_set_callback(subreq, rpccli_PNP_GetCustomDevProp_done, req);
8477 return req;
8480 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq)
8482 struct tevent_req *req = tevent_req_callback_data(
8483 subreq, struct tevent_req);
8484 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8485 req, struct rpccli_PNP_GetCustomDevProp_state);
8486 NTSTATUS status;
8487 TALLOC_CTX *mem_ctx;
8489 if (state->out_mem_ctx) {
8490 mem_ctx = state->out_mem_ctx;
8491 } else {
8492 mem_ctx = state;
8495 status = state->dispatch_recv(subreq, mem_ctx);
8496 TALLOC_FREE(subreq);
8497 if (!NT_STATUS_IS_OK(status)) {
8498 tevent_req_nterror(req, status);
8499 return;
8502 /* Copy out parameters */
8504 /* Copy result */
8505 state->orig.out.result = state->tmp.out.result;
8507 /* Reset temporary structure */
8508 ZERO_STRUCT(state->tmp);
8510 tevent_req_done(req);
8513 NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req,
8514 TALLOC_CTX *mem_ctx,
8515 WERROR *result)
8517 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8518 req, struct rpccli_PNP_GetCustomDevProp_state);
8519 NTSTATUS status;
8521 if (tevent_req_is_nterror(req, &status)) {
8522 tevent_req_received(req);
8523 return status;
8526 /* Steal possbile out parameters to the callers context */
8527 talloc_steal(mem_ctx, state->out_mem_ctx);
8529 /* Return result */
8530 *result = state->orig.out.result;
8532 tevent_req_received(req);
8533 return NT_STATUS_OK;
8536 NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
8537 TALLOC_CTX *mem_ctx,
8538 WERROR *werror)
8540 struct PNP_GetCustomDevProp r;
8541 NTSTATUS status;
8543 /* In parameters */
8545 status = cli->dispatch(cli,
8546 mem_ctx,
8547 &ndr_table_ntsvcs,
8548 NDR_PNP_GETCUSTOMDEVPROP,
8549 &r);
8551 if (!NT_STATUS_IS_OK(status)) {
8552 return status;
8555 if (NT_STATUS_IS_ERR(status)) {
8556 return status;
8559 /* Return variables */
8561 /* Return result */
8562 if (werror) {
8563 *werror = r.out.result;
8566 return werror_to_ntstatus(r.out.result);
8569 struct rpccli_PNP_GetVersionInternal_state {
8570 struct PNP_GetVersionInternal orig;
8571 struct PNP_GetVersionInternal tmp;
8572 TALLOC_CTX *out_mem_ctx;
8573 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8576 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq);
8578 struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx,
8579 struct tevent_context *ev,
8580 struct rpc_pipe_client *cli)
8582 struct tevent_req *req;
8583 struct rpccli_PNP_GetVersionInternal_state *state;
8584 struct tevent_req *subreq;
8586 req = tevent_req_create(mem_ctx, &state,
8587 struct rpccli_PNP_GetVersionInternal_state);
8588 if (req == NULL) {
8589 return NULL;
8591 state->out_mem_ctx = NULL;
8592 state->dispatch_recv = cli->dispatch_recv;
8594 /* In parameters */
8596 /* Out parameters */
8598 /* Result */
8599 ZERO_STRUCT(state->orig.out.result);
8601 /* make a temporary copy, that we pass to the dispatch function */
8602 state->tmp = state->orig;
8604 subreq = cli->dispatch_send(state, ev, cli,
8605 &ndr_table_ntsvcs,
8606 NDR_PNP_GETVERSIONINTERNAL,
8607 &state->tmp);
8608 if (tevent_req_nomem(subreq, req)) {
8609 return tevent_req_post(req, ev);
8611 tevent_req_set_callback(subreq, rpccli_PNP_GetVersionInternal_done, req);
8612 return req;
8615 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq)
8617 struct tevent_req *req = tevent_req_callback_data(
8618 subreq, struct tevent_req);
8619 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8620 req, struct rpccli_PNP_GetVersionInternal_state);
8621 NTSTATUS status;
8622 TALLOC_CTX *mem_ctx;
8624 if (state->out_mem_ctx) {
8625 mem_ctx = state->out_mem_ctx;
8626 } else {
8627 mem_ctx = state;
8630 status = state->dispatch_recv(subreq, mem_ctx);
8631 TALLOC_FREE(subreq);
8632 if (!NT_STATUS_IS_OK(status)) {
8633 tevent_req_nterror(req, status);
8634 return;
8637 /* Copy out parameters */
8639 /* Copy result */
8640 state->orig.out.result = state->tmp.out.result;
8642 /* Reset temporary structure */
8643 ZERO_STRUCT(state->tmp);
8645 tevent_req_done(req);
8648 NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req,
8649 TALLOC_CTX *mem_ctx,
8650 WERROR *result)
8652 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8653 req, struct rpccli_PNP_GetVersionInternal_state);
8654 NTSTATUS status;
8656 if (tevent_req_is_nterror(req, &status)) {
8657 tevent_req_received(req);
8658 return status;
8661 /* Steal possbile out parameters to the callers context */
8662 talloc_steal(mem_ctx, state->out_mem_ctx);
8664 /* Return result */
8665 *result = state->orig.out.result;
8667 tevent_req_received(req);
8668 return NT_STATUS_OK;
8671 NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
8672 TALLOC_CTX *mem_ctx,
8673 WERROR *werror)
8675 struct PNP_GetVersionInternal r;
8676 NTSTATUS status;
8678 /* In parameters */
8680 status = cli->dispatch(cli,
8681 mem_ctx,
8682 &ndr_table_ntsvcs,
8683 NDR_PNP_GETVERSIONINTERNAL,
8684 &r);
8686 if (!NT_STATUS_IS_OK(status)) {
8687 return status;
8690 if (NT_STATUS_IS_ERR(status)) {
8691 return status;
8694 /* Return variables */
8696 /* Return result */
8697 if (werror) {
8698 *werror = r.out.result;
8701 return werror_to_ntstatus(r.out.result);
8704 struct rpccli_PNP_GetBlockedDriverInfo_state {
8705 struct PNP_GetBlockedDriverInfo orig;
8706 struct PNP_GetBlockedDriverInfo tmp;
8707 TALLOC_CTX *out_mem_ctx;
8708 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8711 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq);
8713 struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx,
8714 struct tevent_context *ev,
8715 struct rpc_pipe_client *cli)
8717 struct tevent_req *req;
8718 struct rpccli_PNP_GetBlockedDriverInfo_state *state;
8719 struct tevent_req *subreq;
8721 req = tevent_req_create(mem_ctx, &state,
8722 struct rpccli_PNP_GetBlockedDriverInfo_state);
8723 if (req == NULL) {
8724 return NULL;
8726 state->out_mem_ctx = NULL;
8727 state->dispatch_recv = cli->dispatch_recv;
8729 /* In parameters */
8731 /* Out parameters */
8733 /* Result */
8734 ZERO_STRUCT(state->orig.out.result);
8736 /* make a temporary copy, that we pass to the dispatch function */
8737 state->tmp = state->orig;
8739 subreq = cli->dispatch_send(state, ev, cli,
8740 &ndr_table_ntsvcs,
8741 NDR_PNP_GETBLOCKEDDRIVERINFO,
8742 &state->tmp);
8743 if (tevent_req_nomem(subreq, req)) {
8744 return tevent_req_post(req, ev);
8746 tevent_req_set_callback(subreq, rpccli_PNP_GetBlockedDriverInfo_done, req);
8747 return req;
8750 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq)
8752 struct tevent_req *req = tevent_req_callback_data(
8753 subreq, struct tevent_req);
8754 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8755 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8756 NTSTATUS status;
8757 TALLOC_CTX *mem_ctx;
8759 if (state->out_mem_ctx) {
8760 mem_ctx = state->out_mem_ctx;
8761 } else {
8762 mem_ctx = state;
8765 status = state->dispatch_recv(subreq, mem_ctx);
8766 TALLOC_FREE(subreq);
8767 if (!NT_STATUS_IS_OK(status)) {
8768 tevent_req_nterror(req, status);
8769 return;
8772 /* Copy out parameters */
8774 /* Copy result */
8775 state->orig.out.result = state->tmp.out.result;
8777 /* Reset temporary structure */
8778 ZERO_STRUCT(state->tmp);
8780 tevent_req_done(req);
8783 NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req,
8784 TALLOC_CTX *mem_ctx,
8785 WERROR *result)
8787 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8788 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8789 NTSTATUS status;
8791 if (tevent_req_is_nterror(req, &status)) {
8792 tevent_req_received(req);
8793 return status;
8796 /* Steal possbile out parameters to the callers context */
8797 talloc_steal(mem_ctx, state->out_mem_ctx);
8799 /* Return result */
8800 *result = state->orig.out.result;
8802 tevent_req_received(req);
8803 return NT_STATUS_OK;
8806 NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
8807 TALLOC_CTX *mem_ctx,
8808 WERROR *werror)
8810 struct PNP_GetBlockedDriverInfo r;
8811 NTSTATUS status;
8813 /* In parameters */
8815 status = cli->dispatch(cli,
8816 mem_ctx,
8817 &ndr_table_ntsvcs,
8818 NDR_PNP_GETBLOCKEDDRIVERINFO,
8819 &r);
8821 if (!NT_STATUS_IS_OK(status)) {
8822 return status;
8825 if (NT_STATUS_IS_ERR(status)) {
8826 return status;
8829 /* Return variables */
8831 /* Return result */
8832 if (werror) {
8833 *werror = r.out.result;
8836 return werror_to_ntstatus(r.out.result);
8839 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state {
8840 struct PNP_GetServerSideDeviceInstallFlags orig;
8841 struct PNP_GetServerSideDeviceInstallFlags tmp;
8842 TALLOC_CTX *out_mem_ctx;
8843 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8846 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq);
8848 struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx,
8849 struct tevent_context *ev,
8850 struct rpc_pipe_client *cli)
8852 struct tevent_req *req;
8853 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state;
8854 struct tevent_req *subreq;
8856 req = tevent_req_create(mem_ctx, &state,
8857 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8858 if (req == NULL) {
8859 return NULL;
8861 state->out_mem_ctx = NULL;
8862 state->dispatch_recv = cli->dispatch_recv;
8864 /* In parameters */
8866 /* Out parameters */
8868 /* Result */
8869 ZERO_STRUCT(state->orig.out.result);
8871 /* make a temporary copy, that we pass to the dispatch function */
8872 state->tmp = state->orig;
8874 subreq = cli->dispatch_send(state, ev, cli,
8875 &ndr_table_ntsvcs,
8876 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8877 &state->tmp);
8878 if (tevent_req_nomem(subreq, req)) {
8879 return tevent_req_post(req, ev);
8881 tevent_req_set_callback(subreq, rpccli_PNP_GetServerSideDeviceInstallFlags_done, req);
8882 return req;
8885 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq)
8887 struct tevent_req *req = tevent_req_callback_data(
8888 subreq, struct tevent_req);
8889 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8890 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8891 NTSTATUS status;
8892 TALLOC_CTX *mem_ctx;
8894 if (state->out_mem_ctx) {
8895 mem_ctx = state->out_mem_ctx;
8896 } else {
8897 mem_ctx = state;
8900 status = state->dispatch_recv(subreq, mem_ctx);
8901 TALLOC_FREE(subreq);
8902 if (!NT_STATUS_IS_OK(status)) {
8903 tevent_req_nterror(req, status);
8904 return;
8907 /* Copy out parameters */
8909 /* Copy result */
8910 state->orig.out.result = state->tmp.out.result;
8912 /* Reset temporary structure */
8913 ZERO_STRUCT(state->tmp);
8915 tevent_req_done(req);
8918 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req,
8919 TALLOC_CTX *mem_ctx,
8920 WERROR *result)
8922 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8923 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8924 NTSTATUS status;
8926 if (tevent_req_is_nterror(req, &status)) {
8927 tevent_req_received(req);
8928 return status;
8931 /* Steal possbile out parameters to the callers context */
8932 talloc_steal(mem_ctx, state->out_mem_ctx);
8934 /* Return result */
8935 *result = state->orig.out.result;
8937 tevent_req_received(req);
8938 return NT_STATUS_OK;
8941 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
8942 TALLOC_CTX *mem_ctx,
8943 WERROR *werror)
8945 struct PNP_GetServerSideDeviceInstallFlags r;
8946 NTSTATUS status;
8948 /* In parameters */
8950 status = cli->dispatch(cli,
8951 mem_ctx,
8952 &ndr_table_ntsvcs,
8953 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8954 &r);
8956 if (!NT_STATUS_IS_OK(status)) {
8957 return status;
8960 if (NT_STATUS_IS_ERR(status)) {
8961 return status;
8964 /* Return variables */
8966 /* Return result */
8967 if (werror) {
8968 *werror = r.out.result;
8971 return werror_to_ntstatus(r.out.result);