s3: Fix bug 8042: File creation on OS/X
[Samba.git] / librpc / gen_ndr / cli_ntsvcs.c
blobe3e941a82dbaaeeda1ff5d5ff6c6e61fba634db9
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 if ((*state->tmp.out.length) > (*state->tmp.in.length)) {
1463 tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
1464 return;
1466 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.length) * sizeof(*state->orig.out.buffer));
1467 *state->orig.out.length = *state->tmp.out.length;
1469 /* Copy result */
1470 state->orig.out.result = state->tmp.out.result;
1472 /* Reset temporary structure */
1473 ZERO_STRUCT(state->tmp);
1475 tevent_req_done(req);
1478 NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req,
1479 TALLOC_CTX *mem_ctx,
1480 WERROR *result)
1482 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1483 req, struct rpccli_PNP_GetDeviceList_state);
1484 NTSTATUS status;
1486 if (tevent_req_is_nterror(req, &status)) {
1487 tevent_req_received(req);
1488 return status;
1491 /* Steal possbile out parameters to the callers context */
1492 talloc_steal(mem_ctx, state->out_mem_ctx);
1494 /* Return result */
1495 *result = state->orig.out.result;
1497 tevent_req_received(req);
1498 return NT_STATUS_OK;
1501 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
1502 TALLOC_CTX *mem_ctx,
1503 const char *filter /* [in] [unique,charset(UTF16)] */,
1504 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1505 uint32_t *length /* [in,out] [ref] */,
1506 uint32_t flags /* [in] */,
1507 WERROR *werror)
1509 struct PNP_GetDeviceList r;
1510 NTSTATUS status;
1512 /* In parameters */
1513 r.in.filter = filter;
1514 r.in.length = length;
1515 r.in.flags = flags;
1517 status = cli->dispatch(cli,
1518 mem_ctx,
1519 &ndr_table_ntsvcs,
1520 NDR_PNP_GETDEVICELIST,
1521 &r);
1523 if (!NT_STATUS_IS_OK(status)) {
1524 return status;
1527 if (NT_STATUS_IS_ERR(status)) {
1528 return status;
1531 /* Return variables */
1532 if ((*r.out.length) > (*r.in.length)) {
1533 return NT_STATUS_INVALID_NETWORK_RESPONSE;
1535 memcpy(buffer, r.out.buffer, (*r.out.length) * sizeof(*buffer));
1536 *length = *r.out.length;
1538 /* Return result */
1539 if (werror) {
1540 *werror = r.out.result;
1543 return werror_to_ntstatus(r.out.result);
1546 struct rpccli_PNP_GetDeviceListSize_state {
1547 struct PNP_GetDeviceListSize orig;
1548 struct PNP_GetDeviceListSize tmp;
1549 TALLOC_CTX *out_mem_ctx;
1550 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1553 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq);
1555 struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx,
1556 struct tevent_context *ev,
1557 struct rpc_pipe_client *cli,
1558 const char *_devicename /* [in] [unique,charset(UTF16)] */,
1559 uint32_t *_size /* [out] [ref] */,
1560 uint32_t _flags /* [in] */)
1562 struct tevent_req *req;
1563 struct rpccli_PNP_GetDeviceListSize_state *state;
1564 struct tevent_req *subreq;
1566 req = tevent_req_create(mem_ctx, &state,
1567 struct rpccli_PNP_GetDeviceListSize_state);
1568 if (req == NULL) {
1569 return NULL;
1571 state->out_mem_ctx = NULL;
1572 state->dispatch_recv = cli->dispatch_recv;
1574 /* In parameters */
1575 state->orig.in.devicename = _devicename;
1576 state->orig.in.flags = _flags;
1578 /* Out parameters */
1579 state->orig.out.size = _size;
1581 /* Result */
1582 ZERO_STRUCT(state->orig.out.result);
1584 state->out_mem_ctx = talloc_named_const(state, 0,
1585 "rpccli_PNP_GetDeviceListSize_out_memory");
1586 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1587 return tevent_req_post(req, ev);
1590 /* make a temporary copy, that we pass to the dispatch function */
1591 state->tmp = state->orig;
1593 subreq = cli->dispatch_send(state, ev, cli,
1594 &ndr_table_ntsvcs,
1595 NDR_PNP_GETDEVICELISTSIZE,
1596 &state->tmp);
1597 if (tevent_req_nomem(subreq, req)) {
1598 return tevent_req_post(req, ev);
1600 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceListSize_done, req);
1601 return req;
1604 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq)
1606 struct tevent_req *req = tevent_req_callback_data(
1607 subreq, struct tevent_req);
1608 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1609 req, struct rpccli_PNP_GetDeviceListSize_state);
1610 NTSTATUS status;
1611 TALLOC_CTX *mem_ctx;
1613 if (state->out_mem_ctx) {
1614 mem_ctx = state->out_mem_ctx;
1615 } else {
1616 mem_ctx = state;
1619 status = state->dispatch_recv(subreq, mem_ctx);
1620 TALLOC_FREE(subreq);
1621 if (!NT_STATUS_IS_OK(status)) {
1622 tevent_req_nterror(req, status);
1623 return;
1626 /* Copy out parameters */
1627 *state->orig.out.size = *state->tmp.out.size;
1629 /* Copy result */
1630 state->orig.out.result = state->tmp.out.result;
1632 /* Reset temporary structure */
1633 ZERO_STRUCT(state->tmp);
1635 tevent_req_done(req);
1638 NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req,
1639 TALLOC_CTX *mem_ctx,
1640 WERROR *result)
1642 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1643 req, struct rpccli_PNP_GetDeviceListSize_state);
1644 NTSTATUS status;
1646 if (tevent_req_is_nterror(req, &status)) {
1647 tevent_req_received(req);
1648 return status;
1651 /* Steal possbile out parameters to the callers context */
1652 talloc_steal(mem_ctx, state->out_mem_ctx);
1654 /* Return result */
1655 *result = state->orig.out.result;
1657 tevent_req_received(req);
1658 return NT_STATUS_OK;
1661 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
1662 TALLOC_CTX *mem_ctx,
1663 const char *devicename /* [in] [unique,charset(UTF16)] */,
1664 uint32_t *size /* [out] [ref] */,
1665 uint32_t flags /* [in] */,
1666 WERROR *werror)
1668 struct PNP_GetDeviceListSize r;
1669 NTSTATUS status;
1671 /* In parameters */
1672 r.in.devicename = devicename;
1673 r.in.flags = flags;
1675 status = cli->dispatch(cli,
1676 mem_ctx,
1677 &ndr_table_ntsvcs,
1678 NDR_PNP_GETDEVICELISTSIZE,
1679 &r);
1681 if (!NT_STATUS_IS_OK(status)) {
1682 return status;
1685 if (NT_STATUS_IS_ERR(status)) {
1686 return status;
1689 /* Return variables */
1690 *size = *r.out.size;
1692 /* Return result */
1693 if (werror) {
1694 *werror = r.out.result;
1697 return werror_to_ntstatus(r.out.result);
1700 struct rpccli_PNP_GetDepth_state {
1701 struct PNP_GetDepth orig;
1702 struct PNP_GetDepth tmp;
1703 TALLOC_CTX *out_mem_ctx;
1704 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1707 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq);
1709 struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx,
1710 struct tevent_context *ev,
1711 struct rpc_pipe_client *cli)
1713 struct tevent_req *req;
1714 struct rpccli_PNP_GetDepth_state *state;
1715 struct tevent_req *subreq;
1717 req = tevent_req_create(mem_ctx, &state,
1718 struct rpccli_PNP_GetDepth_state);
1719 if (req == NULL) {
1720 return NULL;
1722 state->out_mem_ctx = NULL;
1723 state->dispatch_recv = cli->dispatch_recv;
1725 /* In parameters */
1727 /* Out parameters */
1729 /* Result */
1730 ZERO_STRUCT(state->orig.out.result);
1732 /* make a temporary copy, that we pass to the dispatch function */
1733 state->tmp = state->orig;
1735 subreq = cli->dispatch_send(state, ev, cli,
1736 &ndr_table_ntsvcs,
1737 NDR_PNP_GETDEPTH,
1738 &state->tmp);
1739 if (tevent_req_nomem(subreq, req)) {
1740 return tevent_req_post(req, ev);
1742 tevent_req_set_callback(subreq, rpccli_PNP_GetDepth_done, req);
1743 return req;
1746 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq)
1748 struct tevent_req *req = tevent_req_callback_data(
1749 subreq, struct tevent_req);
1750 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1751 req, struct rpccli_PNP_GetDepth_state);
1752 NTSTATUS status;
1753 TALLOC_CTX *mem_ctx;
1755 if (state->out_mem_ctx) {
1756 mem_ctx = state->out_mem_ctx;
1757 } else {
1758 mem_ctx = state;
1761 status = state->dispatch_recv(subreq, mem_ctx);
1762 TALLOC_FREE(subreq);
1763 if (!NT_STATUS_IS_OK(status)) {
1764 tevent_req_nterror(req, status);
1765 return;
1768 /* Copy out parameters */
1770 /* Copy result */
1771 state->orig.out.result = state->tmp.out.result;
1773 /* Reset temporary structure */
1774 ZERO_STRUCT(state->tmp);
1776 tevent_req_done(req);
1779 NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req,
1780 TALLOC_CTX *mem_ctx,
1781 WERROR *result)
1783 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1784 req, struct rpccli_PNP_GetDepth_state);
1785 NTSTATUS status;
1787 if (tevent_req_is_nterror(req, &status)) {
1788 tevent_req_received(req);
1789 return status;
1792 /* Steal possbile out parameters to the callers context */
1793 talloc_steal(mem_ctx, state->out_mem_ctx);
1795 /* Return result */
1796 *result = state->orig.out.result;
1798 tevent_req_received(req);
1799 return NT_STATUS_OK;
1802 NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
1803 TALLOC_CTX *mem_ctx,
1804 WERROR *werror)
1806 struct PNP_GetDepth r;
1807 NTSTATUS status;
1809 /* In parameters */
1811 status = cli->dispatch(cli,
1812 mem_ctx,
1813 &ndr_table_ntsvcs,
1814 NDR_PNP_GETDEPTH,
1815 &r);
1817 if (!NT_STATUS_IS_OK(status)) {
1818 return status;
1821 if (NT_STATUS_IS_ERR(status)) {
1822 return status;
1825 /* Return variables */
1827 /* Return result */
1828 if (werror) {
1829 *werror = r.out.result;
1832 return werror_to_ntstatus(r.out.result);
1835 struct rpccli_PNP_GetDeviceRegProp_state {
1836 struct PNP_GetDeviceRegProp orig;
1837 struct PNP_GetDeviceRegProp tmp;
1838 TALLOC_CTX *out_mem_ctx;
1839 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1842 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq);
1844 struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
1845 struct tevent_context *ev,
1846 struct rpc_pipe_client *cli,
1847 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
1848 uint32_t _property /* [in] */,
1849 enum winreg_Type *_reg_data_type /* [in,out] [ref] */,
1850 uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1851 uint32_t *_buffer_size /* [in,out] [ref] */,
1852 uint32_t *_needed /* [in,out] [ref] */,
1853 uint32_t _flags /* [in] */)
1855 struct tevent_req *req;
1856 struct rpccli_PNP_GetDeviceRegProp_state *state;
1857 struct tevent_req *subreq;
1859 req = tevent_req_create(mem_ctx, &state,
1860 struct rpccli_PNP_GetDeviceRegProp_state);
1861 if (req == NULL) {
1862 return NULL;
1864 state->out_mem_ctx = NULL;
1865 state->dispatch_recv = cli->dispatch_recv;
1867 /* In parameters */
1868 state->orig.in.devicepath = _devicepath;
1869 state->orig.in.property = _property;
1870 state->orig.in.reg_data_type = _reg_data_type;
1871 state->orig.in.buffer_size = _buffer_size;
1872 state->orig.in.needed = _needed;
1873 state->orig.in.flags = _flags;
1875 /* Out parameters */
1876 state->orig.out.reg_data_type = _reg_data_type;
1877 state->orig.out.buffer = _buffer;
1878 state->orig.out.buffer_size = _buffer_size;
1879 state->orig.out.needed = _needed;
1881 /* Result */
1882 ZERO_STRUCT(state->orig.out.result);
1884 state->out_mem_ctx = talloc_named_const(state, 0,
1885 "rpccli_PNP_GetDeviceRegProp_out_memory");
1886 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1887 return tevent_req_post(req, ev);
1890 /* make a temporary copy, that we pass to the dispatch function */
1891 state->tmp = state->orig;
1893 subreq = cli->dispatch_send(state, ev, cli,
1894 &ndr_table_ntsvcs,
1895 NDR_PNP_GETDEVICEREGPROP,
1896 &state->tmp);
1897 if (tevent_req_nomem(subreq, req)) {
1898 return tevent_req_post(req, ev);
1900 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceRegProp_done, req);
1901 return req;
1904 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq)
1906 struct tevent_req *req = tevent_req_callback_data(
1907 subreq, struct tevent_req);
1908 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1909 req, struct rpccli_PNP_GetDeviceRegProp_state);
1910 NTSTATUS status;
1911 TALLOC_CTX *mem_ctx;
1913 if (state->out_mem_ctx) {
1914 mem_ctx = state->out_mem_ctx;
1915 } else {
1916 mem_ctx = state;
1919 status = state->dispatch_recv(subreq, mem_ctx);
1920 TALLOC_FREE(subreq);
1921 if (!NT_STATUS_IS_OK(status)) {
1922 tevent_req_nterror(req, status);
1923 return;
1926 /* Copy out parameters */
1927 *state->orig.out.reg_data_type = *state->tmp.out.reg_data_type;
1928 if ((*state->tmp.out.buffer_size) > (*state->tmp.in.buffer_size)) {
1929 tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
1930 return;
1932 memcpy(state->orig.out.buffer, state->tmp.out.buffer, (*state->tmp.out.buffer_size) * sizeof(*state->orig.out.buffer));
1933 *state->orig.out.buffer_size = *state->tmp.out.buffer_size;
1934 *state->orig.out.needed = *state->tmp.out.needed;
1936 /* Copy result */
1937 state->orig.out.result = state->tmp.out.result;
1939 /* Reset temporary structure */
1940 ZERO_STRUCT(state->tmp);
1942 tevent_req_done(req);
1945 NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req,
1946 TALLOC_CTX *mem_ctx,
1947 WERROR *result)
1949 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
1950 req, struct rpccli_PNP_GetDeviceRegProp_state);
1951 NTSTATUS status;
1953 if (tevent_req_is_nterror(req, &status)) {
1954 tevent_req_received(req);
1955 return status;
1958 /* Steal possbile out parameters to the callers context */
1959 talloc_steal(mem_ctx, state->out_mem_ctx);
1961 /* Return result */
1962 *result = state->orig.out.result;
1964 tevent_req_received(req);
1965 return NT_STATUS_OK;
1968 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
1969 TALLOC_CTX *mem_ctx,
1970 const char *devicepath /* [in] [ref,charset(UTF16)] */,
1971 uint32_t property /* [in] */,
1972 enum winreg_Type *reg_data_type /* [in,out] [ref] */,
1973 uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1974 uint32_t *buffer_size /* [in,out] [ref] */,
1975 uint32_t *needed /* [in,out] [ref] */,
1976 uint32_t flags /* [in] */,
1977 WERROR *werror)
1979 struct PNP_GetDeviceRegProp r;
1980 NTSTATUS status;
1982 /* In parameters */
1983 r.in.devicepath = devicepath;
1984 r.in.property = property;
1985 r.in.reg_data_type = reg_data_type;
1986 r.in.buffer_size = buffer_size;
1987 r.in.needed = needed;
1988 r.in.flags = flags;
1990 status = cli->dispatch(cli,
1991 mem_ctx,
1992 &ndr_table_ntsvcs,
1993 NDR_PNP_GETDEVICEREGPROP,
1994 &r);
1996 if (!NT_STATUS_IS_OK(status)) {
1997 return status;
2000 if (NT_STATUS_IS_ERR(status)) {
2001 return status;
2004 /* Return variables */
2005 *reg_data_type = *r.out.reg_data_type;
2006 if ((*r.out.buffer_size) > (*r.in.buffer_size)) {
2007 return NT_STATUS_INVALID_NETWORK_RESPONSE;
2009 memcpy(buffer, r.out.buffer, (*r.out.buffer_size) * sizeof(*buffer));
2010 *buffer_size = *r.out.buffer_size;
2011 *needed = *r.out.needed;
2013 /* Return result */
2014 if (werror) {
2015 *werror = r.out.result;
2018 return werror_to_ntstatus(r.out.result);
2021 struct rpccli_PNP_SetDeviceRegProp_state {
2022 struct PNP_SetDeviceRegProp orig;
2023 struct PNP_SetDeviceRegProp tmp;
2024 TALLOC_CTX *out_mem_ctx;
2025 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2028 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq);
2030 struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
2031 struct tevent_context *ev,
2032 struct rpc_pipe_client *cli)
2034 struct tevent_req *req;
2035 struct rpccli_PNP_SetDeviceRegProp_state *state;
2036 struct tevent_req *subreq;
2038 req = tevent_req_create(mem_ctx, &state,
2039 struct rpccli_PNP_SetDeviceRegProp_state);
2040 if (req == NULL) {
2041 return NULL;
2043 state->out_mem_ctx = NULL;
2044 state->dispatch_recv = cli->dispatch_recv;
2046 /* In parameters */
2048 /* Out parameters */
2050 /* Result */
2051 ZERO_STRUCT(state->orig.out.result);
2053 /* make a temporary copy, that we pass to the dispatch function */
2054 state->tmp = state->orig;
2056 subreq = cli->dispatch_send(state, ev, cli,
2057 &ndr_table_ntsvcs,
2058 NDR_PNP_SETDEVICEREGPROP,
2059 &state->tmp);
2060 if (tevent_req_nomem(subreq, req)) {
2061 return tevent_req_post(req, ev);
2063 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceRegProp_done, req);
2064 return req;
2067 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq)
2069 struct tevent_req *req = tevent_req_callback_data(
2070 subreq, struct tevent_req);
2071 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2072 req, struct rpccli_PNP_SetDeviceRegProp_state);
2073 NTSTATUS status;
2074 TALLOC_CTX *mem_ctx;
2076 if (state->out_mem_ctx) {
2077 mem_ctx = state->out_mem_ctx;
2078 } else {
2079 mem_ctx = state;
2082 status = state->dispatch_recv(subreq, mem_ctx);
2083 TALLOC_FREE(subreq);
2084 if (!NT_STATUS_IS_OK(status)) {
2085 tevent_req_nterror(req, status);
2086 return;
2089 /* Copy out parameters */
2091 /* Copy result */
2092 state->orig.out.result = state->tmp.out.result;
2094 /* Reset temporary structure */
2095 ZERO_STRUCT(state->tmp);
2097 tevent_req_done(req);
2100 NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req,
2101 TALLOC_CTX *mem_ctx,
2102 WERROR *result)
2104 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2105 req, struct rpccli_PNP_SetDeviceRegProp_state);
2106 NTSTATUS status;
2108 if (tevent_req_is_nterror(req, &status)) {
2109 tevent_req_received(req);
2110 return status;
2113 /* Steal possbile out parameters to the callers context */
2114 talloc_steal(mem_ctx, state->out_mem_ctx);
2116 /* Return result */
2117 *result = state->orig.out.result;
2119 tevent_req_received(req);
2120 return NT_STATUS_OK;
2123 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
2124 TALLOC_CTX *mem_ctx,
2125 WERROR *werror)
2127 struct PNP_SetDeviceRegProp r;
2128 NTSTATUS status;
2130 /* In parameters */
2132 status = cli->dispatch(cli,
2133 mem_ctx,
2134 &ndr_table_ntsvcs,
2135 NDR_PNP_SETDEVICEREGPROP,
2136 &r);
2138 if (!NT_STATUS_IS_OK(status)) {
2139 return status;
2142 if (NT_STATUS_IS_ERR(status)) {
2143 return status;
2146 /* Return variables */
2148 /* Return result */
2149 if (werror) {
2150 *werror = r.out.result;
2153 return werror_to_ntstatus(r.out.result);
2156 struct rpccli_PNP_GetClassInstance_state {
2157 struct PNP_GetClassInstance orig;
2158 struct PNP_GetClassInstance tmp;
2159 TALLOC_CTX *out_mem_ctx;
2160 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2163 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq);
2165 struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx,
2166 struct tevent_context *ev,
2167 struct rpc_pipe_client *cli)
2169 struct tevent_req *req;
2170 struct rpccli_PNP_GetClassInstance_state *state;
2171 struct tevent_req *subreq;
2173 req = tevent_req_create(mem_ctx, &state,
2174 struct rpccli_PNP_GetClassInstance_state);
2175 if (req == NULL) {
2176 return NULL;
2178 state->out_mem_ctx = NULL;
2179 state->dispatch_recv = cli->dispatch_recv;
2181 /* In parameters */
2183 /* Out parameters */
2185 /* Result */
2186 ZERO_STRUCT(state->orig.out.result);
2188 /* make a temporary copy, that we pass to the dispatch function */
2189 state->tmp = state->orig;
2191 subreq = cli->dispatch_send(state, ev, cli,
2192 &ndr_table_ntsvcs,
2193 NDR_PNP_GETCLASSINSTANCE,
2194 &state->tmp);
2195 if (tevent_req_nomem(subreq, req)) {
2196 return tevent_req_post(req, ev);
2198 tevent_req_set_callback(subreq, rpccli_PNP_GetClassInstance_done, req);
2199 return req;
2202 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq)
2204 struct tevent_req *req = tevent_req_callback_data(
2205 subreq, struct tevent_req);
2206 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2207 req, struct rpccli_PNP_GetClassInstance_state);
2208 NTSTATUS status;
2209 TALLOC_CTX *mem_ctx;
2211 if (state->out_mem_ctx) {
2212 mem_ctx = state->out_mem_ctx;
2213 } else {
2214 mem_ctx = state;
2217 status = state->dispatch_recv(subreq, mem_ctx);
2218 TALLOC_FREE(subreq);
2219 if (!NT_STATUS_IS_OK(status)) {
2220 tevent_req_nterror(req, status);
2221 return;
2224 /* Copy out parameters */
2226 /* Copy result */
2227 state->orig.out.result = state->tmp.out.result;
2229 /* Reset temporary structure */
2230 ZERO_STRUCT(state->tmp);
2232 tevent_req_done(req);
2235 NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req,
2236 TALLOC_CTX *mem_ctx,
2237 WERROR *result)
2239 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2240 req, struct rpccli_PNP_GetClassInstance_state);
2241 NTSTATUS status;
2243 if (tevent_req_is_nterror(req, &status)) {
2244 tevent_req_received(req);
2245 return status;
2248 /* Steal possbile out parameters to the callers context */
2249 talloc_steal(mem_ctx, state->out_mem_ctx);
2251 /* Return result */
2252 *result = state->orig.out.result;
2254 tevent_req_received(req);
2255 return NT_STATUS_OK;
2258 NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
2259 TALLOC_CTX *mem_ctx,
2260 WERROR *werror)
2262 struct PNP_GetClassInstance r;
2263 NTSTATUS status;
2265 /* In parameters */
2267 status = cli->dispatch(cli,
2268 mem_ctx,
2269 &ndr_table_ntsvcs,
2270 NDR_PNP_GETCLASSINSTANCE,
2271 &r);
2273 if (!NT_STATUS_IS_OK(status)) {
2274 return status;
2277 if (NT_STATUS_IS_ERR(status)) {
2278 return status;
2281 /* Return variables */
2283 /* Return result */
2284 if (werror) {
2285 *werror = r.out.result;
2288 return werror_to_ntstatus(r.out.result);
2291 struct rpccli_PNP_CreateKey_state {
2292 struct PNP_CreateKey orig;
2293 struct PNP_CreateKey tmp;
2294 TALLOC_CTX *out_mem_ctx;
2295 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2298 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq);
2300 struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx,
2301 struct tevent_context *ev,
2302 struct rpc_pipe_client *cli)
2304 struct tevent_req *req;
2305 struct rpccli_PNP_CreateKey_state *state;
2306 struct tevent_req *subreq;
2308 req = tevent_req_create(mem_ctx, &state,
2309 struct rpccli_PNP_CreateKey_state);
2310 if (req == NULL) {
2311 return NULL;
2313 state->out_mem_ctx = NULL;
2314 state->dispatch_recv = cli->dispatch_recv;
2316 /* In parameters */
2318 /* Out parameters */
2320 /* Result */
2321 ZERO_STRUCT(state->orig.out.result);
2323 /* make a temporary copy, that we pass to the dispatch function */
2324 state->tmp = state->orig;
2326 subreq = cli->dispatch_send(state, ev, cli,
2327 &ndr_table_ntsvcs,
2328 NDR_PNP_CREATEKEY,
2329 &state->tmp);
2330 if (tevent_req_nomem(subreq, req)) {
2331 return tevent_req_post(req, ev);
2333 tevent_req_set_callback(subreq, rpccli_PNP_CreateKey_done, req);
2334 return req;
2337 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq)
2339 struct tevent_req *req = tevent_req_callback_data(
2340 subreq, struct tevent_req);
2341 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2342 req, struct rpccli_PNP_CreateKey_state);
2343 NTSTATUS status;
2344 TALLOC_CTX *mem_ctx;
2346 if (state->out_mem_ctx) {
2347 mem_ctx = state->out_mem_ctx;
2348 } else {
2349 mem_ctx = state;
2352 status = state->dispatch_recv(subreq, mem_ctx);
2353 TALLOC_FREE(subreq);
2354 if (!NT_STATUS_IS_OK(status)) {
2355 tevent_req_nterror(req, status);
2356 return;
2359 /* Copy out parameters */
2361 /* Copy result */
2362 state->orig.out.result = state->tmp.out.result;
2364 /* Reset temporary structure */
2365 ZERO_STRUCT(state->tmp);
2367 tevent_req_done(req);
2370 NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req,
2371 TALLOC_CTX *mem_ctx,
2372 WERROR *result)
2374 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2375 req, struct rpccli_PNP_CreateKey_state);
2376 NTSTATUS status;
2378 if (tevent_req_is_nterror(req, &status)) {
2379 tevent_req_received(req);
2380 return status;
2383 /* Steal possbile out parameters to the callers context */
2384 talloc_steal(mem_ctx, state->out_mem_ctx);
2386 /* Return result */
2387 *result = state->orig.out.result;
2389 tevent_req_received(req);
2390 return NT_STATUS_OK;
2393 NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
2394 TALLOC_CTX *mem_ctx,
2395 WERROR *werror)
2397 struct PNP_CreateKey r;
2398 NTSTATUS status;
2400 /* In parameters */
2402 status = cli->dispatch(cli,
2403 mem_ctx,
2404 &ndr_table_ntsvcs,
2405 NDR_PNP_CREATEKEY,
2406 &r);
2408 if (!NT_STATUS_IS_OK(status)) {
2409 return status;
2412 if (NT_STATUS_IS_ERR(status)) {
2413 return status;
2416 /* Return variables */
2418 /* Return result */
2419 if (werror) {
2420 *werror = r.out.result;
2423 return werror_to_ntstatus(r.out.result);
2426 struct rpccli_PNP_DeleteRegistryKey_state {
2427 struct PNP_DeleteRegistryKey orig;
2428 struct PNP_DeleteRegistryKey tmp;
2429 TALLOC_CTX *out_mem_ctx;
2430 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2433 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq);
2435 struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx,
2436 struct tevent_context *ev,
2437 struct rpc_pipe_client *cli)
2439 struct tevent_req *req;
2440 struct rpccli_PNP_DeleteRegistryKey_state *state;
2441 struct tevent_req *subreq;
2443 req = tevent_req_create(mem_ctx, &state,
2444 struct rpccli_PNP_DeleteRegistryKey_state);
2445 if (req == NULL) {
2446 return NULL;
2448 state->out_mem_ctx = NULL;
2449 state->dispatch_recv = cli->dispatch_recv;
2451 /* In parameters */
2453 /* Out parameters */
2455 /* Result */
2456 ZERO_STRUCT(state->orig.out.result);
2458 /* make a temporary copy, that we pass to the dispatch function */
2459 state->tmp = state->orig;
2461 subreq = cli->dispatch_send(state, ev, cli,
2462 &ndr_table_ntsvcs,
2463 NDR_PNP_DELETEREGISTRYKEY,
2464 &state->tmp);
2465 if (tevent_req_nomem(subreq, req)) {
2466 return tevent_req_post(req, ev);
2468 tevent_req_set_callback(subreq, rpccli_PNP_DeleteRegistryKey_done, req);
2469 return req;
2472 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq)
2474 struct tevent_req *req = tevent_req_callback_data(
2475 subreq, struct tevent_req);
2476 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2477 req, struct rpccli_PNP_DeleteRegistryKey_state);
2478 NTSTATUS status;
2479 TALLOC_CTX *mem_ctx;
2481 if (state->out_mem_ctx) {
2482 mem_ctx = state->out_mem_ctx;
2483 } else {
2484 mem_ctx = state;
2487 status = state->dispatch_recv(subreq, mem_ctx);
2488 TALLOC_FREE(subreq);
2489 if (!NT_STATUS_IS_OK(status)) {
2490 tevent_req_nterror(req, status);
2491 return;
2494 /* Copy out parameters */
2496 /* Copy result */
2497 state->orig.out.result = state->tmp.out.result;
2499 /* Reset temporary structure */
2500 ZERO_STRUCT(state->tmp);
2502 tevent_req_done(req);
2505 NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req,
2506 TALLOC_CTX *mem_ctx,
2507 WERROR *result)
2509 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2510 req, struct rpccli_PNP_DeleteRegistryKey_state);
2511 NTSTATUS status;
2513 if (tevent_req_is_nterror(req, &status)) {
2514 tevent_req_received(req);
2515 return status;
2518 /* Steal possbile out parameters to the callers context */
2519 talloc_steal(mem_ctx, state->out_mem_ctx);
2521 /* Return result */
2522 *result = state->orig.out.result;
2524 tevent_req_received(req);
2525 return NT_STATUS_OK;
2528 NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
2529 TALLOC_CTX *mem_ctx,
2530 WERROR *werror)
2532 struct PNP_DeleteRegistryKey r;
2533 NTSTATUS status;
2535 /* In parameters */
2537 status = cli->dispatch(cli,
2538 mem_ctx,
2539 &ndr_table_ntsvcs,
2540 NDR_PNP_DELETEREGISTRYKEY,
2541 &r);
2543 if (!NT_STATUS_IS_OK(status)) {
2544 return status;
2547 if (NT_STATUS_IS_ERR(status)) {
2548 return status;
2551 /* Return variables */
2553 /* Return result */
2554 if (werror) {
2555 *werror = r.out.result;
2558 return werror_to_ntstatus(r.out.result);
2561 struct rpccli_PNP_GetClassCount_state {
2562 struct PNP_GetClassCount orig;
2563 struct PNP_GetClassCount tmp;
2564 TALLOC_CTX *out_mem_ctx;
2565 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2568 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq);
2570 struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx,
2571 struct tevent_context *ev,
2572 struct rpc_pipe_client *cli)
2574 struct tevent_req *req;
2575 struct rpccli_PNP_GetClassCount_state *state;
2576 struct tevent_req *subreq;
2578 req = tevent_req_create(mem_ctx, &state,
2579 struct rpccli_PNP_GetClassCount_state);
2580 if (req == NULL) {
2581 return NULL;
2583 state->out_mem_ctx = NULL;
2584 state->dispatch_recv = cli->dispatch_recv;
2586 /* In parameters */
2588 /* Out parameters */
2590 /* Result */
2591 ZERO_STRUCT(state->orig.out.result);
2593 /* make a temporary copy, that we pass to the dispatch function */
2594 state->tmp = state->orig;
2596 subreq = cli->dispatch_send(state, ev, cli,
2597 &ndr_table_ntsvcs,
2598 NDR_PNP_GETCLASSCOUNT,
2599 &state->tmp);
2600 if (tevent_req_nomem(subreq, req)) {
2601 return tevent_req_post(req, ev);
2603 tevent_req_set_callback(subreq, rpccli_PNP_GetClassCount_done, req);
2604 return req;
2607 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq)
2609 struct tevent_req *req = tevent_req_callback_data(
2610 subreq, struct tevent_req);
2611 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2612 req, struct rpccli_PNP_GetClassCount_state);
2613 NTSTATUS status;
2614 TALLOC_CTX *mem_ctx;
2616 if (state->out_mem_ctx) {
2617 mem_ctx = state->out_mem_ctx;
2618 } else {
2619 mem_ctx = state;
2622 status = state->dispatch_recv(subreq, mem_ctx);
2623 TALLOC_FREE(subreq);
2624 if (!NT_STATUS_IS_OK(status)) {
2625 tevent_req_nterror(req, status);
2626 return;
2629 /* Copy out parameters */
2631 /* Copy result */
2632 state->orig.out.result = state->tmp.out.result;
2634 /* Reset temporary structure */
2635 ZERO_STRUCT(state->tmp);
2637 tevent_req_done(req);
2640 NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req,
2641 TALLOC_CTX *mem_ctx,
2642 WERROR *result)
2644 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2645 req, struct rpccli_PNP_GetClassCount_state);
2646 NTSTATUS status;
2648 if (tevent_req_is_nterror(req, &status)) {
2649 tevent_req_received(req);
2650 return status;
2653 /* Steal possbile out parameters to the callers context */
2654 talloc_steal(mem_ctx, state->out_mem_ctx);
2656 /* Return result */
2657 *result = state->orig.out.result;
2659 tevent_req_received(req);
2660 return NT_STATUS_OK;
2663 NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
2664 TALLOC_CTX *mem_ctx,
2665 WERROR *werror)
2667 struct PNP_GetClassCount r;
2668 NTSTATUS status;
2670 /* In parameters */
2672 status = cli->dispatch(cli,
2673 mem_ctx,
2674 &ndr_table_ntsvcs,
2675 NDR_PNP_GETCLASSCOUNT,
2676 &r);
2678 if (!NT_STATUS_IS_OK(status)) {
2679 return status;
2682 if (NT_STATUS_IS_ERR(status)) {
2683 return status;
2686 /* Return variables */
2688 /* Return result */
2689 if (werror) {
2690 *werror = r.out.result;
2693 return werror_to_ntstatus(r.out.result);
2696 struct rpccli_PNP_GetClassName_state {
2697 struct PNP_GetClassName orig;
2698 struct PNP_GetClassName tmp;
2699 TALLOC_CTX *out_mem_ctx;
2700 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2703 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq);
2705 struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx,
2706 struct tevent_context *ev,
2707 struct rpc_pipe_client *cli)
2709 struct tevent_req *req;
2710 struct rpccli_PNP_GetClassName_state *state;
2711 struct tevent_req *subreq;
2713 req = tevent_req_create(mem_ctx, &state,
2714 struct rpccli_PNP_GetClassName_state);
2715 if (req == NULL) {
2716 return NULL;
2718 state->out_mem_ctx = NULL;
2719 state->dispatch_recv = cli->dispatch_recv;
2721 /* In parameters */
2723 /* Out parameters */
2725 /* Result */
2726 ZERO_STRUCT(state->orig.out.result);
2728 /* make a temporary copy, that we pass to the dispatch function */
2729 state->tmp = state->orig;
2731 subreq = cli->dispatch_send(state, ev, cli,
2732 &ndr_table_ntsvcs,
2733 NDR_PNP_GETCLASSNAME,
2734 &state->tmp);
2735 if (tevent_req_nomem(subreq, req)) {
2736 return tevent_req_post(req, ev);
2738 tevent_req_set_callback(subreq, rpccli_PNP_GetClassName_done, req);
2739 return req;
2742 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq)
2744 struct tevent_req *req = tevent_req_callback_data(
2745 subreq, struct tevent_req);
2746 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2747 req, struct rpccli_PNP_GetClassName_state);
2748 NTSTATUS status;
2749 TALLOC_CTX *mem_ctx;
2751 if (state->out_mem_ctx) {
2752 mem_ctx = state->out_mem_ctx;
2753 } else {
2754 mem_ctx = state;
2757 status = state->dispatch_recv(subreq, mem_ctx);
2758 TALLOC_FREE(subreq);
2759 if (!NT_STATUS_IS_OK(status)) {
2760 tevent_req_nterror(req, status);
2761 return;
2764 /* Copy out parameters */
2766 /* Copy result */
2767 state->orig.out.result = state->tmp.out.result;
2769 /* Reset temporary structure */
2770 ZERO_STRUCT(state->tmp);
2772 tevent_req_done(req);
2775 NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req,
2776 TALLOC_CTX *mem_ctx,
2777 WERROR *result)
2779 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
2780 req, struct rpccli_PNP_GetClassName_state);
2781 NTSTATUS status;
2783 if (tevent_req_is_nterror(req, &status)) {
2784 tevent_req_received(req);
2785 return status;
2788 /* Steal possbile out parameters to the callers context */
2789 talloc_steal(mem_ctx, state->out_mem_ctx);
2791 /* Return result */
2792 *result = state->orig.out.result;
2794 tevent_req_received(req);
2795 return NT_STATUS_OK;
2798 NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
2799 TALLOC_CTX *mem_ctx,
2800 WERROR *werror)
2802 struct PNP_GetClassName r;
2803 NTSTATUS status;
2805 /* In parameters */
2807 status = cli->dispatch(cli,
2808 mem_ctx,
2809 &ndr_table_ntsvcs,
2810 NDR_PNP_GETCLASSNAME,
2811 &r);
2813 if (!NT_STATUS_IS_OK(status)) {
2814 return status;
2817 if (NT_STATUS_IS_ERR(status)) {
2818 return status;
2821 /* Return variables */
2823 /* Return result */
2824 if (werror) {
2825 *werror = r.out.result;
2828 return werror_to_ntstatus(r.out.result);
2831 struct rpccli_PNP_DeleteClassKey_state {
2832 struct PNP_DeleteClassKey orig;
2833 struct PNP_DeleteClassKey tmp;
2834 TALLOC_CTX *out_mem_ctx;
2835 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2838 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq);
2840 struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx,
2841 struct tevent_context *ev,
2842 struct rpc_pipe_client *cli)
2844 struct tevent_req *req;
2845 struct rpccli_PNP_DeleteClassKey_state *state;
2846 struct tevent_req *subreq;
2848 req = tevent_req_create(mem_ctx, &state,
2849 struct rpccli_PNP_DeleteClassKey_state);
2850 if (req == NULL) {
2851 return NULL;
2853 state->out_mem_ctx = NULL;
2854 state->dispatch_recv = cli->dispatch_recv;
2856 /* In parameters */
2858 /* Out parameters */
2860 /* Result */
2861 ZERO_STRUCT(state->orig.out.result);
2863 /* make a temporary copy, that we pass to the dispatch function */
2864 state->tmp = state->orig;
2866 subreq = cli->dispatch_send(state, ev, cli,
2867 &ndr_table_ntsvcs,
2868 NDR_PNP_DELETECLASSKEY,
2869 &state->tmp);
2870 if (tevent_req_nomem(subreq, req)) {
2871 return tevent_req_post(req, ev);
2873 tevent_req_set_callback(subreq, rpccli_PNP_DeleteClassKey_done, req);
2874 return req;
2877 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq)
2879 struct tevent_req *req = tevent_req_callback_data(
2880 subreq, struct tevent_req);
2881 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2882 req, struct rpccli_PNP_DeleteClassKey_state);
2883 NTSTATUS status;
2884 TALLOC_CTX *mem_ctx;
2886 if (state->out_mem_ctx) {
2887 mem_ctx = state->out_mem_ctx;
2888 } else {
2889 mem_ctx = state;
2892 status = state->dispatch_recv(subreq, mem_ctx);
2893 TALLOC_FREE(subreq);
2894 if (!NT_STATUS_IS_OK(status)) {
2895 tevent_req_nterror(req, status);
2896 return;
2899 /* Copy out parameters */
2901 /* Copy result */
2902 state->orig.out.result = state->tmp.out.result;
2904 /* Reset temporary structure */
2905 ZERO_STRUCT(state->tmp);
2907 tevent_req_done(req);
2910 NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req,
2911 TALLOC_CTX *mem_ctx,
2912 WERROR *result)
2914 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
2915 req, struct rpccli_PNP_DeleteClassKey_state);
2916 NTSTATUS status;
2918 if (tevent_req_is_nterror(req, &status)) {
2919 tevent_req_received(req);
2920 return status;
2923 /* Steal possbile out parameters to the callers context */
2924 talloc_steal(mem_ctx, state->out_mem_ctx);
2926 /* Return result */
2927 *result = state->orig.out.result;
2929 tevent_req_received(req);
2930 return NT_STATUS_OK;
2933 NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
2934 TALLOC_CTX *mem_ctx,
2935 WERROR *werror)
2937 struct PNP_DeleteClassKey r;
2938 NTSTATUS status;
2940 /* In parameters */
2942 status = cli->dispatch(cli,
2943 mem_ctx,
2944 &ndr_table_ntsvcs,
2945 NDR_PNP_DELETECLASSKEY,
2946 &r);
2948 if (!NT_STATUS_IS_OK(status)) {
2949 return status;
2952 if (NT_STATUS_IS_ERR(status)) {
2953 return status;
2956 /* Return variables */
2958 /* Return result */
2959 if (werror) {
2960 *werror = r.out.result;
2963 return werror_to_ntstatus(r.out.result);
2966 struct rpccli_PNP_GetInterfaceDeviceAlias_state {
2967 struct PNP_GetInterfaceDeviceAlias orig;
2968 struct PNP_GetInterfaceDeviceAlias tmp;
2969 TALLOC_CTX *out_mem_ctx;
2970 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2973 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq);
2975 struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx,
2976 struct tevent_context *ev,
2977 struct rpc_pipe_client *cli)
2979 struct tevent_req *req;
2980 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state;
2981 struct tevent_req *subreq;
2983 req = tevent_req_create(mem_ctx, &state,
2984 struct rpccli_PNP_GetInterfaceDeviceAlias_state);
2985 if (req == NULL) {
2986 return NULL;
2988 state->out_mem_ctx = NULL;
2989 state->dispatch_recv = cli->dispatch_recv;
2991 /* In parameters */
2993 /* Out parameters */
2995 /* Result */
2996 ZERO_STRUCT(state->orig.out.result);
2998 /* make a temporary copy, that we pass to the dispatch function */
2999 state->tmp = state->orig;
3001 subreq = cli->dispatch_send(state, ev, cli,
3002 &ndr_table_ntsvcs,
3003 NDR_PNP_GETINTERFACEDEVICEALIAS,
3004 &state->tmp);
3005 if (tevent_req_nomem(subreq, req)) {
3006 return tevent_req_post(req, ev);
3008 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceAlias_done, req);
3009 return req;
3012 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq)
3014 struct tevent_req *req = tevent_req_callback_data(
3015 subreq, struct tevent_req);
3016 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3017 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3018 NTSTATUS status;
3019 TALLOC_CTX *mem_ctx;
3021 if (state->out_mem_ctx) {
3022 mem_ctx = state->out_mem_ctx;
3023 } else {
3024 mem_ctx = state;
3027 status = state->dispatch_recv(subreq, mem_ctx);
3028 TALLOC_FREE(subreq);
3029 if (!NT_STATUS_IS_OK(status)) {
3030 tevent_req_nterror(req, status);
3031 return;
3034 /* Copy out parameters */
3036 /* Copy result */
3037 state->orig.out.result = state->tmp.out.result;
3039 /* Reset temporary structure */
3040 ZERO_STRUCT(state->tmp);
3042 tevent_req_done(req);
3045 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req,
3046 TALLOC_CTX *mem_ctx,
3047 WERROR *result)
3049 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3050 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3051 NTSTATUS status;
3053 if (tevent_req_is_nterror(req, &status)) {
3054 tevent_req_received(req);
3055 return status;
3058 /* Steal possbile out parameters to the callers context */
3059 talloc_steal(mem_ctx, state->out_mem_ctx);
3061 /* Return result */
3062 *result = state->orig.out.result;
3064 tevent_req_received(req);
3065 return NT_STATUS_OK;
3068 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
3069 TALLOC_CTX *mem_ctx,
3070 WERROR *werror)
3072 struct PNP_GetInterfaceDeviceAlias r;
3073 NTSTATUS status;
3075 /* In parameters */
3077 status = cli->dispatch(cli,
3078 mem_ctx,
3079 &ndr_table_ntsvcs,
3080 NDR_PNP_GETINTERFACEDEVICEALIAS,
3081 &r);
3083 if (!NT_STATUS_IS_OK(status)) {
3084 return status;
3087 if (NT_STATUS_IS_ERR(status)) {
3088 return status;
3091 /* Return variables */
3093 /* Return result */
3094 if (werror) {
3095 *werror = r.out.result;
3098 return werror_to_ntstatus(r.out.result);
3101 struct rpccli_PNP_GetInterfaceDeviceList_state {
3102 struct PNP_GetInterfaceDeviceList orig;
3103 struct PNP_GetInterfaceDeviceList tmp;
3104 TALLOC_CTX *out_mem_ctx;
3105 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3108 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq);
3110 struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx,
3111 struct tevent_context *ev,
3112 struct rpc_pipe_client *cli)
3114 struct tevent_req *req;
3115 struct rpccli_PNP_GetInterfaceDeviceList_state *state;
3116 struct tevent_req *subreq;
3118 req = tevent_req_create(mem_ctx, &state,
3119 struct rpccli_PNP_GetInterfaceDeviceList_state);
3120 if (req == NULL) {
3121 return NULL;
3123 state->out_mem_ctx = NULL;
3124 state->dispatch_recv = cli->dispatch_recv;
3126 /* In parameters */
3128 /* Out parameters */
3130 /* Result */
3131 ZERO_STRUCT(state->orig.out.result);
3133 /* make a temporary copy, that we pass to the dispatch function */
3134 state->tmp = state->orig;
3136 subreq = cli->dispatch_send(state, ev, cli,
3137 &ndr_table_ntsvcs,
3138 NDR_PNP_GETINTERFACEDEVICELIST,
3139 &state->tmp);
3140 if (tevent_req_nomem(subreq, req)) {
3141 return tevent_req_post(req, ev);
3143 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceList_done, req);
3144 return req;
3147 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq)
3149 struct tevent_req *req = tevent_req_callback_data(
3150 subreq, struct tevent_req);
3151 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3152 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3153 NTSTATUS status;
3154 TALLOC_CTX *mem_ctx;
3156 if (state->out_mem_ctx) {
3157 mem_ctx = state->out_mem_ctx;
3158 } else {
3159 mem_ctx = state;
3162 status = state->dispatch_recv(subreq, mem_ctx);
3163 TALLOC_FREE(subreq);
3164 if (!NT_STATUS_IS_OK(status)) {
3165 tevent_req_nterror(req, status);
3166 return;
3169 /* Copy out parameters */
3171 /* Copy result */
3172 state->orig.out.result = state->tmp.out.result;
3174 /* Reset temporary structure */
3175 ZERO_STRUCT(state->tmp);
3177 tevent_req_done(req);
3180 NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req,
3181 TALLOC_CTX *mem_ctx,
3182 WERROR *result)
3184 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3185 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3186 NTSTATUS status;
3188 if (tevent_req_is_nterror(req, &status)) {
3189 tevent_req_received(req);
3190 return status;
3193 /* Steal possbile out parameters to the callers context */
3194 talloc_steal(mem_ctx, state->out_mem_ctx);
3196 /* Return result */
3197 *result = state->orig.out.result;
3199 tevent_req_received(req);
3200 return NT_STATUS_OK;
3203 NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
3204 TALLOC_CTX *mem_ctx,
3205 WERROR *werror)
3207 struct PNP_GetInterfaceDeviceList r;
3208 NTSTATUS status;
3210 /* In parameters */
3212 status = cli->dispatch(cli,
3213 mem_ctx,
3214 &ndr_table_ntsvcs,
3215 NDR_PNP_GETINTERFACEDEVICELIST,
3216 &r);
3218 if (!NT_STATUS_IS_OK(status)) {
3219 return status;
3222 if (NT_STATUS_IS_ERR(status)) {
3223 return status;
3226 /* Return variables */
3228 /* Return result */
3229 if (werror) {
3230 *werror = r.out.result;
3233 return werror_to_ntstatus(r.out.result);
3236 struct rpccli_PNP_GetInterfaceDeviceListSize_state {
3237 struct PNP_GetInterfaceDeviceListSize orig;
3238 struct PNP_GetInterfaceDeviceListSize tmp;
3239 TALLOC_CTX *out_mem_ctx;
3240 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3243 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq);
3245 struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx,
3246 struct tevent_context *ev,
3247 struct rpc_pipe_client *cli)
3249 struct tevent_req *req;
3250 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state;
3251 struct tevent_req *subreq;
3253 req = tevent_req_create(mem_ctx, &state,
3254 struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3255 if (req == NULL) {
3256 return NULL;
3258 state->out_mem_ctx = NULL;
3259 state->dispatch_recv = cli->dispatch_recv;
3261 /* In parameters */
3263 /* Out parameters */
3265 /* Result */
3266 ZERO_STRUCT(state->orig.out.result);
3268 /* make a temporary copy, that we pass to the dispatch function */
3269 state->tmp = state->orig;
3271 subreq = cli->dispatch_send(state, ev, cli,
3272 &ndr_table_ntsvcs,
3273 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3274 &state->tmp);
3275 if (tevent_req_nomem(subreq, req)) {
3276 return tevent_req_post(req, ev);
3278 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceListSize_done, req);
3279 return req;
3282 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq)
3284 struct tevent_req *req = tevent_req_callback_data(
3285 subreq, struct tevent_req);
3286 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3287 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3288 NTSTATUS status;
3289 TALLOC_CTX *mem_ctx;
3291 if (state->out_mem_ctx) {
3292 mem_ctx = state->out_mem_ctx;
3293 } else {
3294 mem_ctx = state;
3297 status = state->dispatch_recv(subreq, mem_ctx);
3298 TALLOC_FREE(subreq);
3299 if (!NT_STATUS_IS_OK(status)) {
3300 tevent_req_nterror(req, status);
3301 return;
3304 /* Copy out parameters */
3306 /* Copy result */
3307 state->orig.out.result = state->tmp.out.result;
3309 /* Reset temporary structure */
3310 ZERO_STRUCT(state->tmp);
3312 tevent_req_done(req);
3315 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req,
3316 TALLOC_CTX *mem_ctx,
3317 WERROR *result)
3319 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3320 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3321 NTSTATUS status;
3323 if (tevent_req_is_nterror(req, &status)) {
3324 tevent_req_received(req);
3325 return status;
3328 /* Steal possbile out parameters to the callers context */
3329 talloc_steal(mem_ctx, state->out_mem_ctx);
3331 /* Return result */
3332 *result = state->orig.out.result;
3334 tevent_req_received(req);
3335 return NT_STATUS_OK;
3338 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
3339 TALLOC_CTX *mem_ctx,
3340 WERROR *werror)
3342 struct PNP_GetInterfaceDeviceListSize r;
3343 NTSTATUS status;
3345 /* In parameters */
3347 status = cli->dispatch(cli,
3348 mem_ctx,
3349 &ndr_table_ntsvcs,
3350 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3351 &r);
3353 if (!NT_STATUS_IS_OK(status)) {
3354 return status;
3357 if (NT_STATUS_IS_ERR(status)) {
3358 return status;
3361 /* Return variables */
3363 /* Return result */
3364 if (werror) {
3365 *werror = r.out.result;
3368 return werror_to_ntstatus(r.out.result);
3371 struct rpccli_PNP_RegisterDeviceClassAssociation_state {
3372 struct PNP_RegisterDeviceClassAssociation orig;
3373 struct PNP_RegisterDeviceClassAssociation tmp;
3374 TALLOC_CTX *out_mem_ctx;
3375 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3378 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq);
3380 struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3381 struct tevent_context *ev,
3382 struct rpc_pipe_client *cli)
3384 struct tevent_req *req;
3385 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state;
3386 struct tevent_req *subreq;
3388 req = tevent_req_create(mem_ctx, &state,
3389 struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3390 if (req == NULL) {
3391 return NULL;
3393 state->out_mem_ctx = NULL;
3394 state->dispatch_recv = cli->dispatch_recv;
3396 /* In parameters */
3398 /* Out parameters */
3400 /* Result */
3401 ZERO_STRUCT(state->orig.out.result);
3403 /* make a temporary copy, that we pass to the dispatch function */
3404 state->tmp = state->orig;
3406 subreq = cli->dispatch_send(state, ev, cli,
3407 &ndr_table_ntsvcs,
3408 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3409 &state->tmp);
3410 if (tevent_req_nomem(subreq, req)) {
3411 return tevent_req_post(req, ev);
3413 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDeviceClassAssociation_done, req);
3414 return req;
3417 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq)
3419 struct tevent_req *req = tevent_req_callback_data(
3420 subreq, struct tevent_req);
3421 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3422 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3423 NTSTATUS status;
3424 TALLOC_CTX *mem_ctx;
3426 if (state->out_mem_ctx) {
3427 mem_ctx = state->out_mem_ctx;
3428 } else {
3429 mem_ctx = state;
3432 status = state->dispatch_recv(subreq, mem_ctx);
3433 TALLOC_FREE(subreq);
3434 if (!NT_STATUS_IS_OK(status)) {
3435 tevent_req_nterror(req, status);
3436 return;
3439 /* Copy out parameters */
3441 /* Copy result */
3442 state->orig.out.result = state->tmp.out.result;
3444 /* Reset temporary structure */
3445 ZERO_STRUCT(state->tmp);
3447 tevent_req_done(req);
3450 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req,
3451 TALLOC_CTX *mem_ctx,
3452 WERROR *result)
3454 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3455 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3456 NTSTATUS status;
3458 if (tevent_req_is_nterror(req, &status)) {
3459 tevent_req_received(req);
3460 return status;
3463 /* Steal possbile out parameters to the callers context */
3464 talloc_steal(mem_ctx, state->out_mem_ctx);
3466 /* Return result */
3467 *result = state->orig.out.result;
3469 tevent_req_received(req);
3470 return NT_STATUS_OK;
3473 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3474 TALLOC_CTX *mem_ctx,
3475 WERROR *werror)
3477 struct PNP_RegisterDeviceClassAssociation r;
3478 NTSTATUS status;
3480 /* In parameters */
3482 status = cli->dispatch(cli,
3483 mem_ctx,
3484 &ndr_table_ntsvcs,
3485 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3486 &r);
3488 if (!NT_STATUS_IS_OK(status)) {
3489 return status;
3492 if (NT_STATUS_IS_ERR(status)) {
3493 return status;
3496 /* Return variables */
3498 /* Return result */
3499 if (werror) {
3500 *werror = r.out.result;
3503 return werror_to_ntstatus(r.out.result);
3506 struct rpccli_PNP_UnregisterDeviceClassAssociation_state {
3507 struct PNP_UnregisterDeviceClassAssociation orig;
3508 struct PNP_UnregisterDeviceClassAssociation tmp;
3509 TALLOC_CTX *out_mem_ctx;
3510 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3513 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq);
3515 struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3516 struct tevent_context *ev,
3517 struct rpc_pipe_client *cli)
3519 struct tevent_req *req;
3520 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state;
3521 struct tevent_req *subreq;
3523 req = tevent_req_create(mem_ctx, &state,
3524 struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3525 if (req == NULL) {
3526 return NULL;
3528 state->out_mem_ctx = NULL;
3529 state->dispatch_recv = cli->dispatch_recv;
3531 /* In parameters */
3533 /* Out parameters */
3535 /* Result */
3536 ZERO_STRUCT(state->orig.out.result);
3538 /* make a temporary copy, that we pass to the dispatch function */
3539 state->tmp = state->orig;
3541 subreq = cli->dispatch_send(state, ev, cli,
3542 &ndr_table_ntsvcs,
3543 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3544 &state->tmp);
3545 if (tevent_req_nomem(subreq, req)) {
3546 return tevent_req_post(req, ev);
3548 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterDeviceClassAssociation_done, req);
3549 return req;
3552 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq)
3554 struct tevent_req *req = tevent_req_callback_data(
3555 subreq, struct tevent_req);
3556 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3557 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3558 NTSTATUS status;
3559 TALLOC_CTX *mem_ctx;
3561 if (state->out_mem_ctx) {
3562 mem_ctx = state->out_mem_ctx;
3563 } else {
3564 mem_ctx = state;
3567 status = state->dispatch_recv(subreq, mem_ctx);
3568 TALLOC_FREE(subreq);
3569 if (!NT_STATUS_IS_OK(status)) {
3570 tevent_req_nterror(req, status);
3571 return;
3574 /* Copy out parameters */
3576 /* Copy result */
3577 state->orig.out.result = state->tmp.out.result;
3579 /* Reset temporary structure */
3580 ZERO_STRUCT(state->tmp);
3582 tevent_req_done(req);
3585 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req,
3586 TALLOC_CTX *mem_ctx,
3587 WERROR *result)
3589 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3590 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3591 NTSTATUS status;
3593 if (tevent_req_is_nterror(req, &status)) {
3594 tevent_req_received(req);
3595 return status;
3598 /* Steal possbile out parameters to the callers context */
3599 talloc_steal(mem_ctx, state->out_mem_ctx);
3601 /* Return result */
3602 *result = state->orig.out.result;
3604 tevent_req_received(req);
3605 return NT_STATUS_OK;
3608 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3609 TALLOC_CTX *mem_ctx,
3610 WERROR *werror)
3612 struct PNP_UnregisterDeviceClassAssociation r;
3613 NTSTATUS status;
3615 /* In parameters */
3617 status = cli->dispatch(cli,
3618 mem_ctx,
3619 &ndr_table_ntsvcs,
3620 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3621 &r);
3623 if (!NT_STATUS_IS_OK(status)) {
3624 return status;
3627 if (NT_STATUS_IS_ERR(status)) {
3628 return status;
3631 /* Return variables */
3633 /* Return result */
3634 if (werror) {
3635 *werror = r.out.result;
3638 return werror_to_ntstatus(r.out.result);
3641 struct rpccli_PNP_GetClassRegProp_state {
3642 struct PNP_GetClassRegProp orig;
3643 struct PNP_GetClassRegProp tmp;
3644 TALLOC_CTX *out_mem_ctx;
3645 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3648 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq);
3650 struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx,
3651 struct tevent_context *ev,
3652 struct rpc_pipe_client *cli)
3654 struct tevent_req *req;
3655 struct rpccli_PNP_GetClassRegProp_state *state;
3656 struct tevent_req *subreq;
3658 req = tevent_req_create(mem_ctx, &state,
3659 struct rpccli_PNP_GetClassRegProp_state);
3660 if (req == NULL) {
3661 return NULL;
3663 state->out_mem_ctx = NULL;
3664 state->dispatch_recv = cli->dispatch_recv;
3666 /* In parameters */
3668 /* Out parameters */
3670 /* Result */
3671 ZERO_STRUCT(state->orig.out.result);
3673 /* make a temporary copy, that we pass to the dispatch function */
3674 state->tmp = state->orig;
3676 subreq = cli->dispatch_send(state, ev, cli,
3677 &ndr_table_ntsvcs,
3678 NDR_PNP_GETCLASSREGPROP,
3679 &state->tmp);
3680 if (tevent_req_nomem(subreq, req)) {
3681 return tevent_req_post(req, ev);
3683 tevent_req_set_callback(subreq, rpccli_PNP_GetClassRegProp_done, req);
3684 return req;
3687 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq)
3689 struct tevent_req *req = tevent_req_callback_data(
3690 subreq, struct tevent_req);
3691 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3692 req, struct rpccli_PNP_GetClassRegProp_state);
3693 NTSTATUS status;
3694 TALLOC_CTX *mem_ctx;
3696 if (state->out_mem_ctx) {
3697 mem_ctx = state->out_mem_ctx;
3698 } else {
3699 mem_ctx = state;
3702 status = state->dispatch_recv(subreq, mem_ctx);
3703 TALLOC_FREE(subreq);
3704 if (!NT_STATUS_IS_OK(status)) {
3705 tevent_req_nterror(req, status);
3706 return;
3709 /* Copy out parameters */
3711 /* Copy result */
3712 state->orig.out.result = state->tmp.out.result;
3714 /* Reset temporary structure */
3715 ZERO_STRUCT(state->tmp);
3717 tevent_req_done(req);
3720 NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req,
3721 TALLOC_CTX *mem_ctx,
3722 WERROR *result)
3724 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
3725 req, struct rpccli_PNP_GetClassRegProp_state);
3726 NTSTATUS status;
3728 if (tevent_req_is_nterror(req, &status)) {
3729 tevent_req_received(req);
3730 return status;
3733 /* Steal possbile out parameters to the callers context */
3734 talloc_steal(mem_ctx, state->out_mem_ctx);
3736 /* Return result */
3737 *result = state->orig.out.result;
3739 tevent_req_received(req);
3740 return NT_STATUS_OK;
3743 NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
3744 TALLOC_CTX *mem_ctx,
3745 WERROR *werror)
3747 struct PNP_GetClassRegProp r;
3748 NTSTATUS status;
3750 /* In parameters */
3752 status = cli->dispatch(cli,
3753 mem_ctx,
3754 &ndr_table_ntsvcs,
3755 NDR_PNP_GETCLASSREGPROP,
3756 &r);
3758 if (!NT_STATUS_IS_OK(status)) {
3759 return status;
3762 if (NT_STATUS_IS_ERR(status)) {
3763 return status;
3766 /* Return variables */
3768 /* Return result */
3769 if (werror) {
3770 *werror = r.out.result;
3773 return werror_to_ntstatus(r.out.result);
3776 struct rpccli_PNP_SetClassRegProp_state {
3777 struct PNP_SetClassRegProp orig;
3778 struct PNP_SetClassRegProp tmp;
3779 TALLOC_CTX *out_mem_ctx;
3780 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3783 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq);
3785 struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx,
3786 struct tevent_context *ev,
3787 struct rpc_pipe_client *cli)
3789 struct tevent_req *req;
3790 struct rpccli_PNP_SetClassRegProp_state *state;
3791 struct tevent_req *subreq;
3793 req = tevent_req_create(mem_ctx, &state,
3794 struct rpccli_PNP_SetClassRegProp_state);
3795 if (req == NULL) {
3796 return NULL;
3798 state->out_mem_ctx = NULL;
3799 state->dispatch_recv = cli->dispatch_recv;
3801 /* In parameters */
3803 /* Out parameters */
3805 /* Result */
3806 ZERO_STRUCT(state->orig.out.result);
3808 /* make a temporary copy, that we pass to the dispatch function */
3809 state->tmp = state->orig;
3811 subreq = cli->dispatch_send(state, ev, cli,
3812 &ndr_table_ntsvcs,
3813 NDR_PNP_SETCLASSREGPROP,
3814 &state->tmp);
3815 if (tevent_req_nomem(subreq, req)) {
3816 return tevent_req_post(req, ev);
3818 tevent_req_set_callback(subreq, rpccli_PNP_SetClassRegProp_done, req);
3819 return req;
3822 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq)
3824 struct tevent_req *req = tevent_req_callback_data(
3825 subreq, struct tevent_req);
3826 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3827 req, struct rpccli_PNP_SetClassRegProp_state);
3828 NTSTATUS status;
3829 TALLOC_CTX *mem_ctx;
3831 if (state->out_mem_ctx) {
3832 mem_ctx = state->out_mem_ctx;
3833 } else {
3834 mem_ctx = state;
3837 status = state->dispatch_recv(subreq, mem_ctx);
3838 TALLOC_FREE(subreq);
3839 if (!NT_STATUS_IS_OK(status)) {
3840 tevent_req_nterror(req, status);
3841 return;
3844 /* Copy out parameters */
3846 /* Copy result */
3847 state->orig.out.result = state->tmp.out.result;
3849 /* Reset temporary structure */
3850 ZERO_STRUCT(state->tmp);
3852 tevent_req_done(req);
3855 NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req,
3856 TALLOC_CTX *mem_ctx,
3857 WERROR *result)
3859 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
3860 req, struct rpccli_PNP_SetClassRegProp_state);
3861 NTSTATUS status;
3863 if (tevent_req_is_nterror(req, &status)) {
3864 tevent_req_received(req);
3865 return status;
3868 /* Steal possbile out parameters to the callers context */
3869 talloc_steal(mem_ctx, state->out_mem_ctx);
3871 /* Return result */
3872 *result = state->orig.out.result;
3874 tevent_req_received(req);
3875 return NT_STATUS_OK;
3878 NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
3879 TALLOC_CTX *mem_ctx,
3880 WERROR *werror)
3882 struct PNP_SetClassRegProp r;
3883 NTSTATUS status;
3885 /* In parameters */
3887 status = cli->dispatch(cli,
3888 mem_ctx,
3889 &ndr_table_ntsvcs,
3890 NDR_PNP_SETCLASSREGPROP,
3891 &r);
3893 if (!NT_STATUS_IS_OK(status)) {
3894 return status;
3897 if (NT_STATUS_IS_ERR(status)) {
3898 return status;
3901 /* Return variables */
3903 /* Return result */
3904 if (werror) {
3905 *werror = r.out.result;
3908 return werror_to_ntstatus(r.out.result);
3911 struct rpccli_PNP_CreateDevInst_state {
3912 struct PNP_CreateDevInst orig;
3913 struct PNP_CreateDevInst tmp;
3914 TALLOC_CTX *out_mem_ctx;
3915 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3918 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq);
3920 struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx,
3921 struct tevent_context *ev,
3922 struct rpc_pipe_client *cli)
3924 struct tevent_req *req;
3925 struct rpccli_PNP_CreateDevInst_state *state;
3926 struct tevent_req *subreq;
3928 req = tevent_req_create(mem_ctx, &state,
3929 struct rpccli_PNP_CreateDevInst_state);
3930 if (req == NULL) {
3931 return NULL;
3933 state->out_mem_ctx = NULL;
3934 state->dispatch_recv = cli->dispatch_recv;
3936 /* In parameters */
3938 /* Out parameters */
3940 /* Result */
3941 ZERO_STRUCT(state->orig.out.result);
3943 /* make a temporary copy, that we pass to the dispatch function */
3944 state->tmp = state->orig;
3946 subreq = cli->dispatch_send(state, ev, cli,
3947 &ndr_table_ntsvcs,
3948 NDR_PNP_CREATEDEVINST,
3949 &state->tmp);
3950 if (tevent_req_nomem(subreq, req)) {
3951 return tevent_req_post(req, ev);
3953 tevent_req_set_callback(subreq, rpccli_PNP_CreateDevInst_done, req);
3954 return req;
3957 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq)
3959 struct tevent_req *req = tevent_req_callback_data(
3960 subreq, struct tevent_req);
3961 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3962 req, struct rpccli_PNP_CreateDevInst_state);
3963 NTSTATUS status;
3964 TALLOC_CTX *mem_ctx;
3966 if (state->out_mem_ctx) {
3967 mem_ctx = state->out_mem_ctx;
3968 } else {
3969 mem_ctx = state;
3972 status = state->dispatch_recv(subreq, mem_ctx);
3973 TALLOC_FREE(subreq);
3974 if (!NT_STATUS_IS_OK(status)) {
3975 tevent_req_nterror(req, status);
3976 return;
3979 /* Copy out parameters */
3981 /* Copy result */
3982 state->orig.out.result = state->tmp.out.result;
3984 /* Reset temporary structure */
3985 ZERO_STRUCT(state->tmp);
3987 tevent_req_done(req);
3990 NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req,
3991 TALLOC_CTX *mem_ctx,
3992 WERROR *result)
3994 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
3995 req, struct rpccli_PNP_CreateDevInst_state);
3996 NTSTATUS status;
3998 if (tevent_req_is_nterror(req, &status)) {
3999 tevent_req_received(req);
4000 return status;
4003 /* Steal possbile out parameters to the callers context */
4004 talloc_steal(mem_ctx, state->out_mem_ctx);
4006 /* Return result */
4007 *result = state->orig.out.result;
4009 tevent_req_received(req);
4010 return NT_STATUS_OK;
4013 NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
4014 TALLOC_CTX *mem_ctx,
4015 WERROR *werror)
4017 struct PNP_CreateDevInst r;
4018 NTSTATUS status;
4020 /* In parameters */
4022 status = cli->dispatch(cli,
4023 mem_ctx,
4024 &ndr_table_ntsvcs,
4025 NDR_PNP_CREATEDEVINST,
4026 &r);
4028 if (!NT_STATUS_IS_OK(status)) {
4029 return status;
4032 if (NT_STATUS_IS_ERR(status)) {
4033 return status;
4036 /* Return variables */
4038 /* Return result */
4039 if (werror) {
4040 *werror = r.out.result;
4043 return werror_to_ntstatus(r.out.result);
4046 struct rpccli_PNP_DeviceInstanceAction_state {
4047 struct PNP_DeviceInstanceAction orig;
4048 struct PNP_DeviceInstanceAction tmp;
4049 TALLOC_CTX *out_mem_ctx;
4050 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4053 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq);
4055 struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx,
4056 struct tevent_context *ev,
4057 struct rpc_pipe_client *cli)
4059 struct tevent_req *req;
4060 struct rpccli_PNP_DeviceInstanceAction_state *state;
4061 struct tevent_req *subreq;
4063 req = tevent_req_create(mem_ctx, &state,
4064 struct rpccli_PNP_DeviceInstanceAction_state);
4065 if (req == NULL) {
4066 return NULL;
4068 state->out_mem_ctx = NULL;
4069 state->dispatch_recv = cli->dispatch_recv;
4071 /* In parameters */
4073 /* Out parameters */
4075 /* Result */
4076 ZERO_STRUCT(state->orig.out.result);
4078 /* make a temporary copy, that we pass to the dispatch function */
4079 state->tmp = state->orig;
4081 subreq = cli->dispatch_send(state, ev, cli,
4082 &ndr_table_ntsvcs,
4083 NDR_PNP_DEVICEINSTANCEACTION,
4084 &state->tmp);
4085 if (tevent_req_nomem(subreq, req)) {
4086 return tevent_req_post(req, ev);
4088 tevent_req_set_callback(subreq, rpccli_PNP_DeviceInstanceAction_done, req);
4089 return req;
4092 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq)
4094 struct tevent_req *req = tevent_req_callback_data(
4095 subreq, struct tevent_req);
4096 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4097 req, struct rpccli_PNP_DeviceInstanceAction_state);
4098 NTSTATUS status;
4099 TALLOC_CTX *mem_ctx;
4101 if (state->out_mem_ctx) {
4102 mem_ctx = state->out_mem_ctx;
4103 } else {
4104 mem_ctx = state;
4107 status = state->dispatch_recv(subreq, mem_ctx);
4108 TALLOC_FREE(subreq);
4109 if (!NT_STATUS_IS_OK(status)) {
4110 tevent_req_nterror(req, status);
4111 return;
4114 /* Copy out parameters */
4116 /* Copy result */
4117 state->orig.out.result = state->tmp.out.result;
4119 /* Reset temporary structure */
4120 ZERO_STRUCT(state->tmp);
4122 tevent_req_done(req);
4125 NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req,
4126 TALLOC_CTX *mem_ctx,
4127 WERROR *result)
4129 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4130 req, struct rpccli_PNP_DeviceInstanceAction_state);
4131 NTSTATUS status;
4133 if (tevent_req_is_nterror(req, &status)) {
4134 tevent_req_received(req);
4135 return status;
4138 /* Steal possbile out parameters to the callers context */
4139 talloc_steal(mem_ctx, state->out_mem_ctx);
4141 /* Return result */
4142 *result = state->orig.out.result;
4144 tevent_req_received(req);
4145 return NT_STATUS_OK;
4148 NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
4149 TALLOC_CTX *mem_ctx,
4150 WERROR *werror)
4152 struct PNP_DeviceInstanceAction r;
4153 NTSTATUS status;
4155 /* In parameters */
4157 status = cli->dispatch(cli,
4158 mem_ctx,
4159 &ndr_table_ntsvcs,
4160 NDR_PNP_DEVICEINSTANCEACTION,
4161 &r);
4163 if (!NT_STATUS_IS_OK(status)) {
4164 return status;
4167 if (NT_STATUS_IS_ERR(status)) {
4168 return status;
4171 /* Return variables */
4173 /* Return result */
4174 if (werror) {
4175 *werror = r.out.result;
4178 return werror_to_ntstatus(r.out.result);
4181 struct rpccli_PNP_GetDeviceStatus_state {
4182 struct PNP_GetDeviceStatus orig;
4183 struct PNP_GetDeviceStatus tmp;
4184 TALLOC_CTX *out_mem_ctx;
4185 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4188 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq);
4190 struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx,
4191 struct tevent_context *ev,
4192 struct rpc_pipe_client *cli)
4194 struct tevent_req *req;
4195 struct rpccli_PNP_GetDeviceStatus_state *state;
4196 struct tevent_req *subreq;
4198 req = tevent_req_create(mem_ctx, &state,
4199 struct rpccli_PNP_GetDeviceStatus_state);
4200 if (req == NULL) {
4201 return NULL;
4203 state->out_mem_ctx = NULL;
4204 state->dispatch_recv = cli->dispatch_recv;
4206 /* In parameters */
4208 /* Out parameters */
4210 /* Result */
4211 ZERO_STRUCT(state->orig.out.result);
4213 /* make a temporary copy, that we pass to the dispatch function */
4214 state->tmp = state->orig;
4216 subreq = cli->dispatch_send(state, ev, cli,
4217 &ndr_table_ntsvcs,
4218 NDR_PNP_GETDEVICESTATUS,
4219 &state->tmp);
4220 if (tevent_req_nomem(subreq, req)) {
4221 return tevent_req_post(req, ev);
4223 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceStatus_done, req);
4224 return req;
4227 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq)
4229 struct tevent_req *req = tevent_req_callback_data(
4230 subreq, struct tevent_req);
4231 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4232 req, struct rpccli_PNP_GetDeviceStatus_state);
4233 NTSTATUS status;
4234 TALLOC_CTX *mem_ctx;
4236 if (state->out_mem_ctx) {
4237 mem_ctx = state->out_mem_ctx;
4238 } else {
4239 mem_ctx = state;
4242 status = state->dispatch_recv(subreq, mem_ctx);
4243 TALLOC_FREE(subreq);
4244 if (!NT_STATUS_IS_OK(status)) {
4245 tevent_req_nterror(req, status);
4246 return;
4249 /* Copy out parameters */
4251 /* Copy result */
4252 state->orig.out.result = state->tmp.out.result;
4254 /* Reset temporary structure */
4255 ZERO_STRUCT(state->tmp);
4257 tevent_req_done(req);
4260 NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req,
4261 TALLOC_CTX *mem_ctx,
4262 WERROR *result)
4264 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4265 req, struct rpccli_PNP_GetDeviceStatus_state);
4266 NTSTATUS status;
4268 if (tevent_req_is_nterror(req, &status)) {
4269 tevent_req_received(req);
4270 return status;
4273 /* Steal possbile out parameters to the callers context */
4274 talloc_steal(mem_ctx, state->out_mem_ctx);
4276 /* Return result */
4277 *result = state->orig.out.result;
4279 tevent_req_received(req);
4280 return NT_STATUS_OK;
4283 NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
4284 TALLOC_CTX *mem_ctx,
4285 WERROR *werror)
4287 struct PNP_GetDeviceStatus r;
4288 NTSTATUS status;
4290 /* In parameters */
4292 status = cli->dispatch(cli,
4293 mem_ctx,
4294 &ndr_table_ntsvcs,
4295 NDR_PNP_GETDEVICESTATUS,
4296 &r);
4298 if (!NT_STATUS_IS_OK(status)) {
4299 return status;
4302 if (NT_STATUS_IS_ERR(status)) {
4303 return status;
4306 /* Return variables */
4308 /* Return result */
4309 if (werror) {
4310 *werror = r.out.result;
4313 return werror_to_ntstatus(r.out.result);
4316 struct rpccli_PNP_SetDeviceProblem_state {
4317 struct PNP_SetDeviceProblem orig;
4318 struct PNP_SetDeviceProblem tmp;
4319 TALLOC_CTX *out_mem_ctx;
4320 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4323 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq);
4325 struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx,
4326 struct tevent_context *ev,
4327 struct rpc_pipe_client *cli)
4329 struct tevent_req *req;
4330 struct rpccli_PNP_SetDeviceProblem_state *state;
4331 struct tevent_req *subreq;
4333 req = tevent_req_create(mem_ctx, &state,
4334 struct rpccli_PNP_SetDeviceProblem_state);
4335 if (req == NULL) {
4336 return NULL;
4338 state->out_mem_ctx = NULL;
4339 state->dispatch_recv = cli->dispatch_recv;
4341 /* In parameters */
4343 /* Out parameters */
4345 /* Result */
4346 ZERO_STRUCT(state->orig.out.result);
4348 /* make a temporary copy, that we pass to the dispatch function */
4349 state->tmp = state->orig;
4351 subreq = cli->dispatch_send(state, ev, cli,
4352 &ndr_table_ntsvcs,
4353 NDR_PNP_SETDEVICEPROBLEM,
4354 &state->tmp);
4355 if (tevent_req_nomem(subreq, req)) {
4356 return tevent_req_post(req, ev);
4358 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceProblem_done, req);
4359 return req;
4362 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq)
4364 struct tevent_req *req = tevent_req_callback_data(
4365 subreq, struct tevent_req);
4366 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4367 req, struct rpccli_PNP_SetDeviceProblem_state);
4368 NTSTATUS status;
4369 TALLOC_CTX *mem_ctx;
4371 if (state->out_mem_ctx) {
4372 mem_ctx = state->out_mem_ctx;
4373 } else {
4374 mem_ctx = state;
4377 status = state->dispatch_recv(subreq, mem_ctx);
4378 TALLOC_FREE(subreq);
4379 if (!NT_STATUS_IS_OK(status)) {
4380 tevent_req_nterror(req, status);
4381 return;
4384 /* Copy out parameters */
4386 /* Copy result */
4387 state->orig.out.result = state->tmp.out.result;
4389 /* Reset temporary structure */
4390 ZERO_STRUCT(state->tmp);
4392 tevent_req_done(req);
4395 NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req,
4396 TALLOC_CTX *mem_ctx,
4397 WERROR *result)
4399 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4400 req, struct rpccli_PNP_SetDeviceProblem_state);
4401 NTSTATUS status;
4403 if (tevent_req_is_nterror(req, &status)) {
4404 tevent_req_received(req);
4405 return status;
4408 /* Steal possbile out parameters to the callers context */
4409 talloc_steal(mem_ctx, state->out_mem_ctx);
4411 /* Return result */
4412 *result = state->orig.out.result;
4414 tevent_req_received(req);
4415 return NT_STATUS_OK;
4418 NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
4419 TALLOC_CTX *mem_ctx,
4420 WERROR *werror)
4422 struct PNP_SetDeviceProblem r;
4423 NTSTATUS status;
4425 /* In parameters */
4427 status = cli->dispatch(cli,
4428 mem_ctx,
4429 &ndr_table_ntsvcs,
4430 NDR_PNP_SETDEVICEPROBLEM,
4431 &r);
4433 if (!NT_STATUS_IS_OK(status)) {
4434 return status;
4437 if (NT_STATUS_IS_ERR(status)) {
4438 return status;
4441 /* Return variables */
4443 /* Return result */
4444 if (werror) {
4445 *werror = r.out.result;
4448 return werror_to_ntstatus(r.out.result);
4451 struct rpccli_PNP_DisableDevInst_state {
4452 struct PNP_DisableDevInst orig;
4453 struct PNP_DisableDevInst tmp;
4454 TALLOC_CTX *out_mem_ctx;
4455 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4458 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq);
4460 struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx,
4461 struct tevent_context *ev,
4462 struct rpc_pipe_client *cli)
4464 struct tevent_req *req;
4465 struct rpccli_PNP_DisableDevInst_state *state;
4466 struct tevent_req *subreq;
4468 req = tevent_req_create(mem_ctx, &state,
4469 struct rpccli_PNP_DisableDevInst_state);
4470 if (req == NULL) {
4471 return NULL;
4473 state->out_mem_ctx = NULL;
4474 state->dispatch_recv = cli->dispatch_recv;
4476 /* In parameters */
4478 /* Out parameters */
4480 /* Result */
4481 ZERO_STRUCT(state->orig.out.result);
4483 /* make a temporary copy, that we pass to the dispatch function */
4484 state->tmp = state->orig;
4486 subreq = cli->dispatch_send(state, ev, cli,
4487 &ndr_table_ntsvcs,
4488 NDR_PNP_DISABLEDEVINST,
4489 &state->tmp);
4490 if (tevent_req_nomem(subreq, req)) {
4491 return tevent_req_post(req, ev);
4493 tevent_req_set_callback(subreq, rpccli_PNP_DisableDevInst_done, req);
4494 return req;
4497 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq)
4499 struct tevent_req *req = tevent_req_callback_data(
4500 subreq, struct tevent_req);
4501 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4502 req, struct rpccli_PNP_DisableDevInst_state);
4503 NTSTATUS status;
4504 TALLOC_CTX *mem_ctx;
4506 if (state->out_mem_ctx) {
4507 mem_ctx = state->out_mem_ctx;
4508 } else {
4509 mem_ctx = state;
4512 status = state->dispatch_recv(subreq, mem_ctx);
4513 TALLOC_FREE(subreq);
4514 if (!NT_STATUS_IS_OK(status)) {
4515 tevent_req_nterror(req, status);
4516 return;
4519 /* Copy out parameters */
4521 /* Copy result */
4522 state->orig.out.result = state->tmp.out.result;
4524 /* Reset temporary structure */
4525 ZERO_STRUCT(state->tmp);
4527 tevent_req_done(req);
4530 NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req,
4531 TALLOC_CTX *mem_ctx,
4532 WERROR *result)
4534 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
4535 req, struct rpccli_PNP_DisableDevInst_state);
4536 NTSTATUS status;
4538 if (tevent_req_is_nterror(req, &status)) {
4539 tevent_req_received(req);
4540 return status;
4543 /* Steal possbile out parameters to the callers context */
4544 talloc_steal(mem_ctx, state->out_mem_ctx);
4546 /* Return result */
4547 *result = state->orig.out.result;
4549 tevent_req_received(req);
4550 return NT_STATUS_OK;
4553 NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
4554 TALLOC_CTX *mem_ctx,
4555 WERROR *werror)
4557 struct PNP_DisableDevInst r;
4558 NTSTATUS status;
4560 /* In parameters */
4562 status = cli->dispatch(cli,
4563 mem_ctx,
4564 &ndr_table_ntsvcs,
4565 NDR_PNP_DISABLEDEVINST,
4566 &r);
4568 if (!NT_STATUS_IS_OK(status)) {
4569 return status;
4572 if (NT_STATUS_IS_ERR(status)) {
4573 return status;
4576 /* Return variables */
4578 /* Return result */
4579 if (werror) {
4580 *werror = r.out.result;
4583 return werror_to_ntstatus(r.out.result);
4586 struct rpccli_PNP_UninstallDevInst_state {
4587 struct PNP_UninstallDevInst orig;
4588 struct PNP_UninstallDevInst tmp;
4589 TALLOC_CTX *out_mem_ctx;
4590 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4593 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq);
4595 struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx,
4596 struct tevent_context *ev,
4597 struct rpc_pipe_client *cli)
4599 struct tevent_req *req;
4600 struct rpccli_PNP_UninstallDevInst_state *state;
4601 struct tevent_req *subreq;
4603 req = tevent_req_create(mem_ctx, &state,
4604 struct rpccli_PNP_UninstallDevInst_state);
4605 if (req == NULL) {
4606 return NULL;
4608 state->out_mem_ctx = NULL;
4609 state->dispatch_recv = cli->dispatch_recv;
4611 /* In parameters */
4613 /* Out parameters */
4615 /* Result */
4616 ZERO_STRUCT(state->orig.out.result);
4618 /* make a temporary copy, that we pass to the dispatch function */
4619 state->tmp = state->orig;
4621 subreq = cli->dispatch_send(state, ev, cli,
4622 &ndr_table_ntsvcs,
4623 NDR_PNP_UNINSTALLDEVINST,
4624 &state->tmp);
4625 if (tevent_req_nomem(subreq, req)) {
4626 return tevent_req_post(req, ev);
4628 tevent_req_set_callback(subreq, rpccli_PNP_UninstallDevInst_done, req);
4629 return req;
4632 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq)
4634 struct tevent_req *req = tevent_req_callback_data(
4635 subreq, struct tevent_req);
4636 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4637 req, struct rpccli_PNP_UninstallDevInst_state);
4638 NTSTATUS status;
4639 TALLOC_CTX *mem_ctx;
4641 if (state->out_mem_ctx) {
4642 mem_ctx = state->out_mem_ctx;
4643 } else {
4644 mem_ctx = state;
4647 status = state->dispatch_recv(subreq, mem_ctx);
4648 TALLOC_FREE(subreq);
4649 if (!NT_STATUS_IS_OK(status)) {
4650 tevent_req_nterror(req, status);
4651 return;
4654 /* Copy out parameters */
4656 /* Copy result */
4657 state->orig.out.result = state->tmp.out.result;
4659 /* Reset temporary structure */
4660 ZERO_STRUCT(state->tmp);
4662 tevent_req_done(req);
4665 NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req,
4666 TALLOC_CTX *mem_ctx,
4667 WERROR *result)
4669 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
4670 req, struct rpccli_PNP_UninstallDevInst_state);
4671 NTSTATUS status;
4673 if (tevent_req_is_nterror(req, &status)) {
4674 tevent_req_received(req);
4675 return status;
4678 /* Steal possbile out parameters to the callers context */
4679 talloc_steal(mem_ctx, state->out_mem_ctx);
4681 /* Return result */
4682 *result = state->orig.out.result;
4684 tevent_req_received(req);
4685 return NT_STATUS_OK;
4688 NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
4689 TALLOC_CTX *mem_ctx,
4690 WERROR *werror)
4692 struct PNP_UninstallDevInst r;
4693 NTSTATUS status;
4695 /* In parameters */
4697 status = cli->dispatch(cli,
4698 mem_ctx,
4699 &ndr_table_ntsvcs,
4700 NDR_PNP_UNINSTALLDEVINST,
4701 &r);
4703 if (!NT_STATUS_IS_OK(status)) {
4704 return status;
4707 if (NT_STATUS_IS_ERR(status)) {
4708 return status;
4711 /* Return variables */
4713 /* Return result */
4714 if (werror) {
4715 *werror = r.out.result;
4718 return werror_to_ntstatus(r.out.result);
4721 struct rpccli_PNP_AddID_state {
4722 struct PNP_AddID orig;
4723 struct PNP_AddID tmp;
4724 TALLOC_CTX *out_mem_ctx;
4725 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4728 static void rpccli_PNP_AddID_done(struct tevent_req *subreq);
4730 struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx,
4731 struct tevent_context *ev,
4732 struct rpc_pipe_client *cli)
4734 struct tevent_req *req;
4735 struct rpccli_PNP_AddID_state *state;
4736 struct tevent_req *subreq;
4738 req = tevent_req_create(mem_ctx, &state,
4739 struct rpccli_PNP_AddID_state);
4740 if (req == NULL) {
4741 return NULL;
4743 state->out_mem_ctx = NULL;
4744 state->dispatch_recv = cli->dispatch_recv;
4746 /* In parameters */
4748 /* Out parameters */
4750 /* Result */
4751 ZERO_STRUCT(state->orig.out.result);
4753 /* make a temporary copy, that we pass to the dispatch function */
4754 state->tmp = state->orig;
4756 subreq = cli->dispatch_send(state, ev, cli,
4757 &ndr_table_ntsvcs,
4758 NDR_PNP_ADDID,
4759 &state->tmp);
4760 if (tevent_req_nomem(subreq, req)) {
4761 return tevent_req_post(req, ev);
4763 tevent_req_set_callback(subreq, rpccli_PNP_AddID_done, req);
4764 return req;
4767 static void rpccli_PNP_AddID_done(struct tevent_req *subreq)
4769 struct tevent_req *req = tevent_req_callback_data(
4770 subreq, struct tevent_req);
4771 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4772 req, struct rpccli_PNP_AddID_state);
4773 NTSTATUS status;
4774 TALLOC_CTX *mem_ctx;
4776 if (state->out_mem_ctx) {
4777 mem_ctx = state->out_mem_ctx;
4778 } else {
4779 mem_ctx = state;
4782 status = state->dispatch_recv(subreq, mem_ctx);
4783 TALLOC_FREE(subreq);
4784 if (!NT_STATUS_IS_OK(status)) {
4785 tevent_req_nterror(req, status);
4786 return;
4789 /* Copy out parameters */
4791 /* Copy result */
4792 state->orig.out.result = state->tmp.out.result;
4794 /* Reset temporary structure */
4795 ZERO_STRUCT(state->tmp);
4797 tevent_req_done(req);
4800 NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req,
4801 TALLOC_CTX *mem_ctx,
4802 WERROR *result)
4804 struct rpccli_PNP_AddID_state *state = tevent_req_data(
4805 req, struct rpccli_PNP_AddID_state);
4806 NTSTATUS status;
4808 if (tevent_req_is_nterror(req, &status)) {
4809 tevent_req_received(req);
4810 return status;
4813 /* Steal possbile out parameters to the callers context */
4814 talloc_steal(mem_ctx, state->out_mem_ctx);
4816 /* Return result */
4817 *result = state->orig.out.result;
4819 tevent_req_received(req);
4820 return NT_STATUS_OK;
4823 NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
4824 TALLOC_CTX *mem_ctx,
4825 WERROR *werror)
4827 struct PNP_AddID r;
4828 NTSTATUS status;
4830 /* In parameters */
4832 status = cli->dispatch(cli,
4833 mem_ctx,
4834 &ndr_table_ntsvcs,
4835 NDR_PNP_ADDID,
4836 &r);
4838 if (!NT_STATUS_IS_OK(status)) {
4839 return status;
4842 if (NT_STATUS_IS_ERR(status)) {
4843 return status;
4846 /* Return variables */
4848 /* Return result */
4849 if (werror) {
4850 *werror = r.out.result;
4853 return werror_to_ntstatus(r.out.result);
4856 struct rpccli_PNP_RegisterDriver_state {
4857 struct PNP_RegisterDriver orig;
4858 struct PNP_RegisterDriver tmp;
4859 TALLOC_CTX *out_mem_ctx;
4860 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4863 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq);
4865 struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx,
4866 struct tevent_context *ev,
4867 struct rpc_pipe_client *cli)
4869 struct tevent_req *req;
4870 struct rpccli_PNP_RegisterDriver_state *state;
4871 struct tevent_req *subreq;
4873 req = tevent_req_create(mem_ctx, &state,
4874 struct rpccli_PNP_RegisterDriver_state);
4875 if (req == NULL) {
4876 return NULL;
4878 state->out_mem_ctx = NULL;
4879 state->dispatch_recv = cli->dispatch_recv;
4881 /* In parameters */
4883 /* Out parameters */
4885 /* Result */
4886 ZERO_STRUCT(state->orig.out.result);
4888 /* make a temporary copy, that we pass to the dispatch function */
4889 state->tmp = state->orig;
4891 subreq = cli->dispatch_send(state, ev, cli,
4892 &ndr_table_ntsvcs,
4893 NDR_PNP_REGISTERDRIVER,
4894 &state->tmp);
4895 if (tevent_req_nomem(subreq, req)) {
4896 return tevent_req_post(req, ev);
4898 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDriver_done, req);
4899 return req;
4902 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq)
4904 struct tevent_req *req = tevent_req_callback_data(
4905 subreq, struct tevent_req);
4906 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4907 req, struct rpccli_PNP_RegisterDriver_state);
4908 NTSTATUS status;
4909 TALLOC_CTX *mem_ctx;
4911 if (state->out_mem_ctx) {
4912 mem_ctx = state->out_mem_ctx;
4913 } else {
4914 mem_ctx = state;
4917 status = state->dispatch_recv(subreq, mem_ctx);
4918 TALLOC_FREE(subreq);
4919 if (!NT_STATUS_IS_OK(status)) {
4920 tevent_req_nterror(req, status);
4921 return;
4924 /* Copy out parameters */
4926 /* Copy result */
4927 state->orig.out.result = state->tmp.out.result;
4929 /* Reset temporary structure */
4930 ZERO_STRUCT(state->tmp);
4932 tevent_req_done(req);
4935 NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req,
4936 TALLOC_CTX *mem_ctx,
4937 WERROR *result)
4939 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
4940 req, struct rpccli_PNP_RegisterDriver_state);
4941 NTSTATUS status;
4943 if (tevent_req_is_nterror(req, &status)) {
4944 tevent_req_received(req);
4945 return status;
4948 /* Steal possbile out parameters to the callers context */
4949 talloc_steal(mem_ctx, state->out_mem_ctx);
4951 /* Return result */
4952 *result = state->orig.out.result;
4954 tevent_req_received(req);
4955 return NT_STATUS_OK;
4958 NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
4959 TALLOC_CTX *mem_ctx,
4960 WERROR *werror)
4962 struct PNP_RegisterDriver r;
4963 NTSTATUS status;
4965 /* In parameters */
4967 status = cli->dispatch(cli,
4968 mem_ctx,
4969 &ndr_table_ntsvcs,
4970 NDR_PNP_REGISTERDRIVER,
4971 &r);
4973 if (!NT_STATUS_IS_OK(status)) {
4974 return status;
4977 if (NT_STATUS_IS_ERR(status)) {
4978 return status;
4981 /* Return variables */
4983 /* Return result */
4984 if (werror) {
4985 *werror = r.out.result;
4988 return werror_to_ntstatus(r.out.result);
4991 struct rpccli_PNP_QueryRemove_state {
4992 struct PNP_QueryRemove orig;
4993 struct PNP_QueryRemove tmp;
4994 TALLOC_CTX *out_mem_ctx;
4995 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4998 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq);
5000 struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx,
5001 struct tevent_context *ev,
5002 struct rpc_pipe_client *cli)
5004 struct tevent_req *req;
5005 struct rpccli_PNP_QueryRemove_state *state;
5006 struct tevent_req *subreq;
5008 req = tevent_req_create(mem_ctx, &state,
5009 struct rpccli_PNP_QueryRemove_state);
5010 if (req == NULL) {
5011 return NULL;
5013 state->out_mem_ctx = NULL;
5014 state->dispatch_recv = cli->dispatch_recv;
5016 /* In parameters */
5018 /* Out parameters */
5020 /* Result */
5021 ZERO_STRUCT(state->orig.out.result);
5023 /* make a temporary copy, that we pass to the dispatch function */
5024 state->tmp = state->orig;
5026 subreq = cli->dispatch_send(state, ev, cli,
5027 &ndr_table_ntsvcs,
5028 NDR_PNP_QUERYREMOVE,
5029 &state->tmp);
5030 if (tevent_req_nomem(subreq, req)) {
5031 return tevent_req_post(req, ev);
5033 tevent_req_set_callback(subreq, rpccli_PNP_QueryRemove_done, req);
5034 return req;
5037 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq)
5039 struct tevent_req *req = tevent_req_callback_data(
5040 subreq, struct tevent_req);
5041 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5042 req, struct rpccli_PNP_QueryRemove_state);
5043 NTSTATUS status;
5044 TALLOC_CTX *mem_ctx;
5046 if (state->out_mem_ctx) {
5047 mem_ctx = state->out_mem_ctx;
5048 } else {
5049 mem_ctx = state;
5052 status = state->dispatch_recv(subreq, mem_ctx);
5053 TALLOC_FREE(subreq);
5054 if (!NT_STATUS_IS_OK(status)) {
5055 tevent_req_nterror(req, status);
5056 return;
5059 /* Copy out parameters */
5061 /* Copy result */
5062 state->orig.out.result = state->tmp.out.result;
5064 /* Reset temporary structure */
5065 ZERO_STRUCT(state->tmp);
5067 tevent_req_done(req);
5070 NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req,
5071 TALLOC_CTX *mem_ctx,
5072 WERROR *result)
5074 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5075 req, struct rpccli_PNP_QueryRemove_state);
5076 NTSTATUS status;
5078 if (tevent_req_is_nterror(req, &status)) {
5079 tevent_req_received(req);
5080 return status;
5083 /* Steal possbile out parameters to the callers context */
5084 talloc_steal(mem_ctx, state->out_mem_ctx);
5086 /* Return result */
5087 *result = state->orig.out.result;
5089 tevent_req_received(req);
5090 return NT_STATUS_OK;
5093 NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
5094 TALLOC_CTX *mem_ctx,
5095 WERROR *werror)
5097 struct PNP_QueryRemove r;
5098 NTSTATUS status;
5100 /* In parameters */
5102 status = cli->dispatch(cli,
5103 mem_ctx,
5104 &ndr_table_ntsvcs,
5105 NDR_PNP_QUERYREMOVE,
5106 &r);
5108 if (!NT_STATUS_IS_OK(status)) {
5109 return status;
5112 if (NT_STATUS_IS_ERR(status)) {
5113 return status;
5116 /* Return variables */
5118 /* Return result */
5119 if (werror) {
5120 *werror = r.out.result;
5123 return werror_to_ntstatus(r.out.result);
5126 struct rpccli_PNP_RequestDeviceEject_state {
5127 struct PNP_RequestDeviceEject orig;
5128 struct PNP_RequestDeviceEject tmp;
5129 TALLOC_CTX *out_mem_ctx;
5130 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5133 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq);
5135 struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx,
5136 struct tevent_context *ev,
5137 struct rpc_pipe_client *cli)
5139 struct tevent_req *req;
5140 struct rpccli_PNP_RequestDeviceEject_state *state;
5141 struct tevent_req *subreq;
5143 req = tevent_req_create(mem_ctx, &state,
5144 struct rpccli_PNP_RequestDeviceEject_state);
5145 if (req == NULL) {
5146 return NULL;
5148 state->out_mem_ctx = NULL;
5149 state->dispatch_recv = cli->dispatch_recv;
5151 /* In parameters */
5153 /* Out parameters */
5155 /* Result */
5156 ZERO_STRUCT(state->orig.out.result);
5158 /* make a temporary copy, that we pass to the dispatch function */
5159 state->tmp = state->orig;
5161 subreq = cli->dispatch_send(state, ev, cli,
5162 &ndr_table_ntsvcs,
5163 NDR_PNP_REQUESTDEVICEEJECT,
5164 &state->tmp);
5165 if (tevent_req_nomem(subreq, req)) {
5166 return tevent_req_post(req, ev);
5168 tevent_req_set_callback(subreq, rpccli_PNP_RequestDeviceEject_done, req);
5169 return req;
5172 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq)
5174 struct tevent_req *req = tevent_req_callback_data(
5175 subreq, struct tevent_req);
5176 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5177 req, struct rpccli_PNP_RequestDeviceEject_state);
5178 NTSTATUS status;
5179 TALLOC_CTX *mem_ctx;
5181 if (state->out_mem_ctx) {
5182 mem_ctx = state->out_mem_ctx;
5183 } else {
5184 mem_ctx = state;
5187 status = state->dispatch_recv(subreq, mem_ctx);
5188 TALLOC_FREE(subreq);
5189 if (!NT_STATUS_IS_OK(status)) {
5190 tevent_req_nterror(req, status);
5191 return;
5194 /* Copy out parameters */
5196 /* Copy result */
5197 state->orig.out.result = state->tmp.out.result;
5199 /* Reset temporary structure */
5200 ZERO_STRUCT(state->tmp);
5202 tevent_req_done(req);
5205 NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req,
5206 TALLOC_CTX *mem_ctx,
5207 WERROR *result)
5209 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5210 req, struct rpccli_PNP_RequestDeviceEject_state);
5211 NTSTATUS status;
5213 if (tevent_req_is_nterror(req, &status)) {
5214 tevent_req_received(req);
5215 return status;
5218 /* Steal possbile out parameters to the callers context */
5219 talloc_steal(mem_ctx, state->out_mem_ctx);
5221 /* Return result */
5222 *result = state->orig.out.result;
5224 tevent_req_received(req);
5225 return NT_STATUS_OK;
5228 NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
5229 TALLOC_CTX *mem_ctx,
5230 WERROR *werror)
5232 struct PNP_RequestDeviceEject r;
5233 NTSTATUS status;
5235 /* In parameters */
5237 status = cli->dispatch(cli,
5238 mem_ctx,
5239 &ndr_table_ntsvcs,
5240 NDR_PNP_REQUESTDEVICEEJECT,
5241 &r);
5243 if (!NT_STATUS_IS_OK(status)) {
5244 return status;
5247 if (NT_STATUS_IS_ERR(status)) {
5248 return status;
5251 /* Return variables */
5253 /* Return result */
5254 if (werror) {
5255 *werror = r.out.result;
5258 return werror_to_ntstatus(r.out.result);
5261 struct rpccli_PNP_IsDockStationPresent_state {
5262 struct PNP_IsDockStationPresent orig;
5263 struct PNP_IsDockStationPresent tmp;
5264 TALLOC_CTX *out_mem_ctx;
5265 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5268 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq);
5270 struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx,
5271 struct tevent_context *ev,
5272 struct rpc_pipe_client *cli)
5274 struct tevent_req *req;
5275 struct rpccli_PNP_IsDockStationPresent_state *state;
5276 struct tevent_req *subreq;
5278 req = tevent_req_create(mem_ctx, &state,
5279 struct rpccli_PNP_IsDockStationPresent_state);
5280 if (req == NULL) {
5281 return NULL;
5283 state->out_mem_ctx = NULL;
5284 state->dispatch_recv = cli->dispatch_recv;
5286 /* In parameters */
5288 /* Out parameters */
5290 /* Result */
5291 ZERO_STRUCT(state->orig.out.result);
5293 /* make a temporary copy, that we pass to the dispatch function */
5294 state->tmp = state->orig;
5296 subreq = cli->dispatch_send(state, ev, cli,
5297 &ndr_table_ntsvcs,
5298 NDR_PNP_ISDOCKSTATIONPRESENT,
5299 &state->tmp);
5300 if (tevent_req_nomem(subreq, req)) {
5301 return tevent_req_post(req, ev);
5303 tevent_req_set_callback(subreq, rpccli_PNP_IsDockStationPresent_done, req);
5304 return req;
5307 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq)
5309 struct tevent_req *req = tevent_req_callback_data(
5310 subreq, struct tevent_req);
5311 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5312 req, struct rpccli_PNP_IsDockStationPresent_state);
5313 NTSTATUS status;
5314 TALLOC_CTX *mem_ctx;
5316 if (state->out_mem_ctx) {
5317 mem_ctx = state->out_mem_ctx;
5318 } else {
5319 mem_ctx = state;
5322 status = state->dispatch_recv(subreq, mem_ctx);
5323 TALLOC_FREE(subreq);
5324 if (!NT_STATUS_IS_OK(status)) {
5325 tevent_req_nterror(req, status);
5326 return;
5329 /* Copy out parameters */
5331 /* Copy result */
5332 state->orig.out.result = state->tmp.out.result;
5334 /* Reset temporary structure */
5335 ZERO_STRUCT(state->tmp);
5337 tevent_req_done(req);
5340 NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req,
5341 TALLOC_CTX *mem_ctx,
5342 WERROR *result)
5344 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5345 req, struct rpccli_PNP_IsDockStationPresent_state);
5346 NTSTATUS status;
5348 if (tevent_req_is_nterror(req, &status)) {
5349 tevent_req_received(req);
5350 return status;
5353 /* Steal possbile out parameters to the callers context */
5354 talloc_steal(mem_ctx, state->out_mem_ctx);
5356 /* Return result */
5357 *result = state->orig.out.result;
5359 tevent_req_received(req);
5360 return NT_STATUS_OK;
5363 NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
5364 TALLOC_CTX *mem_ctx,
5365 WERROR *werror)
5367 struct PNP_IsDockStationPresent r;
5368 NTSTATUS status;
5370 /* In parameters */
5372 status = cli->dispatch(cli,
5373 mem_ctx,
5374 &ndr_table_ntsvcs,
5375 NDR_PNP_ISDOCKSTATIONPRESENT,
5376 &r);
5378 if (!NT_STATUS_IS_OK(status)) {
5379 return status;
5382 if (NT_STATUS_IS_ERR(status)) {
5383 return status;
5386 /* Return variables */
5388 /* Return result */
5389 if (werror) {
5390 *werror = r.out.result;
5393 return werror_to_ntstatus(r.out.result);
5396 struct rpccli_PNP_RequestEjectPC_state {
5397 struct PNP_RequestEjectPC orig;
5398 struct PNP_RequestEjectPC tmp;
5399 TALLOC_CTX *out_mem_ctx;
5400 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5403 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq);
5405 struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx,
5406 struct tevent_context *ev,
5407 struct rpc_pipe_client *cli)
5409 struct tevent_req *req;
5410 struct rpccli_PNP_RequestEjectPC_state *state;
5411 struct tevent_req *subreq;
5413 req = tevent_req_create(mem_ctx, &state,
5414 struct rpccli_PNP_RequestEjectPC_state);
5415 if (req == NULL) {
5416 return NULL;
5418 state->out_mem_ctx = NULL;
5419 state->dispatch_recv = cli->dispatch_recv;
5421 /* In parameters */
5423 /* Out parameters */
5425 /* Result */
5426 ZERO_STRUCT(state->orig.out.result);
5428 /* make a temporary copy, that we pass to the dispatch function */
5429 state->tmp = state->orig;
5431 subreq = cli->dispatch_send(state, ev, cli,
5432 &ndr_table_ntsvcs,
5433 NDR_PNP_REQUESTEJECTPC,
5434 &state->tmp);
5435 if (tevent_req_nomem(subreq, req)) {
5436 return tevent_req_post(req, ev);
5438 tevent_req_set_callback(subreq, rpccli_PNP_RequestEjectPC_done, req);
5439 return req;
5442 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq)
5444 struct tevent_req *req = tevent_req_callback_data(
5445 subreq, struct tevent_req);
5446 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5447 req, struct rpccli_PNP_RequestEjectPC_state);
5448 NTSTATUS status;
5449 TALLOC_CTX *mem_ctx;
5451 if (state->out_mem_ctx) {
5452 mem_ctx = state->out_mem_ctx;
5453 } else {
5454 mem_ctx = state;
5457 status = state->dispatch_recv(subreq, mem_ctx);
5458 TALLOC_FREE(subreq);
5459 if (!NT_STATUS_IS_OK(status)) {
5460 tevent_req_nterror(req, status);
5461 return;
5464 /* Copy out parameters */
5466 /* Copy result */
5467 state->orig.out.result = state->tmp.out.result;
5469 /* Reset temporary structure */
5470 ZERO_STRUCT(state->tmp);
5472 tevent_req_done(req);
5475 NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req,
5476 TALLOC_CTX *mem_ctx,
5477 WERROR *result)
5479 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
5480 req, struct rpccli_PNP_RequestEjectPC_state);
5481 NTSTATUS status;
5483 if (tevent_req_is_nterror(req, &status)) {
5484 tevent_req_received(req);
5485 return status;
5488 /* Steal possbile out parameters to the callers context */
5489 talloc_steal(mem_ctx, state->out_mem_ctx);
5491 /* Return result */
5492 *result = state->orig.out.result;
5494 tevent_req_received(req);
5495 return NT_STATUS_OK;
5498 NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
5499 TALLOC_CTX *mem_ctx,
5500 WERROR *werror)
5502 struct PNP_RequestEjectPC r;
5503 NTSTATUS status;
5505 /* In parameters */
5507 status = cli->dispatch(cli,
5508 mem_ctx,
5509 &ndr_table_ntsvcs,
5510 NDR_PNP_REQUESTEJECTPC,
5511 &r);
5513 if (!NT_STATUS_IS_OK(status)) {
5514 return status;
5517 if (NT_STATUS_IS_ERR(status)) {
5518 return status;
5521 /* Return variables */
5523 /* Return result */
5524 if (werror) {
5525 *werror = r.out.result;
5528 return werror_to_ntstatus(r.out.result);
5531 struct rpccli_PNP_HwProfFlags_state {
5532 struct PNP_HwProfFlags orig;
5533 struct PNP_HwProfFlags tmp;
5534 TALLOC_CTX *out_mem_ctx;
5535 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5538 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq);
5540 struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx,
5541 struct tevent_context *ev,
5542 struct rpc_pipe_client *cli,
5543 uint32_t _action /* [in] */,
5544 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
5545 uint32_t _config /* [in] */,
5546 uint32_t *_profile_flags /* [in,out] [ref] */,
5547 uint16_t *_veto_type /* [in,out] [unique] */,
5548 const char *_unknown5 /* [in] [unique,charset(UTF16)] */,
5549 const char **_unknown5a /* [out] [unique,charset(UTF16)] */,
5550 uint32_t _name_length /* [in] */,
5551 uint32_t _flags /* [in] */)
5553 struct tevent_req *req;
5554 struct rpccli_PNP_HwProfFlags_state *state;
5555 struct tevent_req *subreq;
5557 req = tevent_req_create(mem_ctx, &state,
5558 struct rpccli_PNP_HwProfFlags_state);
5559 if (req == NULL) {
5560 return NULL;
5562 state->out_mem_ctx = NULL;
5563 state->dispatch_recv = cli->dispatch_recv;
5565 /* In parameters */
5566 state->orig.in.action = _action;
5567 state->orig.in.devicepath = _devicepath;
5568 state->orig.in.config = _config;
5569 state->orig.in.profile_flags = _profile_flags;
5570 state->orig.in.veto_type = _veto_type;
5571 state->orig.in.unknown5 = _unknown5;
5572 state->orig.in.name_length = _name_length;
5573 state->orig.in.flags = _flags;
5575 /* Out parameters */
5576 state->orig.out.profile_flags = _profile_flags;
5577 state->orig.out.veto_type = _veto_type;
5578 state->orig.out.unknown5a = _unknown5a;
5580 /* Result */
5581 ZERO_STRUCT(state->orig.out.result);
5583 state->out_mem_ctx = talloc_named_const(state, 0,
5584 "rpccli_PNP_HwProfFlags_out_memory");
5585 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5586 return tevent_req_post(req, ev);
5589 /* make a temporary copy, that we pass to the dispatch function */
5590 state->tmp = state->orig;
5592 subreq = cli->dispatch_send(state, ev, cli,
5593 &ndr_table_ntsvcs,
5594 NDR_PNP_HWPROFFLAGS,
5595 &state->tmp);
5596 if (tevent_req_nomem(subreq, req)) {
5597 return tevent_req_post(req, ev);
5599 tevent_req_set_callback(subreq, rpccli_PNP_HwProfFlags_done, req);
5600 return req;
5603 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq)
5605 struct tevent_req *req = tevent_req_callback_data(
5606 subreq, struct tevent_req);
5607 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5608 req, struct rpccli_PNP_HwProfFlags_state);
5609 NTSTATUS status;
5610 TALLOC_CTX *mem_ctx;
5612 if (state->out_mem_ctx) {
5613 mem_ctx = state->out_mem_ctx;
5614 } else {
5615 mem_ctx = state;
5618 status = state->dispatch_recv(subreq, mem_ctx);
5619 TALLOC_FREE(subreq);
5620 if (!NT_STATUS_IS_OK(status)) {
5621 tevent_req_nterror(req, status);
5622 return;
5625 /* Copy out parameters */
5626 *state->orig.out.profile_flags = *state->tmp.out.profile_flags;
5627 if (state->orig.out.veto_type && state->tmp.out.veto_type) {
5628 *state->orig.out.veto_type = *state->tmp.out.veto_type;
5630 if (state->orig.out.unknown5a && state->tmp.out.unknown5a) {
5631 *state->orig.out.unknown5a = *state->tmp.out.unknown5a;
5634 /* Copy result */
5635 state->orig.out.result = state->tmp.out.result;
5637 /* Reset temporary structure */
5638 ZERO_STRUCT(state->tmp);
5640 tevent_req_done(req);
5643 NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req,
5644 TALLOC_CTX *mem_ctx,
5645 WERROR *result)
5647 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
5648 req, struct rpccli_PNP_HwProfFlags_state);
5649 NTSTATUS status;
5651 if (tevent_req_is_nterror(req, &status)) {
5652 tevent_req_received(req);
5653 return status;
5656 /* Steal possbile out parameters to the callers context */
5657 talloc_steal(mem_ctx, state->out_mem_ctx);
5659 /* Return result */
5660 *result = state->orig.out.result;
5662 tevent_req_received(req);
5663 return NT_STATUS_OK;
5666 NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
5667 TALLOC_CTX *mem_ctx,
5668 uint32_t action /* [in] */,
5669 const char *devicepath /* [in] [ref,charset(UTF16)] */,
5670 uint32_t config /* [in] */,
5671 uint32_t *profile_flags /* [in,out] [ref] */,
5672 uint16_t *veto_type /* [in,out] [unique] */,
5673 const char *unknown5 /* [in] [unique,charset(UTF16)] */,
5674 const char **unknown5a /* [out] [unique,charset(UTF16)] */,
5675 uint32_t name_length /* [in] */,
5676 uint32_t flags /* [in] */,
5677 WERROR *werror)
5679 struct PNP_HwProfFlags r;
5680 NTSTATUS status;
5682 /* In parameters */
5683 r.in.action = action;
5684 r.in.devicepath = devicepath;
5685 r.in.config = config;
5686 r.in.profile_flags = profile_flags;
5687 r.in.veto_type = veto_type;
5688 r.in.unknown5 = unknown5;
5689 r.in.name_length = name_length;
5690 r.in.flags = flags;
5692 status = cli->dispatch(cli,
5693 mem_ctx,
5694 &ndr_table_ntsvcs,
5695 NDR_PNP_HWPROFFLAGS,
5696 &r);
5698 if (!NT_STATUS_IS_OK(status)) {
5699 return status;
5702 if (NT_STATUS_IS_ERR(status)) {
5703 return status;
5706 /* Return variables */
5707 *profile_flags = *r.out.profile_flags;
5708 if (veto_type && r.out.veto_type) {
5709 *veto_type = *r.out.veto_type;
5711 if (unknown5a && r.out.unknown5a) {
5712 *unknown5a = *r.out.unknown5a;
5715 /* Return result */
5716 if (werror) {
5717 *werror = r.out.result;
5720 return werror_to_ntstatus(r.out.result);
5723 struct rpccli_PNP_GetHwProfInfo_state {
5724 struct PNP_GetHwProfInfo orig;
5725 struct PNP_GetHwProfInfo tmp;
5726 TALLOC_CTX *out_mem_ctx;
5727 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5730 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq);
5732 struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx,
5733 struct tevent_context *ev,
5734 struct rpc_pipe_client *cli,
5735 uint32_t _idx /* [in] */,
5736 struct PNP_HwProfInfo *_info /* [in,out] [ref] */,
5737 uint32_t _size /* [in] */,
5738 uint32_t _flags /* [in] */)
5740 struct tevent_req *req;
5741 struct rpccli_PNP_GetHwProfInfo_state *state;
5742 struct tevent_req *subreq;
5744 req = tevent_req_create(mem_ctx, &state,
5745 struct rpccli_PNP_GetHwProfInfo_state);
5746 if (req == NULL) {
5747 return NULL;
5749 state->out_mem_ctx = NULL;
5750 state->dispatch_recv = cli->dispatch_recv;
5752 /* In parameters */
5753 state->orig.in.idx = _idx;
5754 state->orig.in.info = _info;
5755 state->orig.in.size = _size;
5756 state->orig.in.flags = _flags;
5758 /* Out parameters */
5759 state->orig.out.info = _info;
5761 /* Result */
5762 ZERO_STRUCT(state->orig.out.result);
5764 state->out_mem_ctx = talloc_named_const(state, 0,
5765 "rpccli_PNP_GetHwProfInfo_out_memory");
5766 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5767 return tevent_req_post(req, ev);
5770 /* make a temporary copy, that we pass to the dispatch function */
5771 state->tmp = state->orig;
5773 subreq = cli->dispatch_send(state, ev, cli,
5774 &ndr_table_ntsvcs,
5775 NDR_PNP_GETHWPROFINFO,
5776 &state->tmp);
5777 if (tevent_req_nomem(subreq, req)) {
5778 return tevent_req_post(req, ev);
5780 tevent_req_set_callback(subreq, rpccli_PNP_GetHwProfInfo_done, req);
5781 return req;
5784 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq)
5786 struct tevent_req *req = tevent_req_callback_data(
5787 subreq, struct tevent_req);
5788 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5789 req, struct rpccli_PNP_GetHwProfInfo_state);
5790 NTSTATUS status;
5791 TALLOC_CTX *mem_ctx;
5793 if (state->out_mem_ctx) {
5794 mem_ctx = state->out_mem_ctx;
5795 } else {
5796 mem_ctx = state;
5799 status = state->dispatch_recv(subreq, mem_ctx);
5800 TALLOC_FREE(subreq);
5801 if (!NT_STATUS_IS_OK(status)) {
5802 tevent_req_nterror(req, status);
5803 return;
5806 /* Copy out parameters */
5807 *state->orig.out.info = *state->tmp.out.info;
5809 /* Copy result */
5810 state->orig.out.result = state->tmp.out.result;
5812 /* Reset temporary structure */
5813 ZERO_STRUCT(state->tmp);
5815 tevent_req_done(req);
5818 NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req,
5819 TALLOC_CTX *mem_ctx,
5820 WERROR *result)
5822 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
5823 req, struct rpccli_PNP_GetHwProfInfo_state);
5824 NTSTATUS status;
5826 if (tevent_req_is_nterror(req, &status)) {
5827 tevent_req_received(req);
5828 return status;
5831 /* Steal possbile out parameters to the callers context */
5832 talloc_steal(mem_ctx, state->out_mem_ctx);
5834 /* Return result */
5835 *result = state->orig.out.result;
5837 tevent_req_received(req);
5838 return NT_STATUS_OK;
5841 NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
5842 TALLOC_CTX *mem_ctx,
5843 uint32_t idx /* [in] */,
5844 struct PNP_HwProfInfo *info /* [in,out] [ref] */,
5845 uint32_t size /* [in] */,
5846 uint32_t flags /* [in] */,
5847 WERROR *werror)
5849 struct PNP_GetHwProfInfo r;
5850 NTSTATUS status;
5852 /* In parameters */
5853 r.in.idx = idx;
5854 r.in.info = info;
5855 r.in.size = size;
5856 r.in.flags = flags;
5858 status = cli->dispatch(cli,
5859 mem_ctx,
5860 &ndr_table_ntsvcs,
5861 NDR_PNP_GETHWPROFINFO,
5862 &r);
5864 if (!NT_STATUS_IS_OK(status)) {
5865 return status;
5868 if (NT_STATUS_IS_ERR(status)) {
5869 return status;
5872 /* Return variables */
5873 *info = *r.out.info;
5875 /* Return result */
5876 if (werror) {
5877 *werror = r.out.result;
5880 return werror_to_ntstatus(r.out.result);
5883 struct rpccli_PNP_AddEmptyLogConf_state {
5884 struct PNP_AddEmptyLogConf orig;
5885 struct PNP_AddEmptyLogConf tmp;
5886 TALLOC_CTX *out_mem_ctx;
5887 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5890 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq);
5892 struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx,
5893 struct tevent_context *ev,
5894 struct rpc_pipe_client *cli)
5896 struct tevent_req *req;
5897 struct rpccli_PNP_AddEmptyLogConf_state *state;
5898 struct tevent_req *subreq;
5900 req = tevent_req_create(mem_ctx, &state,
5901 struct rpccli_PNP_AddEmptyLogConf_state);
5902 if (req == NULL) {
5903 return NULL;
5905 state->out_mem_ctx = NULL;
5906 state->dispatch_recv = cli->dispatch_recv;
5908 /* In parameters */
5910 /* Out parameters */
5912 /* Result */
5913 ZERO_STRUCT(state->orig.out.result);
5915 /* make a temporary copy, that we pass to the dispatch function */
5916 state->tmp = state->orig;
5918 subreq = cli->dispatch_send(state, ev, cli,
5919 &ndr_table_ntsvcs,
5920 NDR_PNP_ADDEMPTYLOGCONF,
5921 &state->tmp);
5922 if (tevent_req_nomem(subreq, req)) {
5923 return tevent_req_post(req, ev);
5925 tevent_req_set_callback(subreq, rpccli_PNP_AddEmptyLogConf_done, req);
5926 return req;
5929 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq)
5931 struct tevent_req *req = tevent_req_callback_data(
5932 subreq, struct tevent_req);
5933 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5934 req, struct rpccli_PNP_AddEmptyLogConf_state);
5935 NTSTATUS status;
5936 TALLOC_CTX *mem_ctx;
5938 if (state->out_mem_ctx) {
5939 mem_ctx = state->out_mem_ctx;
5940 } else {
5941 mem_ctx = state;
5944 status = state->dispatch_recv(subreq, mem_ctx);
5945 TALLOC_FREE(subreq);
5946 if (!NT_STATUS_IS_OK(status)) {
5947 tevent_req_nterror(req, status);
5948 return;
5951 /* Copy out parameters */
5953 /* Copy result */
5954 state->orig.out.result = state->tmp.out.result;
5956 /* Reset temporary structure */
5957 ZERO_STRUCT(state->tmp);
5959 tevent_req_done(req);
5962 NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req,
5963 TALLOC_CTX *mem_ctx,
5964 WERROR *result)
5966 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
5967 req, struct rpccli_PNP_AddEmptyLogConf_state);
5968 NTSTATUS status;
5970 if (tevent_req_is_nterror(req, &status)) {
5971 tevent_req_received(req);
5972 return status;
5975 /* Steal possbile out parameters to the callers context */
5976 talloc_steal(mem_ctx, state->out_mem_ctx);
5978 /* Return result */
5979 *result = state->orig.out.result;
5981 tevent_req_received(req);
5982 return NT_STATUS_OK;
5985 NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
5986 TALLOC_CTX *mem_ctx,
5987 WERROR *werror)
5989 struct PNP_AddEmptyLogConf r;
5990 NTSTATUS status;
5992 /* In parameters */
5994 status = cli->dispatch(cli,
5995 mem_ctx,
5996 &ndr_table_ntsvcs,
5997 NDR_PNP_ADDEMPTYLOGCONF,
5998 &r);
6000 if (!NT_STATUS_IS_OK(status)) {
6001 return status;
6004 if (NT_STATUS_IS_ERR(status)) {
6005 return status;
6008 /* Return variables */
6010 /* Return result */
6011 if (werror) {
6012 *werror = r.out.result;
6015 return werror_to_ntstatus(r.out.result);
6018 struct rpccli_PNP_FreeLogConf_state {
6019 struct PNP_FreeLogConf orig;
6020 struct PNP_FreeLogConf tmp;
6021 TALLOC_CTX *out_mem_ctx;
6022 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6025 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq);
6027 struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx,
6028 struct tevent_context *ev,
6029 struct rpc_pipe_client *cli)
6031 struct tevent_req *req;
6032 struct rpccli_PNP_FreeLogConf_state *state;
6033 struct tevent_req *subreq;
6035 req = tevent_req_create(mem_ctx, &state,
6036 struct rpccli_PNP_FreeLogConf_state);
6037 if (req == NULL) {
6038 return NULL;
6040 state->out_mem_ctx = NULL;
6041 state->dispatch_recv = cli->dispatch_recv;
6043 /* In parameters */
6045 /* Out parameters */
6047 /* Result */
6048 ZERO_STRUCT(state->orig.out.result);
6050 /* make a temporary copy, that we pass to the dispatch function */
6051 state->tmp = state->orig;
6053 subreq = cli->dispatch_send(state, ev, cli,
6054 &ndr_table_ntsvcs,
6055 NDR_PNP_FREELOGCONF,
6056 &state->tmp);
6057 if (tevent_req_nomem(subreq, req)) {
6058 return tevent_req_post(req, ev);
6060 tevent_req_set_callback(subreq, rpccli_PNP_FreeLogConf_done, req);
6061 return req;
6064 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq)
6066 struct tevent_req *req = tevent_req_callback_data(
6067 subreq, struct tevent_req);
6068 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6069 req, struct rpccli_PNP_FreeLogConf_state);
6070 NTSTATUS status;
6071 TALLOC_CTX *mem_ctx;
6073 if (state->out_mem_ctx) {
6074 mem_ctx = state->out_mem_ctx;
6075 } else {
6076 mem_ctx = state;
6079 status = state->dispatch_recv(subreq, mem_ctx);
6080 TALLOC_FREE(subreq);
6081 if (!NT_STATUS_IS_OK(status)) {
6082 tevent_req_nterror(req, status);
6083 return;
6086 /* Copy out parameters */
6088 /* Copy result */
6089 state->orig.out.result = state->tmp.out.result;
6091 /* Reset temporary structure */
6092 ZERO_STRUCT(state->tmp);
6094 tevent_req_done(req);
6097 NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req,
6098 TALLOC_CTX *mem_ctx,
6099 WERROR *result)
6101 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6102 req, struct rpccli_PNP_FreeLogConf_state);
6103 NTSTATUS status;
6105 if (tevent_req_is_nterror(req, &status)) {
6106 tevent_req_received(req);
6107 return status;
6110 /* Steal possbile out parameters to the callers context */
6111 talloc_steal(mem_ctx, state->out_mem_ctx);
6113 /* Return result */
6114 *result = state->orig.out.result;
6116 tevent_req_received(req);
6117 return NT_STATUS_OK;
6120 NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
6121 TALLOC_CTX *mem_ctx,
6122 WERROR *werror)
6124 struct PNP_FreeLogConf r;
6125 NTSTATUS status;
6127 /* In parameters */
6129 status = cli->dispatch(cli,
6130 mem_ctx,
6131 &ndr_table_ntsvcs,
6132 NDR_PNP_FREELOGCONF,
6133 &r);
6135 if (!NT_STATUS_IS_OK(status)) {
6136 return status;
6139 if (NT_STATUS_IS_ERR(status)) {
6140 return status;
6143 /* Return variables */
6145 /* Return result */
6146 if (werror) {
6147 *werror = r.out.result;
6150 return werror_to_ntstatus(r.out.result);
6153 struct rpccli_PNP_GetFirstLogConf_state {
6154 struct PNP_GetFirstLogConf orig;
6155 struct PNP_GetFirstLogConf tmp;
6156 TALLOC_CTX *out_mem_ctx;
6157 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6160 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq);
6162 struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx,
6163 struct tevent_context *ev,
6164 struct rpc_pipe_client *cli)
6166 struct tevent_req *req;
6167 struct rpccli_PNP_GetFirstLogConf_state *state;
6168 struct tevent_req *subreq;
6170 req = tevent_req_create(mem_ctx, &state,
6171 struct rpccli_PNP_GetFirstLogConf_state);
6172 if (req == NULL) {
6173 return NULL;
6175 state->out_mem_ctx = NULL;
6176 state->dispatch_recv = cli->dispatch_recv;
6178 /* In parameters */
6180 /* Out parameters */
6182 /* Result */
6183 ZERO_STRUCT(state->orig.out.result);
6185 /* make a temporary copy, that we pass to the dispatch function */
6186 state->tmp = state->orig;
6188 subreq = cli->dispatch_send(state, ev, cli,
6189 &ndr_table_ntsvcs,
6190 NDR_PNP_GETFIRSTLOGCONF,
6191 &state->tmp);
6192 if (tevent_req_nomem(subreq, req)) {
6193 return tevent_req_post(req, ev);
6195 tevent_req_set_callback(subreq, rpccli_PNP_GetFirstLogConf_done, req);
6196 return req;
6199 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq)
6201 struct tevent_req *req = tevent_req_callback_data(
6202 subreq, struct tevent_req);
6203 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6204 req, struct rpccli_PNP_GetFirstLogConf_state);
6205 NTSTATUS status;
6206 TALLOC_CTX *mem_ctx;
6208 if (state->out_mem_ctx) {
6209 mem_ctx = state->out_mem_ctx;
6210 } else {
6211 mem_ctx = state;
6214 status = state->dispatch_recv(subreq, mem_ctx);
6215 TALLOC_FREE(subreq);
6216 if (!NT_STATUS_IS_OK(status)) {
6217 tevent_req_nterror(req, status);
6218 return;
6221 /* Copy out parameters */
6223 /* Copy result */
6224 state->orig.out.result = state->tmp.out.result;
6226 /* Reset temporary structure */
6227 ZERO_STRUCT(state->tmp);
6229 tevent_req_done(req);
6232 NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req,
6233 TALLOC_CTX *mem_ctx,
6234 WERROR *result)
6236 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6237 req, struct rpccli_PNP_GetFirstLogConf_state);
6238 NTSTATUS status;
6240 if (tevent_req_is_nterror(req, &status)) {
6241 tevent_req_received(req);
6242 return status;
6245 /* Steal possbile out parameters to the callers context */
6246 talloc_steal(mem_ctx, state->out_mem_ctx);
6248 /* Return result */
6249 *result = state->orig.out.result;
6251 tevent_req_received(req);
6252 return NT_STATUS_OK;
6255 NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
6256 TALLOC_CTX *mem_ctx,
6257 WERROR *werror)
6259 struct PNP_GetFirstLogConf r;
6260 NTSTATUS status;
6262 /* In parameters */
6264 status = cli->dispatch(cli,
6265 mem_ctx,
6266 &ndr_table_ntsvcs,
6267 NDR_PNP_GETFIRSTLOGCONF,
6268 &r);
6270 if (!NT_STATUS_IS_OK(status)) {
6271 return status;
6274 if (NT_STATUS_IS_ERR(status)) {
6275 return status;
6278 /* Return variables */
6280 /* Return result */
6281 if (werror) {
6282 *werror = r.out.result;
6285 return werror_to_ntstatus(r.out.result);
6288 struct rpccli_PNP_GetNextLogConf_state {
6289 struct PNP_GetNextLogConf orig;
6290 struct PNP_GetNextLogConf tmp;
6291 TALLOC_CTX *out_mem_ctx;
6292 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6295 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq);
6297 struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx,
6298 struct tevent_context *ev,
6299 struct rpc_pipe_client *cli)
6301 struct tevent_req *req;
6302 struct rpccli_PNP_GetNextLogConf_state *state;
6303 struct tevent_req *subreq;
6305 req = tevent_req_create(mem_ctx, &state,
6306 struct rpccli_PNP_GetNextLogConf_state);
6307 if (req == NULL) {
6308 return NULL;
6310 state->out_mem_ctx = NULL;
6311 state->dispatch_recv = cli->dispatch_recv;
6313 /* In parameters */
6315 /* Out parameters */
6317 /* Result */
6318 ZERO_STRUCT(state->orig.out.result);
6320 /* make a temporary copy, that we pass to the dispatch function */
6321 state->tmp = state->orig;
6323 subreq = cli->dispatch_send(state, ev, cli,
6324 &ndr_table_ntsvcs,
6325 NDR_PNP_GETNEXTLOGCONF,
6326 &state->tmp);
6327 if (tevent_req_nomem(subreq, req)) {
6328 return tevent_req_post(req, ev);
6330 tevent_req_set_callback(subreq, rpccli_PNP_GetNextLogConf_done, req);
6331 return req;
6334 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq)
6336 struct tevent_req *req = tevent_req_callback_data(
6337 subreq, struct tevent_req);
6338 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6339 req, struct rpccli_PNP_GetNextLogConf_state);
6340 NTSTATUS status;
6341 TALLOC_CTX *mem_ctx;
6343 if (state->out_mem_ctx) {
6344 mem_ctx = state->out_mem_ctx;
6345 } else {
6346 mem_ctx = state;
6349 status = state->dispatch_recv(subreq, mem_ctx);
6350 TALLOC_FREE(subreq);
6351 if (!NT_STATUS_IS_OK(status)) {
6352 tevent_req_nterror(req, status);
6353 return;
6356 /* Copy out parameters */
6358 /* Copy result */
6359 state->orig.out.result = state->tmp.out.result;
6361 /* Reset temporary structure */
6362 ZERO_STRUCT(state->tmp);
6364 tevent_req_done(req);
6367 NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req,
6368 TALLOC_CTX *mem_ctx,
6369 WERROR *result)
6371 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
6372 req, struct rpccli_PNP_GetNextLogConf_state);
6373 NTSTATUS status;
6375 if (tevent_req_is_nterror(req, &status)) {
6376 tevent_req_received(req);
6377 return status;
6380 /* Steal possbile out parameters to the callers context */
6381 talloc_steal(mem_ctx, state->out_mem_ctx);
6383 /* Return result */
6384 *result = state->orig.out.result;
6386 tevent_req_received(req);
6387 return NT_STATUS_OK;
6390 NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
6391 TALLOC_CTX *mem_ctx,
6392 WERROR *werror)
6394 struct PNP_GetNextLogConf r;
6395 NTSTATUS status;
6397 /* In parameters */
6399 status = cli->dispatch(cli,
6400 mem_ctx,
6401 &ndr_table_ntsvcs,
6402 NDR_PNP_GETNEXTLOGCONF,
6403 &r);
6405 if (!NT_STATUS_IS_OK(status)) {
6406 return status;
6409 if (NT_STATUS_IS_ERR(status)) {
6410 return status;
6413 /* Return variables */
6415 /* Return result */
6416 if (werror) {
6417 *werror = r.out.result;
6420 return werror_to_ntstatus(r.out.result);
6423 struct rpccli_PNP_GetLogConfPriority_state {
6424 struct PNP_GetLogConfPriority orig;
6425 struct PNP_GetLogConfPriority tmp;
6426 TALLOC_CTX *out_mem_ctx;
6427 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6430 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq);
6432 struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx,
6433 struct tevent_context *ev,
6434 struct rpc_pipe_client *cli)
6436 struct tevent_req *req;
6437 struct rpccli_PNP_GetLogConfPriority_state *state;
6438 struct tevent_req *subreq;
6440 req = tevent_req_create(mem_ctx, &state,
6441 struct rpccli_PNP_GetLogConfPriority_state);
6442 if (req == NULL) {
6443 return NULL;
6445 state->out_mem_ctx = NULL;
6446 state->dispatch_recv = cli->dispatch_recv;
6448 /* In parameters */
6450 /* Out parameters */
6452 /* Result */
6453 ZERO_STRUCT(state->orig.out.result);
6455 /* make a temporary copy, that we pass to the dispatch function */
6456 state->tmp = state->orig;
6458 subreq = cli->dispatch_send(state, ev, cli,
6459 &ndr_table_ntsvcs,
6460 NDR_PNP_GETLOGCONFPRIORITY,
6461 &state->tmp);
6462 if (tevent_req_nomem(subreq, req)) {
6463 return tevent_req_post(req, ev);
6465 tevent_req_set_callback(subreq, rpccli_PNP_GetLogConfPriority_done, req);
6466 return req;
6469 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq)
6471 struct tevent_req *req = tevent_req_callback_data(
6472 subreq, struct tevent_req);
6473 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6474 req, struct rpccli_PNP_GetLogConfPriority_state);
6475 NTSTATUS status;
6476 TALLOC_CTX *mem_ctx;
6478 if (state->out_mem_ctx) {
6479 mem_ctx = state->out_mem_ctx;
6480 } else {
6481 mem_ctx = state;
6484 status = state->dispatch_recv(subreq, mem_ctx);
6485 TALLOC_FREE(subreq);
6486 if (!NT_STATUS_IS_OK(status)) {
6487 tevent_req_nterror(req, status);
6488 return;
6491 /* Copy out parameters */
6493 /* Copy result */
6494 state->orig.out.result = state->tmp.out.result;
6496 /* Reset temporary structure */
6497 ZERO_STRUCT(state->tmp);
6499 tevent_req_done(req);
6502 NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req,
6503 TALLOC_CTX *mem_ctx,
6504 WERROR *result)
6506 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
6507 req, struct rpccli_PNP_GetLogConfPriority_state);
6508 NTSTATUS status;
6510 if (tevent_req_is_nterror(req, &status)) {
6511 tevent_req_received(req);
6512 return status;
6515 /* Steal possbile out parameters to the callers context */
6516 talloc_steal(mem_ctx, state->out_mem_ctx);
6518 /* Return result */
6519 *result = state->orig.out.result;
6521 tevent_req_received(req);
6522 return NT_STATUS_OK;
6525 NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
6526 TALLOC_CTX *mem_ctx,
6527 WERROR *werror)
6529 struct PNP_GetLogConfPriority r;
6530 NTSTATUS status;
6532 /* In parameters */
6534 status = cli->dispatch(cli,
6535 mem_ctx,
6536 &ndr_table_ntsvcs,
6537 NDR_PNP_GETLOGCONFPRIORITY,
6538 &r);
6540 if (!NT_STATUS_IS_OK(status)) {
6541 return status;
6544 if (NT_STATUS_IS_ERR(status)) {
6545 return status;
6548 /* Return variables */
6550 /* Return result */
6551 if (werror) {
6552 *werror = r.out.result;
6555 return werror_to_ntstatus(r.out.result);
6558 struct rpccli_PNP_AddResDes_state {
6559 struct PNP_AddResDes orig;
6560 struct PNP_AddResDes tmp;
6561 TALLOC_CTX *out_mem_ctx;
6562 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6565 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq);
6567 struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx,
6568 struct tevent_context *ev,
6569 struct rpc_pipe_client *cli)
6571 struct tevent_req *req;
6572 struct rpccli_PNP_AddResDes_state *state;
6573 struct tevent_req *subreq;
6575 req = tevent_req_create(mem_ctx, &state,
6576 struct rpccli_PNP_AddResDes_state);
6577 if (req == NULL) {
6578 return NULL;
6580 state->out_mem_ctx = NULL;
6581 state->dispatch_recv = cli->dispatch_recv;
6583 /* In parameters */
6585 /* Out parameters */
6587 /* Result */
6588 ZERO_STRUCT(state->orig.out.result);
6590 /* make a temporary copy, that we pass to the dispatch function */
6591 state->tmp = state->orig;
6593 subreq = cli->dispatch_send(state, ev, cli,
6594 &ndr_table_ntsvcs,
6595 NDR_PNP_ADDRESDES,
6596 &state->tmp);
6597 if (tevent_req_nomem(subreq, req)) {
6598 return tevent_req_post(req, ev);
6600 tevent_req_set_callback(subreq, rpccli_PNP_AddResDes_done, req);
6601 return req;
6604 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq)
6606 struct tevent_req *req = tevent_req_callback_data(
6607 subreq, struct tevent_req);
6608 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6609 req, struct rpccli_PNP_AddResDes_state);
6610 NTSTATUS status;
6611 TALLOC_CTX *mem_ctx;
6613 if (state->out_mem_ctx) {
6614 mem_ctx = state->out_mem_ctx;
6615 } else {
6616 mem_ctx = state;
6619 status = state->dispatch_recv(subreq, mem_ctx);
6620 TALLOC_FREE(subreq);
6621 if (!NT_STATUS_IS_OK(status)) {
6622 tevent_req_nterror(req, status);
6623 return;
6626 /* Copy out parameters */
6628 /* Copy result */
6629 state->orig.out.result = state->tmp.out.result;
6631 /* Reset temporary structure */
6632 ZERO_STRUCT(state->tmp);
6634 tevent_req_done(req);
6637 NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req,
6638 TALLOC_CTX *mem_ctx,
6639 WERROR *result)
6641 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
6642 req, struct rpccli_PNP_AddResDes_state);
6643 NTSTATUS status;
6645 if (tevent_req_is_nterror(req, &status)) {
6646 tevent_req_received(req);
6647 return status;
6650 /* Steal possbile out parameters to the callers context */
6651 talloc_steal(mem_ctx, state->out_mem_ctx);
6653 /* Return result */
6654 *result = state->orig.out.result;
6656 tevent_req_received(req);
6657 return NT_STATUS_OK;
6660 NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
6661 TALLOC_CTX *mem_ctx,
6662 WERROR *werror)
6664 struct PNP_AddResDes r;
6665 NTSTATUS status;
6667 /* In parameters */
6669 status = cli->dispatch(cli,
6670 mem_ctx,
6671 &ndr_table_ntsvcs,
6672 NDR_PNP_ADDRESDES,
6673 &r);
6675 if (!NT_STATUS_IS_OK(status)) {
6676 return status;
6679 if (NT_STATUS_IS_ERR(status)) {
6680 return status;
6683 /* Return variables */
6685 /* Return result */
6686 if (werror) {
6687 *werror = r.out.result;
6690 return werror_to_ntstatus(r.out.result);
6693 struct rpccli_PNP_FreeResDes_state {
6694 struct PNP_FreeResDes orig;
6695 struct PNP_FreeResDes tmp;
6696 TALLOC_CTX *out_mem_ctx;
6697 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6700 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq);
6702 struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx,
6703 struct tevent_context *ev,
6704 struct rpc_pipe_client *cli)
6706 struct tevent_req *req;
6707 struct rpccli_PNP_FreeResDes_state *state;
6708 struct tevent_req *subreq;
6710 req = tevent_req_create(mem_ctx, &state,
6711 struct rpccli_PNP_FreeResDes_state);
6712 if (req == NULL) {
6713 return NULL;
6715 state->out_mem_ctx = NULL;
6716 state->dispatch_recv = cli->dispatch_recv;
6718 /* In parameters */
6720 /* Out parameters */
6722 /* Result */
6723 ZERO_STRUCT(state->orig.out.result);
6725 /* make a temporary copy, that we pass to the dispatch function */
6726 state->tmp = state->orig;
6728 subreq = cli->dispatch_send(state, ev, cli,
6729 &ndr_table_ntsvcs,
6730 NDR_PNP_FREERESDES,
6731 &state->tmp);
6732 if (tevent_req_nomem(subreq, req)) {
6733 return tevent_req_post(req, ev);
6735 tevent_req_set_callback(subreq, rpccli_PNP_FreeResDes_done, req);
6736 return req;
6739 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq)
6741 struct tevent_req *req = tevent_req_callback_data(
6742 subreq, struct tevent_req);
6743 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6744 req, struct rpccli_PNP_FreeResDes_state);
6745 NTSTATUS status;
6746 TALLOC_CTX *mem_ctx;
6748 if (state->out_mem_ctx) {
6749 mem_ctx = state->out_mem_ctx;
6750 } else {
6751 mem_ctx = state;
6754 status = state->dispatch_recv(subreq, mem_ctx);
6755 TALLOC_FREE(subreq);
6756 if (!NT_STATUS_IS_OK(status)) {
6757 tevent_req_nterror(req, status);
6758 return;
6761 /* Copy out parameters */
6763 /* Copy result */
6764 state->orig.out.result = state->tmp.out.result;
6766 /* Reset temporary structure */
6767 ZERO_STRUCT(state->tmp);
6769 tevent_req_done(req);
6772 NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req,
6773 TALLOC_CTX *mem_ctx,
6774 WERROR *result)
6776 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
6777 req, struct rpccli_PNP_FreeResDes_state);
6778 NTSTATUS status;
6780 if (tevent_req_is_nterror(req, &status)) {
6781 tevent_req_received(req);
6782 return status;
6785 /* Steal possbile out parameters to the callers context */
6786 talloc_steal(mem_ctx, state->out_mem_ctx);
6788 /* Return result */
6789 *result = state->orig.out.result;
6791 tevent_req_received(req);
6792 return NT_STATUS_OK;
6795 NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
6796 TALLOC_CTX *mem_ctx,
6797 WERROR *werror)
6799 struct PNP_FreeResDes r;
6800 NTSTATUS status;
6802 /* In parameters */
6804 status = cli->dispatch(cli,
6805 mem_ctx,
6806 &ndr_table_ntsvcs,
6807 NDR_PNP_FREERESDES,
6808 &r);
6810 if (!NT_STATUS_IS_OK(status)) {
6811 return status;
6814 if (NT_STATUS_IS_ERR(status)) {
6815 return status;
6818 /* Return variables */
6820 /* Return result */
6821 if (werror) {
6822 *werror = r.out.result;
6825 return werror_to_ntstatus(r.out.result);
6828 struct rpccli_PNP_GetNextResDes_state {
6829 struct PNP_GetNextResDes orig;
6830 struct PNP_GetNextResDes tmp;
6831 TALLOC_CTX *out_mem_ctx;
6832 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6835 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq);
6837 struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx,
6838 struct tevent_context *ev,
6839 struct rpc_pipe_client *cli)
6841 struct tevent_req *req;
6842 struct rpccli_PNP_GetNextResDes_state *state;
6843 struct tevent_req *subreq;
6845 req = tevent_req_create(mem_ctx, &state,
6846 struct rpccli_PNP_GetNextResDes_state);
6847 if (req == NULL) {
6848 return NULL;
6850 state->out_mem_ctx = NULL;
6851 state->dispatch_recv = cli->dispatch_recv;
6853 /* In parameters */
6855 /* Out parameters */
6857 /* Result */
6858 ZERO_STRUCT(state->orig.out.result);
6860 /* make a temporary copy, that we pass to the dispatch function */
6861 state->tmp = state->orig;
6863 subreq = cli->dispatch_send(state, ev, cli,
6864 &ndr_table_ntsvcs,
6865 NDR_PNP_GETNEXTRESDES,
6866 &state->tmp);
6867 if (tevent_req_nomem(subreq, req)) {
6868 return tevent_req_post(req, ev);
6870 tevent_req_set_callback(subreq, rpccli_PNP_GetNextResDes_done, req);
6871 return req;
6874 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq)
6876 struct tevent_req *req = tevent_req_callback_data(
6877 subreq, struct tevent_req);
6878 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6879 req, struct rpccli_PNP_GetNextResDes_state);
6880 NTSTATUS status;
6881 TALLOC_CTX *mem_ctx;
6883 if (state->out_mem_ctx) {
6884 mem_ctx = state->out_mem_ctx;
6885 } else {
6886 mem_ctx = state;
6889 status = state->dispatch_recv(subreq, mem_ctx);
6890 TALLOC_FREE(subreq);
6891 if (!NT_STATUS_IS_OK(status)) {
6892 tevent_req_nterror(req, status);
6893 return;
6896 /* Copy out parameters */
6898 /* Copy result */
6899 state->orig.out.result = state->tmp.out.result;
6901 /* Reset temporary structure */
6902 ZERO_STRUCT(state->tmp);
6904 tevent_req_done(req);
6907 NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req,
6908 TALLOC_CTX *mem_ctx,
6909 WERROR *result)
6911 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
6912 req, struct rpccli_PNP_GetNextResDes_state);
6913 NTSTATUS status;
6915 if (tevent_req_is_nterror(req, &status)) {
6916 tevent_req_received(req);
6917 return status;
6920 /* Steal possbile out parameters to the callers context */
6921 talloc_steal(mem_ctx, state->out_mem_ctx);
6923 /* Return result */
6924 *result = state->orig.out.result;
6926 tevent_req_received(req);
6927 return NT_STATUS_OK;
6930 NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
6931 TALLOC_CTX *mem_ctx,
6932 WERROR *werror)
6934 struct PNP_GetNextResDes r;
6935 NTSTATUS status;
6937 /* In parameters */
6939 status = cli->dispatch(cli,
6940 mem_ctx,
6941 &ndr_table_ntsvcs,
6942 NDR_PNP_GETNEXTRESDES,
6943 &r);
6945 if (!NT_STATUS_IS_OK(status)) {
6946 return status;
6949 if (NT_STATUS_IS_ERR(status)) {
6950 return status;
6953 /* Return variables */
6955 /* Return result */
6956 if (werror) {
6957 *werror = r.out.result;
6960 return werror_to_ntstatus(r.out.result);
6963 struct rpccli_PNP_GetResDesData_state {
6964 struct PNP_GetResDesData orig;
6965 struct PNP_GetResDesData tmp;
6966 TALLOC_CTX *out_mem_ctx;
6967 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6970 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq);
6972 struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx,
6973 struct tevent_context *ev,
6974 struct rpc_pipe_client *cli)
6976 struct tevent_req *req;
6977 struct rpccli_PNP_GetResDesData_state *state;
6978 struct tevent_req *subreq;
6980 req = tevent_req_create(mem_ctx, &state,
6981 struct rpccli_PNP_GetResDesData_state);
6982 if (req == NULL) {
6983 return NULL;
6985 state->out_mem_ctx = NULL;
6986 state->dispatch_recv = cli->dispatch_recv;
6988 /* In parameters */
6990 /* Out parameters */
6992 /* Result */
6993 ZERO_STRUCT(state->orig.out.result);
6995 /* make a temporary copy, that we pass to the dispatch function */
6996 state->tmp = state->orig;
6998 subreq = cli->dispatch_send(state, ev, cli,
6999 &ndr_table_ntsvcs,
7000 NDR_PNP_GETRESDESDATA,
7001 &state->tmp);
7002 if (tevent_req_nomem(subreq, req)) {
7003 return tevent_req_post(req, ev);
7005 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesData_done, req);
7006 return req;
7009 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq)
7011 struct tevent_req *req = tevent_req_callback_data(
7012 subreq, struct tevent_req);
7013 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7014 req, struct rpccli_PNP_GetResDesData_state);
7015 NTSTATUS status;
7016 TALLOC_CTX *mem_ctx;
7018 if (state->out_mem_ctx) {
7019 mem_ctx = state->out_mem_ctx;
7020 } else {
7021 mem_ctx = state;
7024 status = state->dispatch_recv(subreq, mem_ctx);
7025 TALLOC_FREE(subreq);
7026 if (!NT_STATUS_IS_OK(status)) {
7027 tevent_req_nterror(req, status);
7028 return;
7031 /* Copy out parameters */
7033 /* Copy result */
7034 state->orig.out.result = state->tmp.out.result;
7036 /* Reset temporary structure */
7037 ZERO_STRUCT(state->tmp);
7039 tevent_req_done(req);
7042 NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req,
7043 TALLOC_CTX *mem_ctx,
7044 WERROR *result)
7046 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7047 req, struct rpccli_PNP_GetResDesData_state);
7048 NTSTATUS status;
7050 if (tevent_req_is_nterror(req, &status)) {
7051 tevent_req_received(req);
7052 return status;
7055 /* Steal possbile out parameters to the callers context */
7056 talloc_steal(mem_ctx, state->out_mem_ctx);
7058 /* Return result */
7059 *result = state->orig.out.result;
7061 tevent_req_received(req);
7062 return NT_STATUS_OK;
7065 NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
7066 TALLOC_CTX *mem_ctx,
7067 WERROR *werror)
7069 struct PNP_GetResDesData r;
7070 NTSTATUS status;
7072 /* In parameters */
7074 status = cli->dispatch(cli,
7075 mem_ctx,
7076 &ndr_table_ntsvcs,
7077 NDR_PNP_GETRESDESDATA,
7078 &r);
7080 if (!NT_STATUS_IS_OK(status)) {
7081 return status;
7084 if (NT_STATUS_IS_ERR(status)) {
7085 return status;
7088 /* Return variables */
7090 /* Return result */
7091 if (werror) {
7092 *werror = r.out.result;
7095 return werror_to_ntstatus(r.out.result);
7098 struct rpccli_PNP_GetResDesDataSize_state {
7099 struct PNP_GetResDesDataSize orig;
7100 struct PNP_GetResDesDataSize tmp;
7101 TALLOC_CTX *out_mem_ctx;
7102 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7105 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq);
7107 struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx,
7108 struct tevent_context *ev,
7109 struct rpc_pipe_client *cli)
7111 struct tevent_req *req;
7112 struct rpccli_PNP_GetResDesDataSize_state *state;
7113 struct tevent_req *subreq;
7115 req = tevent_req_create(mem_ctx, &state,
7116 struct rpccli_PNP_GetResDesDataSize_state);
7117 if (req == NULL) {
7118 return NULL;
7120 state->out_mem_ctx = NULL;
7121 state->dispatch_recv = cli->dispatch_recv;
7123 /* In parameters */
7125 /* Out parameters */
7127 /* Result */
7128 ZERO_STRUCT(state->orig.out.result);
7130 /* make a temporary copy, that we pass to the dispatch function */
7131 state->tmp = state->orig;
7133 subreq = cli->dispatch_send(state, ev, cli,
7134 &ndr_table_ntsvcs,
7135 NDR_PNP_GETRESDESDATASIZE,
7136 &state->tmp);
7137 if (tevent_req_nomem(subreq, req)) {
7138 return tevent_req_post(req, ev);
7140 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesDataSize_done, req);
7141 return req;
7144 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq)
7146 struct tevent_req *req = tevent_req_callback_data(
7147 subreq, struct tevent_req);
7148 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7149 req, struct rpccli_PNP_GetResDesDataSize_state);
7150 NTSTATUS status;
7151 TALLOC_CTX *mem_ctx;
7153 if (state->out_mem_ctx) {
7154 mem_ctx = state->out_mem_ctx;
7155 } else {
7156 mem_ctx = state;
7159 status = state->dispatch_recv(subreq, mem_ctx);
7160 TALLOC_FREE(subreq);
7161 if (!NT_STATUS_IS_OK(status)) {
7162 tevent_req_nterror(req, status);
7163 return;
7166 /* Copy out parameters */
7168 /* Copy result */
7169 state->orig.out.result = state->tmp.out.result;
7171 /* Reset temporary structure */
7172 ZERO_STRUCT(state->tmp);
7174 tevent_req_done(req);
7177 NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req,
7178 TALLOC_CTX *mem_ctx,
7179 WERROR *result)
7181 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7182 req, struct rpccli_PNP_GetResDesDataSize_state);
7183 NTSTATUS status;
7185 if (tevent_req_is_nterror(req, &status)) {
7186 tevent_req_received(req);
7187 return status;
7190 /* Steal possbile out parameters to the callers context */
7191 talloc_steal(mem_ctx, state->out_mem_ctx);
7193 /* Return result */
7194 *result = state->orig.out.result;
7196 tevent_req_received(req);
7197 return NT_STATUS_OK;
7200 NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
7201 TALLOC_CTX *mem_ctx,
7202 WERROR *werror)
7204 struct PNP_GetResDesDataSize r;
7205 NTSTATUS status;
7207 /* In parameters */
7209 status = cli->dispatch(cli,
7210 mem_ctx,
7211 &ndr_table_ntsvcs,
7212 NDR_PNP_GETRESDESDATASIZE,
7213 &r);
7215 if (!NT_STATUS_IS_OK(status)) {
7216 return status;
7219 if (NT_STATUS_IS_ERR(status)) {
7220 return status;
7223 /* Return variables */
7225 /* Return result */
7226 if (werror) {
7227 *werror = r.out.result;
7230 return werror_to_ntstatus(r.out.result);
7233 struct rpccli_PNP_ModifyResDes_state {
7234 struct PNP_ModifyResDes orig;
7235 struct PNP_ModifyResDes tmp;
7236 TALLOC_CTX *out_mem_ctx;
7237 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7240 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq);
7242 struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx,
7243 struct tevent_context *ev,
7244 struct rpc_pipe_client *cli)
7246 struct tevent_req *req;
7247 struct rpccli_PNP_ModifyResDes_state *state;
7248 struct tevent_req *subreq;
7250 req = tevent_req_create(mem_ctx, &state,
7251 struct rpccli_PNP_ModifyResDes_state);
7252 if (req == NULL) {
7253 return NULL;
7255 state->out_mem_ctx = NULL;
7256 state->dispatch_recv = cli->dispatch_recv;
7258 /* In parameters */
7260 /* Out parameters */
7262 /* Result */
7263 ZERO_STRUCT(state->orig.out.result);
7265 /* make a temporary copy, that we pass to the dispatch function */
7266 state->tmp = state->orig;
7268 subreq = cli->dispatch_send(state, ev, cli,
7269 &ndr_table_ntsvcs,
7270 NDR_PNP_MODIFYRESDES,
7271 &state->tmp);
7272 if (tevent_req_nomem(subreq, req)) {
7273 return tevent_req_post(req, ev);
7275 tevent_req_set_callback(subreq, rpccli_PNP_ModifyResDes_done, req);
7276 return req;
7279 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq)
7281 struct tevent_req *req = tevent_req_callback_data(
7282 subreq, struct tevent_req);
7283 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7284 req, struct rpccli_PNP_ModifyResDes_state);
7285 NTSTATUS status;
7286 TALLOC_CTX *mem_ctx;
7288 if (state->out_mem_ctx) {
7289 mem_ctx = state->out_mem_ctx;
7290 } else {
7291 mem_ctx = state;
7294 status = state->dispatch_recv(subreq, mem_ctx);
7295 TALLOC_FREE(subreq);
7296 if (!NT_STATUS_IS_OK(status)) {
7297 tevent_req_nterror(req, status);
7298 return;
7301 /* Copy out parameters */
7303 /* Copy result */
7304 state->orig.out.result = state->tmp.out.result;
7306 /* Reset temporary structure */
7307 ZERO_STRUCT(state->tmp);
7309 tevent_req_done(req);
7312 NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req,
7313 TALLOC_CTX *mem_ctx,
7314 WERROR *result)
7316 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
7317 req, struct rpccli_PNP_ModifyResDes_state);
7318 NTSTATUS status;
7320 if (tevent_req_is_nterror(req, &status)) {
7321 tevent_req_received(req);
7322 return status;
7325 /* Steal possbile out parameters to the callers context */
7326 talloc_steal(mem_ctx, state->out_mem_ctx);
7328 /* Return result */
7329 *result = state->orig.out.result;
7331 tevent_req_received(req);
7332 return NT_STATUS_OK;
7335 NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
7336 TALLOC_CTX *mem_ctx,
7337 WERROR *werror)
7339 struct PNP_ModifyResDes r;
7340 NTSTATUS status;
7342 /* In parameters */
7344 status = cli->dispatch(cli,
7345 mem_ctx,
7346 &ndr_table_ntsvcs,
7347 NDR_PNP_MODIFYRESDES,
7348 &r);
7350 if (!NT_STATUS_IS_OK(status)) {
7351 return status;
7354 if (NT_STATUS_IS_ERR(status)) {
7355 return status;
7358 /* Return variables */
7360 /* Return result */
7361 if (werror) {
7362 *werror = r.out.result;
7365 return werror_to_ntstatus(r.out.result);
7368 struct rpccli_PNP_DetectResourceLimit_state {
7369 struct PNP_DetectResourceLimit orig;
7370 struct PNP_DetectResourceLimit tmp;
7371 TALLOC_CTX *out_mem_ctx;
7372 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7375 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq);
7377 struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx,
7378 struct tevent_context *ev,
7379 struct rpc_pipe_client *cli)
7381 struct tevent_req *req;
7382 struct rpccli_PNP_DetectResourceLimit_state *state;
7383 struct tevent_req *subreq;
7385 req = tevent_req_create(mem_ctx, &state,
7386 struct rpccli_PNP_DetectResourceLimit_state);
7387 if (req == NULL) {
7388 return NULL;
7390 state->out_mem_ctx = NULL;
7391 state->dispatch_recv = cli->dispatch_recv;
7393 /* In parameters */
7395 /* Out parameters */
7397 /* Result */
7398 ZERO_STRUCT(state->orig.out.result);
7400 /* make a temporary copy, that we pass to the dispatch function */
7401 state->tmp = state->orig;
7403 subreq = cli->dispatch_send(state, ev, cli,
7404 &ndr_table_ntsvcs,
7405 NDR_PNP_DETECTRESOURCELIMIT,
7406 &state->tmp);
7407 if (tevent_req_nomem(subreq, req)) {
7408 return tevent_req_post(req, ev);
7410 tevent_req_set_callback(subreq, rpccli_PNP_DetectResourceLimit_done, req);
7411 return req;
7414 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq)
7416 struct tevent_req *req = tevent_req_callback_data(
7417 subreq, struct tevent_req);
7418 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7419 req, struct rpccli_PNP_DetectResourceLimit_state);
7420 NTSTATUS status;
7421 TALLOC_CTX *mem_ctx;
7423 if (state->out_mem_ctx) {
7424 mem_ctx = state->out_mem_ctx;
7425 } else {
7426 mem_ctx = state;
7429 status = state->dispatch_recv(subreq, mem_ctx);
7430 TALLOC_FREE(subreq);
7431 if (!NT_STATUS_IS_OK(status)) {
7432 tevent_req_nterror(req, status);
7433 return;
7436 /* Copy out parameters */
7438 /* Copy result */
7439 state->orig.out.result = state->tmp.out.result;
7441 /* Reset temporary structure */
7442 ZERO_STRUCT(state->tmp);
7444 tevent_req_done(req);
7447 NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req,
7448 TALLOC_CTX *mem_ctx,
7449 WERROR *result)
7451 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
7452 req, struct rpccli_PNP_DetectResourceLimit_state);
7453 NTSTATUS status;
7455 if (tevent_req_is_nterror(req, &status)) {
7456 tevent_req_received(req);
7457 return status;
7460 /* Steal possbile out parameters to the callers context */
7461 talloc_steal(mem_ctx, state->out_mem_ctx);
7463 /* Return result */
7464 *result = state->orig.out.result;
7466 tevent_req_received(req);
7467 return NT_STATUS_OK;
7470 NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
7471 TALLOC_CTX *mem_ctx,
7472 WERROR *werror)
7474 struct PNP_DetectResourceLimit r;
7475 NTSTATUS status;
7477 /* In parameters */
7479 status = cli->dispatch(cli,
7480 mem_ctx,
7481 &ndr_table_ntsvcs,
7482 NDR_PNP_DETECTRESOURCELIMIT,
7483 &r);
7485 if (!NT_STATUS_IS_OK(status)) {
7486 return status;
7489 if (NT_STATUS_IS_ERR(status)) {
7490 return status;
7493 /* Return variables */
7495 /* Return result */
7496 if (werror) {
7497 *werror = r.out.result;
7500 return werror_to_ntstatus(r.out.result);
7503 struct rpccli_PNP_QueryResConfList_state {
7504 struct PNP_QueryResConfList orig;
7505 struct PNP_QueryResConfList tmp;
7506 TALLOC_CTX *out_mem_ctx;
7507 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7510 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq);
7512 struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx,
7513 struct tevent_context *ev,
7514 struct rpc_pipe_client *cli)
7516 struct tevent_req *req;
7517 struct rpccli_PNP_QueryResConfList_state *state;
7518 struct tevent_req *subreq;
7520 req = tevent_req_create(mem_ctx, &state,
7521 struct rpccli_PNP_QueryResConfList_state);
7522 if (req == NULL) {
7523 return NULL;
7525 state->out_mem_ctx = NULL;
7526 state->dispatch_recv = cli->dispatch_recv;
7528 /* In parameters */
7530 /* Out parameters */
7532 /* Result */
7533 ZERO_STRUCT(state->orig.out.result);
7535 /* make a temporary copy, that we pass to the dispatch function */
7536 state->tmp = state->orig;
7538 subreq = cli->dispatch_send(state, ev, cli,
7539 &ndr_table_ntsvcs,
7540 NDR_PNP_QUERYRESCONFLIST,
7541 &state->tmp);
7542 if (tevent_req_nomem(subreq, req)) {
7543 return tevent_req_post(req, ev);
7545 tevent_req_set_callback(subreq, rpccli_PNP_QueryResConfList_done, req);
7546 return req;
7549 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq)
7551 struct tevent_req *req = tevent_req_callback_data(
7552 subreq, struct tevent_req);
7553 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7554 req, struct rpccli_PNP_QueryResConfList_state);
7555 NTSTATUS status;
7556 TALLOC_CTX *mem_ctx;
7558 if (state->out_mem_ctx) {
7559 mem_ctx = state->out_mem_ctx;
7560 } else {
7561 mem_ctx = state;
7564 status = state->dispatch_recv(subreq, mem_ctx);
7565 TALLOC_FREE(subreq);
7566 if (!NT_STATUS_IS_OK(status)) {
7567 tevent_req_nterror(req, status);
7568 return;
7571 /* Copy out parameters */
7573 /* Copy result */
7574 state->orig.out.result = state->tmp.out.result;
7576 /* Reset temporary structure */
7577 ZERO_STRUCT(state->tmp);
7579 tevent_req_done(req);
7582 NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req,
7583 TALLOC_CTX *mem_ctx,
7584 WERROR *result)
7586 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
7587 req, struct rpccli_PNP_QueryResConfList_state);
7588 NTSTATUS status;
7590 if (tevent_req_is_nterror(req, &status)) {
7591 tevent_req_received(req);
7592 return status;
7595 /* Steal possbile out parameters to the callers context */
7596 talloc_steal(mem_ctx, state->out_mem_ctx);
7598 /* Return result */
7599 *result = state->orig.out.result;
7601 tevent_req_received(req);
7602 return NT_STATUS_OK;
7605 NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
7606 TALLOC_CTX *mem_ctx,
7607 WERROR *werror)
7609 struct PNP_QueryResConfList r;
7610 NTSTATUS status;
7612 /* In parameters */
7614 status = cli->dispatch(cli,
7615 mem_ctx,
7616 &ndr_table_ntsvcs,
7617 NDR_PNP_QUERYRESCONFLIST,
7618 &r);
7620 if (!NT_STATUS_IS_OK(status)) {
7621 return status;
7624 if (NT_STATUS_IS_ERR(status)) {
7625 return status;
7628 /* Return variables */
7630 /* Return result */
7631 if (werror) {
7632 *werror = r.out.result;
7635 return werror_to_ntstatus(r.out.result);
7638 struct rpccli_PNP_SetHwProf_state {
7639 struct PNP_SetHwProf orig;
7640 struct PNP_SetHwProf tmp;
7641 TALLOC_CTX *out_mem_ctx;
7642 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7645 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq);
7647 struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx,
7648 struct tevent_context *ev,
7649 struct rpc_pipe_client *cli)
7651 struct tevent_req *req;
7652 struct rpccli_PNP_SetHwProf_state *state;
7653 struct tevent_req *subreq;
7655 req = tevent_req_create(mem_ctx, &state,
7656 struct rpccli_PNP_SetHwProf_state);
7657 if (req == NULL) {
7658 return NULL;
7660 state->out_mem_ctx = NULL;
7661 state->dispatch_recv = cli->dispatch_recv;
7663 /* In parameters */
7665 /* Out parameters */
7667 /* Result */
7668 ZERO_STRUCT(state->orig.out.result);
7670 /* make a temporary copy, that we pass to the dispatch function */
7671 state->tmp = state->orig;
7673 subreq = cli->dispatch_send(state, ev, cli,
7674 &ndr_table_ntsvcs,
7675 NDR_PNP_SETHWPROF,
7676 &state->tmp);
7677 if (tevent_req_nomem(subreq, req)) {
7678 return tevent_req_post(req, ev);
7680 tevent_req_set_callback(subreq, rpccli_PNP_SetHwProf_done, req);
7681 return req;
7684 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq)
7686 struct tevent_req *req = tevent_req_callback_data(
7687 subreq, struct tevent_req);
7688 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7689 req, struct rpccli_PNP_SetHwProf_state);
7690 NTSTATUS status;
7691 TALLOC_CTX *mem_ctx;
7693 if (state->out_mem_ctx) {
7694 mem_ctx = state->out_mem_ctx;
7695 } else {
7696 mem_ctx = state;
7699 status = state->dispatch_recv(subreq, mem_ctx);
7700 TALLOC_FREE(subreq);
7701 if (!NT_STATUS_IS_OK(status)) {
7702 tevent_req_nterror(req, status);
7703 return;
7706 /* Copy out parameters */
7708 /* Copy result */
7709 state->orig.out.result = state->tmp.out.result;
7711 /* Reset temporary structure */
7712 ZERO_STRUCT(state->tmp);
7714 tevent_req_done(req);
7717 NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req,
7718 TALLOC_CTX *mem_ctx,
7719 WERROR *result)
7721 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
7722 req, struct rpccli_PNP_SetHwProf_state);
7723 NTSTATUS status;
7725 if (tevent_req_is_nterror(req, &status)) {
7726 tevent_req_received(req);
7727 return status;
7730 /* Steal possbile out parameters to the callers context */
7731 talloc_steal(mem_ctx, state->out_mem_ctx);
7733 /* Return result */
7734 *result = state->orig.out.result;
7736 tevent_req_received(req);
7737 return NT_STATUS_OK;
7740 NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
7741 TALLOC_CTX *mem_ctx,
7742 WERROR *werror)
7744 struct PNP_SetHwProf r;
7745 NTSTATUS status;
7747 /* In parameters */
7749 status = cli->dispatch(cli,
7750 mem_ctx,
7751 &ndr_table_ntsvcs,
7752 NDR_PNP_SETHWPROF,
7753 &r);
7755 if (!NT_STATUS_IS_OK(status)) {
7756 return status;
7759 if (NT_STATUS_IS_ERR(status)) {
7760 return status;
7763 /* Return variables */
7765 /* Return result */
7766 if (werror) {
7767 *werror = r.out.result;
7770 return werror_to_ntstatus(r.out.result);
7773 struct rpccli_PNP_QueryArbitratorFreeData_state {
7774 struct PNP_QueryArbitratorFreeData orig;
7775 struct PNP_QueryArbitratorFreeData tmp;
7776 TALLOC_CTX *out_mem_ctx;
7777 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7780 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq);
7782 struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx,
7783 struct tevent_context *ev,
7784 struct rpc_pipe_client *cli)
7786 struct tevent_req *req;
7787 struct rpccli_PNP_QueryArbitratorFreeData_state *state;
7788 struct tevent_req *subreq;
7790 req = tevent_req_create(mem_ctx, &state,
7791 struct rpccli_PNP_QueryArbitratorFreeData_state);
7792 if (req == NULL) {
7793 return NULL;
7795 state->out_mem_ctx = NULL;
7796 state->dispatch_recv = cli->dispatch_recv;
7798 /* In parameters */
7800 /* Out parameters */
7802 /* Result */
7803 ZERO_STRUCT(state->orig.out.result);
7805 /* make a temporary copy, that we pass to the dispatch function */
7806 state->tmp = state->orig;
7808 subreq = cli->dispatch_send(state, ev, cli,
7809 &ndr_table_ntsvcs,
7810 NDR_PNP_QUERYARBITRATORFREEDATA,
7811 &state->tmp);
7812 if (tevent_req_nomem(subreq, req)) {
7813 return tevent_req_post(req, ev);
7815 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeData_done, req);
7816 return req;
7819 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq)
7821 struct tevent_req *req = tevent_req_callback_data(
7822 subreq, struct tevent_req);
7823 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7824 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7825 NTSTATUS status;
7826 TALLOC_CTX *mem_ctx;
7828 if (state->out_mem_ctx) {
7829 mem_ctx = state->out_mem_ctx;
7830 } else {
7831 mem_ctx = state;
7834 status = state->dispatch_recv(subreq, mem_ctx);
7835 TALLOC_FREE(subreq);
7836 if (!NT_STATUS_IS_OK(status)) {
7837 tevent_req_nterror(req, status);
7838 return;
7841 /* Copy out parameters */
7843 /* Copy result */
7844 state->orig.out.result = state->tmp.out.result;
7846 /* Reset temporary structure */
7847 ZERO_STRUCT(state->tmp);
7849 tevent_req_done(req);
7852 NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req,
7853 TALLOC_CTX *mem_ctx,
7854 WERROR *result)
7856 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
7857 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
7858 NTSTATUS status;
7860 if (tevent_req_is_nterror(req, &status)) {
7861 tevent_req_received(req);
7862 return status;
7865 /* Steal possbile out parameters to the callers context */
7866 talloc_steal(mem_ctx, state->out_mem_ctx);
7868 /* Return result */
7869 *result = state->orig.out.result;
7871 tevent_req_received(req);
7872 return NT_STATUS_OK;
7875 NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
7876 TALLOC_CTX *mem_ctx,
7877 WERROR *werror)
7879 struct PNP_QueryArbitratorFreeData r;
7880 NTSTATUS status;
7882 /* In parameters */
7884 status = cli->dispatch(cli,
7885 mem_ctx,
7886 &ndr_table_ntsvcs,
7887 NDR_PNP_QUERYARBITRATORFREEDATA,
7888 &r);
7890 if (!NT_STATUS_IS_OK(status)) {
7891 return status;
7894 if (NT_STATUS_IS_ERR(status)) {
7895 return status;
7898 /* Return variables */
7900 /* Return result */
7901 if (werror) {
7902 *werror = r.out.result;
7905 return werror_to_ntstatus(r.out.result);
7908 struct rpccli_PNP_QueryArbitratorFreeSize_state {
7909 struct PNP_QueryArbitratorFreeSize orig;
7910 struct PNP_QueryArbitratorFreeSize tmp;
7911 TALLOC_CTX *out_mem_ctx;
7912 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7915 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq);
7917 struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx,
7918 struct tevent_context *ev,
7919 struct rpc_pipe_client *cli)
7921 struct tevent_req *req;
7922 struct rpccli_PNP_QueryArbitratorFreeSize_state *state;
7923 struct tevent_req *subreq;
7925 req = tevent_req_create(mem_ctx, &state,
7926 struct rpccli_PNP_QueryArbitratorFreeSize_state);
7927 if (req == NULL) {
7928 return NULL;
7930 state->out_mem_ctx = NULL;
7931 state->dispatch_recv = cli->dispatch_recv;
7933 /* In parameters */
7935 /* Out parameters */
7937 /* Result */
7938 ZERO_STRUCT(state->orig.out.result);
7940 /* make a temporary copy, that we pass to the dispatch function */
7941 state->tmp = state->orig;
7943 subreq = cli->dispatch_send(state, ev, cli,
7944 &ndr_table_ntsvcs,
7945 NDR_PNP_QUERYARBITRATORFREESIZE,
7946 &state->tmp);
7947 if (tevent_req_nomem(subreq, req)) {
7948 return tevent_req_post(req, ev);
7950 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeSize_done, req);
7951 return req;
7954 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq)
7956 struct tevent_req *req = tevent_req_callback_data(
7957 subreq, struct tevent_req);
7958 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7959 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7960 NTSTATUS status;
7961 TALLOC_CTX *mem_ctx;
7963 if (state->out_mem_ctx) {
7964 mem_ctx = state->out_mem_ctx;
7965 } else {
7966 mem_ctx = state;
7969 status = state->dispatch_recv(subreq, mem_ctx);
7970 TALLOC_FREE(subreq);
7971 if (!NT_STATUS_IS_OK(status)) {
7972 tevent_req_nterror(req, status);
7973 return;
7976 /* Copy out parameters */
7978 /* Copy result */
7979 state->orig.out.result = state->tmp.out.result;
7981 /* Reset temporary structure */
7982 ZERO_STRUCT(state->tmp);
7984 tevent_req_done(req);
7987 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req,
7988 TALLOC_CTX *mem_ctx,
7989 WERROR *result)
7991 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
7992 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
7993 NTSTATUS status;
7995 if (tevent_req_is_nterror(req, &status)) {
7996 tevent_req_received(req);
7997 return status;
8000 /* Steal possbile out parameters to the callers context */
8001 talloc_steal(mem_ctx, state->out_mem_ctx);
8003 /* Return result */
8004 *result = state->orig.out.result;
8006 tevent_req_received(req);
8007 return NT_STATUS_OK;
8010 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
8011 TALLOC_CTX *mem_ctx,
8012 WERROR *werror)
8014 struct PNP_QueryArbitratorFreeSize r;
8015 NTSTATUS status;
8017 /* In parameters */
8019 status = cli->dispatch(cli,
8020 mem_ctx,
8021 &ndr_table_ntsvcs,
8022 NDR_PNP_QUERYARBITRATORFREESIZE,
8023 &r);
8025 if (!NT_STATUS_IS_OK(status)) {
8026 return status;
8029 if (NT_STATUS_IS_ERR(status)) {
8030 return status;
8033 /* Return variables */
8035 /* Return result */
8036 if (werror) {
8037 *werror = r.out.result;
8040 return werror_to_ntstatus(r.out.result);
8043 struct rpccli_PNP_RunDetection_state {
8044 struct PNP_RunDetection orig;
8045 struct PNP_RunDetection tmp;
8046 TALLOC_CTX *out_mem_ctx;
8047 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8050 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq);
8052 struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx,
8053 struct tevent_context *ev,
8054 struct rpc_pipe_client *cli)
8056 struct tevent_req *req;
8057 struct rpccli_PNP_RunDetection_state *state;
8058 struct tevent_req *subreq;
8060 req = tevent_req_create(mem_ctx, &state,
8061 struct rpccli_PNP_RunDetection_state);
8062 if (req == NULL) {
8063 return NULL;
8065 state->out_mem_ctx = NULL;
8066 state->dispatch_recv = cli->dispatch_recv;
8068 /* In parameters */
8070 /* Out parameters */
8072 /* Result */
8073 ZERO_STRUCT(state->orig.out.result);
8075 /* make a temporary copy, that we pass to the dispatch function */
8076 state->tmp = state->orig;
8078 subreq = cli->dispatch_send(state, ev, cli,
8079 &ndr_table_ntsvcs,
8080 NDR_PNP_RUNDETECTION,
8081 &state->tmp);
8082 if (tevent_req_nomem(subreq, req)) {
8083 return tevent_req_post(req, ev);
8085 tevent_req_set_callback(subreq, rpccli_PNP_RunDetection_done, req);
8086 return req;
8089 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq)
8091 struct tevent_req *req = tevent_req_callback_data(
8092 subreq, struct tevent_req);
8093 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8094 req, struct rpccli_PNP_RunDetection_state);
8095 NTSTATUS status;
8096 TALLOC_CTX *mem_ctx;
8098 if (state->out_mem_ctx) {
8099 mem_ctx = state->out_mem_ctx;
8100 } else {
8101 mem_ctx = state;
8104 status = state->dispatch_recv(subreq, mem_ctx);
8105 TALLOC_FREE(subreq);
8106 if (!NT_STATUS_IS_OK(status)) {
8107 tevent_req_nterror(req, status);
8108 return;
8111 /* Copy out parameters */
8113 /* Copy result */
8114 state->orig.out.result = state->tmp.out.result;
8116 /* Reset temporary structure */
8117 ZERO_STRUCT(state->tmp);
8119 tevent_req_done(req);
8122 NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req,
8123 TALLOC_CTX *mem_ctx,
8124 WERROR *result)
8126 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
8127 req, struct rpccli_PNP_RunDetection_state);
8128 NTSTATUS status;
8130 if (tevent_req_is_nterror(req, &status)) {
8131 tevent_req_received(req);
8132 return status;
8135 /* Steal possbile out parameters to the callers context */
8136 talloc_steal(mem_ctx, state->out_mem_ctx);
8138 /* Return result */
8139 *result = state->orig.out.result;
8141 tevent_req_received(req);
8142 return NT_STATUS_OK;
8145 NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
8146 TALLOC_CTX *mem_ctx,
8147 WERROR *werror)
8149 struct PNP_RunDetection r;
8150 NTSTATUS status;
8152 /* In parameters */
8154 status = cli->dispatch(cli,
8155 mem_ctx,
8156 &ndr_table_ntsvcs,
8157 NDR_PNP_RUNDETECTION,
8158 &r);
8160 if (!NT_STATUS_IS_OK(status)) {
8161 return status;
8164 if (NT_STATUS_IS_ERR(status)) {
8165 return status;
8168 /* Return variables */
8170 /* Return result */
8171 if (werror) {
8172 *werror = r.out.result;
8175 return werror_to_ntstatus(r.out.result);
8178 struct rpccli_PNP_RegisterNotification_state {
8179 struct PNP_RegisterNotification orig;
8180 struct PNP_RegisterNotification tmp;
8181 TALLOC_CTX *out_mem_ctx;
8182 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8185 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq);
8187 struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx,
8188 struct tevent_context *ev,
8189 struct rpc_pipe_client *cli)
8191 struct tevent_req *req;
8192 struct rpccli_PNP_RegisterNotification_state *state;
8193 struct tevent_req *subreq;
8195 req = tevent_req_create(mem_ctx, &state,
8196 struct rpccli_PNP_RegisterNotification_state);
8197 if (req == NULL) {
8198 return NULL;
8200 state->out_mem_ctx = NULL;
8201 state->dispatch_recv = cli->dispatch_recv;
8203 /* In parameters */
8205 /* Out parameters */
8207 /* Result */
8208 ZERO_STRUCT(state->orig.out.result);
8210 /* make a temporary copy, that we pass to the dispatch function */
8211 state->tmp = state->orig;
8213 subreq = cli->dispatch_send(state, ev, cli,
8214 &ndr_table_ntsvcs,
8215 NDR_PNP_REGISTERNOTIFICATION,
8216 &state->tmp);
8217 if (tevent_req_nomem(subreq, req)) {
8218 return tevent_req_post(req, ev);
8220 tevent_req_set_callback(subreq, rpccli_PNP_RegisterNotification_done, req);
8221 return req;
8224 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq)
8226 struct tevent_req *req = tevent_req_callback_data(
8227 subreq, struct tevent_req);
8228 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8229 req, struct rpccli_PNP_RegisterNotification_state);
8230 NTSTATUS status;
8231 TALLOC_CTX *mem_ctx;
8233 if (state->out_mem_ctx) {
8234 mem_ctx = state->out_mem_ctx;
8235 } else {
8236 mem_ctx = state;
8239 status = state->dispatch_recv(subreq, mem_ctx);
8240 TALLOC_FREE(subreq);
8241 if (!NT_STATUS_IS_OK(status)) {
8242 tevent_req_nterror(req, status);
8243 return;
8246 /* Copy out parameters */
8248 /* Copy result */
8249 state->orig.out.result = state->tmp.out.result;
8251 /* Reset temporary structure */
8252 ZERO_STRUCT(state->tmp);
8254 tevent_req_done(req);
8257 NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req,
8258 TALLOC_CTX *mem_ctx,
8259 WERROR *result)
8261 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
8262 req, struct rpccli_PNP_RegisterNotification_state);
8263 NTSTATUS status;
8265 if (tevent_req_is_nterror(req, &status)) {
8266 tevent_req_received(req);
8267 return status;
8270 /* Steal possbile out parameters to the callers context */
8271 talloc_steal(mem_ctx, state->out_mem_ctx);
8273 /* Return result */
8274 *result = state->orig.out.result;
8276 tevent_req_received(req);
8277 return NT_STATUS_OK;
8280 NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
8281 TALLOC_CTX *mem_ctx,
8282 WERROR *werror)
8284 struct PNP_RegisterNotification r;
8285 NTSTATUS status;
8287 /* In parameters */
8289 status = cli->dispatch(cli,
8290 mem_ctx,
8291 &ndr_table_ntsvcs,
8292 NDR_PNP_REGISTERNOTIFICATION,
8293 &r);
8295 if (!NT_STATUS_IS_OK(status)) {
8296 return status;
8299 if (NT_STATUS_IS_ERR(status)) {
8300 return status;
8303 /* Return variables */
8305 /* Return result */
8306 if (werror) {
8307 *werror = r.out.result;
8310 return werror_to_ntstatus(r.out.result);
8313 struct rpccli_PNP_UnregisterNotification_state {
8314 struct PNP_UnregisterNotification orig;
8315 struct PNP_UnregisterNotification tmp;
8316 TALLOC_CTX *out_mem_ctx;
8317 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8320 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq);
8322 struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx,
8323 struct tevent_context *ev,
8324 struct rpc_pipe_client *cli)
8326 struct tevent_req *req;
8327 struct rpccli_PNP_UnregisterNotification_state *state;
8328 struct tevent_req *subreq;
8330 req = tevent_req_create(mem_ctx, &state,
8331 struct rpccli_PNP_UnregisterNotification_state);
8332 if (req == NULL) {
8333 return NULL;
8335 state->out_mem_ctx = NULL;
8336 state->dispatch_recv = cli->dispatch_recv;
8338 /* In parameters */
8340 /* Out parameters */
8342 /* Result */
8343 ZERO_STRUCT(state->orig.out.result);
8345 /* make a temporary copy, that we pass to the dispatch function */
8346 state->tmp = state->orig;
8348 subreq = cli->dispatch_send(state, ev, cli,
8349 &ndr_table_ntsvcs,
8350 NDR_PNP_UNREGISTERNOTIFICATION,
8351 &state->tmp);
8352 if (tevent_req_nomem(subreq, req)) {
8353 return tevent_req_post(req, ev);
8355 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterNotification_done, req);
8356 return req;
8359 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq)
8361 struct tevent_req *req = tevent_req_callback_data(
8362 subreq, struct tevent_req);
8363 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8364 req, struct rpccli_PNP_UnregisterNotification_state);
8365 NTSTATUS status;
8366 TALLOC_CTX *mem_ctx;
8368 if (state->out_mem_ctx) {
8369 mem_ctx = state->out_mem_ctx;
8370 } else {
8371 mem_ctx = state;
8374 status = state->dispatch_recv(subreq, mem_ctx);
8375 TALLOC_FREE(subreq);
8376 if (!NT_STATUS_IS_OK(status)) {
8377 tevent_req_nterror(req, status);
8378 return;
8381 /* Copy out parameters */
8383 /* Copy result */
8384 state->orig.out.result = state->tmp.out.result;
8386 /* Reset temporary structure */
8387 ZERO_STRUCT(state->tmp);
8389 tevent_req_done(req);
8392 NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req,
8393 TALLOC_CTX *mem_ctx,
8394 WERROR *result)
8396 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
8397 req, struct rpccli_PNP_UnregisterNotification_state);
8398 NTSTATUS status;
8400 if (tevent_req_is_nterror(req, &status)) {
8401 tevent_req_received(req);
8402 return status;
8405 /* Steal possbile out parameters to the callers context */
8406 talloc_steal(mem_ctx, state->out_mem_ctx);
8408 /* Return result */
8409 *result = state->orig.out.result;
8411 tevent_req_received(req);
8412 return NT_STATUS_OK;
8415 NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
8416 TALLOC_CTX *mem_ctx,
8417 WERROR *werror)
8419 struct PNP_UnregisterNotification r;
8420 NTSTATUS status;
8422 /* In parameters */
8424 status = cli->dispatch(cli,
8425 mem_ctx,
8426 &ndr_table_ntsvcs,
8427 NDR_PNP_UNREGISTERNOTIFICATION,
8428 &r);
8430 if (!NT_STATUS_IS_OK(status)) {
8431 return status;
8434 if (NT_STATUS_IS_ERR(status)) {
8435 return status;
8438 /* Return variables */
8440 /* Return result */
8441 if (werror) {
8442 *werror = r.out.result;
8445 return werror_to_ntstatus(r.out.result);
8448 struct rpccli_PNP_GetCustomDevProp_state {
8449 struct PNP_GetCustomDevProp orig;
8450 struct PNP_GetCustomDevProp tmp;
8451 TALLOC_CTX *out_mem_ctx;
8452 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8455 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq);
8457 struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx,
8458 struct tevent_context *ev,
8459 struct rpc_pipe_client *cli)
8461 struct tevent_req *req;
8462 struct rpccli_PNP_GetCustomDevProp_state *state;
8463 struct tevent_req *subreq;
8465 req = tevent_req_create(mem_ctx, &state,
8466 struct rpccli_PNP_GetCustomDevProp_state);
8467 if (req == NULL) {
8468 return NULL;
8470 state->out_mem_ctx = NULL;
8471 state->dispatch_recv = cli->dispatch_recv;
8473 /* In parameters */
8475 /* Out parameters */
8477 /* Result */
8478 ZERO_STRUCT(state->orig.out.result);
8480 /* make a temporary copy, that we pass to the dispatch function */
8481 state->tmp = state->orig;
8483 subreq = cli->dispatch_send(state, ev, cli,
8484 &ndr_table_ntsvcs,
8485 NDR_PNP_GETCUSTOMDEVPROP,
8486 &state->tmp);
8487 if (tevent_req_nomem(subreq, req)) {
8488 return tevent_req_post(req, ev);
8490 tevent_req_set_callback(subreq, rpccli_PNP_GetCustomDevProp_done, req);
8491 return req;
8494 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq)
8496 struct tevent_req *req = tevent_req_callback_data(
8497 subreq, struct tevent_req);
8498 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8499 req, struct rpccli_PNP_GetCustomDevProp_state);
8500 NTSTATUS status;
8501 TALLOC_CTX *mem_ctx;
8503 if (state->out_mem_ctx) {
8504 mem_ctx = state->out_mem_ctx;
8505 } else {
8506 mem_ctx = state;
8509 status = state->dispatch_recv(subreq, mem_ctx);
8510 TALLOC_FREE(subreq);
8511 if (!NT_STATUS_IS_OK(status)) {
8512 tevent_req_nterror(req, status);
8513 return;
8516 /* Copy out parameters */
8518 /* Copy result */
8519 state->orig.out.result = state->tmp.out.result;
8521 /* Reset temporary structure */
8522 ZERO_STRUCT(state->tmp);
8524 tevent_req_done(req);
8527 NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req,
8528 TALLOC_CTX *mem_ctx,
8529 WERROR *result)
8531 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
8532 req, struct rpccli_PNP_GetCustomDevProp_state);
8533 NTSTATUS status;
8535 if (tevent_req_is_nterror(req, &status)) {
8536 tevent_req_received(req);
8537 return status;
8540 /* Steal possbile out parameters to the callers context */
8541 talloc_steal(mem_ctx, state->out_mem_ctx);
8543 /* Return result */
8544 *result = state->orig.out.result;
8546 tevent_req_received(req);
8547 return NT_STATUS_OK;
8550 NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
8551 TALLOC_CTX *mem_ctx,
8552 WERROR *werror)
8554 struct PNP_GetCustomDevProp r;
8555 NTSTATUS status;
8557 /* In parameters */
8559 status = cli->dispatch(cli,
8560 mem_ctx,
8561 &ndr_table_ntsvcs,
8562 NDR_PNP_GETCUSTOMDEVPROP,
8563 &r);
8565 if (!NT_STATUS_IS_OK(status)) {
8566 return status;
8569 if (NT_STATUS_IS_ERR(status)) {
8570 return status;
8573 /* Return variables */
8575 /* Return result */
8576 if (werror) {
8577 *werror = r.out.result;
8580 return werror_to_ntstatus(r.out.result);
8583 struct rpccli_PNP_GetVersionInternal_state {
8584 struct PNP_GetVersionInternal orig;
8585 struct PNP_GetVersionInternal tmp;
8586 TALLOC_CTX *out_mem_ctx;
8587 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8590 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq);
8592 struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx,
8593 struct tevent_context *ev,
8594 struct rpc_pipe_client *cli)
8596 struct tevent_req *req;
8597 struct rpccli_PNP_GetVersionInternal_state *state;
8598 struct tevent_req *subreq;
8600 req = tevent_req_create(mem_ctx, &state,
8601 struct rpccli_PNP_GetVersionInternal_state);
8602 if (req == NULL) {
8603 return NULL;
8605 state->out_mem_ctx = NULL;
8606 state->dispatch_recv = cli->dispatch_recv;
8608 /* In parameters */
8610 /* Out parameters */
8612 /* Result */
8613 ZERO_STRUCT(state->orig.out.result);
8615 /* make a temporary copy, that we pass to the dispatch function */
8616 state->tmp = state->orig;
8618 subreq = cli->dispatch_send(state, ev, cli,
8619 &ndr_table_ntsvcs,
8620 NDR_PNP_GETVERSIONINTERNAL,
8621 &state->tmp);
8622 if (tevent_req_nomem(subreq, req)) {
8623 return tevent_req_post(req, ev);
8625 tevent_req_set_callback(subreq, rpccli_PNP_GetVersionInternal_done, req);
8626 return req;
8629 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq)
8631 struct tevent_req *req = tevent_req_callback_data(
8632 subreq, struct tevent_req);
8633 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8634 req, struct rpccli_PNP_GetVersionInternal_state);
8635 NTSTATUS status;
8636 TALLOC_CTX *mem_ctx;
8638 if (state->out_mem_ctx) {
8639 mem_ctx = state->out_mem_ctx;
8640 } else {
8641 mem_ctx = state;
8644 status = state->dispatch_recv(subreq, mem_ctx);
8645 TALLOC_FREE(subreq);
8646 if (!NT_STATUS_IS_OK(status)) {
8647 tevent_req_nterror(req, status);
8648 return;
8651 /* Copy out parameters */
8653 /* Copy result */
8654 state->orig.out.result = state->tmp.out.result;
8656 /* Reset temporary structure */
8657 ZERO_STRUCT(state->tmp);
8659 tevent_req_done(req);
8662 NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req,
8663 TALLOC_CTX *mem_ctx,
8664 WERROR *result)
8666 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
8667 req, struct rpccli_PNP_GetVersionInternal_state);
8668 NTSTATUS status;
8670 if (tevent_req_is_nterror(req, &status)) {
8671 tevent_req_received(req);
8672 return status;
8675 /* Steal possbile out parameters to the callers context */
8676 talloc_steal(mem_ctx, state->out_mem_ctx);
8678 /* Return result */
8679 *result = state->orig.out.result;
8681 tevent_req_received(req);
8682 return NT_STATUS_OK;
8685 NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
8686 TALLOC_CTX *mem_ctx,
8687 WERROR *werror)
8689 struct PNP_GetVersionInternal r;
8690 NTSTATUS status;
8692 /* In parameters */
8694 status = cli->dispatch(cli,
8695 mem_ctx,
8696 &ndr_table_ntsvcs,
8697 NDR_PNP_GETVERSIONINTERNAL,
8698 &r);
8700 if (!NT_STATUS_IS_OK(status)) {
8701 return status;
8704 if (NT_STATUS_IS_ERR(status)) {
8705 return status;
8708 /* Return variables */
8710 /* Return result */
8711 if (werror) {
8712 *werror = r.out.result;
8715 return werror_to_ntstatus(r.out.result);
8718 struct rpccli_PNP_GetBlockedDriverInfo_state {
8719 struct PNP_GetBlockedDriverInfo orig;
8720 struct PNP_GetBlockedDriverInfo tmp;
8721 TALLOC_CTX *out_mem_ctx;
8722 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8725 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq);
8727 struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx,
8728 struct tevent_context *ev,
8729 struct rpc_pipe_client *cli)
8731 struct tevent_req *req;
8732 struct rpccli_PNP_GetBlockedDriverInfo_state *state;
8733 struct tevent_req *subreq;
8735 req = tevent_req_create(mem_ctx, &state,
8736 struct rpccli_PNP_GetBlockedDriverInfo_state);
8737 if (req == NULL) {
8738 return NULL;
8740 state->out_mem_ctx = NULL;
8741 state->dispatch_recv = cli->dispatch_recv;
8743 /* In parameters */
8745 /* Out parameters */
8747 /* Result */
8748 ZERO_STRUCT(state->orig.out.result);
8750 /* make a temporary copy, that we pass to the dispatch function */
8751 state->tmp = state->orig;
8753 subreq = cli->dispatch_send(state, ev, cli,
8754 &ndr_table_ntsvcs,
8755 NDR_PNP_GETBLOCKEDDRIVERINFO,
8756 &state->tmp);
8757 if (tevent_req_nomem(subreq, req)) {
8758 return tevent_req_post(req, ev);
8760 tevent_req_set_callback(subreq, rpccli_PNP_GetBlockedDriverInfo_done, req);
8761 return req;
8764 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq)
8766 struct tevent_req *req = tevent_req_callback_data(
8767 subreq, struct tevent_req);
8768 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8769 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8770 NTSTATUS status;
8771 TALLOC_CTX *mem_ctx;
8773 if (state->out_mem_ctx) {
8774 mem_ctx = state->out_mem_ctx;
8775 } else {
8776 mem_ctx = state;
8779 status = state->dispatch_recv(subreq, mem_ctx);
8780 TALLOC_FREE(subreq);
8781 if (!NT_STATUS_IS_OK(status)) {
8782 tevent_req_nterror(req, status);
8783 return;
8786 /* Copy out parameters */
8788 /* Copy result */
8789 state->orig.out.result = state->tmp.out.result;
8791 /* Reset temporary structure */
8792 ZERO_STRUCT(state->tmp);
8794 tevent_req_done(req);
8797 NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req,
8798 TALLOC_CTX *mem_ctx,
8799 WERROR *result)
8801 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
8802 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
8803 NTSTATUS status;
8805 if (tevent_req_is_nterror(req, &status)) {
8806 tevent_req_received(req);
8807 return status;
8810 /* Steal possbile out parameters to the callers context */
8811 talloc_steal(mem_ctx, state->out_mem_ctx);
8813 /* Return result */
8814 *result = state->orig.out.result;
8816 tevent_req_received(req);
8817 return NT_STATUS_OK;
8820 NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
8821 TALLOC_CTX *mem_ctx,
8822 WERROR *werror)
8824 struct PNP_GetBlockedDriverInfo r;
8825 NTSTATUS status;
8827 /* In parameters */
8829 status = cli->dispatch(cli,
8830 mem_ctx,
8831 &ndr_table_ntsvcs,
8832 NDR_PNP_GETBLOCKEDDRIVERINFO,
8833 &r);
8835 if (!NT_STATUS_IS_OK(status)) {
8836 return status;
8839 if (NT_STATUS_IS_ERR(status)) {
8840 return status;
8843 /* Return variables */
8845 /* Return result */
8846 if (werror) {
8847 *werror = r.out.result;
8850 return werror_to_ntstatus(r.out.result);
8853 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state {
8854 struct PNP_GetServerSideDeviceInstallFlags orig;
8855 struct PNP_GetServerSideDeviceInstallFlags tmp;
8856 TALLOC_CTX *out_mem_ctx;
8857 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8860 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq);
8862 struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx,
8863 struct tevent_context *ev,
8864 struct rpc_pipe_client *cli)
8866 struct tevent_req *req;
8867 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state;
8868 struct tevent_req *subreq;
8870 req = tevent_req_create(mem_ctx, &state,
8871 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8872 if (req == NULL) {
8873 return NULL;
8875 state->out_mem_ctx = NULL;
8876 state->dispatch_recv = cli->dispatch_recv;
8878 /* In parameters */
8880 /* Out parameters */
8882 /* Result */
8883 ZERO_STRUCT(state->orig.out.result);
8885 /* make a temporary copy, that we pass to the dispatch function */
8886 state->tmp = state->orig;
8888 subreq = cli->dispatch_send(state, ev, cli,
8889 &ndr_table_ntsvcs,
8890 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8891 &state->tmp);
8892 if (tevent_req_nomem(subreq, req)) {
8893 return tevent_req_post(req, ev);
8895 tevent_req_set_callback(subreq, rpccli_PNP_GetServerSideDeviceInstallFlags_done, req);
8896 return req;
8899 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq)
8901 struct tevent_req *req = tevent_req_callback_data(
8902 subreq, struct tevent_req);
8903 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8904 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8905 NTSTATUS status;
8906 TALLOC_CTX *mem_ctx;
8908 if (state->out_mem_ctx) {
8909 mem_ctx = state->out_mem_ctx;
8910 } else {
8911 mem_ctx = state;
8914 status = state->dispatch_recv(subreq, mem_ctx);
8915 TALLOC_FREE(subreq);
8916 if (!NT_STATUS_IS_OK(status)) {
8917 tevent_req_nterror(req, status);
8918 return;
8921 /* Copy out parameters */
8923 /* Copy result */
8924 state->orig.out.result = state->tmp.out.result;
8926 /* Reset temporary structure */
8927 ZERO_STRUCT(state->tmp);
8929 tevent_req_done(req);
8932 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req,
8933 TALLOC_CTX *mem_ctx,
8934 WERROR *result)
8936 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
8937 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
8938 NTSTATUS status;
8940 if (tevent_req_is_nterror(req, &status)) {
8941 tevent_req_received(req);
8942 return status;
8945 /* Steal possbile out parameters to the callers context */
8946 talloc_steal(mem_ctx, state->out_mem_ctx);
8948 /* Return result */
8949 *result = state->orig.out.result;
8951 tevent_req_received(req);
8952 return NT_STATUS_OK;
8955 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
8956 TALLOC_CTX *mem_ctx,
8957 WERROR *werror)
8959 struct PNP_GetServerSideDeviceInstallFlags r;
8960 NTSTATUS status;
8962 /* In parameters */
8964 status = cli->dispatch(cli,
8965 mem_ctx,
8966 &ndr_table_ntsvcs,
8967 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
8968 &r);
8970 if (!NT_STATUS_IS_OK(status)) {
8971 return status;
8974 if (NT_STATUS_IS_ERR(status)) {
8975 return status;
8978 /* Return variables */
8980 /* Return result */
8981 if (werror) {
8982 *werror = r.out.result;
8985 return werror_to_ntstatus(r.out.result);