s4:provision - Some rework
[Samba/ekacnet.git] / librpc / gen_ndr / cli_ntsvcs.c
blob5096be955951b697f5b2466a564eba7227443d9c
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 if (DEBUGLEVEL >= 10) {
42 NDR_PRINT_IN_DEBUG(PNP_Disconnect, &state->orig);
45 /* make a temporary copy, that we pass to the dispatch function */
46 state->tmp = state->orig;
48 subreq = cli->dispatch_send(state, ev, cli,
49 &ndr_table_ntsvcs,
50 NDR_PNP_DISCONNECT,
51 &state->tmp);
52 if (tevent_req_nomem(subreq, req)) {
53 return tevent_req_post(req, ev);
55 tevent_req_set_callback(subreq, rpccli_PNP_Disconnect_done, req);
56 return req;
59 static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq)
61 struct tevent_req *req = tevent_req_callback_data(
62 subreq, struct tevent_req);
63 struct rpccli_PNP_Disconnect_state *state = tevent_req_data(
64 req, struct rpccli_PNP_Disconnect_state);
65 NTSTATUS status;
66 TALLOC_CTX *mem_ctx;
68 if (state->out_mem_ctx) {
69 mem_ctx = state->out_mem_ctx;
70 } else {
71 mem_ctx = state;
74 status = state->dispatch_recv(subreq, mem_ctx);
75 TALLOC_FREE(subreq);
76 if (!NT_STATUS_IS_OK(status)) {
77 tevent_req_nterror(req, status);
78 return;
81 /* Copy out parameters */
83 /* Copy result */
84 state->orig.out.result = state->tmp.out.result;
86 /* Reset temporary structure */
87 ZERO_STRUCT(state->tmp);
89 if (DEBUGLEVEL >= 10) {
90 NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &state->orig);
93 tevent_req_done(req);
96 NTSTATUS rpccli_PNP_Disconnect_recv(struct tevent_req *req,
97 TALLOC_CTX *mem_ctx,
98 WERROR *result)
100 struct rpccli_PNP_Disconnect_state *state = tevent_req_data(
101 req, struct rpccli_PNP_Disconnect_state);
102 NTSTATUS status;
104 if (tevent_req_is_nterror(req, &status)) {
105 tevent_req_received(req);
106 return status;
109 /* Steal possbile out parameters to the callers context */
110 talloc_steal(mem_ctx, state->out_mem_ctx);
112 /* Return result */
113 *result = state->orig.out.result;
115 tevent_req_received(req);
116 return NT_STATUS_OK;
119 NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
120 TALLOC_CTX *mem_ctx,
121 WERROR *werror)
123 struct PNP_Disconnect r;
124 NTSTATUS status;
126 /* In parameters */
128 if (DEBUGLEVEL >= 10) {
129 NDR_PRINT_IN_DEBUG(PNP_Disconnect, &r);
132 status = cli->dispatch(cli,
133 mem_ctx,
134 &ndr_table_ntsvcs,
135 NDR_PNP_DISCONNECT,
136 &r);
138 if (!NT_STATUS_IS_OK(status)) {
139 return status;
142 if (DEBUGLEVEL >= 10) {
143 NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &r);
146 if (NT_STATUS_IS_ERR(status)) {
147 return status;
150 /* Return variables */
152 /* Return result */
153 if (werror) {
154 *werror = r.out.result;
157 return werror_to_ntstatus(r.out.result);
160 struct rpccli_PNP_Connect_state {
161 struct PNP_Connect orig;
162 struct PNP_Connect tmp;
163 TALLOC_CTX *out_mem_ctx;
164 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
167 static void rpccli_PNP_Connect_done(struct tevent_req *subreq);
169 struct tevent_req *rpccli_PNP_Connect_send(TALLOC_CTX *mem_ctx,
170 struct tevent_context *ev,
171 struct rpc_pipe_client *cli)
173 struct tevent_req *req;
174 struct rpccli_PNP_Connect_state *state;
175 struct tevent_req *subreq;
177 req = tevent_req_create(mem_ctx, &state,
178 struct rpccli_PNP_Connect_state);
179 if (req == NULL) {
180 return NULL;
182 state->out_mem_ctx = NULL;
183 state->dispatch_recv = cli->dispatch_recv;
185 /* In parameters */
187 /* Out parameters */
189 /* Result */
190 ZERO_STRUCT(state->orig.out.result);
192 if (DEBUGLEVEL >= 10) {
193 NDR_PRINT_IN_DEBUG(PNP_Connect, &state->orig);
196 /* make a temporary copy, that we pass to the dispatch function */
197 state->tmp = state->orig;
199 subreq = cli->dispatch_send(state, ev, cli,
200 &ndr_table_ntsvcs,
201 NDR_PNP_CONNECT,
202 &state->tmp);
203 if (tevent_req_nomem(subreq, req)) {
204 return tevent_req_post(req, ev);
206 tevent_req_set_callback(subreq, rpccli_PNP_Connect_done, req);
207 return req;
210 static void rpccli_PNP_Connect_done(struct tevent_req *subreq)
212 struct tevent_req *req = tevent_req_callback_data(
213 subreq, struct tevent_req);
214 struct rpccli_PNP_Connect_state *state = tevent_req_data(
215 req, struct rpccli_PNP_Connect_state);
216 NTSTATUS status;
217 TALLOC_CTX *mem_ctx;
219 if (state->out_mem_ctx) {
220 mem_ctx = state->out_mem_ctx;
221 } else {
222 mem_ctx = state;
225 status = state->dispatch_recv(subreq, mem_ctx);
226 TALLOC_FREE(subreq);
227 if (!NT_STATUS_IS_OK(status)) {
228 tevent_req_nterror(req, status);
229 return;
232 /* Copy out parameters */
234 /* Copy result */
235 state->orig.out.result = state->tmp.out.result;
237 /* Reset temporary structure */
238 ZERO_STRUCT(state->tmp);
240 if (DEBUGLEVEL >= 10) {
241 NDR_PRINT_OUT_DEBUG(PNP_Connect, &state->orig);
244 tevent_req_done(req);
247 NTSTATUS rpccli_PNP_Connect_recv(struct tevent_req *req,
248 TALLOC_CTX *mem_ctx,
249 WERROR *result)
251 struct rpccli_PNP_Connect_state *state = tevent_req_data(
252 req, struct rpccli_PNP_Connect_state);
253 NTSTATUS status;
255 if (tevent_req_is_nterror(req, &status)) {
256 tevent_req_received(req);
257 return status;
260 /* Steal possbile out parameters to the callers context */
261 talloc_steal(mem_ctx, state->out_mem_ctx);
263 /* Return result */
264 *result = state->orig.out.result;
266 tevent_req_received(req);
267 return NT_STATUS_OK;
270 NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
271 TALLOC_CTX *mem_ctx,
272 WERROR *werror)
274 struct PNP_Connect r;
275 NTSTATUS status;
277 /* In parameters */
279 if (DEBUGLEVEL >= 10) {
280 NDR_PRINT_IN_DEBUG(PNP_Connect, &r);
283 status = cli->dispatch(cli,
284 mem_ctx,
285 &ndr_table_ntsvcs,
286 NDR_PNP_CONNECT,
287 &r);
289 if (!NT_STATUS_IS_OK(status)) {
290 return status;
293 if (DEBUGLEVEL >= 10) {
294 NDR_PRINT_OUT_DEBUG(PNP_Connect, &r);
297 if (NT_STATUS_IS_ERR(status)) {
298 return status;
301 /* Return variables */
303 /* Return result */
304 if (werror) {
305 *werror = r.out.result;
308 return werror_to_ntstatus(r.out.result);
311 struct rpccli_PNP_GetVersion_state {
312 struct PNP_GetVersion orig;
313 struct PNP_GetVersion tmp;
314 TALLOC_CTX *out_mem_ctx;
315 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
318 static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq);
320 struct tevent_req *rpccli_PNP_GetVersion_send(TALLOC_CTX *mem_ctx,
321 struct tevent_context *ev,
322 struct rpc_pipe_client *cli,
323 uint16_t *_version /* [out] [ref] */)
325 struct tevent_req *req;
326 struct rpccli_PNP_GetVersion_state *state;
327 struct tevent_req *subreq;
329 req = tevent_req_create(mem_ctx, &state,
330 struct rpccli_PNP_GetVersion_state);
331 if (req == NULL) {
332 return NULL;
334 state->out_mem_ctx = NULL;
335 state->dispatch_recv = cli->dispatch_recv;
337 /* In parameters */
339 /* Out parameters */
340 state->orig.out.version = _version;
342 /* Result */
343 ZERO_STRUCT(state->orig.out.result);
345 if (DEBUGLEVEL >= 10) {
346 NDR_PRINT_IN_DEBUG(PNP_GetVersion, &state->orig);
349 state->out_mem_ctx = talloc_named_const(state, 0,
350 "rpccli_PNP_GetVersion_out_memory");
351 if (tevent_req_nomem(state->out_mem_ctx, req)) {
352 return tevent_req_post(req, ev);
355 /* make a temporary copy, that we pass to the dispatch function */
356 state->tmp = state->orig;
358 subreq = cli->dispatch_send(state, ev, cli,
359 &ndr_table_ntsvcs,
360 NDR_PNP_GETVERSION,
361 &state->tmp);
362 if (tevent_req_nomem(subreq, req)) {
363 return tevent_req_post(req, ev);
365 tevent_req_set_callback(subreq, rpccli_PNP_GetVersion_done, req);
366 return req;
369 static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq)
371 struct tevent_req *req = tevent_req_callback_data(
372 subreq, struct tevent_req);
373 struct rpccli_PNP_GetVersion_state *state = tevent_req_data(
374 req, struct rpccli_PNP_GetVersion_state);
375 NTSTATUS status;
376 TALLOC_CTX *mem_ctx;
378 if (state->out_mem_ctx) {
379 mem_ctx = state->out_mem_ctx;
380 } else {
381 mem_ctx = state;
384 status = state->dispatch_recv(subreq, mem_ctx);
385 TALLOC_FREE(subreq);
386 if (!NT_STATUS_IS_OK(status)) {
387 tevent_req_nterror(req, status);
388 return;
391 /* Copy out parameters */
392 *state->orig.out.version = *state->tmp.out.version;
394 /* Copy result */
395 state->orig.out.result = state->tmp.out.result;
397 /* Reset temporary structure */
398 ZERO_STRUCT(state->tmp);
400 if (DEBUGLEVEL >= 10) {
401 NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &state->orig);
404 tevent_req_done(req);
407 NTSTATUS rpccli_PNP_GetVersion_recv(struct tevent_req *req,
408 TALLOC_CTX *mem_ctx,
409 WERROR *result)
411 struct rpccli_PNP_GetVersion_state *state = tevent_req_data(
412 req, struct rpccli_PNP_GetVersion_state);
413 NTSTATUS status;
415 if (tevent_req_is_nterror(req, &status)) {
416 tevent_req_received(req);
417 return status;
420 /* Steal possbile out parameters to the callers context */
421 talloc_steal(mem_ctx, state->out_mem_ctx);
423 /* Return result */
424 *result = state->orig.out.result;
426 tevent_req_received(req);
427 return NT_STATUS_OK;
430 NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
431 TALLOC_CTX *mem_ctx,
432 uint16_t *version /* [out] [ref] */,
433 WERROR *werror)
435 struct PNP_GetVersion r;
436 NTSTATUS status;
438 /* In parameters */
440 if (DEBUGLEVEL >= 10) {
441 NDR_PRINT_IN_DEBUG(PNP_GetVersion, &r);
444 status = cli->dispatch(cli,
445 mem_ctx,
446 &ndr_table_ntsvcs,
447 NDR_PNP_GETVERSION,
448 &r);
450 if (!NT_STATUS_IS_OK(status)) {
451 return status;
454 if (DEBUGLEVEL >= 10) {
455 NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &r);
458 if (NT_STATUS_IS_ERR(status)) {
459 return status;
462 /* Return variables */
463 *version = *r.out.version;
465 /* Return result */
466 if (werror) {
467 *werror = r.out.result;
470 return werror_to_ntstatus(r.out.result);
473 struct rpccli_PNP_GetGlobalState_state {
474 struct PNP_GetGlobalState orig;
475 struct PNP_GetGlobalState tmp;
476 TALLOC_CTX *out_mem_ctx;
477 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
480 static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq);
482 struct tevent_req *rpccli_PNP_GetGlobalState_send(TALLOC_CTX *mem_ctx,
483 struct tevent_context *ev,
484 struct rpc_pipe_client *cli)
486 struct tevent_req *req;
487 struct rpccli_PNP_GetGlobalState_state *state;
488 struct tevent_req *subreq;
490 req = tevent_req_create(mem_ctx, &state,
491 struct rpccli_PNP_GetGlobalState_state);
492 if (req == NULL) {
493 return NULL;
495 state->out_mem_ctx = NULL;
496 state->dispatch_recv = cli->dispatch_recv;
498 /* In parameters */
500 /* Out parameters */
502 /* Result */
503 ZERO_STRUCT(state->orig.out.result);
505 if (DEBUGLEVEL >= 10) {
506 NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &state->orig);
509 /* make a temporary copy, that we pass to the dispatch function */
510 state->tmp = state->orig;
512 subreq = cli->dispatch_send(state, ev, cli,
513 &ndr_table_ntsvcs,
514 NDR_PNP_GETGLOBALSTATE,
515 &state->tmp);
516 if (tevent_req_nomem(subreq, req)) {
517 return tevent_req_post(req, ev);
519 tevent_req_set_callback(subreq, rpccli_PNP_GetGlobalState_done, req);
520 return req;
523 static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq)
525 struct tevent_req *req = tevent_req_callback_data(
526 subreq, struct tevent_req);
527 struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data(
528 req, struct rpccli_PNP_GetGlobalState_state);
529 NTSTATUS status;
530 TALLOC_CTX *mem_ctx;
532 if (state->out_mem_ctx) {
533 mem_ctx = state->out_mem_ctx;
534 } else {
535 mem_ctx = state;
538 status = state->dispatch_recv(subreq, mem_ctx);
539 TALLOC_FREE(subreq);
540 if (!NT_STATUS_IS_OK(status)) {
541 tevent_req_nterror(req, status);
542 return;
545 /* Copy out parameters */
547 /* Copy result */
548 state->orig.out.result = state->tmp.out.result;
550 /* Reset temporary structure */
551 ZERO_STRUCT(state->tmp);
553 if (DEBUGLEVEL >= 10) {
554 NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &state->orig);
557 tevent_req_done(req);
560 NTSTATUS rpccli_PNP_GetGlobalState_recv(struct tevent_req *req,
561 TALLOC_CTX *mem_ctx,
562 WERROR *result)
564 struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data(
565 req, struct rpccli_PNP_GetGlobalState_state);
566 NTSTATUS status;
568 if (tevent_req_is_nterror(req, &status)) {
569 tevent_req_received(req);
570 return status;
573 /* Steal possbile out parameters to the callers context */
574 talloc_steal(mem_ctx, state->out_mem_ctx);
576 /* Return result */
577 *result = state->orig.out.result;
579 tevent_req_received(req);
580 return NT_STATUS_OK;
583 NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
584 TALLOC_CTX *mem_ctx,
585 WERROR *werror)
587 struct PNP_GetGlobalState r;
588 NTSTATUS status;
590 /* In parameters */
592 if (DEBUGLEVEL >= 10) {
593 NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &r);
596 status = cli->dispatch(cli,
597 mem_ctx,
598 &ndr_table_ntsvcs,
599 NDR_PNP_GETGLOBALSTATE,
600 &r);
602 if (!NT_STATUS_IS_OK(status)) {
603 return status;
606 if (DEBUGLEVEL >= 10) {
607 NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &r);
610 if (NT_STATUS_IS_ERR(status)) {
611 return status;
614 /* Return variables */
616 /* Return result */
617 if (werror) {
618 *werror = r.out.result;
621 return werror_to_ntstatus(r.out.result);
624 struct rpccli_PNP_InitDetection_state {
625 struct PNP_InitDetection orig;
626 struct PNP_InitDetection tmp;
627 TALLOC_CTX *out_mem_ctx;
628 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
631 static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq);
633 struct tevent_req *rpccli_PNP_InitDetection_send(TALLOC_CTX *mem_ctx,
634 struct tevent_context *ev,
635 struct rpc_pipe_client *cli)
637 struct tevent_req *req;
638 struct rpccli_PNP_InitDetection_state *state;
639 struct tevent_req *subreq;
641 req = tevent_req_create(mem_ctx, &state,
642 struct rpccli_PNP_InitDetection_state);
643 if (req == NULL) {
644 return NULL;
646 state->out_mem_ctx = NULL;
647 state->dispatch_recv = cli->dispatch_recv;
649 /* In parameters */
651 /* Out parameters */
653 /* Result */
654 ZERO_STRUCT(state->orig.out.result);
656 if (DEBUGLEVEL >= 10) {
657 NDR_PRINT_IN_DEBUG(PNP_InitDetection, &state->orig);
660 /* make a temporary copy, that we pass to the dispatch function */
661 state->tmp = state->orig;
663 subreq = cli->dispatch_send(state, ev, cli,
664 &ndr_table_ntsvcs,
665 NDR_PNP_INITDETECTION,
666 &state->tmp);
667 if (tevent_req_nomem(subreq, req)) {
668 return tevent_req_post(req, ev);
670 tevent_req_set_callback(subreq, rpccli_PNP_InitDetection_done, req);
671 return req;
674 static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq)
676 struct tevent_req *req = tevent_req_callback_data(
677 subreq, struct tevent_req);
678 struct rpccli_PNP_InitDetection_state *state = tevent_req_data(
679 req, struct rpccli_PNP_InitDetection_state);
680 NTSTATUS status;
681 TALLOC_CTX *mem_ctx;
683 if (state->out_mem_ctx) {
684 mem_ctx = state->out_mem_ctx;
685 } else {
686 mem_ctx = state;
689 status = state->dispatch_recv(subreq, mem_ctx);
690 TALLOC_FREE(subreq);
691 if (!NT_STATUS_IS_OK(status)) {
692 tevent_req_nterror(req, status);
693 return;
696 /* Copy out parameters */
698 /* Copy result */
699 state->orig.out.result = state->tmp.out.result;
701 /* Reset temporary structure */
702 ZERO_STRUCT(state->tmp);
704 if (DEBUGLEVEL >= 10) {
705 NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &state->orig);
708 tevent_req_done(req);
711 NTSTATUS rpccli_PNP_InitDetection_recv(struct tevent_req *req,
712 TALLOC_CTX *mem_ctx,
713 WERROR *result)
715 struct rpccli_PNP_InitDetection_state *state = tevent_req_data(
716 req, struct rpccli_PNP_InitDetection_state);
717 NTSTATUS status;
719 if (tevent_req_is_nterror(req, &status)) {
720 tevent_req_received(req);
721 return status;
724 /* Steal possbile out parameters to the callers context */
725 talloc_steal(mem_ctx, state->out_mem_ctx);
727 /* Return result */
728 *result = state->orig.out.result;
730 tevent_req_received(req);
731 return NT_STATUS_OK;
734 NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
735 TALLOC_CTX *mem_ctx,
736 WERROR *werror)
738 struct PNP_InitDetection r;
739 NTSTATUS status;
741 /* In parameters */
743 if (DEBUGLEVEL >= 10) {
744 NDR_PRINT_IN_DEBUG(PNP_InitDetection, &r);
747 status = cli->dispatch(cli,
748 mem_ctx,
749 &ndr_table_ntsvcs,
750 NDR_PNP_INITDETECTION,
751 &r);
753 if (!NT_STATUS_IS_OK(status)) {
754 return status;
757 if (DEBUGLEVEL >= 10) {
758 NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &r);
761 if (NT_STATUS_IS_ERR(status)) {
762 return status;
765 /* Return variables */
767 /* Return result */
768 if (werror) {
769 *werror = r.out.result;
772 return werror_to_ntstatus(r.out.result);
775 struct rpccli_PNP_ReportLogOn_state {
776 struct PNP_ReportLogOn orig;
777 struct PNP_ReportLogOn tmp;
778 TALLOC_CTX *out_mem_ctx;
779 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
782 static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq);
784 struct tevent_req *rpccli_PNP_ReportLogOn_send(TALLOC_CTX *mem_ctx,
785 struct tevent_context *ev,
786 struct rpc_pipe_client *cli)
788 struct tevent_req *req;
789 struct rpccli_PNP_ReportLogOn_state *state;
790 struct tevent_req *subreq;
792 req = tevent_req_create(mem_ctx, &state,
793 struct rpccli_PNP_ReportLogOn_state);
794 if (req == NULL) {
795 return NULL;
797 state->out_mem_ctx = NULL;
798 state->dispatch_recv = cli->dispatch_recv;
800 /* In parameters */
802 /* Out parameters */
804 /* Result */
805 ZERO_STRUCT(state->orig.out.result);
807 if (DEBUGLEVEL >= 10) {
808 NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &state->orig);
811 /* make a temporary copy, that we pass to the dispatch function */
812 state->tmp = state->orig;
814 subreq = cli->dispatch_send(state, ev, cli,
815 &ndr_table_ntsvcs,
816 NDR_PNP_REPORTLOGON,
817 &state->tmp);
818 if (tevent_req_nomem(subreq, req)) {
819 return tevent_req_post(req, ev);
821 tevent_req_set_callback(subreq, rpccli_PNP_ReportLogOn_done, req);
822 return req;
825 static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq)
827 struct tevent_req *req = tevent_req_callback_data(
828 subreq, struct tevent_req);
829 struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data(
830 req, struct rpccli_PNP_ReportLogOn_state);
831 NTSTATUS status;
832 TALLOC_CTX *mem_ctx;
834 if (state->out_mem_ctx) {
835 mem_ctx = state->out_mem_ctx;
836 } else {
837 mem_ctx = state;
840 status = state->dispatch_recv(subreq, mem_ctx);
841 TALLOC_FREE(subreq);
842 if (!NT_STATUS_IS_OK(status)) {
843 tevent_req_nterror(req, status);
844 return;
847 /* Copy out parameters */
849 /* Copy result */
850 state->orig.out.result = state->tmp.out.result;
852 /* Reset temporary structure */
853 ZERO_STRUCT(state->tmp);
855 if (DEBUGLEVEL >= 10) {
856 NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &state->orig);
859 tevent_req_done(req);
862 NTSTATUS rpccli_PNP_ReportLogOn_recv(struct tevent_req *req,
863 TALLOC_CTX *mem_ctx,
864 WERROR *result)
866 struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data(
867 req, struct rpccli_PNP_ReportLogOn_state);
868 NTSTATUS status;
870 if (tevent_req_is_nterror(req, &status)) {
871 tevent_req_received(req);
872 return status;
875 /* Steal possbile out parameters to the callers context */
876 talloc_steal(mem_ctx, state->out_mem_ctx);
878 /* Return result */
879 *result = state->orig.out.result;
881 tevent_req_received(req);
882 return NT_STATUS_OK;
885 NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
886 TALLOC_CTX *mem_ctx,
887 WERROR *werror)
889 struct PNP_ReportLogOn r;
890 NTSTATUS status;
892 /* In parameters */
894 if (DEBUGLEVEL >= 10) {
895 NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &r);
898 status = cli->dispatch(cli,
899 mem_ctx,
900 &ndr_table_ntsvcs,
901 NDR_PNP_REPORTLOGON,
902 &r);
904 if (!NT_STATUS_IS_OK(status)) {
905 return status;
908 if (DEBUGLEVEL >= 10) {
909 NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &r);
912 if (NT_STATUS_IS_ERR(status)) {
913 return status;
916 /* Return variables */
918 /* Return result */
919 if (werror) {
920 *werror = r.out.result;
923 return werror_to_ntstatus(r.out.result);
926 struct rpccli_PNP_ValidateDeviceInstance_state {
927 struct PNP_ValidateDeviceInstance orig;
928 struct PNP_ValidateDeviceInstance tmp;
929 TALLOC_CTX *out_mem_ctx;
930 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
933 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq);
935 struct tevent_req *rpccli_PNP_ValidateDeviceInstance_send(TALLOC_CTX *mem_ctx,
936 struct tevent_context *ev,
937 struct rpc_pipe_client *cli,
938 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
939 uint32_t _flags /* [in] */)
941 struct tevent_req *req;
942 struct rpccli_PNP_ValidateDeviceInstance_state *state;
943 struct tevent_req *subreq;
945 req = tevent_req_create(mem_ctx, &state,
946 struct rpccli_PNP_ValidateDeviceInstance_state);
947 if (req == NULL) {
948 return NULL;
950 state->out_mem_ctx = NULL;
951 state->dispatch_recv = cli->dispatch_recv;
953 /* In parameters */
954 state->orig.in.devicepath = _devicepath;
955 state->orig.in.flags = _flags;
957 /* Out parameters */
959 /* Result */
960 ZERO_STRUCT(state->orig.out.result);
962 if (DEBUGLEVEL >= 10) {
963 NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &state->orig);
966 /* make a temporary copy, that we pass to the dispatch function */
967 state->tmp = state->orig;
969 subreq = cli->dispatch_send(state, ev, cli,
970 &ndr_table_ntsvcs,
971 NDR_PNP_VALIDATEDEVICEINSTANCE,
972 &state->tmp);
973 if (tevent_req_nomem(subreq, req)) {
974 return tevent_req_post(req, ev);
976 tevent_req_set_callback(subreq, rpccli_PNP_ValidateDeviceInstance_done, req);
977 return req;
980 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq)
982 struct tevent_req *req = tevent_req_callback_data(
983 subreq, struct tevent_req);
984 struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data(
985 req, struct rpccli_PNP_ValidateDeviceInstance_state);
986 NTSTATUS status;
987 TALLOC_CTX *mem_ctx;
989 if (state->out_mem_ctx) {
990 mem_ctx = state->out_mem_ctx;
991 } else {
992 mem_ctx = state;
995 status = state->dispatch_recv(subreq, mem_ctx);
996 TALLOC_FREE(subreq);
997 if (!NT_STATUS_IS_OK(status)) {
998 tevent_req_nterror(req, status);
999 return;
1002 /* Copy out parameters */
1004 /* Copy result */
1005 state->orig.out.result = state->tmp.out.result;
1007 /* Reset temporary structure */
1008 ZERO_STRUCT(state->tmp);
1010 if (DEBUGLEVEL >= 10) {
1011 NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &state->orig);
1014 tevent_req_done(req);
1017 NTSTATUS rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req *req,
1018 TALLOC_CTX *mem_ctx,
1019 WERROR *result)
1021 struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data(
1022 req, struct rpccli_PNP_ValidateDeviceInstance_state);
1023 NTSTATUS status;
1025 if (tevent_req_is_nterror(req, &status)) {
1026 tevent_req_received(req);
1027 return status;
1030 /* Steal possbile out parameters to the callers context */
1031 talloc_steal(mem_ctx, state->out_mem_ctx);
1033 /* Return result */
1034 *result = state->orig.out.result;
1036 tevent_req_received(req);
1037 return NT_STATUS_OK;
1040 NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli,
1041 TALLOC_CTX *mem_ctx,
1042 const char *devicepath /* [in] [ref,charset(UTF16)] */,
1043 uint32_t flags /* [in] */,
1044 WERROR *werror)
1046 struct PNP_ValidateDeviceInstance r;
1047 NTSTATUS status;
1049 /* In parameters */
1050 r.in.devicepath = devicepath;
1051 r.in.flags = flags;
1053 if (DEBUGLEVEL >= 10) {
1054 NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &r);
1057 status = cli->dispatch(cli,
1058 mem_ctx,
1059 &ndr_table_ntsvcs,
1060 NDR_PNP_VALIDATEDEVICEINSTANCE,
1061 &r);
1063 if (!NT_STATUS_IS_OK(status)) {
1064 return status;
1067 if (DEBUGLEVEL >= 10) {
1068 NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &r);
1071 if (NT_STATUS_IS_ERR(status)) {
1072 return status;
1075 /* Return variables */
1077 /* Return result */
1078 if (werror) {
1079 *werror = r.out.result;
1082 return werror_to_ntstatus(r.out.result);
1085 struct rpccli_PNP_GetRootDeviceInstance_state {
1086 struct PNP_GetRootDeviceInstance orig;
1087 struct PNP_GetRootDeviceInstance tmp;
1088 TALLOC_CTX *out_mem_ctx;
1089 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1092 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq);
1094 struct tevent_req *rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX *mem_ctx,
1095 struct tevent_context *ev,
1096 struct rpc_pipe_client *cli)
1098 struct tevent_req *req;
1099 struct rpccli_PNP_GetRootDeviceInstance_state *state;
1100 struct tevent_req *subreq;
1102 req = tevent_req_create(mem_ctx, &state,
1103 struct rpccli_PNP_GetRootDeviceInstance_state);
1104 if (req == NULL) {
1105 return NULL;
1107 state->out_mem_ctx = NULL;
1108 state->dispatch_recv = cli->dispatch_recv;
1110 /* In parameters */
1112 /* Out parameters */
1114 /* Result */
1115 ZERO_STRUCT(state->orig.out.result);
1117 if (DEBUGLEVEL >= 10) {
1118 NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &state->orig);
1121 /* make a temporary copy, that we pass to the dispatch function */
1122 state->tmp = state->orig;
1124 subreq = cli->dispatch_send(state, ev, cli,
1125 &ndr_table_ntsvcs,
1126 NDR_PNP_GETROOTDEVICEINSTANCE,
1127 &state->tmp);
1128 if (tevent_req_nomem(subreq, req)) {
1129 return tevent_req_post(req, ev);
1131 tevent_req_set_callback(subreq, rpccli_PNP_GetRootDeviceInstance_done, req);
1132 return req;
1135 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq)
1137 struct tevent_req *req = tevent_req_callback_data(
1138 subreq, struct tevent_req);
1139 struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data(
1140 req, struct rpccli_PNP_GetRootDeviceInstance_state);
1141 NTSTATUS status;
1142 TALLOC_CTX *mem_ctx;
1144 if (state->out_mem_ctx) {
1145 mem_ctx = state->out_mem_ctx;
1146 } else {
1147 mem_ctx = state;
1150 status = state->dispatch_recv(subreq, mem_ctx);
1151 TALLOC_FREE(subreq);
1152 if (!NT_STATUS_IS_OK(status)) {
1153 tevent_req_nterror(req, status);
1154 return;
1157 /* Copy out parameters */
1159 /* Copy result */
1160 state->orig.out.result = state->tmp.out.result;
1162 /* Reset temporary structure */
1163 ZERO_STRUCT(state->tmp);
1165 if (DEBUGLEVEL >= 10) {
1166 NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &state->orig);
1169 tevent_req_done(req);
1172 NTSTATUS rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req *req,
1173 TALLOC_CTX *mem_ctx,
1174 WERROR *result)
1176 struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data(
1177 req, struct rpccli_PNP_GetRootDeviceInstance_state);
1178 NTSTATUS status;
1180 if (tevent_req_is_nterror(req, &status)) {
1181 tevent_req_received(req);
1182 return status;
1185 /* Steal possbile out parameters to the callers context */
1186 talloc_steal(mem_ctx, state->out_mem_ctx);
1188 /* Return result */
1189 *result = state->orig.out.result;
1191 tevent_req_received(req);
1192 return NT_STATUS_OK;
1195 NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
1196 TALLOC_CTX *mem_ctx,
1197 WERROR *werror)
1199 struct PNP_GetRootDeviceInstance r;
1200 NTSTATUS status;
1202 /* In parameters */
1204 if (DEBUGLEVEL >= 10) {
1205 NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &r);
1208 status = cli->dispatch(cli,
1209 mem_ctx,
1210 &ndr_table_ntsvcs,
1211 NDR_PNP_GETROOTDEVICEINSTANCE,
1212 &r);
1214 if (!NT_STATUS_IS_OK(status)) {
1215 return status;
1218 if (DEBUGLEVEL >= 10) {
1219 NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &r);
1222 if (NT_STATUS_IS_ERR(status)) {
1223 return status;
1226 /* Return variables */
1228 /* Return result */
1229 if (werror) {
1230 *werror = r.out.result;
1233 return werror_to_ntstatus(r.out.result);
1236 struct rpccli_PNP_GetRelatedDeviceInstance_state {
1237 struct PNP_GetRelatedDeviceInstance orig;
1238 struct PNP_GetRelatedDeviceInstance tmp;
1239 TALLOC_CTX *out_mem_ctx;
1240 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1243 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq);
1245 struct tevent_req *rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX *mem_ctx,
1246 struct tevent_context *ev,
1247 struct rpc_pipe_client *cli)
1249 struct tevent_req *req;
1250 struct rpccli_PNP_GetRelatedDeviceInstance_state *state;
1251 struct tevent_req *subreq;
1253 req = tevent_req_create(mem_ctx, &state,
1254 struct rpccli_PNP_GetRelatedDeviceInstance_state);
1255 if (req == NULL) {
1256 return NULL;
1258 state->out_mem_ctx = NULL;
1259 state->dispatch_recv = cli->dispatch_recv;
1261 /* In parameters */
1263 /* Out parameters */
1265 /* Result */
1266 ZERO_STRUCT(state->orig.out.result);
1268 if (DEBUGLEVEL >= 10) {
1269 NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &state->orig);
1272 /* make a temporary copy, that we pass to the dispatch function */
1273 state->tmp = state->orig;
1275 subreq = cli->dispatch_send(state, ev, cli,
1276 &ndr_table_ntsvcs,
1277 NDR_PNP_GETRELATEDDEVICEINSTANCE,
1278 &state->tmp);
1279 if (tevent_req_nomem(subreq, req)) {
1280 return tevent_req_post(req, ev);
1282 tevent_req_set_callback(subreq, rpccli_PNP_GetRelatedDeviceInstance_done, req);
1283 return req;
1286 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq)
1288 struct tevent_req *req = tevent_req_callback_data(
1289 subreq, struct tevent_req);
1290 struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data(
1291 req, struct rpccli_PNP_GetRelatedDeviceInstance_state);
1292 NTSTATUS status;
1293 TALLOC_CTX *mem_ctx;
1295 if (state->out_mem_ctx) {
1296 mem_ctx = state->out_mem_ctx;
1297 } else {
1298 mem_ctx = state;
1301 status = state->dispatch_recv(subreq, mem_ctx);
1302 TALLOC_FREE(subreq);
1303 if (!NT_STATUS_IS_OK(status)) {
1304 tevent_req_nterror(req, status);
1305 return;
1308 /* Copy out parameters */
1310 /* Copy result */
1311 state->orig.out.result = state->tmp.out.result;
1313 /* Reset temporary structure */
1314 ZERO_STRUCT(state->tmp);
1316 if (DEBUGLEVEL >= 10) {
1317 NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &state->orig);
1320 tevent_req_done(req);
1323 NTSTATUS rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req *req,
1324 TALLOC_CTX *mem_ctx,
1325 WERROR *result)
1327 struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data(
1328 req, struct rpccli_PNP_GetRelatedDeviceInstance_state);
1329 NTSTATUS status;
1331 if (tevent_req_is_nterror(req, &status)) {
1332 tevent_req_received(req);
1333 return status;
1336 /* Steal possbile out parameters to the callers context */
1337 talloc_steal(mem_ctx, state->out_mem_ctx);
1339 /* Return result */
1340 *result = state->orig.out.result;
1342 tevent_req_received(req);
1343 return NT_STATUS_OK;
1346 NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
1347 TALLOC_CTX *mem_ctx,
1348 WERROR *werror)
1350 struct PNP_GetRelatedDeviceInstance r;
1351 NTSTATUS status;
1353 /* In parameters */
1355 if (DEBUGLEVEL >= 10) {
1356 NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &r);
1359 status = cli->dispatch(cli,
1360 mem_ctx,
1361 &ndr_table_ntsvcs,
1362 NDR_PNP_GETRELATEDDEVICEINSTANCE,
1363 &r);
1365 if (!NT_STATUS_IS_OK(status)) {
1366 return status;
1369 if (DEBUGLEVEL >= 10) {
1370 NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &r);
1373 if (NT_STATUS_IS_ERR(status)) {
1374 return status;
1377 /* Return variables */
1379 /* Return result */
1380 if (werror) {
1381 *werror = r.out.result;
1384 return werror_to_ntstatus(r.out.result);
1387 struct rpccli_PNP_EnumerateSubKeys_state {
1388 struct PNP_EnumerateSubKeys orig;
1389 struct PNP_EnumerateSubKeys tmp;
1390 TALLOC_CTX *out_mem_ctx;
1391 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1394 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq);
1396 struct tevent_req *rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX *mem_ctx,
1397 struct tevent_context *ev,
1398 struct rpc_pipe_client *cli)
1400 struct tevent_req *req;
1401 struct rpccli_PNP_EnumerateSubKeys_state *state;
1402 struct tevent_req *subreq;
1404 req = tevent_req_create(mem_ctx, &state,
1405 struct rpccli_PNP_EnumerateSubKeys_state);
1406 if (req == NULL) {
1407 return NULL;
1409 state->out_mem_ctx = NULL;
1410 state->dispatch_recv = cli->dispatch_recv;
1412 /* In parameters */
1414 /* Out parameters */
1416 /* Result */
1417 ZERO_STRUCT(state->orig.out.result);
1419 if (DEBUGLEVEL >= 10) {
1420 NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &state->orig);
1423 /* make a temporary copy, that we pass to the dispatch function */
1424 state->tmp = state->orig;
1426 subreq = cli->dispatch_send(state, ev, cli,
1427 &ndr_table_ntsvcs,
1428 NDR_PNP_ENUMERATESUBKEYS,
1429 &state->tmp);
1430 if (tevent_req_nomem(subreq, req)) {
1431 return tevent_req_post(req, ev);
1433 tevent_req_set_callback(subreq, rpccli_PNP_EnumerateSubKeys_done, req);
1434 return req;
1437 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq)
1439 struct tevent_req *req = tevent_req_callback_data(
1440 subreq, struct tevent_req);
1441 struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data(
1442 req, struct rpccli_PNP_EnumerateSubKeys_state);
1443 NTSTATUS status;
1444 TALLOC_CTX *mem_ctx;
1446 if (state->out_mem_ctx) {
1447 mem_ctx = state->out_mem_ctx;
1448 } else {
1449 mem_ctx = state;
1452 status = state->dispatch_recv(subreq, mem_ctx);
1453 TALLOC_FREE(subreq);
1454 if (!NT_STATUS_IS_OK(status)) {
1455 tevent_req_nterror(req, status);
1456 return;
1459 /* Copy out parameters */
1461 /* Copy result */
1462 state->orig.out.result = state->tmp.out.result;
1464 /* Reset temporary structure */
1465 ZERO_STRUCT(state->tmp);
1467 if (DEBUGLEVEL >= 10) {
1468 NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &state->orig);
1471 tevent_req_done(req);
1474 NTSTATUS rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req *req,
1475 TALLOC_CTX *mem_ctx,
1476 WERROR *result)
1478 struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data(
1479 req, struct rpccli_PNP_EnumerateSubKeys_state);
1480 NTSTATUS status;
1482 if (tevent_req_is_nterror(req, &status)) {
1483 tevent_req_received(req);
1484 return status;
1487 /* Steal possbile out parameters to the callers context */
1488 talloc_steal(mem_ctx, state->out_mem_ctx);
1490 /* Return result */
1491 *result = state->orig.out.result;
1493 tevent_req_received(req);
1494 return NT_STATUS_OK;
1497 NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
1498 TALLOC_CTX *mem_ctx,
1499 WERROR *werror)
1501 struct PNP_EnumerateSubKeys r;
1502 NTSTATUS status;
1504 /* In parameters */
1506 if (DEBUGLEVEL >= 10) {
1507 NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &r);
1510 status = cli->dispatch(cli,
1511 mem_ctx,
1512 &ndr_table_ntsvcs,
1513 NDR_PNP_ENUMERATESUBKEYS,
1514 &r);
1516 if (!NT_STATUS_IS_OK(status)) {
1517 return status;
1520 if (DEBUGLEVEL >= 10) {
1521 NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &r);
1524 if (NT_STATUS_IS_ERR(status)) {
1525 return status;
1528 /* Return variables */
1530 /* Return result */
1531 if (werror) {
1532 *werror = r.out.result;
1535 return werror_to_ntstatus(r.out.result);
1538 struct rpccli_PNP_GetDeviceList_state {
1539 struct PNP_GetDeviceList orig;
1540 struct PNP_GetDeviceList tmp;
1541 TALLOC_CTX *out_mem_ctx;
1542 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1545 static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq);
1547 struct tevent_req *rpccli_PNP_GetDeviceList_send(TALLOC_CTX *mem_ctx,
1548 struct tevent_context *ev,
1549 struct rpc_pipe_client *cli,
1550 const char *_filter /* [in] [unique,charset(UTF16)] */,
1551 uint16_t *_buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1552 uint32_t *_length /* [in,out] [ref] */,
1553 uint32_t _flags /* [in] */)
1555 struct tevent_req *req;
1556 struct rpccli_PNP_GetDeviceList_state *state;
1557 struct tevent_req *subreq;
1559 req = tevent_req_create(mem_ctx, &state,
1560 struct rpccli_PNP_GetDeviceList_state);
1561 if (req == NULL) {
1562 return NULL;
1564 state->out_mem_ctx = NULL;
1565 state->dispatch_recv = cli->dispatch_recv;
1567 /* In parameters */
1568 state->orig.in.filter = _filter;
1569 state->orig.in.length = _length;
1570 state->orig.in.flags = _flags;
1572 /* Out parameters */
1573 state->orig.out.buffer = _buffer;
1574 state->orig.out.length = _length;
1576 /* Result */
1577 ZERO_STRUCT(state->orig.out.result);
1579 if (DEBUGLEVEL >= 10) {
1580 NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &state->orig);
1583 state->out_mem_ctx = talloc_named_const(state, 0,
1584 "rpccli_PNP_GetDeviceList_out_memory");
1585 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1586 return tevent_req_post(req, ev);
1589 /* make a temporary copy, that we pass to the dispatch function */
1590 state->tmp = state->orig;
1592 subreq = cli->dispatch_send(state, ev, cli,
1593 &ndr_table_ntsvcs,
1594 NDR_PNP_GETDEVICELIST,
1595 &state->tmp);
1596 if (tevent_req_nomem(subreq, req)) {
1597 return tevent_req_post(req, ev);
1599 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceList_done, req);
1600 return req;
1603 static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq)
1605 struct tevent_req *req = tevent_req_callback_data(
1606 subreq, struct tevent_req);
1607 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1608 req, struct rpccli_PNP_GetDeviceList_state);
1609 NTSTATUS status;
1610 TALLOC_CTX *mem_ctx;
1612 if (state->out_mem_ctx) {
1613 mem_ctx = state->out_mem_ctx;
1614 } else {
1615 mem_ctx = state;
1618 status = state->dispatch_recv(subreq, mem_ctx);
1619 TALLOC_FREE(subreq);
1620 if (!NT_STATUS_IS_OK(status)) {
1621 tevent_req_nterror(req, status);
1622 return;
1625 /* Copy out parameters */
1626 memcpy(state->orig.out.buffer, state->tmp.out.buffer, *state->tmp.in.length * sizeof(*state->orig.out.buffer));
1627 *state->orig.out.length = *state->tmp.out.length;
1629 /* Copy result */
1630 state->orig.out.result = state->tmp.out.result;
1632 /* Reset temporary structure */
1633 ZERO_STRUCT(state->tmp);
1635 if (DEBUGLEVEL >= 10) {
1636 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &state->orig);
1639 tevent_req_done(req);
1642 NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req,
1643 TALLOC_CTX *mem_ctx,
1644 WERROR *result)
1646 struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data(
1647 req, struct rpccli_PNP_GetDeviceList_state);
1648 NTSTATUS status;
1650 if (tevent_req_is_nterror(req, &status)) {
1651 tevent_req_received(req);
1652 return status;
1655 /* Steal possbile out parameters to the callers context */
1656 talloc_steal(mem_ctx, state->out_mem_ctx);
1658 /* Return result */
1659 *result = state->orig.out.result;
1661 tevent_req_received(req);
1662 return NT_STATUS_OK;
1665 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
1666 TALLOC_CTX *mem_ctx,
1667 const char *filter /* [in] [unique,charset(UTF16)] */,
1668 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
1669 uint32_t *length /* [in,out] [ref] */,
1670 uint32_t flags /* [in] */,
1671 WERROR *werror)
1673 struct PNP_GetDeviceList r;
1674 NTSTATUS status;
1676 /* In parameters */
1677 r.in.filter = filter;
1678 r.in.length = length;
1679 r.in.flags = flags;
1681 if (DEBUGLEVEL >= 10) {
1682 NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
1685 status = cli->dispatch(cli,
1686 mem_ctx,
1687 &ndr_table_ntsvcs,
1688 NDR_PNP_GETDEVICELIST,
1689 &r);
1691 if (!NT_STATUS_IS_OK(status)) {
1692 return status;
1695 if (DEBUGLEVEL >= 10) {
1696 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &r);
1699 if (NT_STATUS_IS_ERR(status)) {
1700 return status;
1703 /* Return variables */
1704 memcpy(buffer, r.out.buffer, *r.in.length * sizeof(*buffer));
1705 *length = *r.out.length;
1707 /* Return result */
1708 if (werror) {
1709 *werror = r.out.result;
1712 return werror_to_ntstatus(r.out.result);
1715 struct rpccli_PNP_GetDeviceListSize_state {
1716 struct PNP_GetDeviceListSize orig;
1717 struct PNP_GetDeviceListSize tmp;
1718 TALLOC_CTX *out_mem_ctx;
1719 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1722 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq);
1724 struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx,
1725 struct tevent_context *ev,
1726 struct rpc_pipe_client *cli,
1727 const char *_devicename /* [in] [unique,charset(UTF16)] */,
1728 uint32_t *_size /* [out] [ref] */,
1729 uint32_t _flags /* [in] */)
1731 struct tevent_req *req;
1732 struct rpccli_PNP_GetDeviceListSize_state *state;
1733 struct tevent_req *subreq;
1735 req = tevent_req_create(mem_ctx, &state,
1736 struct rpccli_PNP_GetDeviceListSize_state);
1737 if (req == NULL) {
1738 return NULL;
1740 state->out_mem_ctx = NULL;
1741 state->dispatch_recv = cli->dispatch_recv;
1743 /* In parameters */
1744 state->orig.in.devicename = _devicename;
1745 state->orig.in.flags = _flags;
1747 /* Out parameters */
1748 state->orig.out.size = _size;
1750 /* Result */
1751 ZERO_STRUCT(state->orig.out.result);
1753 if (DEBUGLEVEL >= 10) {
1754 NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &state->orig);
1757 state->out_mem_ctx = talloc_named_const(state, 0,
1758 "rpccli_PNP_GetDeviceListSize_out_memory");
1759 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1760 return tevent_req_post(req, ev);
1763 /* make a temporary copy, that we pass to the dispatch function */
1764 state->tmp = state->orig;
1766 subreq = cli->dispatch_send(state, ev, cli,
1767 &ndr_table_ntsvcs,
1768 NDR_PNP_GETDEVICELISTSIZE,
1769 &state->tmp);
1770 if (tevent_req_nomem(subreq, req)) {
1771 return tevent_req_post(req, ev);
1773 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceListSize_done, req);
1774 return req;
1777 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq)
1779 struct tevent_req *req = tevent_req_callback_data(
1780 subreq, struct tevent_req);
1781 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1782 req, struct rpccli_PNP_GetDeviceListSize_state);
1783 NTSTATUS status;
1784 TALLOC_CTX *mem_ctx;
1786 if (state->out_mem_ctx) {
1787 mem_ctx = state->out_mem_ctx;
1788 } else {
1789 mem_ctx = state;
1792 status = state->dispatch_recv(subreq, mem_ctx);
1793 TALLOC_FREE(subreq);
1794 if (!NT_STATUS_IS_OK(status)) {
1795 tevent_req_nterror(req, status);
1796 return;
1799 /* Copy out parameters */
1800 *state->orig.out.size = *state->tmp.out.size;
1802 /* Copy result */
1803 state->orig.out.result = state->tmp.out.result;
1805 /* Reset temporary structure */
1806 ZERO_STRUCT(state->tmp);
1808 if (DEBUGLEVEL >= 10) {
1809 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &state->orig);
1812 tevent_req_done(req);
1815 NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req,
1816 TALLOC_CTX *mem_ctx,
1817 WERROR *result)
1819 struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data(
1820 req, struct rpccli_PNP_GetDeviceListSize_state);
1821 NTSTATUS status;
1823 if (tevent_req_is_nterror(req, &status)) {
1824 tevent_req_received(req);
1825 return status;
1828 /* Steal possbile out parameters to the callers context */
1829 talloc_steal(mem_ctx, state->out_mem_ctx);
1831 /* Return result */
1832 *result = state->orig.out.result;
1834 tevent_req_received(req);
1835 return NT_STATUS_OK;
1838 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
1839 TALLOC_CTX *mem_ctx,
1840 const char *devicename /* [in] [unique,charset(UTF16)] */,
1841 uint32_t *size /* [out] [ref] */,
1842 uint32_t flags /* [in] */,
1843 WERROR *werror)
1845 struct PNP_GetDeviceListSize r;
1846 NTSTATUS status;
1848 /* In parameters */
1849 r.in.devicename = devicename;
1850 r.in.flags = flags;
1852 if (DEBUGLEVEL >= 10) {
1853 NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r);
1856 status = cli->dispatch(cli,
1857 mem_ctx,
1858 &ndr_table_ntsvcs,
1859 NDR_PNP_GETDEVICELISTSIZE,
1860 &r);
1862 if (!NT_STATUS_IS_OK(status)) {
1863 return status;
1866 if (DEBUGLEVEL >= 10) {
1867 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &r);
1870 if (NT_STATUS_IS_ERR(status)) {
1871 return status;
1874 /* Return variables */
1875 *size = *r.out.size;
1877 /* Return result */
1878 if (werror) {
1879 *werror = r.out.result;
1882 return werror_to_ntstatus(r.out.result);
1885 struct rpccli_PNP_GetDepth_state {
1886 struct PNP_GetDepth orig;
1887 struct PNP_GetDepth tmp;
1888 TALLOC_CTX *out_mem_ctx;
1889 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1892 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq);
1894 struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx,
1895 struct tevent_context *ev,
1896 struct rpc_pipe_client *cli)
1898 struct tevent_req *req;
1899 struct rpccli_PNP_GetDepth_state *state;
1900 struct tevent_req *subreq;
1902 req = tevent_req_create(mem_ctx, &state,
1903 struct rpccli_PNP_GetDepth_state);
1904 if (req == NULL) {
1905 return NULL;
1907 state->out_mem_ctx = NULL;
1908 state->dispatch_recv = cli->dispatch_recv;
1910 /* In parameters */
1912 /* Out parameters */
1914 /* Result */
1915 ZERO_STRUCT(state->orig.out.result);
1917 if (DEBUGLEVEL >= 10) {
1918 NDR_PRINT_IN_DEBUG(PNP_GetDepth, &state->orig);
1921 /* make a temporary copy, that we pass to the dispatch function */
1922 state->tmp = state->orig;
1924 subreq = cli->dispatch_send(state, ev, cli,
1925 &ndr_table_ntsvcs,
1926 NDR_PNP_GETDEPTH,
1927 &state->tmp);
1928 if (tevent_req_nomem(subreq, req)) {
1929 return tevent_req_post(req, ev);
1931 tevent_req_set_callback(subreq, rpccli_PNP_GetDepth_done, req);
1932 return req;
1935 static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq)
1937 struct tevent_req *req = tevent_req_callback_data(
1938 subreq, struct tevent_req);
1939 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1940 req, struct rpccli_PNP_GetDepth_state);
1941 NTSTATUS status;
1942 TALLOC_CTX *mem_ctx;
1944 if (state->out_mem_ctx) {
1945 mem_ctx = state->out_mem_ctx;
1946 } else {
1947 mem_ctx = state;
1950 status = state->dispatch_recv(subreq, mem_ctx);
1951 TALLOC_FREE(subreq);
1952 if (!NT_STATUS_IS_OK(status)) {
1953 tevent_req_nterror(req, status);
1954 return;
1957 /* Copy out parameters */
1959 /* Copy result */
1960 state->orig.out.result = state->tmp.out.result;
1962 /* Reset temporary structure */
1963 ZERO_STRUCT(state->tmp);
1965 if (DEBUGLEVEL >= 10) {
1966 NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &state->orig);
1969 tevent_req_done(req);
1972 NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req,
1973 TALLOC_CTX *mem_ctx,
1974 WERROR *result)
1976 struct rpccli_PNP_GetDepth_state *state = tevent_req_data(
1977 req, struct rpccli_PNP_GetDepth_state);
1978 NTSTATUS status;
1980 if (tevent_req_is_nterror(req, &status)) {
1981 tevent_req_received(req);
1982 return status;
1985 /* Steal possbile out parameters to the callers context */
1986 talloc_steal(mem_ctx, state->out_mem_ctx);
1988 /* Return result */
1989 *result = state->orig.out.result;
1991 tevent_req_received(req);
1992 return NT_STATUS_OK;
1995 NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
1996 TALLOC_CTX *mem_ctx,
1997 WERROR *werror)
1999 struct PNP_GetDepth r;
2000 NTSTATUS status;
2002 /* In parameters */
2004 if (DEBUGLEVEL >= 10) {
2005 NDR_PRINT_IN_DEBUG(PNP_GetDepth, &r);
2008 status = cli->dispatch(cli,
2009 mem_ctx,
2010 &ndr_table_ntsvcs,
2011 NDR_PNP_GETDEPTH,
2012 &r);
2014 if (!NT_STATUS_IS_OK(status)) {
2015 return status;
2018 if (DEBUGLEVEL >= 10) {
2019 NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &r);
2022 if (NT_STATUS_IS_ERR(status)) {
2023 return status;
2026 /* Return variables */
2028 /* Return result */
2029 if (werror) {
2030 *werror = r.out.result;
2033 return werror_to_ntstatus(r.out.result);
2036 struct rpccli_PNP_GetDeviceRegProp_state {
2037 struct PNP_GetDeviceRegProp orig;
2038 struct PNP_GetDeviceRegProp tmp;
2039 TALLOC_CTX *out_mem_ctx;
2040 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2043 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq);
2045 struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
2046 struct tevent_context *ev,
2047 struct rpc_pipe_client *cli,
2048 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
2049 uint32_t _property /* [in] */,
2050 enum winreg_Type *_reg_data_type /* [in,out] [ref] */,
2051 uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
2052 uint32_t *_buffer_size /* [in,out] [ref] */,
2053 uint32_t *_needed /* [in,out] [ref] */,
2054 uint32_t _flags /* [in] */)
2056 struct tevent_req *req;
2057 struct rpccli_PNP_GetDeviceRegProp_state *state;
2058 struct tevent_req *subreq;
2060 req = tevent_req_create(mem_ctx, &state,
2061 struct rpccli_PNP_GetDeviceRegProp_state);
2062 if (req == NULL) {
2063 return NULL;
2065 state->out_mem_ctx = NULL;
2066 state->dispatch_recv = cli->dispatch_recv;
2068 /* In parameters */
2069 state->orig.in.devicepath = _devicepath;
2070 state->orig.in.property = _property;
2071 state->orig.in.reg_data_type = _reg_data_type;
2072 state->orig.in.buffer_size = _buffer_size;
2073 state->orig.in.needed = _needed;
2074 state->orig.in.flags = _flags;
2076 /* Out parameters */
2077 state->orig.out.reg_data_type = _reg_data_type;
2078 state->orig.out.buffer = _buffer;
2079 state->orig.out.buffer_size = _buffer_size;
2080 state->orig.out.needed = _needed;
2082 /* Result */
2083 ZERO_STRUCT(state->orig.out.result);
2085 if (DEBUGLEVEL >= 10) {
2086 NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &state->orig);
2089 state->out_mem_ctx = talloc_named_const(state, 0,
2090 "rpccli_PNP_GetDeviceRegProp_out_memory");
2091 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2092 return tevent_req_post(req, ev);
2095 /* make a temporary copy, that we pass to the dispatch function */
2096 state->tmp = state->orig;
2098 subreq = cli->dispatch_send(state, ev, cli,
2099 &ndr_table_ntsvcs,
2100 NDR_PNP_GETDEVICEREGPROP,
2101 &state->tmp);
2102 if (tevent_req_nomem(subreq, req)) {
2103 return tevent_req_post(req, ev);
2105 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceRegProp_done, req);
2106 return req;
2109 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq)
2111 struct tevent_req *req = tevent_req_callback_data(
2112 subreq, struct tevent_req);
2113 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
2114 req, struct rpccli_PNP_GetDeviceRegProp_state);
2115 NTSTATUS status;
2116 TALLOC_CTX *mem_ctx;
2118 if (state->out_mem_ctx) {
2119 mem_ctx = state->out_mem_ctx;
2120 } else {
2121 mem_ctx = state;
2124 status = state->dispatch_recv(subreq, mem_ctx);
2125 TALLOC_FREE(subreq);
2126 if (!NT_STATUS_IS_OK(status)) {
2127 tevent_req_nterror(req, status);
2128 return;
2131 /* Copy out parameters */
2132 *state->orig.out.reg_data_type = *state->tmp.out.reg_data_type;
2133 memcpy(state->orig.out.buffer, state->tmp.out.buffer, *state->tmp.in.buffer_size * sizeof(*state->orig.out.buffer));
2134 *state->orig.out.buffer_size = *state->tmp.out.buffer_size;
2135 *state->orig.out.needed = *state->tmp.out.needed;
2137 /* Copy result */
2138 state->orig.out.result = state->tmp.out.result;
2140 /* Reset temporary structure */
2141 ZERO_STRUCT(state->tmp);
2143 if (DEBUGLEVEL >= 10) {
2144 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &state->orig);
2147 tevent_req_done(req);
2150 NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req,
2151 TALLOC_CTX *mem_ctx,
2152 WERROR *result)
2154 struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data(
2155 req, struct rpccli_PNP_GetDeviceRegProp_state);
2156 NTSTATUS status;
2158 if (tevent_req_is_nterror(req, &status)) {
2159 tevent_req_received(req);
2160 return status;
2163 /* Steal possbile out parameters to the callers context */
2164 talloc_steal(mem_ctx, state->out_mem_ctx);
2166 /* Return result */
2167 *result = state->orig.out.result;
2169 tevent_req_received(req);
2170 return NT_STATUS_OK;
2173 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
2174 TALLOC_CTX *mem_ctx,
2175 const char *devicepath /* [in] [ref,charset(UTF16)] */,
2176 uint32_t property /* [in] */,
2177 enum winreg_Type *reg_data_type /* [in,out] [ref] */,
2178 uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
2179 uint32_t *buffer_size /* [in,out] [ref] */,
2180 uint32_t *needed /* [in,out] [ref] */,
2181 uint32_t flags /* [in] */,
2182 WERROR *werror)
2184 struct PNP_GetDeviceRegProp r;
2185 NTSTATUS status;
2187 /* In parameters */
2188 r.in.devicepath = devicepath;
2189 r.in.property = property;
2190 r.in.reg_data_type = reg_data_type;
2191 r.in.buffer_size = buffer_size;
2192 r.in.needed = needed;
2193 r.in.flags = flags;
2195 if (DEBUGLEVEL >= 10) {
2196 NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
2199 status = cli->dispatch(cli,
2200 mem_ctx,
2201 &ndr_table_ntsvcs,
2202 NDR_PNP_GETDEVICEREGPROP,
2203 &r);
2205 if (!NT_STATUS_IS_OK(status)) {
2206 return status;
2209 if (DEBUGLEVEL >= 10) {
2210 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &r);
2213 if (NT_STATUS_IS_ERR(status)) {
2214 return status;
2217 /* Return variables */
2218 *reg_data_type = *r.out.reg_data_type;
2219 memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
2220 *buffer_size = *r.out.buffer_size;
2221 *needed = *r.out.needed;
2223 /* Return result */
2224 if (werror) {
2225 *werror = r.out.result;
2228 return werror_to_ntstatus(r.out.result);
2231 struct rpccli_PNP_SetDeviceRegProp_state {
2232 struct PNP_SetDeviceRegProp orig;
2233 struct PNP_SetDeviceRegProp tmp;
2234 TALLOC_CTX *out_mem_ctx;
2235 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2238 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq);
2240 struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx,
2241 struct tevent_context *ev,
2242 struct rpc_pipe_client *cli)
2244 struct tevent_req *req;
2245 struct rpccli_PNP_SetDeviceRegProp_state *state;
2246 struct tevent_req *subreq;
2248 req = tevent_req_create(mem_ctx, &state,
2249 struct rpccli_PNP_SetDeviceRegProp_state);
2250 if (req == NULL) {
2251 return NULL;
2253 state->out_mem_ctx = NULL;
2254 state->dispatch_recv = cli->dispatch_recv;
2256 /* In parameters */
2258 /* Out parameters */
2260 /* Result */
2261 ZERO_STRUCT(state->orig.out.result);
2263 if (DEBUGLEVEL >= 10) {
2264 NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &state->orig);
2267 /* make a temporary copy, that we pass to the dispatch function */
2268 state->tmp = state->orig;
2270 subreq = cli->dispatch_send(state, ev, cli,
2271 &ndr_table_ntsvcs,
2272 NDR_PNP_SETDEVICEREGPROP,
2273 &state->tmp);
2274 if (tevent_req_nomem(subreq, req)) {
2275 return tevent_req_post(req, ev);
2277 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceRegProp_done, req);
2278 return req;
2281 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq)
2283 struct tevent_req *req = tevent_req_callback_data(
2284 subreq, struct tevent_req);
2285 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2286 req, struct rpccli_PNP_SetDeviceRegProp_state);
2287 NTSTATUS status;
2288 TALLOC_CTX *mem_ctx;
2290 if (state->out_mem_ctx) {
2291 mem_ctx = state->out_mem_ctx;
2292 } else {
2293 mem_ctx = state;
2296 status = state->dispatch_recv(subreq, mem_ctx);
2297 TALLOC_FREE(subreq);
2298 if (!NT_STATUS_IS_OK(status)) {
2299 tevent_req_nterror(req, status);
2300 return;
2303 /* Copy out parameters */
2305 /* Copy result */
2306 state->orig.out.result = state->tmp.out.result;
2308 /* Reset temporary structure */
2309 ZERO_STRUCT(state->tmp);
2311 if (DEBUGLEVEL >= 10) {
2312 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &state->orig);
2315 tevent_req_done(req);
2318 NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req,
2319 TALLOC_CTX *mem_ctx,
2320 WERROR *result)
2322 struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data(
2323 req, struct rpccli_PNP_SetDeviceRegProp_state);
2324 NTSTATUS status;
2326 if (tevent_req_is_nterror(req, &status)) {
2327 tevent_req_received(req);
2328 return status;
2331 /* Steal possbile out parameters to the callers context */
2332 talloc_steal(mem_ctx, state->out_mem_ctx);
2334 /* Return result */
2335 *result = state->orig.out.result;
2337 tevent_req_received(req);
2338 return NT_STATUS_OK;
2341 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
2342 TALLOC_CTX *mem_ctx,
2343 WERROR *werror)
2345 struct PNP_SetDeviceRegProp r;
2346 NTSTATUS status;
2348 /* In parameters */
2350 if (DEBUGLEVEL >= 10) {
2351 NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &r);
2354 status = cli->dispatch(cli,
2355 mem_ctx,
2356 &ndr_table_ntsvcs,
2357 NDR_PNP_SETDEVICEREGPROP,
2358 &r);
2360 if (!NT_STATUS_IS_OK(status)) {
2361 return status;
2364 if (DEBUGLEVEL >= 10) {
2365 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &r);
2368 if (NT_STATUS_IS_ERR(status)) {
2369 return status;
2372 /* Return variables */
2374 /* Return result */
2375 if (werror) {
2376 *werror = r.out.result;
2379 return werror_to_ntstatus(r.out.result);
2382 struct rpccli_PNP_GetClassInstance_state {
2383 struct PNP_GetClassInstance orig;
2384 struct PNP_GetClassInstance tmp;
2385 TALLOC_CTX *out_mem_ctx;
2386 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2389 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq);
2391 struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx,
2392 struct tevent_context *ev,
2393 struct rpc_pipe_client *cli)
2395 struct tevent_req *req;
2396 struct rpccli_PNP_GetClassInstance_state *state;
2397 struct tevent_req *subreq;
2399 req = tevent_req_create(mem_ctx, &state,
2400 struct rpccli_PNP_GetClassInstance_state);
2401 if (req == NULL) {
2402 return NULL;
2404 state->out_mem_ctx = NULL;
2405 state->dispatch_recv = cli->dispatch_recv;
2407 /* In parameters */
2409 /* Out parameters */
2411 /* Result */
2412 ZERO_STRUCT(state->orig.out.result);
2414 if (DEBUGLEVEL >= 10) {
2415 NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &state->orig);
2418 /* make a temporary copy, that we pass to the dispatch function */
2419 state->tmp = state->orig;
2421 subreq = cli->dispatch_send(state, ev, cli,
2422 &ndr_table_ntsvcs,
2423 NDR_PNP_GETCLASSINSTANCE,
2424 &state->tmp);
2425 if (tevent_req_nomem(subreq, req)) {
2426 return tevent_req_post(req, ev);
2428 tevent_req_set_callback(subreq, rpccli_PNP_GetClassInstance_done, req);
2429 return req;
2432 static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq)
2434 struct tevent_req *req = tevent_req_callback_data(
2435 subreq, struct tevent_req);
2436 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2437 req, struct rpccli_PNP_GetClassInstance_state);
2438 NTSTATUS status;
2439 TALLOC_CTX *mem_ctx;
2441 if (state->out_mem_ctx) {
2442 mem_ctx = state->out_mem_ctx;
2443 } else {
2444 mem_ctx = state;
2447 status = state->dispatch_recv(subreq, mem_ctx);
2448 TALLOC_FREE(subreq);
2449 if (!NT_STATUS_IS_OK(status)) {
2450 tevent_req_nterror(req, status);
2451 return;
2454 /* Copy out parameters */
2456 /* Copy result */
2457 state->orig.out.result = state->tmp.out.result;
2459 /* Reset temporary structure */
2460 ZERO_STRUCT(state->tmp);
2462 if (DEBUGLEVEL >= 10) {
2463 NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &state->orig);
2466 tevent_req_done(req);
2469 NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req,
2470 TALLOC_CTX *mem_ctx,
2471 WERROR *result)
2473 struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data(
2474 req, struct rpccli_PNP_GetClassInstance_state);
2475 NTSTATUS status;
2477 if (tevent_req_is_nterror(req, &status)) {
2478 tevent_req_received(req);
2479 return status;
2482 /* Steal possbile out parameters to the callers context */
2483 talloc_steal(mem_ctx, state->out_mem_ctx);
2485 /* Return result */
2486 *result = state->orig.out.result;
2488 tevent_req_received(req);
2489 return NT_STATUS_OK;
2492 NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
2493 TALLOC_CTX *mem_ctx,
2494 WERROR *werror)
2496 struct PNP_GetClassInstance r;
2497 NTSTATUS status;
2499 /* In parameters */
2501 if (DEBUGLEVEL >= 10) {
2502 NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &r);
2505 status = cli->dispatch(cli,
2506 mem_ctx,
2507 &ndr_table_ntsvcs,
2508 NDR_PNP_GETCLASSINSTANCE,
2509 &r);
2511 if (!NT_STATUS_IS_OK(status)) {
2512 return status;
2515 if (DEBUGLEVEL >= 10) {
2516 NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &r);
2519 if (NT_STATUS_IS_ERR(status)) {
2520 return status;
2523 /* Return variables */
2525 /* Return result */
2526 if (werror) {
2527 *werror = r.out.result;
2530 return werror_to_ntstatus(r.out.result);
2533 struct rpccli_PNP_CreateKey_state {
2534 struct PNP_CreateKey orig;
2535 struct PNP_CreateKey tmp;
2536 TALLOC_CTX *out_mem_ctx;
2537 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2540 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq);
2542 struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx,
2543 struct tevent_context *ev,
2544 struct rpc_pipe_client *cli)
2546 struct tevent_req *req;
2547 struct rpccli_PNP_CreateKey_state *state;
2548 struct tevent_req *subreq;
2550 req = tevent_req_create(mem_ctx, &state,
2551 struct rpccli_PNP_CreateKey_state);
2552 if (req == NULL) {
2553 return NULL;
2555 state->out_mem_ctx = NULL;
2556 state->dispatch_recv = cli->dispatch_recv;
2558 /* In parameters */
2560 /* Out parameters */
2562 /* Result */
2563 ZERO_STRUCT(state->orig.out.result);
2565 if (DEBUGLEVEL >= 10) {
2566 NDR_PRINT_IN_DEBUG(PNP_CreateKey, &state->orig);
2569 /* make a temporary copy, that we pass to the dispatch function */
2570 state->tmp = state->orig;
2572 subreq = cli->dispatch_send(state, ev, cli,
2573 &ndr_table_ntsvcs,
2574 NDR_PNP_CREATEKEY,
2575 &state->tmp);
2576 if (tevent_req_nomem(subreq, req)) {
2577 return tevent_req_post(req, ev);
2579 tevent_req_set_callback(subreq, rpccli_PNP_CreateKey_done, req);
2580 return req;
2583 static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq)
2585 struct tevent_req *req = tevent_req_callback_data(
2586 subreq, struct tevent_req);
2587 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2588 req, struct rpccli_PNP_CreateKey_state);
2589 NTSTATUS status;
2590 TALLOC_CTX *mem_ctx;
2592 if (state->out_mem_ctx) {
2593 mem_ctx = state->out_mem_ctx;
2594 } else {
2595 mem_ctx = state;
2598 status = state->dispatch_recv(subreq, mem_ctx);
2599 TALLOC_FREE(subreq);
2600 if (!NT_STATUS_IS_OK(status)) {
2601 tevent_req_nterror(req, status);
2602 return;
2605 /* Copy out parameters */
2607 /* Copy result */
2608 state->orig.out.result = state->tmp.out.result;
2610 /* Reset temporary structure */
2611 ZERO_STRUCT(state->tmp);
2613 if (DEBUGLEVEL >= 10) {
2614 NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &state->orig);
2617 tevent_req_done(req);
2620 NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req,
2621 TALLOC_CTX *mem_ctx,
2622 WERROR *result)
2624 struct rpccli_PNP_CreateKey_state *state = tevent_req_data(
2625 req, struct rpccli_PNP_CreateKey_state);
2626 NTSTATUS status;
2628 if (tevent_req_is_nterror(req, &status)) {
2629 tevent_req_received(req);
2630 return status;
2633 /* Steal possbile out parameters to the callers context */
2634 talloc_steal(mem_ctx, state->out_mem_ctx);
2636 /* Return result */
2637 *result = state->orig.out.result;
2639 tevent_req_received(req);
2640 return NT_STATUS_OK;
2643 NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
2644 TALLOC_CTX *mem_ctx,
2645 WERROR *werror)
2647 struct PNP_CreateKey r;
2648 NTSTATUS status;
2650 /* In parameters */
2652 if (DEBUGLEVEL >= 10) {
2653 NDR_PRINT_IN_DEBUG(PNP_CreateKey, &r);
2656 status = cli->dispatch(cli,
2657 mem_ctx,
2658 &ndr_table_ntsvcs,
2659 NDR_PNP_CREATEKEY,
2660 &r);
2662 if (!NT_STATUS_IS_OK(status)) {
2663 return status;
2666 if (DEBUGLEVEL >= 10) {
2667 NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &r);
2670 if (NT_STATUS_IS_ERR(status)) {
2671 return status;
2674 /* Return variables */
2676 /* Return result */
2677 if (werror) {
2678 *werror = r.out.result;
2681 return werror_to_ntstatus(r.out.result);
2684 struct rpccli_PNP_DeleteRegistryKey_state {
2685 struct PNP_DeleteRegistryKey orig;
2686 struct PNP_DeleteRegistryKey tmp;
2687 TALLOC_CTX *out_mem_ctx;
2688 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2691 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq);
2693 struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx,
2694 struct tevent_context *ev,
2695 struct rpc_pipe_client *cli)
2697 struct tevent_req *req;
2698 struct rpccli_PNP_DeleteRegistryKey_state *state;
2699 struct tevent_req *subreq;
2701 req = tevent_req_create(mem_ctx, &state,
2702 struct rpccli_PNP_DeleteRegistryKey_state);
2703 if (req == NULL) {
2704 return NULL;
2706 state->out_mem_ctx = NULL;
2707 state->dispatch_recv = cli->dispatch_recv;
2709 /* In parameters */
2711 /* Out parameters */
2713 /* Result */
2714 ZERO_STRUCT(state->orig.out.result);
2716 if (DEBUGLEVEL >= 10) {
2717 NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &state->orig);
2720 /* make a temporary copy, that we pass to the dispatch function */
2721 state->tmp = state->orig;
2723 subreq = cli->dispatch_send(state, ev, cli,
2724 &ndr_table_ntsvcs,
2725 NDR_PNP_DELETEREGISTRYKEY,
2726 &state->tmp);
2727 if (tevent_req_nomem(subreq, req)) {
2728 return tevent_req_post(req, ev);
2730 tevent_req_set_callback(subreq, rpccli_PNP_DeleteRegistryKey_done, req);
2731 return req;
2734 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq)
2736 struct tevent_req *req = tevent_req_callback_data(
2737 subreq, struct tevent_req);
2738 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2739 req, struct rpccli_PNP_DeleteRegistryKey_state);
2740 NTSTATUS status;
2741 TALLOC_CTX *mem_ctx;
2743 if (state->out_mem_ctx) {
2744 mem_ctx = state->out_mem_ctx;
2745 } else {
2746 mem_ctx = state;
2749 status = state->dispatch_recv(subreq, mem_ctx);
2750 TALLOC_FREE(subreq);
2751 if (!NT_STATUS_IS_OK(status)) {
2752 tevent_req_nterror(req, status);
2753 return;
2756 /* Copy out parameters */
2758 /* Copy result */
2759 state->orig.out.result = state->tmp.out.result;
2761 /* Reset temporary structure */
2762 ZERO_STRUCT(state->tmp);
2764 if (DEBUGLEVEL >= 10) {
2765 NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &state->orig);
2768 tevent_req_done(req);
2771 NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req,
2772 TALLOC_CTX *mem_ctx,
2773 WERROR *result)
2775 struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data(
2776 req, struct rpccli_PNP_DeleteRegistryKey_state);
2777 NTSTATUS status;
2779 if (tevent_req_is_nterror(req, &status)) {
2780 tevent_req_received(req);
2781 return status;
2784 /* Steal possbile out parameters to the callers context */
2785 talloc_steal(mem_ctx, state->out_mem_ctx);
2787 /* Return result */
2788 *result = state->orig.out.result;
2790 tevent_req_received(req);
2791 return NT_STATUS_OK;
2794 NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
2795 TALLOC_CTX *mem_ctx,
2796 WERROR *werror)
2798 struct PNP_DeleteRegistryKey r;
2799 NTSTATUS status;
2801 /* In parameters */
2803 if (DEBUGLEVEL >= 10) {
2804 NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &r);
2807 status = cli->dispatch(cli,
2808 mem_ctx,
2809 &ndr_table_ntsvcs,
2810 NDR_PNP_DELETEREGISTRYKEY,
2811 &r);
2813 if (!NT_STATUS_IS_OK(status)) {
2814 return status;
2817 if (DEBUGLEVEL >= 10) {
2818 NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &r);
2821 if (NT_STATUS_IS_ERR(status)) {
2822 return status;
2825 /* Return variables */
2827 /* Return result */
2828 if (werror) {
2829 *werror = r.out.result;
2832 return werror_to_ntstatus(r.out.result);
2835 struct rpccli_PNP_GetClassCount_state {
2836 struct PNP_GetClassCount orig;
2837 struct PNP_GetClassCount tmp;
2838 TALLOC_CTX *out_mem_ctx;
2839 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2842 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq);
2844 struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx,
2845 struct tevent_context *ev,
2846 struct rpc_pipe_client *cli)
2848 struct tevent_req *req;
2849 struct rpccli_PNP_GetClassCount_state *state;
2850 struct tevent_req *subreq;
2852 req = tevent_req_create(mem_ctx, &state,
2853 struct rpccli_PNP_GetClassCount_state);
2854 if (req == NULL) {
2855 return NULL;
2857 state->out_mem_ctx = NULL;
2858 state->dispatch_recv = cli->dispatch_recv;
2860 /* In parameters */
2862 /* Out parameters */
2864 /* Result */
2865 ZERO_STRUCT(state->orig.out.result);
2867 if (DEBUGLEVEL >= 10) {
2868 NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &state->orig);
2871 /* make a temporary copy, that we pass to the dispatch function */
2872 state->tmp = state->orig;
2874 subreq = cli->dispatch_send(state, ev, cli,
2875 &ndr_table_ntsvcs,
2876 NDR_PNP_GETCLASSCOUNT,
2877 &state->tmp);
2878 if (tevent_req_nomem(subreq, req)) {
2879 return tevent_req_post(req, ev);
2881 tevent_req_set_callback(subreq, rpccli_PNP_GetClassCount_done, req);
2882 return req;
2885 static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq)
2887 struct tevent_req *req = tevent_req_callback_data(
2888 subreq, struct tevent_req);
2889 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2890 req, struct rpccli_PNP_GetClassCount_state);
2891 NTSTATUS status;
2892 TALLOC_CTX *mem_ctx;
2894 if (state->out_mem_ctx) {
2895 mem_ctx = state->out_mem_ctx;
2896 } else {
2897 mem_ctx = state;
2900 status = state->dispatch_recv(subreq, mem_ctx);
2901 TALLOC_FREE(subreq);
2902 if (!NT_STATUS_IS_OK(status)) {
2903 tevent_req_nterror(req, status);
2904 return;
2907 /* Copy out parameters */
2909 /* Copy result */
2910 state->orig.out.result = state->tmp.out.result;
2912 /* Reset temporary structure */
2913 ZERO_STRUCT(state->tmp);
2915 if (DEBUGLEVEL >= 10) {
2916 NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &state->orig);
2919 tevent_req_done(req);
2922 NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req,
2923 TALLOC_CTX *mem_ctx,
2924 WERROR *result)
2926 struct rpccli_PNP_GetClassCount_state *state = tevent_req_data(
2927 req, struct rpccli_PNP_GetClassCount_state);
2928 NTSTATUS status;
2930 if (tevent_req_is_nterror(req, &status)) {
2931 tevent_req_received(req);
2932 return status;
2935 /* Steal possbile out parameters to the callers context */
2936 talloc_steal(mem_ctx, state->out_mem_ctx);
2938 /* Return result */
2939 *result = state->orig.out.result;
2941 tevent_req_received(req);
2942 return NT_STATUS_OK;
2945 NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
2946 TALLOC_CTX *mem_ctx,
2947 WERROR *werror)
2949 struct PNP_GetClassCount r;
2950 NTSTATUS status;
2952 /* In parameters */
2954 if (DEBUGLEVEL >= 10) {
2955 NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &r);
2958 status = cli->dispatch(cli,
2959 mem_ctx,
2960 &ndr_table_ntsvcs,
2961 NDR_PNP_GETCLASSCOUNT,
2962 &r);
2964 if (!NT_STATUS_IS_OK(status)) {
2965 return status;
2968 if (DEBUGLEVEL >= 10) {
2969 NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &r);
2972 if (NT_STATUS_IS_ERR(status)) {
2973 return status;
2976 /* Return variables */
2978 /* Return result */
2979 if (werror) {
2980 *werror = r.out.result;
2983 return werror_to_ntstatus(r.out.result);
2986 struct rpccli_PNP_GetClassName_state {
2987 struct PNP_GetClassName orig;
2988 struct PNP_GetClassName tmp;
2989 TALLOC_CTX *out_mem_ctx;
2990 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2993 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq);
2995 struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx,
2996 struct tevent_context *ev,
2997 struct rpc_pipe_client *cli)
2999 struct tevent_req *req;
3000 struct rpccli_PNP_GetClassName_state *state;
3001 struct tevent_req *subreq;
3003 req = tevent_req_create(mem_ctx, &state,
3004 struct rpccli_PNP_GetClassName_state);
3005 if (req == NULL) {
3006 return NULL;
3008 state->out_mem_ctx = NULL;
3009 state->dispatch_recv = cli->dispatch_recv;
3011 /* In parameters */
3013 /* Out parameters */
3015 /* Result */
3016 ZERO_STRUCT(state->orig.out.result);
3018 if (DEBUGLEVEL >= 10) {
3019 NDR_PRINT_IN_DEBUG(PNP_GetClassName, &state->orig);
3022 /* make a temporary copy, that we pass to the dispatch function */
3023 state->tmp = state->orig;
3025 subreq = cli->dispatch_send(state, ev, cli,
3026 &ndr_table_ntsvcs,
3027 NDR_PNP_GETCLASSNAME,
3028 &state->tmp);
3029 if (tevent_req_nomem(subreq, req)) {
3030 return tevent_req_post(req, ev);
3032 tevent_req_set_callback(subreq, rpccli_PNP_GetClassName_done, req);
3033 return req;
3036 static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq)
3038 struct tevent_req *req = tevent_req_callback_data(
3039 subreq, struct tevent_req);
3040 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
3041 req, struct rpccli_PNP_GetClassName_state);
3042 NTSTATUS status;
3043 TALLOC_CTX *mem_ctx;
3045 if (state->out_mem_ctx) {
3046 mem_ctx = state->out_mem_ctx;
3047 } else {
3048 mem_ctx = state;
3051 status = state->dispatch_recv(subreq, mem_ctx);
3052 TALLOC_FREE(subreq);
3053 if (!NT_STATUS_IS_OK(status)) {
3054 tevent_req_nterror(req, status);
3055 return;
3058 /* Copy out parameters */
3060 /* Copy result */
3061 state->orig.out.result = state->tmp.out.result;
3063 /* Reset temporary structure */
3064 ZERO_STRUCT(state->tmp);
3066 if (DEBUGLEVEL >= 10) {
3067 NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &state->orig);
3070 tevent_req_done(req);
3073 NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req,
3074 TALLOC_CTX *mem_ctx,
3075 WERROR *result)
3077 struct rpccli_PNP_GetClassName_state *state = tevent_req_data(
3078 req, struct rpccli_PNP_GetClassName_state);
3079 NTSTATUS status;
3081 if (tevent_req_is_nterror(req, &status)) {
3082 tevent_req_received(req);
3083 return status;
3086 /* Steal possbile out parameters to the callers context */
3087 talloc_steal(mem_ctx, state->out_mem_ctx);
3089 /* Return result */
3090 *result = state->orig.out.result;
3092 tevent_req_received(req);
3093 return NT_STATUS_OK;
3096 NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
3097 TALLOC_CTX *mem_ctx,
3098 WERROR *werror)
3100 struct PNP_GetClassName r;
3101 NTSTATUS status;
3103 /* In parameters */
3105 if (DEBUGLEVEL >= 10) {
3106 NDR_PRINT_IN_DEBUG(PNP_GetClassName, &r);
3109 status = cli->dispatch(cli,
3110 mem_ctx,
3111 &ndr_table_ntsvcs,
3112 NDR_PNP_GETCLASSNAME,
3113 &r);
3115 if (!NT_STATUS_IS_OK(status)) {
3116 return status;
3119 if (DEBUGLEVEL >= 10) {
3120 NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &r);
3123 if (NT_STATUS_IS_ERR(status)) {
3124 return status;
3127 /* Return variables */
3129 /* Return result */
3130 if (werror) {
3131 *werror = r.out.result;
3134 return werror_to_ntstatus(r.out.result);
3137 struct rpccli_PNP_DeleteClassKey_state {
3138 struct PNP_DeleteClassKey orig;
3139 struct PNP_DeleteClassKey tmp;
3140 TALLOC_CTX *out_mem_ctx;
3141 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3144 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq);
3146 struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx,
3147 struct tevent_context *ev,
3148 struct rpc_pipe_client *cli)
3150 struct tevent_req *req;
3151 struct rpccli_PNP_DeleteClassKey_state *state;
3152 struct tevent_req *subreq;
3154 req = tevent_req_create(mem_ctx, &state,
3155 struct rpccli_PNP_DeleteClassKey_state);
3156 if (req == NULL) {
3157 return NULL;
3159 state->out_mem_ctx = NULL;
3160 state->dispatch_recv = cli->dispatch_recv;
3162 /* In parameters */
3164 /* Out parameters */
3166 /* Result */
3167 ZERO_STRUCT(state->orig.out.result);
3169 if (DEBUGLEVEL >= 10) {
3170 NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &state->orig);
3173 /* make a temporary copy, that we pass to the dispatch function */
3174 state->tmp = state->orig;
3176 subreq = cli->dispatch_send(state, ev, cli,
3177 &ndr_table_ntsvcs,
3178 NDR_PNP_DELETECLASSKEY,
3179 &state->tmp);
3180 if (tevent_req_nomem(subreq, req)) {
3181 return tevent_req_post(req, ev);
3183 tevent_req_set_callback(subreq, rpccli_PNP_DeleteClassKey_done, req);
3184 return req;
3187 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq)
3189 struct tevent_req *req = tevent_req_callback_data(
3190 subreq, struct tevent_req);
3191 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
3192 req, struct rpccli_PNP_DeleteClassKey_state);
3193 NTSTATUS status;
3194 TALLOC_CTX *mem_ctx;
3196 if (state->out_mem_ctx) {
3197 mem_ctx = state->out_mem_ctx;
3198 } else {
3199 mem_ctx = state;
3202 status = state->dispatch_recv(subreq, mem_ctx);
3203 TALLOC_FREE(subreq);
3204 if (!NT_STATUS_IS_OK(status)) {
3205 tevent_req_nterror(req, status);
3206 return;
3209 /* Copy out parameters */
3211 /* Copy result */
3212 state->orig.out.result = state->tmp.out.result;
3214 /* Reset temporary structure */
3215 ZERO_STRUCT(state->tmp);
3217 if (DEBUGLEVEL >= 10) {
3218 NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &state->orig);
3221 tevent_req_done(req);
3224 NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req,
3225 TALLOC_CTX *mem_ctx,
3226 WERROR *result)
3228 struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data(
3229 req, struct rpccli_PNP_DeleteClassKey_state);
3230 NTSTATUS status;
3232 if (tevent_req_is_nterror(req, &status)) {
3233 tevent_req_received(req);
3234 return status;
3237 /* Steal possbile out parameters to the callers context */
3238 talloc_steal(mem_ctx, state->out_mem_ctx);
3240 /* Return result */
3241 *result = state->orig.out.result;
3243 tevent_req_received(req);
3244 return NT_STATUS_OK;
3247 NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
3248 TALLOC_CTX *mem_ctx,
3249 WERROR *werror)
3251 struct PNP_DeleteClassKey r;
3252 NTSTATUS status;
3254 /* In parameters */
3256 if (DEBUGLEVEL >= 10) {
3257 NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &r);
3260 status = cli->dispatch(cli,
3261 mem_ctx,
3262 &ndr_table_ntsvcs,
3263 NDR_PNP_DELETECLASSKEY,
3264 &r);
3266 if (!NT_STATUS_IS_OK(status)) {
3267 return status;
3270 if (DEBUGLEVEL >= 10) {
3271 NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &r);
3274 if (NT_STATUS_IS_ERR(status)) {
3275 return status;
3278 /* Return variables */
3280 /* Return result */
3281 if (werror) {
3282 *werror = r.out.result;
3285 return werror_to_ntstatus(r.out.result);
3288 struct rpccli_PNP_GetInterfaceDeviceAlias_state {
3289 struct PNP_GetInterfaceDeviceAlias orig;
3290 struct PNP_GetInterfaceDeviceAlias tmp;
3291 TALLOC_CTX *out_mem_ctx;
3292 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3295 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq);
3297 struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx,
3298 struct tevent_context *ev,
3299 struct rpc_pipe_client *cli)
3301 struct tevent_req *req;
3302 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state;
3303 struct tevent_req *subreq;
3305 req = tevent_req_create(mem_ctx, &state,
3306 struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3307 if (req == NULL) {
3308 return NULL;
3310 state->out_mem_ctx = NULL;
3311 state->dispatch_recv = cli->dispatch_recv;
3313 /* In parameters */
3315 /* Out parameters */
3317 /* Result */
3318 ZERO_STRUCT(state->orig.out.result);
3320 if (DEBUGLEVEL >= 10) {
3321 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &state->orig);
3324 /* make a temporary copy, that we pass to the dispatch function */
3325 state->tmp = state->orig;
3327 subreq = cli->dispatch_send(state, ev, cli,
3328 &ndr_table_ntsvcs,
3329 NDR_PNP_GETINTERFACEDEVICEALIAS,
3330 &state->tmp);
3331 if (tevent_req_nomem(subreq, req)) {
3332 return tevent_req_post(req, ev);
3334 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceAlias_done, req);
3335 return req;
3338 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq)
3340 struct tevent_req *req = tevent_req_callback_data(
3341 subreq, struct tevent_req);
3342 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3343 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3344 NTSTATUS status;
3345 TALLOC_CTX *mem_ctx;
3347 if (state->out_mem_ctx) {
3348 mem_ctx = state->out_mem_ctx;
3349 } else {
3350 mem_ctx = state;
3353 status = state->dispatch_recv(subreq, mem_ctx);
3354 TALLOC_FREE(subreq);
3355 if (!NT_STATUS_IS_OK(status)) {
3356 tevent_req_nterror(req, status);
3357 return;
3360 /* Copy out parameters */
3362 /* Copy result */
3363 state->orig.out.result = state->tmp.out.result;
3365 /* Reset temporary structure */
3366 ZERO_STRUCT(state->tmp);
3368 if (DEBUGLEVEL >= 10) {
3369 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &state->orig);
3372 tevent_req_done(req);
3375 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req,
3376 TALLOC_CTX *mem_ctx,
3377 WERROR *result)
3379 struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data(
3380 req, struct rpccli_PNP_GetInterfaceDeviceAlias_state);
3381 NTSTATUS status;
3383 if (tevent_req_is_nterror(req, &status)) {
3384 tevent_req_received(req);
3385 return status;
3388 /* Steal possbile out parameters to the callers context */
3389 talloc_steal(mem_ctx, state->out_mem_ctx);
3391 /* Return result */
3392 *result = state->orig.out.result;
3394 tevent_req_received(req);
3395 return NT_STATUS_OK;
3398 NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
3399 TALLOC_CTX *mem_ctx,
3400 WERROR *werror)
3402 struct PNP_GetInterfaceDeviceAlias r;
3403 NTSTATUS status;
3405 /* In parameters */
3407 if (DEBUGLEVEL >= 10) {
3408 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
3411 status = cli->dispatch(cli,
3412 mem_ctx,
3413 &ndr_table_ntsvcs,
3414 NDR_PNP_GETINTERFACEDEVICEALIAS,
3415 &r);
3417 if (!NT_STATUS_IS_OK(status)) {
3418 return status;
3421 if (DEBUGLEVEL >= 10) {
3422 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
3425 if (NT_STATUS_IS_ERR(status)) {
3426 return status;
3429 /* Return variables */
3431 /* Return result */
3432 if (werror) {
3433 *werror = r.out.result;
3436 return werror_to_ntstatus(r.out.result);
3439 struct rpccli_PNP_GetInterfaceDeviceList_state {
3440 struct PNP_GetInterfaceDeviceList orig;
3441 struct PNP_GetInterfaceDeviceList tmp;
3442 TALLOC_CTX *out_mem_ctx;
3443 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3446 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq);
3448 struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx,
3449 struct tevent_context *ev,
3450 struct rpc_pipe_client *cli)
3452 struct tevent_req *req;
3453 struct rpccli_PNP_GetInterfaceDeviceList_state *state;
3454 struct tevent_req *subreq;
3456 req = tevent_req_create(mem_ctx, &state,
3457 struct rpccli_PNP_GetInterfaceDeviceList_state);
3458 if (req == NULL) {
3459 return NULL;
3461 state->out_mem_ctx = NULL;
3462 state->dispatch_recv = cli->dispatch_recv;
3464 /* In parameters */
3466 /* Out parameters */
3468 /* Result */
3469 ZERO_STRUCT(state->orig.out.result);
3471 if (DEBUGLEVEL >= 10) {
3472 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &state->orig);
3475 /* make a temporary copy, that we pass to the dispatch function */
3476 state->tmp = state->orig;
3478 subreq = cli->dispatch_send(state, ev, cli,
3479 &ndr_table_ntsvcs,
3480 NDR_PNP_GETINTERFACEDEVICELIST,
3481 &state->tmp);
3482 if (tevent_req_nomem(subreq, req)) {
3483 return tevent_req_post(req, ev);
3485 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceList_done, req);
3486 return req;
3489 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq)
3491 struct tevent_req *req = tevent_req_callback_data(
3492 subreq, struct tevent_req);
3493 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3494 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3495 NTSTATUS status;
3496 TALLOC_CTX *mem_ctx;
3498 if (state->out_mem_ctx) {
3499 mem_ctx = state->out_mem_ctx;
3500 } else {
3501 mem_ctx = state;
3504 status = state->dispatch_recv(subreq, mem_ctx);
3505 TALLOC_FREE(subreq);
3506 if (!NT_STATUS_IS_OK(status)) {
3507 tevent_req_nterror(req, status);
3508 return;
3511 /* Copy out parameters */
3513 /* Copy result */
3514 state->orig.out.result = state->tmp.out.result;
3516 /* Reset temporary structure */
3517 ZERO_STRUCT(state->tmp);
3519 if (DEBUGLEVEL >= 10) {
3520 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &state->orig);
3523 tevent_req_done(req);
3526 NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req,
3527 TALLOC_CTX *mem_ctx,
3528 WERROR *result)
3530 struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data(
3531 req, struct rpccli_PNP_GetInterfaceDeviceList_state);
3532 NTSTATUS status;
3534 if (tevent_req_is_nterror(req, &status)) {
3535 tevent_req_received(req);
3536 return status;
3539 /* Steal possbile out parameters to the callers context */
3540 talloc_steal(mem_ctx, state->out_mem_ctx);
3542 /* Return result */
3543 *result = state->orig.out.result;
3545 tevent_req_received(req);
3546 return NT_STATUS_OK;
3549 NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
3550 TALLOC_CTX *mem_ctx,
3551 WERROR *werror)
3553 struct PNP_GetInterfaceDeviceList r;
3554 NTSTATUS status;
3556 /* In parameters */
3558 if (DEBUGLEVEL >= 10) {
3559 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &r);
3562 status = cli->dispatch(cli,
3563 mem_ctx,
3564 &ndr_table_ntsvcs,
3565 NDR_PNP_GETINTERFACEDEVICELIST,
3566 &r);
3568 if (!NT_STATUS_IS_OK(status)) {
3569 return status;
3572 if (DEBUGLEVEL >= 10) {
3573 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &r);
3576 if (NT_STATUS_IS_ERR(status)) {
3577 return status;
3580 /* Return variables */
3582 /* Return result */
3583 if (werror) {
3584 *werror = r.out.result;
3587 return werror_to_ntstatus(r.out.result);
3590 struct rpccli_PNP_GetInterfaceDeviceListSize_state {
3591 struct PNP_GetInterfaceDeviceListSize orig;
3592 struct PNP_GetInterfaceDeviceListSize tmp;
3593 TALLOC_CTX *out_mem_ctx;
3594 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3597 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq);
3599 struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx,
3600 struct tevent_context *ev,
3601 struct rpc_pipe_client *cli)
3603 struct tevent_req *req;
3604 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state;
3605 struct tevent_req *subreq;
3607 req = tevent_req_create(mem_ctx, &state,
3608 struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3609 if (req == NULL) {
3610 return NULL;
3612 state->out_mem_ctx = NULL;
3613 state->dispatch_recv = cli->dispatch_recv;
3615 /* In parameters */
3617 /* Out parameters */
3619 /* Result */
3620 ZERO_STRUCT(state->orig.out.result);
3622 if (DEBUGLEVEL >= 10) {
3623 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &state->orig);
3626 /* make a temporary copy, that we pass to the dispatch function */
3627 state->tmp = state->orig;
3629 subreq = cli->dispatch_send(state, ev, cli,
3630 &ndr_table_ntsvcs,
3631 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3632 &state->tmp);
3633 if (tevent_req_nomem(subreq, req)) {
3634 return tevent_req_post(req, ev);
3636 tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceListSize_done, req);
3637 return req;
3640 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq)
3642 struct tevent_req *req = tevent_req_callback_data(
3643 subreq, struct tevent_req);
3644 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3645 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3646 NTSTATUS status;
3647 TALLOC_CTX *mem_ctx;
3649 if (state->out_mem_ctx) {
3650 mem_ctx = state->out_mem_ctx;
3651 } else {
3652 mem_ctx = state;
3655 status = state->dispatch_recv(subreq, mem_ctx);
3656 TALLOC_FREE(subreq);
3657 if (!NT_STATUS_IS_OK(status)) {
3658 tevent_req_nterror(req, status);
3659 return;
3662 /* Copy out parameters */
3664 /* Copy result */
3665 state->orig.out.result = state->tmp.out.result;
3667 /* Reset temporary structure */
3668 ZERO_STRUCT(state->tmp);
3670 if (DEBUGLEVEL >= 10) {
3671 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &state->orig);
3674 tevent_req_done(req);
3677 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req,
3678 TALLOC_CTX *mem_ctx,
3679 WERROR *result)
3681 struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data(
3682 req, struct rpccli_PNP_GetInterfaceDeviceListSize_state);
3683 NTSTATUS status;
3685 if (tevent_req_is_nterror(req, &status)) {
3686 tevent_req_received(req);
3687 return status;
3690 /* Steal possbile out parameters to the callers context */
3691 talloc_steal(mem_ctx, state->out_mem_ctx);
3693 /* Return result */
3694 *result = state->orig.out.result;
3696 tevent_req_received(req);
3697 return NT_STATUS_OK;
3700 NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
3701 TALLOC_CTX *mem_ctx,
3702 WERROR *werror)
3704 struct PNP_GetInterfaceDeviceListSize r;
3705 NTSTATUS status;
3707 /* In parameters */
3709 if (DEBUGLEVEL >= 10) {
3710 NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
3713 status = cli->dispatch(cli,
3714 mem_ctx,
3715 &ndr_table_ntsvcs,
3716 NDR_PNP_GETINTERFACEDEVICELISTSIZE,
3717 &r);
3719 if (!NT_STATUS_IS_OK(status)) {
3720 return status;
3723 if (DEBUGLEVEL >= 10) {
3724 NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
3727 if (NT_STATUS_IS_ERR(status)) {
3728 return status;
3731 /* Return variables */
3733 /* Return result */
3734 if (werror) {
3735 *werror = r.out.result;
3738 return werror_to_ntstatus(r.out.result);
3741 struct rpccli_PNP_RegisterDeviceClassAssociation_state {
3742 struct PNP_RegisterDeviceClassAssociation orig;
3743 struct PNP_RegisterDeviceClassAssociation tmp;
3744 TALLOC_CTX *out_mem_ctx;
3745 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3748 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq);
3750 struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3751 struct tevent_context *ev,
3752 struct rpc_pipe_client *cli)
3754 struct tevent_req *req;
3755 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state;
3756 struct tevent_req *subreq;
3758 req = tevent_req_create(mem_ctx, &state,
3759 struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3760 if (req == NULL) {
3761 return NULL;
3763 state->out_mem_ctx = NULL;
3764 state->dispatch_recv = cli->dispatch_recv;
3766 /* In parameters */
3768 /* Out parameters */
3770 /* Result */
3771 ZERO_STRUCT(state->orig.out.result);
3773 if (DEBUGLEVEL >= 10) {
3774 NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &state->orig);
3777 /* make a temporary copy, that we pass to the dispatch function */
3778 state->tmp = state->orig;
3780 subreq = cli->dispatch_send(state, ev, cli,
3781 &ndr_table_ntsvcs,
3782 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3783 &state->tmp);
3784 if (tevent_req_nomem(subreq, req)) {
3785 return tevent_req_post(req, ev);
3787 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDeviceClassAssociation_done, req);
3788 return req;
3791 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq)
3793 struct tevent_req *req = tevent_req_callback_data(
3794 subreq, struct tevent_req);
3795 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3796 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3797 NTSTATUS status;
3798 TALLOC_CTX *mem_ctx;
3800 if (state->out_mem_ctx) {
3801 mem_ctx = state->out_mem_ctx;
3802 } else {
3803 mem_ctx = state;
3806 status = state->dispatch_recv(subreq, mem_ctx);
3807 TALLOC_FREE(subreq);
3808 if (!NT_STATUS_IS_OK(status)) {
3809 tevent_req_nterror(req, status);
3810 return;
3813 /* Copy out parameters */
3815 /* Copy result */
3816 state->orig.out.result = state->tmp.out.result;
3818 /* Reset temporary structure */
3819 ZERO_STRUCT(state->tmp);
3821 if (DEBUGLEVEL >= 10) {
3822 NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &state->orig);
3825 tevent_req_done(req);
3828 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req,
3829 TALLOC_CTX *mem_ctx,
3830 WERROR *result)
3832 struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data(
3833 req, struct rpccli_PNP_RegisterDeviceClassAssociation_state);
3834 NTSTATUS status;
3836 if (tevent_req_is_nterror(req, &status)) {
3837 tevent_req_received(req);
3838 return status;
3841 /* Steal possbile out parameters to the callers context */
3842 talloc_steal(mem_ctx, state->out_mem_ctx);
3844 /* Return result */
3845 *result = state->orig.out.result;
3847 tevent_req_received(req);
3848 return NT_STATUS_OK;
3851 NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
3852 TALLOC_CTX *mem_ctx,
3853 WERROR *werror)
3855 struct PNP_RegisterDeviceClassAssociation r;
3856 NTSTATUS status;
3858 /* In parameters */
3860 if (DEBUGLEVEL >= 10) {
3861 NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
3864 status = cli->dispatch(cli,
3865 mem_ctx,
3866 &ndr_table_ntsvcs,
3867 NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
3868 &r);
3870 if (!NT_STATUS_IS_OK(status)) {
3871 return status;
3874 if (DEBUGLEVEL >= 10) {
3875 NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
3878 if (NT_STATUS_IS_ERR(status)) {
3879 return status;
3882 /* Return variables */
3884 /* Return result */
3885 if (werror) {
3886 *werror = r.out.result;
3889 return werror_to_ntstatus(r.out.result);
3892 struct rpccli_PNP_UnregisterDeviceClassAssociation_state {
3893 struct PNP_UnregisterDeviceClassAssociation orig;
3894 struct PNP_UnregisterDeviceClassAssociation tmp;
3895 TALLOC_CTX *out_mem_ctx;
3896 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3899 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq);
3901 struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx,
3902 struct tevent_context *ev,
3903 struct rpc_pipe_client *cli)
3905 struct tevent_req *req;
3906 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state;
3907 struct tevent_req *subreq;
3909 req = tevent_req_create(mem_ctx, &state,
3910 struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3911 if (req == NULL) {
3912 return NULL;
3914 state->out_mem_ctx = NULL;
3915 state->dispatch_recv = cli->dispatch_recv;
3917 /* In parameters */
3919 /* Out parameters */
3921 /* Result */
3922 ZERO_STRUCT(state->orig.out.result);
3924 if (DEBUGLEVEL >= 10) {
3925 NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &state->orig);
3928 /* make a temporary copy, that we pass to the dispatch function */
3929 state->tmp = state->orig;
3931 subreq = cli->dispatch_send(state, ev, cli,
3932 &ndr_table_ntsvcs,
3933 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
3934 &state->tmp);
3935 if (tevent_req_nomem(subreq, req)) {
3936 return tevent_req_post(req, ev);
3938 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterDeviceClassAssociation_done, req);
3939 return req;
3942 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq)
3944 struct tevent_req *req = tevent_req_callback_data(
3945 subreq, struct tevent_req);
3946 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3947 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3948 NTSTATUS status;
3949 TALLOC_CTX *mem_ctx;
3951 if (state->out_mem_ctx) {
3952 mem_ctx = state->out_mem_ctx;
3953 } else {
3954 mem_ctx = state;
3957 status = state->dispatch_recv(subreq, mem_ctx);
3958 TALLOC_FREE(subreq);
3959 if (!NT_STATUS_IS_OK(status)) {
3960 tevent_req_nterror(req, status);
3961 return;
3964 /* Copy out parameters */
3966 /* Copy result */
3967 state->orig.out.result = state->tmp.out.result;
3969 /* Reset temporary structure */
3970 ZERO_STRUCT(state->tmp);
3972 if (DEBUGLEVEL >= 10) {
3973 NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &state->orig);
3976 tevent_req_done(req);
3979 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req,
3980 TALLOC_CTX *mem_ctx,
3981 WERROR *result)
3983 struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data(
3984 req, struct rpccli_PNP_UnregisterDeviceClassAssociation_state);
3985 NTSTATUS status;
3987 if (tevent_req_is_nterror(req, &status)) {
3988 tevent_req_received(req);
3989 return status;
3992 /* Steal possbile out parameters to the callers context */
3993 talloc_steal(mem_ctx, state->out_mem_ctx);
3995 /* Return result */
3996 *result = state->orig.out.result;
3998 tevent_req_received(req);
3999 return NT_STATUS_OK;
4002 NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
4003 TALLOC_CTX *mem_ctx,
4004 WERROR *werror)
4006 struct PNP_UnregisterDeviceClassAssociation r;
4007 NTSTATUS status;
4009 /* In parameters */
4011 if (DEBUGLEVEL >= 10) {
4012 NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
4015 status = cli->dispatch(cli,
4016 mem_ctx,
4017 &ndr_table_ntsvcs,
4018 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
4019 &r);
4021 if (!NT_STATUS_IS_OK(status)) {
4022 return status;
4025 if (DEBUGLEVEL >= 10) {
4026 NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
4029 if (NT_STATUS_IS_ERR(status)) {
4030 return status;
4033 /* Return variables */
4035 /* Return result */
4036 if (werror) {
4037 *werror = r.out.result;
4040 return werror_to_ntstatus(r.out.result);
4043 struct rpccli_PNP_GetClassRegProp_state {
4044 struct PNP_GetClassRegProp orig;
4045 struct PNP_GetClassRegProp tmp;
4046 TALLOC_CTX *out_mem_ctx;
4047 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4050 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq);
4052 struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx,
4053 struct tevent_context *ev,
4054 struct rpc_pipe_client *cli)
4056 struct tevent_req *req;
4057 struct rpccli_PNP_GetClassRegProp_state *state;
4058 struct tevent_req *subreq;
4060 req = tevent_req_create(mem_ctx, &state,
4061 struct rpccli_PNP_GetClassRegProp_state);
4062 if (req == NULL) {
4063 return NULL;
4065 state->out_mem_ctx = NULL;
4066 state->dispatch_recv = cli->dispatch_recv;
4068 /* In parameters */
4070 /* Out parameters */
4072 /* Result */
4073 ZERO_STRUCT(state->orig.out.result);
4075 if (DEBUGLEVEL >= 10) {
4076 NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &state->orig);
4079 /* make a temporary copy, that we pass to the dispatch function */
4080 state->tmp = state->orig;
4082 subreq = cli->dispatch_send(state, ev, cli,
4083 &ndr_table_ntsvcs,
4084 NDR_PNP_GETCLASSREGPROP,
4085 &state->tmp);
4086 if (tevent_req_nomem(subreq, req)) {
4087 return tevent_req_post(req, ev);
4089 tevent_req_set_callback(subreq, rpccli_PNP_GetClassRegProp_done, req);
4090 return req;
4093 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq)
4095 struct tevent_req *req = tevent_req_callback_data(
4096 subreq, struct tevent_req);
4097 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
4098 req, struct rpccli_PNP_GetClassRegProp_state);
4099 NTSTATUS status;
4100 TALLOC_CTX *mem_ctx;
4102 if (state->out_mem_ctx) {
4103 mem_ctx = state->out_mem_ctx;
4104 } else {
4105 mem_ctx = state;
4108 status = state->dispatch_recv(subreq, mem_ctx);
4109 TALLOC_FREE(subreq);
4110 if (!NT_STATUS_IS_OK(status)) {
4111 tevent_req_nterror(req, status);
4112 return;
4115 /* Copy out parameters */
4117 /* Copy result */
4118 state->orig.out.result = state->tmp.out.result;
4120 /* Reset temporary structure */
4121 ZERO_STRUCT(state->tmp);
4123 if (DEBUGLEVEL >= 10) {
4124 NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &state->orig);
4127 tevent_req_done(req);
4130 NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req,
4131 TALLOC_CTX *mem_ctx,
4132 WERROR *result)
4134 struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data(
4135 req, struct rpccli_PNP_GetClassRegProp_state);
4136 NTSTATUS status;
4138 if (tevent_req_is_nterror(req, &status)) {
4139 tevent_req_received(req);
4140 return status;
4143 /* Steal possbile out parameters to the callers context */
4144 talloc_steal(mem_ctx, state->out_mem_ctx);
4146 /* Return result */
4147 *result = state->orig.out.result;
4149 tevent_req_received(req);
4150 return NT_STATUS_OK;
4153 NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
4154 TALLOC_CTX *mem_ctx,
4155 WERROR *werror)
4157 struct PNP_GetClassRegProp r;
4158 NTSTATUS status;
4160 /* In parameters */
4162 if (DEBUGLEVEL >= 10) {
4163 NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &r);
4166 status = cli->dispatch(cli,
4167 mem_ctx,
4168 &ndr_table_ntsvcs,
4169 NDR_PNP_GETCLASSREGPROP,
4170 &r);
4172 if (!NT_STATUS_IS_OK(status)) {
4173 return status;
4176 if (DEBUGLEVEL >= 10) {
4177 NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &r);
4180 if (NT_STATUS_IS_ERR(status)) {
4181 return status;
4184 /* Return variables */
4186 /* Return result */
4187 if (werror) {
4188 *werror = r.out.result;
4191 return werror_to_ntstatus(r.out.result);
4194 struct rpccli_PNP_SetClassRegProp_state {
4195 struct PNP_SetClassRegProp orig;
4196 struct PNP_SetClassRegProp tmp;
4197 TALLOC_CTX *out_mem_ctx;
4198 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4201 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq);
4203 struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx,
4204 struct tevent_context *ev,
4205 struct rpc_pipe_client *cli)
4207 struct tevent_req *req;
4208 struct rpccli_PNP_SetClassRegProp_state *state;
4209 struct tevent_req *subreq;
4211 req = tevent_req_create(mem_ctx, &state,
4212 struct rpccli_PNP_SetClassRegProp_state);
4213 if (req == NULL) {
4214 return NULL;
4216 state->out_mem_ctx = NULL;
4217 state->dispatch_recv = cli->dispatch_recv;
4219 /* In parameters */
4221 /* Out parameters */
4223 /* Result */
4224 ZERO_STRUCT(state->orig.out.result);
4226 if (DEBUGLEVEL >= 10) {
4227 NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &state->orig);
4230 /* make a temporary copy, that we pass to the dispatch function */
4231 state->tmp = state->orig;
4233 subreq = cli->dispatch_send(state, ev, cli,
4234 &ndr_table_ntsvcs,
4235 NDR_PNP_SETCLASSREGPROP,
4236 &state->tmp);
4237 if (tevent_req_nomem(subreq, req)) {
4238 return tevent_req_post(req, ev);
4240 tevent_req_set_callback(subreq, rpccli_PNP_SetClassRegProp_done, req);
4241 return req;
4244 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq)
4246 struct tevent_req *req = tevent_req_callback_data(
4247 subreq, struct tevent_req);
4248 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
4249 req, struct rpccli_PNP_SetClassRegProp_state);
4250 NTSTATUS status;
4251 TALLOC_CTX *mem_ctx;
4253 if (state->out_mem_ctx) {
4254 mem_ctx = state->out_mem_ctx;
4255 } else {
4256 mem_ctx = state;
4259 status = state->dispatch_recv(subreq, mem_ctx);
4260 TALLOC_FREE(subreq);
4261 if (!NT_STATUS_IS_OK(status)) {
4262 tevent_req_nterror(req, status);
4263 return;
4266 /* Copy out parameters */
4268 /* Copy result */
4269 state->orig.out.result = state->tmp.out.result;
4271 /* Reset temporary structure */
4272 ZERO_STRUCT(state->tmp);
4274 if (DEBUGLEVEL >= 10) {
4275 NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &state->orig);
4278 tevent_req_done(req);
4281 NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req,
4282 TALLOC_CTX *mem_ctx,
4283 WERROR *result)
4285 struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data(
4286 req, struct rpccli_PNP_SetClassRegProp_state);
4287 NTSTATUS status;
4289 if (tevent_req_is_nterror(req, &status)) {
4290 tevent_req_received(req);
4291 return status;
4294 /* Steal possbile out parameters to the callers context */
4295 talloc_steal(mem_ctx, state->out_mem_ctx);
4297 /* Return result */
4298 *result = state->orig.out.result;
4300 tevent_req_received(req);
4301 return NT_STATUS_OK;
4304 NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
4305 TALLOC_CTX *mem_ctx,
4306 WERROR *werror)
4308 struct PNP_SetClassRegProp r;
4309 NTSTATUS status;
4311 /* In parameters */
4313 if (DEBUGLEVEL >= 10) {
4314 NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &r);
4317 status = cli->dispatch(cli,
4318 mem_ctx,
4319 &ndr_table_ntsvcs,
4320 NDR_PNP_SETCLASSREGPROP,
4321 &r);
4323 if (!NT_STATUS_IS_OK(status)) {
4324 return status;
4327 if (DEBUGLEVEL >= 10) {
4328 NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &r);
4331 if (NT_STATUS_IS_ERR(status)) {
4332 return status;
4335 /* Return variables */
4337 /* Return result */
4338 if (werror) {
4339 *werror = r.out.result;
4342 return werror_to_ntstatus(r.out.result);
4345 struct rpccli_PNP_CreateDevInst_state {
4346 struct PNP_CreateDevInst orig;
4347 struct PNP_CreateDevInst tmp;
4348 TALLOC_CTX *out_mem_ctx;
4349 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4352 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq);
4354 struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx,
4355 struct tevent_context *ev,
4356 struct rpc_pipe_client *cli)
4358 struct tevent_req *req;
4359 struct rpccli_PNP_CreateDevInst_state *state;
4360 struct tevent_req *subreq;
4362 req = tevent_req_create(mem_ctx, &state,
4363 struct rpccli_PNP_CreateDevInst_state);
4364 if (req == NULL) {
4365 return NULL;
4367 state->out_mem_ctx = NULL;
4368 state->dispatch_recv = cli->dispatch_recv;
4370 /* In parameters */
4372 /* Out parameters */
4374 /* Result */
4375 ZERO_STRUCT(state->orig.out.result);
4377 if (DEBUGLEVEL >= 10) {
4378 NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &state->orig);
4381 /* make a temporary copy, that we pass to the dispatch function */
4382 state->tmp = state->orig;
4384 subreq = cli->dispatch_send(state, ev, cli,
4385 &ndr_table_ntsvcs,
4386 NDR_PNP_CREATEDEVINST,
4387 &state->tmp);
4388 if (tevent_req_nomem(subreq, req)) {
4389 return tevent_req_post(req, ev);
4391 tevent_req_set_callback(subreq, rpccli_PNP_CreateDevInst_done, req);
4392 return req;
4395 static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq)
4397 struct tevent_req *req = tevent_req_callback_data(
4398 subreq, struct tevent_req);
4399 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
4400 req, struct rpccli_PNP_CreateDevInst_state);
4401 NTSTATUS status;
4402 TALLOC_CTX *mem_ctx;
4404 if (state->out_mem_ctx) {
4405 mem_ctx = state->out_mem_ctx;
4406 } else {
4407 mem_ctx = state;
4410 status = state->dispatch_recv(subreq, mem_ctx);
4411 TALLOC_FREE(subreq);
4412 if (!NT_STATUS_IS_OK(status)) {
4413 tevent_req_nterror(req, status);
4414 return;
4417 /* Copy out parameters */
4419 /* Copy result */
4420 state->orig.out.result = state->tmp.out.result;
4422 /* Reset temporary structure */
4423 ZERO_STRUCT(state->tmp);
4425 if (DEBUGLEVEL >= 10) {
4426 NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &state->orig);
4429 tevent_req_done(req);
4432 NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req,
4433 TALLOC_CTX *mem_ctx,
4434 WERROR *result)
4436 struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data(
4437 req, struct rpccli_PNP_CreateDevInst_state);
4438 NTSTATUS status;
4440 if (tevent_req_is_nterror(req, &status)) {
4441 tevent_req_received(req);
4442 return status;
4445 /* Steal possbile out parameters to the callers context */
4446 talloc_steal(mem_ctx, state->out_mem_ctx);
4448 /* Return result */
4449 *result = state->orig.out.result;
4451 tevent_req_received(req);
4452 return NT_STATUS_OK;
4455 NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
4456 TALLOC_CTX *mem_ctx,
4457 WERROR *werror)
4459 struct PNP_CreateDevInst r;
4460 NTSTATUS status;
4462 /* In parameters */
4464 if (DEBUGLEVEL >= 10) {
4465 NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &r);
4468 status = cli->dispatch(cli,
4469 mem_ctx,
4470 &ndr_table_ntsvcs,
4471 NDR_PNP_CREATEDEVINST,
4472 &r);
4474 if (!NT_STATUS_IS_OK(status)) {
4475 return status;
4478 if (DEBUGLEVEL >= 10) {
4479 NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &r);
4482 if (NT_STATUS_IS_ERR(status)) {
4483 return status;
4486 /* Return variables */
4488 /* Return result */
4489 if (werror) {
4490 *werror = r.out.result;
4493 return werror_to_ntstatus(r.out.result);
4496 struct rpccli_PNP_DeviceInstanceAction_state {
4497 struct PNP_DeviceInstanceAction orig;
4498 struct PNP_DeviceInstanceAction tmp;
4499 TALLOC_CTX *out_mem_ctx;
4500 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4503 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq);
4505 struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx,
4506 struct tevent_context *ev,
4507 struct rpc_pipe_client *cli)
4509 struct tevent_req *req;
4510 struct rpccli_PNP_DeviceInstanceAction_state *state;
4511 struct tevent_req *subreq;
4513 req = tevent_req_create(mem_ctx, &state,
4514 struct rpccli_PNP_DeviceInstanceAction_state);
4515 if (req == NULL) {
4516 return NULL;
4518 state->out_mem_ctx = NULL;
4519 state->dispatch_recv = cli->dispatch_recv;
4521 /* In parameters */
4523 /* Out parameters */
4525 /* Result */
4526 ZERO_STRUCT(state->orig.out.result);
4528 if (DEBUGLEVEL >= 10) {
4529 NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &state->orig);
4532 /* make a temporary copy, that we pass to the dispatch function */
4533 state->tmp = state->orig;
4535 subreq = cli->dispatch_send(state, ev, cli,
4536 &ndr_table_ntsvcs,
4537 NDR_PNP_DEVICEINSTANCEACTION,
4538 &state->tmp);
4539 if (tevent_req_nomem(subreq, req)) {
4540 return tevent_req_post(req, ev);
4542 tevent_req_set_callback(subreq, rpccli_PNP_DeviceInstanceAction_done, req);
4543 return req;
4546 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq)
4548 struct tevent_req *req = tevent_req_callback_data(
4549 subreq, struct tevent_req);
4550 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4551 req, struct rpccli_PNP_DeviceInstanceAction_state);
4552 NTSTATUS status;
4553 TALLOC_CTX *mem_ctx;
4555 if (state->out_mem_ctx) {
4556 mem_ctx = state->out_mem_ctx;
4557 } else {
4558 mem_ctx = state;
4561 status = state->dispatch_recv(subreq, mem_ctx);
4562 TALLOC_FREE(subreq);
4563 if (!NT_STATUS_IS_OK(status)) {
4564 tevent_req_nterror(req, status);
4565 return;
4568 /* Copy out parameters */
4570 /* Copy result */
4571 state->orig.out.result = state->tmp.out.result;
4573 /* Reset temporary structure */
4574 ZERO_STRUCT(state->tmp);
4576 if (DEBUGLEVEL >= 10) {
4577 NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &state->orig);
4580 tevent_req_done(req);
4583 NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req,
4584 TALLOC_CTX *mem_ctx,
4585 WERROR *result)
4587 struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data(
4588 req, struct rpccli_PNP_DeviceInstanceAction_state);
4589 NTSTATUS status;
4591 if (tevent_req_is_nterror(req, &status)) {
4592 tevent_req_received(req);
4593 return status;
4596 /* Steal possbile out parameters to the callers context */
4597 talloc_steal(mem_ctx, state->out_mem_ctx);
4599 /* Return result */
4600 *result = state->orig.out.result;
4602 tevent_req_received(req);
4603 return NT_STATUS_OK;
4606 NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
4607 TALLOC_CTX *mem_ctx,
4608 WERROR *werror)
4610 struct PNP_DeviceInstanceAction r;
4611 NTSTATUS status;
4613 /* In parameters */
4615 if (DEBUGLEVEL >= 10) {
4616 NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &r);
4619 status = cli->dispatch(cli,
4620 mem_ctx,
4621 &ndr_table_ntsvcs,
4622 NDR_PNP_DEVICEINSTANCEACTION,
4623 &r);
4625 if (!NT_STATUS_IS_OK(status)) {
4626 return status;
4629 if (DEBUGLEVEL >= 10) {
4630 NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &r);
4633 if (NT_STATUS_IS_ERR(status)) {
4634 return status;
4637 /* Return variables */
4639 /* Return result */
4640 if (werror) {
4641 *werror = r.out.result;
4644 return werror_to_ntstatus(r.out.result);
4647 struct rpccli_PNP_GetDeviceStatus_state {
4648 struct PNP_GetDeviceStatus orig;
4649 struct PNP_GetDeviceStatus tmp;
4650 TALLOC_CTX *out_mem_ctx;
4651 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4654 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq);
4656 struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx,
4657 struct tevent_context *ev,
4658 struct rpc_pipe_client *cli)
4660 struct tevent_req *req;
4661 struct rpccli_PNP_GetDeviceStatus_state *state;
4662 struct tevent_req *subreq;
4664 req = tevent_req_create(mem_ctx, &state,
4665 struct rpccli_PNP_GetDeviceStatus_state);
4666 if (req == NULL) {
4667 return NULL;
4669 state->out_mem_ctx = NULL;
4670 state->dispatch_recv = cli->dispatch_recv;
4672 /* In parameters */
4674 /* Out parameters */
4676 /* Result */
4677 ZERO_STRUCT(state->orig.out.result);
4679 if (DEBUGLEVEL >= 10) {
4680 NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &state->orig);
4683 /* make a temporary copy, that we pass to the dispatch function */
4684 state->tmp = state->orig;
4686 subreq = cli->dispatch_send(state, ev, cli,
4687 &ndr_table_ntsvcs,
4688 NDR_PNP_GETDEVICESTATUS,
4689 &state->tmp);
4690 if (tevent_req_nomem(subreq, req)) {
4691 return tevent_req_post(req, ev);
4693 tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceStatus_done, req);
4694 return req;
4697 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq)
4699 struct tevent_req *req = tevent_req_callback_data(
4700 subreq, struct tevent_req);
4701 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4702 req, struct rpccli_PNP_GetDeviceStatus_state);
4703 NTSTATUS status;
4704 TALLOC_CTX *mem_ctx;
4706 if (state->out_mem_ctx) {
4707 mem_ctx = state->out_mem_ctx;
4708 } else {
4709 mem_ctx = state;
4712 status = state->dispatch_recv(subreq, mem_ctx);
4713 TALLOC_FREE(subreq);
4714 if (!NT_STATUS_IS_OK(status)) {
4715 tevent_req_nterror(req, status);
4716 return;
4719 /* Copy out parameters */
4721 /* Copy result */
4722 state->orig.out.result = state->tmp.out.result;
4724 /* Reset temporary structure */
4725 ZERO_STRUCT(state->tmp);
4727 if (DEBUGLEVEL >= 10) {
4728 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &state->orig);
4731 tevent_req_done(req);
4734 NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req,
4735 TALLOC_CTX *mem_ctx,
4736 WERROR *result)
4738 struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data(
4739 req, struct rpccli_PNP_GetDeviceStatus_state);
4740 NTSTATUS status;
4742 if (tevent_req_is_nterror(req, &status)) {
4743 tevent_req_received(req);
4744 return status;
4747 /* Steal possbile out parameters to the callers context */
4748 talloc_steal(mem_ctx, state->out_mem_ctx);
4750 /* Return result */
4751 *result = state->orig.out.result;
4753 tevent_req_received(req);
4754 return NT_STATUS_OK;
4757 NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
4758 TALLOC_CTX *mem_ctx,
4759 WERROR *werror)
4761 struct PNP_GetDeviceStatus r;
4762 NTSTATUS status;
4764 /* In parameters */
4766 if (DEBUGLEVEL >= 10) {
4767 NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &r);
4770 status = cli->dispatch(cli,
4771 mem_ctx,
4772 &ndr_table_ntsvcs,
4773 NDR_PNP_GETDEVICESTATUS,
4774 &r);
4776 if (!NT_STATUS_IS_OK(status)) {
4777 return status;
4780 if (DEBUGLEVEL >= 10) {
4781 NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &r);
4784 if (NT_STATUS_IS_ERR(status)) {
4785 return status;
4788 /* Return variables */
4790 /* Return result */
4791 if (werror) {
4792 *werror = r.out.result;
4795 return werror_to_ntstatus(r.out.result);
4798 struct rpccli_PNP_SetDeviceProblem_state {
4799 struct PNP_SetDeviceProblem orig;
4800 struct PNP_SetDeviceProblem tmp;
4801 TALLOC_CTX *out_mem_ctx;
4802 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4805 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq);
4807 struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx,
4808 struct tevent_context *ev,
4809 struct rpc_pipe_client *cli)
4811 struct tevent_req *req;
4812 struct rpccli_PNP_SetDeviceProblem_state *state;
4813 struct tevent_req *subreq;
4815 req = tevent_req_create(mem_ctx, &state,
4816 struct rpccli_PNP_SetDeviceProblem_state);
4817 if (req == NULL) {
4818 return NULL;
4820 state->out_mem_ctx = NULL;
4821 state->dispatch_recv = cli->dispatch_recv;
4823 /* In parameters */
4825 /* Out parameters */
4827 /* Result */
4828 ZERO_STRUCT(state->orig.out.result);
4830 if (DEBUGLEVEL >= 10) {
4831 NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &state->orig);
4834 /* make a temporary copy, that we pass to the dispatch function */
4835 state->tmp = state->orig;
4837 subreq = cli->dispatch_send(state, ev, cli,
4838 &ndr_table_ntsvcs,
4839 NDR_PNP_SETDEVICEPROBLEM,
4840 &state->tmp);
4841 if (tevent_req_nomem(subreq, req)) {
4842 return tevent_req_post(req, ev);
4844 tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceProblem_done, req);
4845 return req;
4848 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq)
4850 struct tevent_req *req = tevent_req_callback_data(
4851 subreq, struct tevent_req);
4852 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4853 req, struct rpccli_PNP_SetDeviceProblem_state);
4854 NTSTATUS status;
4855 TALLOC_CTX *mem_ctx;
4857 if (state->out_mem_ctx) {
4858 mem_ctx = state->out_mem_ctx;
4859 } else {
4860 mem_ctx = state;
4863 status = state->dispatch_recv(subreq, mem_ctx);
4864 TALLOC_FREE(subreq);
4865 if (!NT_STATUS_IS_OK(status)) {
4866 tevent_req_nterror(req, status);
4867 return;
4870 /* Copy out parameters */
4872 /* Copy result */
4873 state->orig.out.result = state->tmp.out.result;
4875 /* Reset temporary structure */
4876 ZERO_STRUCT(state->tmp);
4878 if (DEBUGLEVEL >= 10) {
4879 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &state->orig);
4882 tevent_req_done(req);
4885 NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req,
4886 TALLOC_CTX *mem_ctx,
4887 WERROR *result)
4889 struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data(
4890 req, struct rpccli_PNP_SetDeviceProblem_state);
4891 NTSTATUS status;
4893 if (tevent_req_is_nterror(req, &status)) {
4894 tevent_req_received(req);
4895 return status;
4898 /* Steal possbile out parameters to the callers context */
4899 talloc_steal(mem_ctx, state->out_mem_ctx);
4901 /* Return result */
4902 *result = state->orig.out.result;
4904 tevent_req_received(req);
4905 return NT_STATUS_OK;
4908 NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
4909 TALLOC_CTX *mem_ctx,
4910 WERROR *werror)
4912 struct PNP_SetDeviceProblem r;
4913 NTSTATUS status;
4915 /* In parameters */
4917 if (DEBUGLEVEL >= 10) {
4918 NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &r);
4921 status = cli->dispatch(cli,
4922 mem_ctx,
4923 &ndr_table_ntsvcs,
4924 NDR_PNP_SETDEVICEPROBLEM,
4925 &r);
4927 if (!NT_STATUS_IS_OK(status)) {
4928 return status;
4931 if (DEBUGLEVEL >= 10) {
4932 NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &r);
4935 if (NT_STATUS_IS_ERR(status)) {
4936 return status;
4939 /* Return variables */
4941 /* Return result */
4942 if (werror) {
4943 *werror = r.out.result;
4946 return werror_to_ntstatus(r.out.result);
4949 struct rpccli_PNP_DisableDevInst_state {
4950 struct PNP_DisableDevInst orig;
4951 struct PNP_DisableDevInst tmp;
4952 TALLOC_CTX *out_mem_ctx;
4953 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4956 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq);
4958 struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx,
4959 struct tevent_context *ev,
4960 struct rpc_pipe_client *cli)
4962 struct tevent_req *req;
4963 struct rpccli_PNP_DisableDevInst_state *state;
4964 struct tevent_req *subreq;
4966 req = tevent_req_create(mem_ctx, &state,
4967 struct rpccli_PNP_DisableDevInst_state);
4968 if (req == NULL) {
4969 return NULL;
4971 state->out_mem_ctx = NULL;
4972 state->dispatch_recv = cli->dispatch_recv;
4974 /* In parameters */
4976 /* Out parameters */
4978 /* Result */
4979 ZERO_STRUCT(state->orig.out.result);
4981 if (DEBUGLEVEL >= 10) {
4982 NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &state->orig);
4985 /* make a temporary copy, that we pass to the dispatch function */
4986 state->tmp = state->orig;
4988 subreq = cli->dispatch_send(state, ev, cli,
4989 &ndr_table_ntsvcs,
4990 NDR_PNP_DISABLEDEVINST,
4991 &state->tmp);
4992 if (tevent_req_nomem(subreq, req)) {
4993 return tevent_req_post(req, ev);
4995 tevent_req_set_callback(subreq, rpccli_PNP_DisableDevInst_done, req);
4996 return req;
4999 static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq)
5001 struct tevent_req *req = tevent_req_callback_data(
5002 subreq, struct tevent_req);
5003 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
5004 req, struct rpccli_PNP_DisableDevInst_state);
5005 NTSTATUS status;
5006 TALLOC_CTX *mem_ctx;
5008 if (state->out_mem_ctx) {
5009 mem_ctx = state->out_mem_ctx;
5010 } else {
5011 mem_ctx = state;
5014 status = state->dispatch_recv(subreq, mem_ctx);
5015 TALLOC_FREE(subreq);
5016 if (!NT_STATUS_IS_OK(status)) {
5017 tevent_req_nterror(req, status);
5018 return;
5021 /* Copy out parameters */
5023 /* Copy result */
5024 state->orig.out.result = state->tmp.out.result;
5026 /* Reset temporary structure */
5027 ZERO_STRUCT(state->tmp);
5029 if (DEBUGLEVEL >= 10) {
5030 NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &state->orig);
5033 tevent_req_done(req);
5036 NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req,
5037 TALLOC_CTX *mem_ctx,
5038 WERROR *result)
5040 struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data(
5041 req, struct rpccli_PNP_DisableDevInst_state);
5042 NTSTATUS status;
5044 if (tevent_req_is_nterror(req, &status)) {
5045 tevent_req_received(req);
5046 return status;
5049 /* Steal possbile out parameters to the callers context */
5050 talloc_steal(mem_ctx, state->out_mem_ctx);
5052 /* Return result */
5053 *result = state->orig.out.result;
5055 tevent_req_received(req);
5056 return NT_STATUS_OK;
5059 NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
5060 TALLOC_CTX *mem_ctx,
5061 WERROR *werror)
5063 struct PNP_DisableDevInst r;
5064 NTSTATUS status;
5066 /* In parameters */
5068 if (DEBUGLEVEL >= 10) {
5069 NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &r);
5072 status = cli->dispatch(cli,
5073 mem_ctx,
5074 &ndr_table_ntsvcs,
5075 NDR_PNP_DISABLEDEVINST,
5076 &r);
5078 if (!NT_STATUS_IS_OK(status)) {
5079 return status;
5082 if (DEBUGLEVEL >= 10) {
5083 NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &r);
5086 if (NT_STATUS_IS_ERR(status)) {
5087 return status;
5090 /* Return variables */
5092 /* Return result */
5093 if (werror) {
5094 *werror = r.out.result;
5097 return werror_to_ntstatus(r.out.result);
5100 struct rpccli_PNP_UninstallDevInst_state {
5101 struct PNP_UninstallDevInst orig;
5102 struct PNP_UninstallDevInst tmp;
5103 TALLOC_CTX *out_mem_ctx;
5104 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5107 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq);
5109 struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx,
5110 struct tevent_context *ev,
5111 struct rpc_pipe_client *cli)
5113 struct tevent_req *req;
5114 struct rpccli_PNP_UninstallDevInst_state *state;
5115 struct tevent_req *subreq;
5117 req = tevent_req_create(mem_ctx, &state,
5118 struct rpccli_PNP_UninstallDevInst_state);
5119 if (req == NULL) {
5120 return NULL;
5122 state->out_mem_ctx = NULL;
5123 state->dispatch_recv = cli->dispatch_recv;
5125 /* In parameters */
5127 /* Out parameters */
5129 /* Result */
5130 ZERO_STRUCT(state->orig.out.result);
5132 if (DEBUGLEVEL >= 10) {
5133 NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &state->orig);
5136 /* make a temporary copy, that we pass to the dispatch function */
5137 state->tmp = state->orig;
5139 subreq = cli->dispatch_send(state, ev, cli,
5140 &ndr_table_ntsvcs,
5141 NDR_PNP_UNINSTALLDEVINST,
5142 &state->tmp);
5143 if (tevent_req_nomem(subreq, req)) {
5144 return tevent_req_post(req, ev);
5146 tevent_req_set_callback(subreq, rpccli_PNP_UninstallDevInst_done, req);
5147 return req;
5150 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq)
5152 struct tevent_req *req = tevent_req_callback_data(
5153 subreq, struct tevent_req);
5154 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
5155 req, struct rpccli_PNP_UninstallDevInst_state);
5156 NTSTATUS status;
5157 TALLOC_CTX *mem_ctx;
5159 if (state->out_mem_ctx) {
5160 mem_ctx = state->out_mem_ctx;
5161 } else {
5162 mem_ctx = state;
5165 status = state->dispatch_recv(subreq, mem_ctx);
5166 TALLOC_FREE(subreq);
5167 if (!NT_STATUS_IS_OK(status)) {
5168 tevent_req_nterror(req, status);
5169 return;
5172 /* Copy out parameters */
5174 /* Copy result */
5175 state->orig.out.result = state->tmp.out.result;
5177 /* Reset temporary structure */
5178 ZERO_STRUCT(state->tmp);
5180 if (DEBUGLEVEL >= 10) {
5181 NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &state->orig);
5184 tevent_req_done(req);
5187 NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req,
5188 TALLOC_CTX *mem_ctx,
5189 WERROR *result)
5191 struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data(
5192 req, struct rpccli_PNP_UninstallDevInst_state);
5193 NTSTATUS status;
5195 if (tevent_req_is_nterror(req, &status)) {
5196 tevent_req_received(req);
5197 return status;
5200 /* Steal possbile out parameters to the callers context */
5201 talloc_steal(mem_ctx, state->out_mem_ctx);
5203 /* Return result */
5204 *result = state->orig.out.result;
5206 tevent_req_received(req);
5207 return NT_STATUS_OK;
5210 NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
5211 TALLOC_CTX *mem_ctx,
5212 WERROR *werror)
5214 struct PNP_UninstallDevInst r;
5215 NTSTATUS status;
5217 /* In parameters */
5219 if (DEBUGLEVEL >= 10) {
5220 NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &r);
5223 status = cli->dispatch(cli,
5224 mem_ctx,
5225 &ndr_table_ntsvcs,
5226 NDR_PNP_UNINSTALLDEVINST,
5227 &r);
5229 if (!NT_STATUS_IS_OK(status)) {
5230 return status;
5233 if (DEBUGLEVEL >= 10) {
5234 NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &r);
5237 if (NT_STATUS_IS_ERR(status)) {
5238 return status;
5241 /* Return variables */
5243 /* Return result */
5244 if (werror) {
5245 *werror = r.out.result;
5248 return werror_to_ntstatus(r.out.result);
5251 struct rpccli_PNP_AddID_state {
5252 struct PNP_AddID orig;
5253 struct PNP_AddID tmp;
5254 TALLOC_CTX *out_mem_ctx;
5255 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5258 static void rpccli_PNP_AddID_done(struct tevent_req *subreq);
5260 struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx,
5261 struct tevent_context *ev,
5262 struct rpc_pipe_client *cli)
5264 struct tevent_req *req;
5265 struct rpccli_PNP_AddID_state *state;
5266 struct tevent_req *subreq;
5268 req = tevent_req_create(mem_ctx, &state,
5269 struct rpccli_PNP_AddID_state);
5270 if (req == NULL) {
5271 return NULL;
5273 state->out_mem_ctx = NULL;
5274 state->dispatch_recv = cli->dispatch_recv;
5276 /* In parameters */
5278 /* Out parameters */
5280 /* Result */
5281 ZERO_STRUCT(state->orig.out.result);
5283 if (DEBUGLEVEL >= 10) {
5284 NDR_PRINT_IN_DEBUG(PNP_AddID, &state->orig);
5287 /* make a temporary copy, that we pass to the dispatch function */
5288 state->tmp = state->orig;
5290 subreq = cli->dispatch_send(state, ev, cli,
5291 &ndr_table_ntsvcs,
5292 NDR_PNP_ADDID,
5293 &state->tmp);
5294 if (tevent_req_nomem(subreq, req)) {
5295 return tevent_req_post(req, ev);
5297 tevent_req_set_callback(subreq, rpccli_PNP_AddID_done, req);
5298 return req;
5301 static void rpccli_PNP_AddID_done(struct tevent_req *subreq)
5303 struct tevent_req *req = tevent_req_callback_data(
5304 subreq, struct tevent_req);
5305 struct rpccli_PNP_AddID_state *state = tevent_req_data(
5306 req, struct rpccli_PNP_AddID_state);
5307 NTSTATUS status;
5308 TALLOC_CTX *mem_ctx;
5310 if (state->out_mem_ctx) {
5311 mem_ctx = state->out_mem_ctx;
5312 } else {
5313 mem_ctx = state;
5316 status = state->dispatch_recv(subreq, mem_ctx);
5317 TALLOC_FREE(subreq);
5318 if (!NT_STATUS_IS_OK(status)) {
5319 tevent_req_nterror(req, status);
5320 return;
5323 /* Copy out parameters */
5325 /* Copy result */
5326 state->orig.out.result = state->tmp.out.result;
5328 /* Reset temporary structure */
5329 ZERO_STRUCT(state->tmp);
5331 if (DEBUGLEVEL >= 10) {
5332 NDR_PRINT_OUT_DEBUG(PNP_AddID, &state->orig);
5335 tevent_req_done(req);
5338 NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req,
5339 TALLOC_CTX *mem_ctx,
5340 WERROR *result)
5342 struct rpccli_PNP_AddID_state *state = tevent_req_data(
5343 req, struct rpccli_PNP_AddID_state);
5344 NTSTATUS status;
5346 if (tevent_req_is_nterror(req, &status)) {
5347 tevent_req_received(req);
5348 return status;
5351 /* Steal possbile out parameters to the callers context */
5352 talloc_steal(mem_ctx, state->out_mem_ctx);
5354 /* Return result */
5355 *result = state->orig.out.result;
5357 tevent_req_received(req);
5358 return NT_STATUS_OK;
5361 NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
5362 TALLOC_CTX *mem_ctx,
5363 WERROR *werror)
5365 struct PNP_AddID r;
5366 NTSTATUS status;
5368 /* In parameters */
5370 if (DEBUGLEVEL >= 10) {
5371 NDR_PRINT_IN_DEBUG(PNP_AddID, &r);
5374 status = cli->dispatch(cli,
5375 mem_ctx,
5376 &ndr_table_ntsvcs,
5377 NDR_PNP_ADDID,
5378 &r);
5380 if (!NT_STATUS_IS_OK(status)) {
5381 return status;
5384 if (DEBUGLEVEL >= 10) {
5385 NDR_PRINT_OUT_DEBUG(PNP_AddID, &r);
5388 if (NT_STATUS_IS_ERR(status)) {
5389 return status;
5392 /* Return variables */
5394 /* Return result */
5395 if (werror) {
5396 *werror = r.out.result;
5399 return werror_to_ntstatus(r.out.result);
5402 struct rpccli_PNP_RegisterDriver_state {
5403 struct PNP_RegisterDriver orig;
5404 struct PNP_RegisterDriver tmp;
5405 TALLOC_CTX *out_mem_ctx;
5406 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5409 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq);
5411 struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx,
5412 struct tevent_context *ev,
5413 struct rpc_pipe_client *cli)
5415 struct tevent_req *req;
5416 struct rpccli_PNP_RegisterDriver_state *state;
5417 struct tevent_req *subreq;
5419 req = tevent_req_create(mem_ctx, &state,
5420 struct rpccli_PNP_RegisterDriver_state);
5421 if (req == NULL) {
5422 return NULL;
5424 state->out_mem_ctx = NULL;
5425 state->dispatch_recv = cli->dispatch_recv;
5427 /* In parameters */
5429 /* Out parameters */
5431 /* Result */
5432 ZERO_STRUCT(state->orig.out.result);
5434 if (DEBUGLEVEL >= 10) {
5435 NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &state->orig);
5438 /* make a temporary copy, that we pass to the dispatch function */
5439 state->tmp = state->orig;
5441 subreq = cli->dispatch_send(state, ev, cli,
5442 &ndr_table_ntsvcs,
5443 NDR_PNP_REGISTERDRIVER,
5444 &state->tmp);
5445 if (tevent_req_nomem(subreq, req)) {
5446 return tevent_req_post(req, ev);
5448 tevent_req_set_callback(subreq, rpccli_PNP_RegisterDriver_done, req);
5449 return req;
5452 static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq)
5454 struct tevent_req *req = tevent_req_callback_data(
5455 subreq, struct tevent_req);
5456 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
5457 req, struct rpccli_PNP_RegisterDriver_state);
5458 NTSTATUS status;
5459 TALLOC_CTX *mem_ctx;
5461 if (state->out_mem_ctx) {
5462 mem_ctx = state->out_mem_ctx;
5463 } else {
5464 mem_ctx = state;
5467 status = state->dispatch_recv(subreq, mem_ctx);
5468 TALLOC_FREE(subreq);
5469 if (!NT_STATUS_IS_OK(status)) {
5470 tevent_req_nterror(req, status);
5471 return;
5474 /* Copy out parameters */
5476 /* Copy result */
5477 state->orig.out.result = state->tmp.out.result;
5479 /* Reset temporary structure */
5480 ZERO_STRUCT(state->tmp);
5482 if (DEBUGLEVEL >= 10) {
5483 NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &state->orig);
5486 tevent_req_done(req);
5489 NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req,
5490 TALLOC_CTX *mem_ctx,
5491 WERROR *result)
5493 struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data(
5494 req, struct rpccli_PNP_RegisterDriver_state);
5495 NTSTATUS status;
5497 if (tevent_req_is_nterror(req, &status)) {
5498 tevent_req_received(req);
5499 return status;
5502 /* Steal possbile out parameters to the callers context */
5503 talloc_steal(mem_ctx, state->out_mem_ctx);
5505 /* Return result */
5506 *result = state->orig.out.result;
5508 tevent_req_received(req);
5509 return NT_STATUS_OK;
5512 NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
5513 TALLOC_CTX *mem_ctx,
5514 WERROR *werror)
5516 struct PNP_RegisterDriver r;
5517 NTSTATUS status;
5519 /* In parameters */
5521 if (DEBUGLEVEL >= 10) {
5522 NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &r);
5525 status = cli->dispatch(cli,
5526 mem_ctx,
5527 &ndr_table_ntsvcs,
5528 NDR_PNP_REGISTERDRIVER,
5529 &r);
5531 if (!NT_STATUS_IS_OK(status)) {
5532 return status;
5535 if (DEBUGLEVEL >= 10) {
5536 NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &r);
5539 if (NT_STATUS_IS_ERR(status)) {
5540 return status;
5543 /* Return variables */
5545 /* Return result */
5546 if (werror) {
5547 *werror = r.out.result;
5550 return werror_to_ntstatus(r.out.result);
5553 struct rpccli_PNP_QueryRemove_state {
5554 struct PNP_QueryRemove orig;
5555 struct PNP_QueryRemove tmp;
5556 TALLOC_CTX *out_mem_ctx;
5557 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5560 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq);
5562 struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx,
5563 struct tevent_context *ev,
5564 struct rpc_pipe_client *cli)
5566 struct tevent_req *req;
5567 struct rpccli_PNP_QueryRemove_state *state;
5568 struct tevent_req *subreq;
5570 req = tevent_req_create(mem_ctx, &state,
5571 struct rpccli_PNP_QueryRemove_state);
5572 if (req == NULL) {
5573 return NULL;
5575 state->out_mem_ctx = NULL;
5576 state->dispatch_recv = cli->dispatch_recv;
5578 /* In parameters */
5580 /* Out parameters */
5582 /* Result */
5583 ZERO_STRUCT(state->orig.out.result);
5585 if (DEBUGLEVEL >= 10) {
5586 NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &state->orig);
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_QUERYREMOVE,
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_QueryRemove_done, req);
5600 return req;
5603 static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq)
5605 struct tevent_req *req = tevent_req_callback_data(
5606 subreq, struct tevent_req);
5607 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5608 req, struct rpccli_PNP_QueryRemove_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 */
5627 /* Copy result */
5628 state->orig.out.result = state->tmp.out.result;
5630 /* Reset temporary structure */
5631 ZERO_STRUCT(state->tmp);
5633 if (DEBUGLEVEL >= 10) {
5634 NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &state->orig);
5637 tevent_req_done(req);
5640 NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req,
5641 TALLOC_CTX *mem_ctx,
5642 WERROR *result)
5644 struct rpccli_PNP_QueryRemove_state *state = tevent_req_data(
5645 req, struct rpccli_PNP_QueryRemove_state);
5646 NTSTATUS status;
5648 if (tevent_req_is_nterror(req, &status)) {
5649 tevent_req_received(req);
5650 return status;
5653 /* Steal possbile out parameters to the callers context */
5654 talloc_steal(mem_ctx, state->out_mem_ctx);
5656 /* Return result */
5657 *result = state->orig.out.result;
5659 tevent_req_received(req);
5660 return NT_STATUS_OK;
5663 NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
5664 TALLOC_CTX *mem_ctx,
5665 WERROR *werror)
5667 struct PNP_QueryRemove r;
5668 NTSTATUS status;
5670 /* In parameters */
5672 if (DEBUGLEVEL >= 10) {
5673 NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &r);
5676 status = cli->dispatch(cli,
5677 mem_ctx,
5678 &ndr_table_ntsvcs,
5679 NDR_PNP_QUERYREMOVE,
5680 &r);
5682 if (!NT_STATUS_IS_OK(status)) {
5683 return status;
5686 if (DEBUGLEVEL >= 10) {
5687 NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &r);
5690 if (NT_STATUS_IS_ERR(status)) {
5691 return status;
5694 /* Return variables */
5696 /* Return result */
5697 if (werror) {
5698 *werror = r.out.result;
5701 return werror_to_ntstatus(r.out.result);
5704 struct rpccli_PNP_RequestDeviceEject_state {
5705 struct PNP_RequestDeviceEject orig;
5706 struct PNP_RequestDeviceEject tmp;
5707 TALLOC_CTX *out_mem_ctx;
5708 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5711 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq);
5713 struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx,
5714 struct tevent_context *ev,
5715 struct rpc_pipe_client *cli)
5717 struct tevent_req *req;
5718 struct rpccli_PNP_RequestDeviceEject_state *state;
5719 struct tevent_req *subreq;
5721 req = tevent_req_create(mem_ctx, &state,
5722 struct rpccli_PNP_RequestDeviceEject_state);
5723 if (req == NULL) {
5724 return NULL;
5726 state->out_mem_ctx = NULL;
5727 state->dispatch_recv = cli->dispatch_recv;
5729 /* In parameters */
5731 /* Out parameters */
5733 /* Result */
5734 ZERO_STRUCT(state->orig.out.result);
5736 if (DEBUGLEVEL >= 10) {
5737 NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &state->orig);
5740 /* make a temporary copy, that we pass to the dispatch function */
5741 state->tmp = state->orig;
5743 subreq = cli->dispatch_send(state, ev, cli,
5744 &ndr_table_ntsvcs,
5745 NDR_PNP_REQUESTDEVICEEJECT,
5746 &state->tmp);
5747 if (tevent_req_nomem(subreq, req)) {
5748 return tevent_req_post(req, ev);
5750 tevent_req_set_callback(subreq, rpccli_PNP_RequestDeviceEject_done, req);
5751 return req;
5754 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq)
5756 struct tevent_req *req = tevent_req_callback_data(
5757 subreq, struct tevent_req);
5758 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5759 req, struct rpccli_PNP_RequestDeviceEject_state);
5760 NTSTATUS status;
5761 TALLOC_CTX *mem_ctx;
5763 if (state->out_mem_ctx) {
5764 mem_ctx = state->out_mem_ctx;
5765 } else {
5766 mem_ctx = state;
5769 status = state->dispatch_recv(subreq, mem_ctx);
5770 TALLOC_FREE(subreq);
5771 if (!NT_STATUS_IS_OK(status)) {
5772 tevent_req_nterror(req, status);
5773 return;
5776 /* Copy out parameters */
5778 /* Copy result */
5779 state->orig.out.result = state->tmp.out.result;
5781 /* Reset temporary structure */
5782 ZERO_STRUCT(state->tmp);
5784 if (DEBUGLEVEL >= 10) {
5785 NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &state->orig);
5788 tevent_req_done(req);
5791 NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req,
5792 TALLOC_CTX *mem_ctx,
5793 WERROR *result)
5795 struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data(
5796 req, struct rpccli_PNP_RequestDeviceEject_state);
5797 NTSTATUS status;
5799 if (tevent_req_is_nterror(req, &status)) {
5800 tevent_req_received(req);
5801 return status;
5804 /* Steal possbile out parameters to the callers context */
5805 talloc_steal(mem_ctx, state->out_mem_ctx);
5807 /* Return result */
5808 *result = state->orig.out.result;
5810 tevent_req_received(req);
5811 return NT_STATUS_OK;
5814 NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
5815 TALLOC_CTX *mem_ctx,
5816 WERROR *werror)
5818 struct PNP_RequestDeviceEject r;
5819 NTSTATUS status;
5821 /* In parameters */
5823 if (DEBUGLEVEL >= 10) {
5824 NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &r);
5827 status = cli->dispatch(cli,
5828 mem_ctx,
5829 &ndr_table_ntsvcs,
5830 NDR_PNP_REQUESTDEVICEEJECT,
5831 &r);
5833 if (!NT_STATUS_IS_OK(status)) {
5834 return status;
5837 if (DEBUGLEVEL >= 10) {
5838 NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &r);
5841 if (NT_STATUS_IS_ERR(status)) {
5842 return status;
5845 /* Return variables */
5847 /* Return result */
5848 if (werror) {
5849 *werror = r.out.result;
5852 return werror_to_ntstatus(r.out.result);
5855 struct rpccli_PNP_IsDockStationPresent_state {
5856 struct PNP_IsDockStationPresent orig;
5857 struct PNP_IsDockStationPresent tmp;
5858 TALLOC_CTX *out_mem_ctx;
5859 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5862 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq);
5864 struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx,
5865 struct tevent_context *ev,
5866 struct rpc_pipe_client *cli)
5868 struct tevent_req *req;
5869 struct rpccli_PNP_IsDockStationPresent_state *state;
5870 struct tevent_req *subreq;
5872 req = tevent_req_create(mem_ctx, &state,
5873 struct rpccli_PNP_IsDockStationPresent_state);
5874 if (req == NULL) {
5875 return NULL;
5877 state->out_mem_ctx = NULL;
5878 state->dispatch_recv = cli->dispatch_recv;
5880 /* In parameters */
5882 /* Out parameters */
5884 /* Result */
5885 ZERO_STRUCT(state->orig.out.result);
5887 if (DEBUGLEVEL >= 10) {
5888 NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &state->orig);
5891 /* make a temporary copy, that we pass to the dispatch function */
5892 state->tmp = state->orig;
5894 subreq = cli->dispatch_send(state, ev, cli,
5895 &ndr_table_ntsvcs,
5896 NDR_PNP_ISDOCKSTATIONPRESENT,
5897 &state->tmp);
5898 if (tevent_req_nomem(subreq, req)) {
5899 return tevent_req_post(req, ev);
5901 tevent_req_set_callback(subreq, rpccli_PNP_IsDockStationPresent_done, req);
5902 return req;
5905 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq)
5907 struct tevent_req *req = tevent_req_callback_data(
5908 subreq, struct tevent_req);
5909 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5910 req, struct rpccli_PNP_IsDockStationPresent_state);
5911 NTSTATUS status;
5912 TALLOC_CTX *mem_ctx;
5914 if (state->out_mem_ctx) {
5915 mem_ctx = state->out_mem_ctx;
5916 } else {
5917 mem_ctx = state;
5920 status = state->dispatch_recv(subreq, mem_ctx);
5921 TALLOC_FREE(subreq);
5922 if (!NT_STATUS_IS_OK(status)) {
5923 tevent_req_nterror(req, status);
5924 return;
5927 /* Copy out parameters */
5929 /* Copy result */
5930 state->orig.out.result = state->tmp.out.result;
5932 /* Reset temporary structure */
5933 ZERO_STRUCT(state->tmp);
5935 if (DEBUGLEVEL >= 10) {
5936 NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &state->orig);
5939 tevent_req_done(req);
5942 NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req,
5943 TALLOC_CTX *mem_ctx,
5944 WERROR *result)
5946 struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data(
5947 req, struct rpccli_PNP_IsDockStationPresent_state);
5948 NTSTATUS status;
5950 if (tevent_req_is_nterror(req, &status)) {
5951 tevent_req_received(req);
5952 return status;
5955 /* Steal possbile out parameters to the callers context */
5956 talloc_steal(mem_ctx, state->out_mem_ctx);
5958 /* Return result */
5959 *result = state->orig.out.result;
5961 tevent_req_received(req);
5962 return NT_STATUS_OK;
5965 NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
5966 TALLOC_CTX *mem_ctx,
5967 WERROR *werror)
5969 struct PNP_IsDockStationPresent r;
5970 NTSTATUS status;
5972 /* In parameters */
5974 if (DEBUGLEVEL >= 10) {
5975 NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &r);
5978 status = cli->dispatch(cli,
5979 mem_ctx,
5980 &ndr_table_ntsvcs,
5981 NDR_PNP_ISDOCKSTATIONPRESENT,
5982 &r);
5984 if (!NT_STATUS_IS_OK(status)) {
5985 return status;
5988 if (DEBUGLEVEL >= 10) {
5989 NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &r);
5992 if (NT_STATUS_IS_ERR(status)) {
5993 return status;
5996 /* Return variables */
5998 /* Return result */
5999 if (werror) {
6000 *werror = r.out.result;
6003 return werror_to_ntstatus(r.out.result);
6006 struct rpccli_PNP_RequestEjectPC_state {
6007 struct PNP_RequestEjectPC orig;
6008 struct PNP_RequestEjectPC tmp;
6009 TALLOC_CTX *out_mem_ctx;
6010 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6013 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq);
6015 struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx,
6016 struct tevent_context *ev,
6017 struct rpc_pipe_client *cli)
6019 struct tevent_req *req;
6020 struct rpccli_PNP_RequestEjectPC_state *state;
6021 struct tevent_req *subreq;
6023 req = tevent_req_create(mem_ctx, &state,
6024 struct rpccli_PNP_RequestEjectPC_state);
6025 if (req == NULL) {
6026 return NULL;
6028 state->out_mem_ctx = NULL;
6029 state->dispatch_recv = cli->dispatch_recv;
6031 /* In parameters */
6033 /* Out parameters */
6035 /* Result */
6036 ZERO_STRUCT(state->orig.out.result);
6038 if (DEBUGLEVEL >= 10) {
6039 NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &state->orig);
6042 /* make a temporary copy, that we pass to the dispatch function */
6043 state->tmp = state->orig;
6045 subreq = cli->dispatch_send(state, ev, cli,
6046 &ndr_table_ntsvcs,
6047 NDR_PNP_REQUESTEJECTPC,
6048 &state->tmp);
6049 if (tevent_req_nomem(subreq, req)) {
6050 return tevent_req_post(req, ev);
6052 tevent_req_set_callback(subreq, rpccli_PNP_RequestEjectPC_done, req);
6053 return req;
6056 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq)
6058 struct tevent_req *req = tevent_req_callback_data(
6059 subreq, struct tevent_req);
6060 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
6061 req, struct rpccli_PNP_RequestEjectPC_state);
6062 NTSTATUS status;
6063 TALLOC_CTX *mem_ctx;
6065 if (state->out_mem_ctx) {
6066 mem_ctx = state->out_mem_ctx;
6067 } else {
6068 mem_ctx = state;
6071 status = state->dispatch_recv(subreq, mem_ctx);
6072 TALLOC_FREE(subreq);
6073 if (!NT_STATUS_IS_OK(status)) {
6074 tevent_req_nterror(req, status);
6075 return;
6078 /* Copy out parameters */
6080 /* Copy result */
6081 state->orig.out.result = state->tmp.out.result;
6083 /* Reset temporary structure */
6084 ZERO_STRUCT(state->tmp);
6086 if (DEBUGLEVEL >= 10) {
6087 NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &state->orig);
6090 tevent_req_done(req);
6093 NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req,
6094 TALLOC_CTX *mem_ctx,
6095 WERROR *result)
6097 struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data(
6098 req, struct rpccli_PNP_RequestEjectPC_state);
6099 NTSTATUS status;
6101 if (tevent_req_is_nterror(req, &status)) {
6102 tevent_req_received(req);
6103 return status;
6106 /* Steal possbile out parameters to the callers context */
6107 talloc_steal(mem_ctx, state->out_mem_ctx);
6109 /* Return result */
6110 *result = state->orig.out.result;
6112 tevent_req_received(req);
6113 return NT_STATUS_OK;
6116 NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
6117 TALLOC_CTX *mem_ctx,
6118 WERROR *werror)
6120 struct PNP_RequestEjectPC r;
6121 NTSTATUS status;
6123 /* In parameters */
6125 if (DEBUGLEVEL >= 10) {
6126 NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &r);
6129 status = cli->dispatch(cli,
6130 mem_ctx,
6131 &ndr_table_ntsvcs,
6132 NDR_PNP_REQUESTEJECTPC,
6133 &r);
6135 if (!NT_STATUS_IS_OK(status)) {
6136 return status;
6139 if (DEBUGLEVEL >= 10) {
6140 NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &r);
6143 if (NT_STATUS_IS_ERR(status)) {
6144 return status;
6147 /* Return variables */
6149 /* Return result */
6150 if (werror) {
6151 *werror = r.out.result;
6154 return werror_to_ntstatus(r.out.result);
6157 struct rpccli_PNP_HwProfFlags_state {
6158 struct PNP_HwProfFlags orig;
6159 struct PNP_HwProfFlags tmp;
6160 TALLOC_CTX *out_mem_ctx;
6161 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6164 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq);
6166 struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx,
6167 struct tevent_context *ev,
6168 struct rpc_pipe_client *cli,
6169 uint32_t _action /* [in] */,
6170 const char *_devicepath /* [in] [ref,charset(UTF16)] */,
6171 uint32_t _config /* [in] */,
6172 uint32_t *_profile_flags /* [in,out] [ref] */,
6173 uint16_t *_veto_type /* [in,out] [unique] */,
6174 const char *_unknown5 /* [in] [unique,charset(UTF16)] */,
6175 const char **_unknown5a /* [out] [unique,charset(UTF16)] */,
6176 uint32_t _name_length /* [in] */,
6177 uint32_t _flags /* [in] */)
6179 struct tevent_req *req;
6180 struct rpccli_PNP_HwProfFlags_state *state;
6181 struct tevent_req *subreq;
6183 req = tevent_req_create(mem_ctx, &state,
6184 struct rpccli_PNP_HwProfFlags_state);
6185 if (req == NULL) {
6186 return NULL;
6188 state->out_mem_ctx = NULL;
6189 state->dispatch_recv = cli->dispatch_recv;
6191 /* In parameters */
6192 state->orig.in.action = _action;
6193 state->orig.in.devicepath = _devicepath;
6194 state->orig.in.config = _config;
6195 state->orig.in.profile_flags = _profile_flags;
6196 state->orig.in.veto_type = _veto_type;
6197 state->orig.in.unknown5 = _unknown5;
6198 state->orig.in.name_length = _name_length;
6199 state->orig.in.flags = _flags;
6201 /* Out parameters */
6202 state->orig.out.profile_flags = _profile_flags;
6203 state->orig.out.veto_type = _veto_type;
6204 state->orig.out.unknown5a = _unknown5a;
6206 /* Result */
6207 ZERO_STRUCT(state->orig.out.result);
6209 if (DEBUGLEVEL >= 10) {
6210 NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &state->orig);
6213 state->out_mem_ctx = talloc_named_const(state, 0,
6214 "rpccli_PNP_HwProfFlags_out_memory");
6215 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6216 return tevent_req_post(req, ev);
6219 /* make a temporary copy, that we pass to the dispatch function */
6220 state->tmp = state->orig;
6222 subreq = cli->dispatch_send(state, ev, cli,
6223 &ndr_table_ntsvcs,
6224 NDR_PNP_HWPROFFLAGS,
6225 &state->tmp);
6226 if (tevent_req_nomem(subreq, req)) {
6227 return tevent_req_post(req, ev);
6229 tevent_req_set_callback(subreq, rpccli_PNP_HwProfFlags_done, req);
6230 return req;
6233 static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq)
6235 struct tevent_req *req = tevent_req_callback_data(
6236 subreq, struct tevent_req);
6237 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
6238 req, struct rpccli_PNP_HwProfFlags_state);
6239 NTSTATUS status;
6240 TALLOC_CTX *mem_ctx;
6242 if (state->out_mem_ctx) {
6243 mem_ctx = state->out_mem_ctx;
6244 } else {
6245 mem_ctx = state;
6248 status = state->dispatch_recv(subreq, mem_ctx);
6249 TALLOC_FREE(subreq);
6250 if (!NT_STATUS_IS_OK(status)) {
6251 tevent_req_nterror(req, status);
6252 return;
6255 /* Copy out parameters */
6256 *state->orig.out.profile_flags = *state->tmp.out.profile_flags;
6257 if (state->orig.out.veto_type && state->tmp.out.veto_type) {
6258 *state->orig.out.veto_type = *state->tmp.out.veto_type;
6260 if (state->orig.out.unknown5a && state->tmp.out.unknown5a) {
6261 *state->orig.out.unknown5a = *state->tmp.out.unknown5a;
6264 /* Copy result */
6265 state->orig.out.result = state->tmp.out.result;
6267 /* Reset temporary structure */
6268 ZERO_STRUCT(state->tmp);
6270 if (DEBUGLEVEL >= 10) {
6271 NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &state->orig);
6274 tevent_req_done(req);
6277 NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req,
6278 TALLOC_CTX *mem_ctx,
6279 WERROR *result)
6281 struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data(
6282 req, struct rpccli_PNP_HwProfFlags_state);
6283 NTSTATUS status;
6285 if (tevent_req_is_nterror(req, &status)) {
6286 tevent_req_received(req);
6287 return status;
6290 /* Steal possbile out parameters to the callers context */
6291 talloc_steal(mem_ctx, state->out_mem_ctx);
6293 /* Return result */
6294 *result = state->orig.out.result;
6296 tevent_req_received(req);
6297 return NT_STATUS_OK;
6300 NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
6301 TALLOC_CTX *mem_ctx,
6302 uint32_t action /* [in] */,
6303 const char *devicepath /* [in] [ref,charset(UTF16)] */,
6304 uint32_t config /* [in] */,
6305 uint32_t *profile_flags /* [in,out] [ref] */,
6306 uint16_t *veto_type /* [in,out] [unique] */,
6307 const char *unknown5 /* [in] [unique,charset(UTF16)] */,
6308 const char **unknown5a /* [out] [unique,charset(UTF16)] */,
6309 uint32_t name_length /* [in] */,
6310 uint32_t flags /* [in] */,
6311 WERROR *werror)
6313 struct PNP_HwProfFlags r;
6314 NTSTATUS status;
6316 /* In parameters */
6317 r.in.action = action;
6318 r.in.devicepath = devicepath;
6319 r.in.config = config;
6320 r.in.profile_flags = profile_flags;
6321 r.in.veto_type = veto_type;
6322 r.in.unknown5 = unknown5;
6323 r.in.name_length = name_length;
6324 r.in.flags = flags;
6326 if (DEBUGLEVEL >= 10) {
6327 NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r);
6330 status = cli->dispatch(cli,
6331 mem_ctx,
6332 &ndr_table_ntsvcs,
6333 NDR_PNP_HWPROFFLAGS,
6334 &r);
6336 if (!NT_STATUS_IS_OK(status)) {
6337 return status;
6340 if (DEBUGLEVEL >= 10) {
6341 NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &r);
6344 if (NT_STATUS_IS_ERR(status)) {
6345 return status;
6348 /* Return variables */
6349 *profile_flags = *r.out.profile_flags;
6350 if (veto_type && r.out.veto_type) {
6351 *veto_type = *r.out.veto_type;
6353 if (unknown5a && r.out.unknown5a) {
6354 *unknown5a = *r.out.unknown5a;
6357 /* Return result */
6358 if (werror) {
6359 *werror = r.out.result;
6362 return werror_to_ntstatus(r.out.result);
6365 struct rpccli_PNP_GetHwProfInfo_state {
6366 struct PNP_GetHwProfInfo orig;
6367 struct PNP_GetHwProfInfo tmp;
6368 TALLOC_CTX *out_mem_ctx;
6369 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6372 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq);
6374 struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx,
6375 struct tevent_context *ev,
6376 struct rpc_pipe_client *cli,
6377 uint32_t _idx /* [in] */,
6378 struct PNP_HwProfInfo *_info /* [in,out] [ref] */,
6379 uint32_t _size /* [in] */,
6380 uint32_t _flags /* [in] */)
6382 struct tevent_req *req;
6383 struct rpccli_PNP_GetHwProfInfo_state *state;
6384 struct tevent_req *subreq;
6386 req = tevent_req_create(mem_ctx, &state,
6387 struct rpccli_PNP_GetHwProfInfo_state);
6388 if (req == NULL) {
6389 return NULL;
6391 state->out_mem_ctx = NULL;
6392 state->dispatch_recv = cli->dispatch_recv;
6394 /* In parameters */
6395 state->orig.in.idx = _idx;
6396 state->orig.in.info = _info;
6397 state->orig.in.size = _size;
6398 state->orig.in.flags = _flags;
6400 /* Out parameters */
6401 state->orig.out.info = _info;
6403 /* Result */
6404 ZERO_STRUCT(state->orig.out.result);
6406 if (DEBUGLEVEL >= 10) {
6407 NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &state->orig);
6410 state->out_mem_ctx = talloc_named_const(state, 0,
6411 "rpccli_PNP_GetHwProfInfo_out_memory");
6412 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6413 return tevent_req_post(req, ev);
6416 /* make a temporary copy, that we pass to the dispatch function */
6417 state->tmp = state->orig;
6419 subreq = cli->dispatch_send(state, ev, cli,
6420 &ndr_table_ntsvcs,
6421 NDR_PNP_GETHWPROFINFO,
6422 &state->tmp);
6423 if (tevent_req_nomem(subreq, req)) {
6424 return tevent_req_post(req, ev);
6426 tevent_req_set_callback(subreq, rpccli_PNP_GetHwProfInfo_done, req);
6427 return req;
6430 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq)
6432 struct tevent_req *req = tevent_req_callback_data(
6433 subreq, struct tevent_req);
6434 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
6435 req, struct rpccli_PNP_GetHwProfInfo_state);
6436 NTSTATUS status;
6437 TALLOC_CTX *mem_ctx;
6439 if (state->out_mem_ctx) {
6440 mem_ctx = state->out_mem_ctx;
6441 } else {
6442 mem_ctx = state;
6445 status = state->dispatch_recv(subreq, mem_ctx);
6446 TALLOC_FREE(subreq);
6447 if (!NT_STATUS_IS_OK(status)) {
6448 tevent_req_nterror(req, status);
6449 return;
6452 /* Copy out parameters */
6453 *state->orig.out.info = *state->tmp.out.info;
6455 /* Copy result */
6456 state->orig.out.result = state->tmp.out.result;
6458 /* Reset temporary structure */
6459 ZERO_STRUCT(state->tmp);
6461 if (DEBUGLEVEL >= 10) {
6462 NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, &state->orig);
6465 tevent_req_done(req);
6468 NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req,
6469 TALLOC_CTX *mem_ctx,
6470 WERROR *result)
6472 struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data(
6473 req, struct rpccli_PNP_GetHwProfInfo_state);
6474 NTSTATUS status;
6476 if (tevent_req_is_nterror(req, &status)) {
6477 tevent_req_received(req);
6478 return status;
6481 /* Steal possbile out parameters to the callers context */
6482 talloc_steal(mem_ctx, state->out_mem_ctx);
6484 /* Return result */
6485 *result = state->orig.out.result;
6487 tevent_req_received(req);
6488 return NT_STATUS_OK;
6491 NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
6492 TALLOC_CTX *mem_ctx,
6493 uint32_t idx /* [in] */,
6494 struct PNP_HwProfInfo *info /* [in,out] [ref] */,
6495 uint32_t size /* [in] */,
6496 uint32_t flags /* [in] */,
6497 WERROR *werror)
6499 struct PNP_GetHwProfInfo r;
6500 NTSTATUS status;
6502 /* In parameters */
6503 r.in.idx = idx;
6504 r.in.info = info;
6505 r.in.size = size;
6506 r.in.flags = flags;
6508 if (DEBUGLEVEL >= 10) {
6509 NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r);
6512 status = cli->dispatch(cli,
6513 mem_ctx,
6514 &ndr_table_ntsvcs,
6515 NDR_PNP_GETHWPROFINFO,
6516 &r);
6518 if (!NT_STATUS_IS_OK(status)) {
6519 return status;
6522 if (DEBUGLEVEL >= 10) {
6523 NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, &r);
6526 if (NT_STATUS_IS_ERR(status)) {
6527 return status;
6530 /* Return variables */
6531 *info = *r.out.info;
6533 /* Return result */
6534 if (werror) {
6535 *werror = r.out.result;
6538 return werror_to_ntstatus(r.out.result);
6541 struct rpccli_PNP_AddEmptyLogConf_state {
6542 struct PNP_AddEmptyLogConf orig;
6543 struct PNP_AddEmptyLogConf tmp;
6544 TALLOC_CTX *out_mem_ctx;
6545 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6548 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq);
6550 struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx,
6551 struct tevent_context *ev,
6552 struct rpc_pipe_client *cli)
6554 struct tevent_req *req;
6555 struct rpccli_PNP_AddEmptyLogConf_state *state;
6556 struct tevent_req *subreq;
6558 req = tevent_req_create(mem_ctx, &state,
6559 struct rpccli_PNP_AddEmptyLogConf_state);
6560 if (req == NULL) {
6561 return NULL;
6563 state->out_mem_ctx = NULL;
6564 state->dispatch_recv = cli->dispatch_recv;
6566 /* In parameters */
6568 /* Out parameters */
6570 /* Result */
6571 ZERO_STRUCT(state->orig.out.result);
6573 if (DEBUGLEVEL >= 10) {
6574 NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &state->orig);
6577 /* make a temporary copy, that we pass to the dispatch function */
6578 state->tmp = state->orig;
6580 subreq = cli->dispatch_send(state, ev, cli,
6581 &ndr_table_ntsvcs,
6582 NDR_PNP_ADDEMPTYLOGCONF,
6583 &state->tmp);
6584 if (tevent_req_nomem(subreq, req)) {
6585 return tevent_req_post(req, ev);
6587 tevent_req_set_callback(subreq, rpccli_PNP_AddEmptyLogConf_done, req);
6588 return req;
6591 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq)
6593 struct tevent_req *req = tevent_req_callback_data(
6594 subreq, struct tevent_req);
6595 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
6596 req, struct rpccli_PNP_AddEmptyLogConf_state);
6597 NTSTATUS status;
6598 TALLOC_CTX *mem_ctx;
6600 if (state->out_mem_ctx) {
6601 mem_ctx = state->out_mem_ctx;
6602 } else {
6603 mem_ctx = state;
6606 status = state->dispatch_recv(subreq, mem_ctx);
6607 TALLOC_FREE(subreq);
6608 if (!NT_STATUS_IS_OK(status)) {
6609 tevent_req_nterror(req, status);
6610 return;
6613 /* Copy out parameters */
6615 /* Copy result */
6616 state->orig.out.result = state->tmp.out.result;
6618 /* Reset temporary structure */
6619 ZERO_STRUCT(state->tmp);
6621 if (DEBUGLEVEL >= 10) {
6622 NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &state->orig);
6625 tevent_req_done(req);
6628 NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req,
6629 TALLOC_CTX *mem_ctx,
6630 WERROR *result)
6632 struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data(
6633 req, struct rpccli_PNP_AddEmptyLogConf_state);
6634 NTSTATUS status;
6636 if (tevent_req_is_nterror(req, &status)) {
6637 tevent_req_received(req);
6638 return status;
6641 /* Steal possbile out parameters to the callers context */
6642 talloc_steal(mem_ctx, state->out_mem_ctx);
6644 /* Return result */
6645 *result = state->orig.out.result;
6647 tevent_req_received(req);
6648 return NT_STATUS_OK;
6651 NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
6652 TALLOC_CTX *mem_ctx,
6653 WERROR *werror)
6655 struct PNP_AddEmptyLogConf r;
6656 NTSTATUS status;
6658 /* In parameters */
6660 if (DEBUGLEVEL >= 10) {
6661 NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &r);
6664 status = cli->dispatch(cli,
6665 mem_ctx,
6666 &ndr_table_ntsvcs,
6667 NDR_PNP_ADDEMPTYLOGCONF,
6668 &r);
6670 if (!NT_STATUS_IS_OK(status)) {
6671 return status;
6674 if (DEBUGLEVEL >= 10) {
6675 NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &r);
6678 if (NT_STATUS_IS_ERR(status)) {
6679 return status;
6682 /* Return variables */
6684 /* Return result */
6685 if (werror) {
6686 *werror = r.out.result;
6689 return werror_to_ntstatus(r.out.result);
6692 struct rpccli_PNP_FreeLogConf_state {
6693 struct PNP_FreeLogConf orig;
6694 struct PNP_FreeLogConf tmp;
6695 TALLOC_CTX *out_mem_ctx;
6696 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6699 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq);
6701 struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx,
6702 struct tevent_context *ev,
6703 struct rpc_pipe_client *cli)
6705 struct tevent_req *req;
6706 struct rpccli_PNP_FreeLogConf_state *state;
6707 struct tevent_req *subreq;
6709 req = tevent_req_create(mem_ctx, &state,
6710 struct rpccli_PNP_FreeLogConf_state);
6711 if (req == NULL) {
6712 return NULL;
6714 state->out_mem_ctx = NULL;
6715 state->dispatch_recv = cli->dispatch_recv;
6717 /* In parameters */
6719 /* Out parameters */
6721 /* Result */
6722 ZERO_STRUCT(state->orig.out.result);
6724 if (DEBUGLEVEL >= 10) {
6725 NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &state->orig);
6728 /* make a temporary copy, that we pass to the dispatch function */
6729 state->tmp = state->orig;
6731 subreq = cli->dispatch_send(state, ev, cli,
6732 &ndr_table_ntsvcs,
6733 NDR_PNP_FREELOGCONF,
6734 &state->tmp);
6735 if (tevent_req_nomem(subreq, req)) {
6736 return tevent_req_post(req, ev);
6738 tevent_req_set_callback(subreq, rpccli_PNP_FreeLogConf_done, req);
6739 return req;
6742 static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq)
6744 struct tevent_req *req = tevent_req_callback_data(
6745 subreq, struct tevent_req);
6746 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6747 req, struct rpccli_PNP_FreeLogConf_state);
6748 NTSTATUS status;
6749 TALLOC_CTX *mem_ctx;
6751 if (state->out_mem_ctx) {
6752 mem_ctx = state->out_mem_ctx;
6753 } else {
6754 mem_ctx = state;
6757 status = state->dispatch_recv(subreq, mem_ctx);
6758 TALLOC_FREE(subreq);
6759 if (!NT_STATUS_IS_OK(status)) {
6760 tevent_req_nterror(req, status);
6761 return;
6764 /* Copy out parameters */
6766 /* Copy result */
6767 state->orig.out.result = state->tmp.out.result;
6769 /* Reset temporary structure */
6770 ZERO_STRUCT(state->tmp);
6772 if (DEBUGLEVEL >= 10) {
6773 NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &state->orig);
6776 tevent_req_done(req);
6779 NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req,
6780 TALLOC_CTX *mem_ctx,
6781 WERROR *result)
6783 struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data(
6784 req, struct rpccli_PNP_FreeLogConf_state);
6785 NTSTATUS status;
6787 if (tevent_req_is_nterror(req, &status)) {
6788 tevent_req_received(req);
6789 return status;
6792 /* Steal possbile out parameters to the callers context */
6793 talloc_steal(mem_ctx, state->out_mem_ctx);
6795 /* Return result */
6796 *result = state->orig.out.result;
6798 tevent_req_received(req);
6799 return NT_STATUS_OK;
6802 NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
6803 TALLOC_CTX *mem_ctx,
6804 WERROR *werror)
6806 struct PNP_FreeLogConf r;
6807 NTSTATUS status;
6809 /* In parameters */
6811 if (DEBUGLEVEL >= 10) {
6812 NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &r);
6815 status = cli->dispatch(cli,
6816 mem_ctx,
6817 &ndr_table_ntsvcs,
6818 NDR_PNP_FREELOGCONF,
6819 &r);
6821 if (!NT_STATUS_IS_OK(status)) {
6822 return status;
6825 if (DEBUGLEVEL >= 10) {
6826 NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &r);
6829 if (NT_STATUS_IS_ERR(status)) {
6830 return status;
6833 /* Return variables */
6835 /* Return result */
6836 if (werror) {
6837 *werror = r.out.result;
6840 return werror_to_ntstatus(r.out.result);
6843 struct rpccli_PNP_GetFirstLogConf_state {
6844 struct PNP_GetFirstLogConf orig;
6845 struct PNP_GetFirstLogConf tmp;
6846 TALLOC_CTX *out_mem_ctx;
6847 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6850 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq);
6852 struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx,
6853 struct tevent_context *ev,
6854 struct rpc_pipe_client *cli)
6856 struct tevent_req *req;
6857 struct rpccli_PNP_GetFirstLogConf_state *state;
6858 struct tevent_req *subreq;
6860 req = tevent_req_create(mem_ctx, &state,
6861 struct rpccli_PNP_GetFirstLogConf_state);
6862 if (req == NULL) {
6863 return NULL;
6865 state->out_mem_ctx = NULL;
6866 state->dispatch_recv = cli->dispatch_recv;
6868 /* In parameters */
6870 /* Out parameters */
6872 /* Result */
6873 ZERO_STRUCT(state->orig.out.result);
6875 if (DEBUGLEVEL >= 10) {
6876 NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &state->orig);
6879 /* make a temporary copy, that we pass to the dispatch function */
6880 state->tmp = state->orig;
6882 subreq = cli->dispatch_send(state, ev, cli,
6883 &ndr_table_ntsvcs,
6884 NDR_PNP_GETFIRSTLOGCONF,
6885 &state->tmp);
6886 if (tevent_req_nomem(subreq, req)) {
6887 return tevent_req_post(req, ev);
6889 tevent_req_set_callback(subreq, rpccli_PNP_GetFirstLogConf_done, req);
6890 return req;
6893 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq)
6895 struct tevent_req *req = tevent_req_callback_data(
6896 subreq, struct tevent_req);
6897 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6898 req, struct rpccli_PNP_GetFirstLogConf_state);
6899 NTSTATUS status;
6900 TALLOC_CTX *mem_ctx;
6902 if (state->out_mem_ctx) {
6903 mem_ctx = state->out_mem_ctx;
6904 } else {
6905 mem_ctx = state;
6908 status = state->dispatch_recv(subreq, mem_ctx);
6909 TALLOC_FREE(subreq);
6910 if (!NT_STATUS_IS_OK(status)) {
6911 tevent_req_nterror(req, status);
6912 return;
6915 /* Copy out parameters */
6917 /* Copy result */
6918 state->orig.out.result = state->tmp.out.result;
6920 /* Reset temporary structure */
6921 ZERO_STRUCT(state->tmp);
6923 if (DEBUGLEVEL >= 10) {
6924 NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &state->orig);
6927 tevent_req_done(req);
6930 NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req,
6931 TALLOC_CTX *mem_ctx,
6932 WERROR *result)
6934 struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data(
6935 req, struct rpccli_PNP_GetFirstLogConf_state);
6936 NTSTATUS status;
6938 if (tevent_req_is_nterror(req, &status)) {
6939 tevent_req_received(req);
6940 return status;
6943 /* Steal possbile out parameters to the callers context */
6944 talloc_steal(mem_ctx, state->out_mem_ctx);
6946 /* Return result */
6947 *result = state->orig.out.result;
6949 tevent_req_received(req);
6950 return NT_STATUS_OK;
6953 NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
6954 TALLOC_CTX *mem_ctx,
6955 WERROR *werror)
6957 struct PNP_GetFirstLogConf r;
6958 NTSTATUS status;
6960 /* In parameters */
6962 if (DEBUGLEVEL >= 10) {
6963 NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &r);
6966 status = cli->dispatch(cli,
6967 mem_ctx,
6968 &ndr_table_ntsvcs,
6969 NDR_PNP_GETFIRSTLOGCONF,
6970 &r);
6972 if (!NT_STATUS_IS_OK(status)) {
6973 return status;
6976 if (DEBUGLEVEL >= 10) {
6977 NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &r);
6980 if (NT_STATUS_IS_ERR(status)) {
6981 return status;
6984 /* Return variables */
6986 /* Return result */
6987 if (werror) {
6988 *werror = r.out.result;
6991 return werror_to_ntstatus(r.out.result);
6994 struct rpccli_PNP_GetNextLogConf_state {
6995 struct PNP_GetNextLogConf orig;
6996 struct PNP_GetNextLogConf tmp;
6997 TALLOC_CTX *out_mem_ctx;
6998 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7001 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq);
7003 struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx,
7004 struct tevent_context *ev,
7005 struct rpc_pipe_client *cli)
7007 struct tevent_req *req;
7008 struct rpccli_PNP_GetNextLogConf_state *state;
7009 struct tevent_req *subreq;
7011 req = tevent_req_create(mem_ctx, &state,
7012 struct rpccli_PNP_GetNextLogConf_state);
7013 if (req == NULL) {
7014 return NULL;
7016 state->out_mem_ctx = NULL;
7017 state->dispatch_recv = cli->dispatch_recv;
7019 /* In parameters */
7021 /* Out parameters */
7023 /* Result */
7024 ZERO_STRUCT(state->orig.out.result);
7026 if (DEBUGLEVEL >= 10) {
7027 NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &state->orig);
7030 /* make a temporary copy, that we pass to the dispatch function */
7031 state->tmp = state->orig;
7033 subreq = cli->dispatch_send(state, ev, cli,
7034 &ndr_table_ntsvcs,
7035 NDR_PNP_GETNEXTLOGCONF,
7036 &state->tmp);
7037 if (tevent_req_nomem(subreq, req)) {
7038 return tevent_req_post(req, ev);
7040 tevent_req_set_callback(subreq, rpccli_PNP_GetNextLogConf_done, req);
7041 return req;
7044 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq)
7046 struct tevent_req *req = tevent_req_callback_data(
7047 subreq, struct tevent_req);
7048 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
7049 req, struct rpccli_PNP_GetNextLogConf_state);
7050 NTSTATUS status;
7051 TALLOC_CTX *mem_ctx;
7053 if (state->out_mem_ctx) {
7054 mem_ctx = state->out_mem_ctx;
7055 } else {
7056 mem_ctx = state;
7059 status = state->dispatch_recv(subreq, mem_ctx);
7060 TALLOC_FREE(subreq);
7061 if (!NT_STATUS_IS_OK(status)) {
7062 tevent_req_nterror(req, status);
7063 return;
7066 /* Copy out parameters */
7068 /* Copy result */
7069 state->orig.out.result = state->tmp.out.result;
7071 /* Reset temporary structure */
7072 ZERO_STRUCT(state->tmp);
7074 if (DEBUGLEVEL >= 10) {
7075 NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &state->orig);
7078 tevent_req_done(req);
7081 NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req,
7082 TALLOC_CTX *mem_ctx,
7083 WERROR *result)
7085 struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data(
7086 req, struct rpccli_PNP_GetNextLogConf_state);
7087 NTSTATUS status;
7089 if (tevent_req_is_nterror(req, &status)) {
7090 tevent_req_received(req);
7091 return status;
7094 /* Steal possbile out parameters to the callers context */
7095 talloc_steal(mem_ctx, state->out_mem_ctx);
7097 /* Return result */
7098 *result = state->orig.out.result;
7100 tevent_req_received(req);
7101 return NT_STATUS_OK;
7104 NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
7105 TALLOC_CTX *mem_ctx,
7106 WERROR *werror)
7108 struct PNP_GetNextLogConf r;
7109 NTSTATUS status;
7111 /* In parameters */
7113 if (DEBUGLEVEL >= 10) {
7114 NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &r);
7117 status = cli->dispatch(cli,
7118 mem_ctx,
7119 &ndr_table_ntsvcs,
7120 NDR_PNP_GETNEXTLOGCONF,
7121 &r);
7123 if (!NT_STATUS_IS_OK(status)) {
7124 return status;
7127 if (DEBUGLEVEL >= 10) {
7128 NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &r);
7131 if (NT_STATUS_IS_ERR(status)) {
7132 return status;
7135 /* Return variables */
7137 /* Return result */
7138 if (werror) {
7139 *werror = r.out.result;
7142 return werror_to_ntstatus(r.out.result);
7145 struct rpccli_PNP_GetLogConfPriority_state {
7146 struct PNP_GetLogConfPriority orig;
7147 struct PNP_GetLogConfPriority tmp;
7148 TALLOC_CTX *out_mem_ctx;
7149 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7152 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq);
7154 struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx,
7155 struct tevent_context *ev,
7156 struct rpc_pipe_client *cli)
7158 struct tevent_req *req;
7159 struct rpccli_PNP_GetLogConfPriority_state *state;
7160 struct tevent_req *subreq;
7162 req = tevent_req_create(mem_ctx, &state,
7163 struct rpccli_PNP_GetLogConfPriority_state);
7164 if (req == NULL) {
7165 return NULL;
7167 state->out_mem_ctx = NULL;
7168 state->dispatch_recv = cli->dispatch_recv;
7170 /* In parameters */
7172 /* Out parameters */
7174 /* Result */
7175 ZERO_STRUCT(state->orig.out.result);
7177 if (DEBUGLEVEL >= 10) {
7178 NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &state->orig);
7181 /* make a temporary copy, that we pass to the dispatch function */
7182 state->tmp = state->orig;
7184 subreq = cli->dispatch_send(state, ev, cli,
7185 &ndr_table_ntsvcs,
7186 NDR_PNP_GETLOGCONFPRIORITY,
7187 &state->tmp);
7188 if (tevent_req_nomem(subreq, req)) {
7189 return tevent_req_post(req, ev);
7191 tevent_req_set_callback(subreq, rpccli_PNP_GetLogConfPriority_done, req);
7192 return req;
7195 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq)
7197 struct tevent_req *req = tevent_req_callback_data(
7198 subreq, struct tevent_req);
7199 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
7200 req, struct rpccli_PNP_GetLogConfPriority_state);
7201 NTSTATUS status;
7202 TALLOC_CTX *mem_ctx;
7204 if (state->out_mem_ctx) {
7205 mem_ctx = state->out_mem_ctx;
7206 } else {
7207 mem_ctx = state;
7210 status = state->dispatch_recv(subreq, mem_ctx);
7211 TALLOC_FREE(subreq);
7212 if (!NT_STATUS_IS_OK(status)) {
7213 tevent_req_nterror(req, status);
7214 return;
7217 /* Copy out parameters */
7219 /* Copy result */
7220 state->orig.out.result = state->tmp.out.result;
7222 /* Reset temporary structure */
7223 ZERO_STRUCT(state->tmp);
7225 if (DEBUGLEVEL >= 10) {
7226 NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &state->orig);
7229 tevent_req_done(req);
7232 NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req,
7233 TALLOC_CTX *mem_ctx,
7234 WERROR *result)
7236 struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data(
7237 req, struct rpccli_PNP_GetLogConfPriority_state);
7238 NTSTATUS status;
7240 if (tevent_req_is_nterror(req, &status)) {
7241 tevent_req_received(req);
7242 return status;
7245 /* Steal possbile out parameters to the callers context */
7246 talloc_steal(mem_ctx, state->out_mem_ctx);
7248 /* Return result */
7249 *result = state->orig.out.result;
7251 tevent_req_received(req);
7252 return NT_STATUS_OK;
7255 NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
7256 TALLOC_CTX *mem_ctx,
7257 WERROR *werror)
7259 struct PNP_GetLogConfPriority r;
7260 NTSTATUS status;
7262 /* In parameters */
7264 if (DEBUGLEVEL >= 10) {
7265 NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &r);
7268 status = cli->dispatch(cli,
7269 mem_ctx,
7270 &ndr_table_ntsvcs,
7271 NDR_PNP_GETLOGCONFPRIORITY,
7272 &r);
7274 if (!NT_STATUS_IS_OK(status)) {
7275 return status;
7278 if (DEBUGLEVEL >= 10) {
7279 NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &r);
7282 if (NT_STATUS_IS_ERR(status)) {
7283 return status;
7286 /* Return variables */
7288 /* Return result */
7289 if (werror) {
7290 *werror = r.out.result;
7293 return werror_to_ntstatus(r.out.result);
7296 struct rpccli_PNP_AddResDes_state {
7297 struct PNP_AddResDes orig;
7298 struct PNP_AddResDes tmp;
7299 TALLOC_CTX *out_mem_ctx;
7300 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7303 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq);
7305 struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx,
7306 struct tevent_context *ev,
7307 struct rpc_pipe_client *cli)
7309 struct tevent_req *req;
7310 struct rpccli_PNP_AddResDes_state *state;
7311 struct tevent_req *subreq;
7313 req = tevent_req_create(mem_ctx, &state,
7314 struct rpccli_PNP_AddResDes_state);
7315 if (req == NULL) {
7316 return NULL;
7318 state->out_mem_ctx = NULL;
7319 state->dispatch_recv = cli->dispatch_recv;
7321 /* In parameters */
7323 /* Out parameters */
7325 /* Result */
7326 ZERO_STRUCT(state->orig.out.result);
7328 if (DEBUGLEVEL >= 10) {
7329 NDR_PRINT_IN_DEBUG(PNP_AddResDes, &state->orig);
7332 /* make a temporary copy, that we pass to the dispatch function */
7333 state->tmp = state->orig;
7335 subreq = cli->dispatch_send(state, ev, cli,
7336 &ndr_table_ntsvcs,
7337 NDR_PNP_ADDRESDES,
7338 &state->tmp);
7339 if (tevent_req_nomem(subreq, req)) {
7340 return tevent_req_post(req, ev);
7342 tevent_req_set_callback(subreq, rpccli_PNP_AddResDes_done, req);
7343 return req;
7346 static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq)
7348 struct tevent_req *req = tevent_req_callback_data(
7349 subreq, struct tevent_req);
7350 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
7351 req, struct rpccli_PNP_AddResDes_state);
7352 NTSTATUS status;
7353 TALLOC_CTX *mem_ctx;
7355 if (state->out_mem_ctx) {
7356 mem_ctx = state->out_mem_ctx;
7357 } else {
7358 mem_ctx = state;
7361 status = state->dispatch_recv(subreq, mem_ctx);
7362 TALLOC_FREE(subreq);
7363 if (!NT_STATUS_IS_OK(status)) {
7364 tevent_req_nterror(req, status);
7365 return;
7368 /* Copy out parameters */
7370 /* Copy result */
7371 state->orig.out.result = state->tmp.out.result;
7373 /* Reset temporary structure */
7374 ZERO_STRUCT(state->tmp);
7376 if (DEBUGLEVEL >= 10) {
7377 NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &state->orig);
7380 tevent_req_done(req);
7383 NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req,
7384 TALLOC_CTX *mem_ctx,
7385 WERROR *result)
7387 struct rpccli_PNP_AddResDes_state *state = tevent_req_data(
7388 req, struct rpccli_PNP_AddResDes_state);
7389 NTSTATUS status;
7391 if (tevent_req_is_nterror(req, &status)) {
7392 tevent_req_received(req);
7393 return status;
7396 /* Steal possbile out parameters to the callers context */
7397 talloc_steal(mem_ctx, state->out_mem_ctx);
7399 /* Return result */
7400 *result = state->orig.out.result;
7402 tevent_req_received(req);
7403 return NT_STATUS_OK;
7406 NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
7407 TALLOC_CTX *mem_ctx,
7408 WERROR *werror)
7410 struct PNP_AddResDes r;
7411 NTSTATUS status;
7413 /* In parameters */
7415 if (DEBUGLEVEL >= 10) {
7416 NDR_PRINT_IN_DEBUG(PNP_AddResDes, &r);
7419 status = cli->dispatch(cli,
7420 mem_ctx,
7421 &ndr_table_ntsvcs,
7422 NDR_PNP_ADDRESDES,
7423 &r);
7425 if (!NT_STATUS_IS_OK(status)) {
7426 return status;
7429 if (DEBUGLEVEL >= 10) {
7430 NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &r);
7433 if (NT_STATUS_IS_ERR(status)) {
7434 return status;
7437 /* Return variables */
7439 /* Return result */
7440 if (werror) {
7441 *werror = r.out.result;
7444 return werror_to_ntstatus(r.out.result);
7447 struct rpccli_PNP_FreeResDes_state {
7448 struct PNP_FreeResDes orig;
7449 struct PNP_FreeResDes tmp;
7450 TALLOC_CTX *out_mem_ctx;
7451 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7454 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq);
7456 struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx,
7457 struct tevent_context *ev,
7458 struct rpc_pipe_client *cli)
7460 struct tevent_req *req;
7461 struct rpccli_PNP_FreeResDes_state *state;
7462 struct tevent_req *subreq;
7464 req = tevent_req_create(mem_ctx, &state,
7465 struct rpccli_PNP_FreeResDes_state);
7466 if (req == NULL) {
7467 return NULL;
7469 state->out_mem_ctx = NULL;
7470 state->dispatch_recv = cli->dispatch_recv;
7472 /* In parameters */
7474 /* Out parameters */
7476 /* Result */
7477 ZERO_STRUCT(state->orig.out.result);
7479 if (DEBUGLEVEL >= 10) {
7480 NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &state->orig);
7483 /* make a temporary copy, that we pass to the dispatch function */
7484 state->tmp = state->orig;
7486 subreq = cli->dispatch_send(state, ev, cli,
7487 &ndr_table_ntsvcs,
7488 NDR_PNP_FREERESDES,
7489 &state->tmp);
7490 if (tevent_req_nomem(subreq, req)) {
7491 return tevent_req_post(req, ev);
7493 tevent_req_set_callback(subreq, rpccli_PNP_FreeResDes_done, req);
7494 return req;
7497 static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq)
7499 struct tevent_req *req = tevent_req_callback_data(
7500 subreq, struct tevent_req);
7501 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
7502 req, struct rpccli_PNP_FreeResDes_state);
7503 NTSTATUS status;
7504 TALLOC_CTX *mem_ctx;
7506 if (state->out_mem_ctx) {
7507 mem_ctx = state->out_mem_ctx;
7508 } else {
7509 mem_ctx = state;
7512 status = state->dispatch_recv(subreq, mem_ctx);
7513 TALLOC_FREE(subreq);
7514 if (!NT_STATUS_IS_OK(status)) {
7515 tevent_req_nterror(req, status);
7516 return;
7519 /* Copy out parameters */
7521 /* Copy result */
7522 state->orig.out.result = state->tmp.out.result;
7524 /* Reset temporary structure */
7525 ZERO_STRUCT(state->tmp);
7527 if (DEBUGLEVEL >= 10) {
7528 NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &state->orig);
7531 tevent_req_done(req);
7534 NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req,
7535 TALLOC_CTX *mem_ctx,
7536 WERROR *result)
7538 struct rpccli_PNP_FreeResDes_state *state = tevent_req_data(
7539 req, struct rpccli_PNP_FreeResDes_state);
7540 NTSTATUS status;
7542 if (tevent_req_is_nterror(req, &status)) {
7543 tevent_req_received(req);
7544 return status;
7547 /* Steal possbile out parameters to the callers context */
7548 talloc_steal(mem_ctx, state->out_mem_ctx);
7550 /* Return result */
7551 *result = state->orig.out.result;
7553 tevent_req_received(req);
7554 return NT_STATUS_OK;
7557 NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
7558 TALLOC_CTX *mem_ctx,
7559 WERROR *werror)
7561 struct PNP_FreeResDes r;
7562 NTSTATUS status;
7564 /* In parameters */
7566 if (DEBUGLEVEL >= 10) {
7567 NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &r);
7570 status = cli->dispatch(cli,
7571 mem_ctx,
7572 &ndr_table_ntsvcs,
7573 NDR_PNP_FREERESDES,
7574 &r);
7576 if (!NT_STATUS_IS_OK(status)) {
7577 return status;
7580 if (DEBUGLEVEL >= 10) {
7581 NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &r);
7584 if (NT_STATUS_IS_ERR(status)) {
7585 return status;
7588 /* Return variables */
7590 /* Return result */
7591 if (werror) {
7592 *werror = r.out.result;
7595 return werror_to_ntstatus(r.out.result);
7598 struct rpccli_PNP_GetNextResDes_state {
7599 struct PNP_GetNextResDes orig;
7600 struct PNP_GetNextResDes tmp;
7601 TALLOC_CTX *out_mem_ctx;
7602 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7605 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq);
7607 struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx,
7608 struct tevent_context *ev,
7609 struct rpc_pipe_client *cli)
7611 struct tevent_req *req;
7612 struct rpccli_PNP_GetNextResDes_state *state;
7613 struct tevent_req *subreq;
7615 req = tevent_req_create(mem_ctx, &state,
7616 struct rpccli_PNP_GetNextResDes_state);
7617 if (req == NULL) {
7618 return NULL;
7620 state->out_mem_ctx = NULL;
7621 state->dispatch_recv = cli->dispatch_recv;
7623 /* In parameters */
7625 /* Out parameters */
7627 /* Result */
7628 ZERO_STRUCT(state->orig.out.result);
7630 if (DEBUGLEVEL >= 10) {
7631 NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &state->orig);
7634 /* make a temporary copy, that we pass to the dispatch function */
7635 state->tmp = state->orig;
7637 subreq = cli->dispatch_send(state, ev, cli,
7638 &ndr_table_ntsvcs,
7639 NDR_PNP_GETNEXTRESDES,
7640 &state->tmp);
7641 if (tevent_req_nomem(subreq, req)) {
7642 return tevent_req_post(req, ev);
7644 tevent_req_set_callback(subreq, rpccli_PNP_GetNextResDes_done, req);
7645 return req;
7648 static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq)
7650 struct tevent_req *req = tevent_req_callback_data(
7651 subreq, struct tevent_req);
7652 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
7653 req, struct rpccli_PNP_GetNextResDes_state);
7654 NTSTATUS status;
7655 TALLOC_CTX *mem_ctx;
7657 if (state->out_mem_ctx) {
7658 mem_ctx = state->out_mem_ctx;
7659 } else {
7660 mem_ctx = state;
7663 status = state->dispatch_recv(subreq, mem_ctx);
7664 TALLOC_FREE(subreq);
7665 if (!NT_STATUS_IS_OK(status)) {
7666 tevent_req_nterror(req, status);
7667 return;
7670 /* Copy out parameters */
7672 /* Copy result */
7673 state->orig.out.result = state->tmp.out.result;
7675 /* Reset temporary structure */
7676 ZERO_STRUCT(state->tmp);
7678 if (DEBUGLEVEL >= 10) {
7679 NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &state->orig);
7682 tevent_req_done(req);
7685 NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req,
7686 TALLOC_CTX *mem_ctx,
7687 WERROR *result)
7689 struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data(
7690 req, struct rpccli_PNP_GetNextResDes_state);
7691 NTSTATUS status;
7693 if (tevent_req_is_nterror(req, &status)) {
7694 tevent_req_received(req);
7695 return status;
7698 /* Steal possbile out parameters to the callers context */
7699 talloc_steal(mem_ctx, state->out_mem_ctx);
7701 /* Return result */
7702 *result = state->orig.out.result;
7704 tevent_req_received(req);
7705 return NT_STATUS_OK;
7708 NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
7709 TALLOC_CTX *mem_ctx,
7710 WERROR *werror)
7712 struct PNP_GetNextResDes r;
7713 NTSTATUS status;
7715 /* In parameters */
7717 if (DEBUGLEVEL >= 10) {
7718 NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &r);
7721 status = cli->dispatch(cli,
7722 mem_ctx,
7723 &ndr_table_ntsvcs,
7724 NDR_PNP_GETNEXTRESDES,
7725 &r);
7727 if (!NT_STATUS_IS_OK(status)) {
7728 return status;
7731 if (DEBUGLEVEL >= 10) {
7732 NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &r);
7735 if (NT_STATUS_IS_ERR(status)) {
7736 return status;
7739 /* Return variables */
7741 /* Return result */
7742 if (werror) {
7743 *werror = r.out.result;
7746 return werror_to_ntstatus(r.out.result);
7749 struct rpccli_PNP_GetResDesData_state {
7750 struct PNP_GetResDesData orig;
7751 struct PNP_GetResDesData tmp;
7752 TALLOC_CTX *out_mem_ctx;
7753 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7756 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq);
7758 struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx,
7759 struct tevent_context *ev,
7760 struct rpc_pipe_client *cli)
7762 struct tevent_req *req;
7763 struct rpccli_PNP_GetResDesData_state *state;
7764 struct tevent_req *subreq;
7766 req = tevent_req_create(mem_ctx, &state,
7767 struct rpccli_PNP_GetResDesData_state);
7768 if (req == NULL) {
7769 return NULL;
7771 state->out_mem_ctx = NULL;
7772 state->dispatch_recv = cli->dispatch_recv;
7774 /* In parameters */
7776 /* Out parameters */
7778 /* Result */
7779 ZERO_STRUCT(state->orig.out.result);
7781 if (DEBUGLEVEL >= 10) {
7782 NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &state->orig);
7785 /* make a temporary copy, that we pass to the dispatch function */
7786 state->tmp = state->orig;
7788 subreq = cli->dispatch_send(state, ev, cli,
7789 &ndr_table_ntsvcs,
7790 NDR_PNP_GETRESDESDATA,
7791 &state->tmp);
7792 if (tevent_req_nomem(subreq, req)) {
7793 return tevent_req_post(req, ev);
7795 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesData_done, req);
7796 return req;
7799 static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq)
7801 struct tevent_req *req = tevent_req_callback_data(
7802 subreq, struct tevent_req);
7803 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7804 req, struct rpccli_PNP_GetResDesData_state);
7805 NTSTATUS status;
7806 TALLOC_CTX *mem_ctx;
7808 if (state->out_mem_ctx) {
7809 mem_ctx = state->out_mem_ctx;
7810 } else {
7811 mem_ctx = state;
7814 status = state->dispatch_recv(subreq, mem_ctx);
7815 TALLOC_FREE(subreq);
7816 if (!NT_STATUS_IS_OK(status)) {
7817 tevent_req_nterror(req, status);
7818 return;
7821 /* Copy out parameters */
7823 /* Copy result */
7824 state->orig.out.result = state->tmp.out.result;
7826 /* Reset temporary structure */
7827 ZERO_STRUCT(state->tmp);
7829 if (DEBUGLEVEL >= 10) {
7830 NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &state->orig);
7833 tevent_req_done(req);
7836 NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req,
7837 TALLOC_CTX *mem_ctx,
7838 WERROR *result)
7840 struct rpccli_PNP_GetResDesData_state *state = tevent_req_data(
7841 req, struct rpccli_PNP_GetResDesData_state);
7842 NTSTATUS status;
7844 if (tevent_req_is_nterror(req, &status)) {
7845 tevent_req_received(req);
7846 return status;
7849 /* Steal possbile out parameters to the callers context */
7850 talloc_steal(mem_ctx, state->out_mem_ctx);
7852 /* Return result */
7853 *result = state->orig.out.result;
7855 tevent_req_received(req);
7856 return NT_STATUS_OK;
7859 NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
7860 TALLOC_CTX *mem_ctx,
7861 WERROR *werror)
7863 struct PNP_GetResDesData r;
7864 NTSTATUS status;
7866 /* In parameters */
7868 if (DEBUGLEVEL >= 10) {
7869 NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &r);
7872 status = cli->dispatch(cli,
7873 mem_ctx,
7874 &ndr_table_ntsvcs,
7875 NDR_PNP_GETRESDESDATA,
7876 &r);
7878 if (!NT_STATUS_IS_OK(status)) {
7879 return status;
7882 if (DEBUGLEVEL >= 10) {
7883 NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &r);
7886 if (NT_STATUS_IS_ERR(status)) {
7887 return status;
7890 /* Return variables */
7892 /* Return result */
7893 if (werror) {
7894 *werror = r.out.result;
7897 return werror_to_ntstatus(r.out.result);
7900 struct rpccli_PNP_GetResDesDataSize_state {
7901 struct PNP_GetResDesDataSize orig;
7902 struct PNP_GetResDesDataSize tmp;
7903 TALLOC_CTX *out_mem_ctx;
7904 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7907 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq);
7909 struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx,
7910 struct tevent_context *ev,
7911 struct rpc_pipe_client *cli)
7913 struct tevent_req *req;
7914 struct rpccli_PNP_GetResDesDataSize_state *state;
7915 struct tevent_req *subreq;
7917 req = tevent_req_create(mem_ctx, &state,
7918 struct rpccli_PNP_GetResDesDataSize_state);
7919 if (req == NULL) {
7920 return NULL;
7922 state->out_mem_ctx = NULL;
7923 state->dispatch_recv = cli->dispatch_recv;
7925 /* In parameters */
7927 /* Out parameters */
7929 /* Result */
7930 ZERO_STRUCT(state->orig.out.result);
7932 if (DEBUGLEVEL >= 10) {
7933 NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &state->orig);
7936 /* make a temporary copy, that we pass to the dispatch function */
7937 state->tmp = state->orig;
7939 subreq = cli->dispatch_send(state, ev, cli,
7940 &ndr_table_ntsvcs,
7941 NDR_PNP_GETRESDESDATASIZE,
7942 &state->tmp);
7943 if (tevent_req_nomem(subreq, req)) {
7944 return tevent_req_post(req, ev);
7946 tevent_req_set_callback(subreq, rpccli_PNP_GetResDesDataSize_done, req);
7947 return req;
7950 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq)
7952 struct tevent_req *req = tevent_req_callback_data(
7953 subreq, struct tevent_req);
7954 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7955 req, struct rpccli_PNP_GetResDesDataSize_state);
7956 NTSTATUS status;
7957 TALLOC_CTX *mem_ctx;
7959 if (state->out_mem_ctx) {
7960 mem_ctx = state->out_mem_ctx;
7961 } else {
7962 mem_ctx = state;
7965 status = state->dispatch_recv(subreq, mem_ctx);
7966 TALLOC_FREE(subreq);
7967 if (!NT_STATUS_IS_OK(status)) {
7968 tevent_req_nterror(req, status);
7969 return;
7972 /* Copy out parameters */
7974 /* Copy result */
7975 state->orig.out.result = state->tmp.out.result;
7977 /* Reset temporary structure */
7978 ZERO_STRUCT(state->tmp);
7980 if (DEBUGLEVEL >= 10) {
7981 NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &state->orig);
7984 tevent_req_done(req);
7987 NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req,
7988 TALLOC_CTX *mem_ctx,
7989 WERROR *result)
7991 struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data(
7992 req, struct rpccli_PNP_GetResDesDataSize_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_GetResDesDataSize(struct rpc_pipe_client *cli,
8011 TALLOC_CTX *mem_ctx,
8012 WERROR *werror)
8014 struct PNP_GetResDesDataSize r;
8015 NTSTATUS status;
8017 /* In parameters */
8019 if (DEBUGLEVEL >= 10) {
8020 NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &r);
8023 status = cli->dispatch(cli,
8024 mem_ctx,
8025 &ndr_table_ntsvcs,
8026 NDR_PNP_GETRESDESDATASIZE,
8027 &r);
8029 if (!NT_STATUS_IS_OK(status)) {
8030 return status;
8033 if (DEBUGLEVEL >= 10) {
8034 NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &r);
8037 if (NT_STATUS_IS_ERR(status)) {
8038 return status;
8041 /* Return variables */
8043 /* Return result */
8044 if (werror) {
8045 *werror = r.out.result;
8048 return werror_to_ntstatus(r.out.result);
8051 struct rpccli_PNP_ModifyResDes_state {
8052 struct PNP_ModifyResDes orig;
8053 struct PNP_ModifyResDes tmp;
8054 TALLOC_CTX *out_mem_ctx;
8055 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8058 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq);
8060 struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx,
8061 struct tevent_context *ev,
8062 struct rpc_pipe_client *cli)
8064 struct tevent_req *req;
8065 struct rpccli_PNP_ModifyResDes_state *state;
8066 struct tevent_req *subreq;
8068 req = tevent_req_create(mem_ctx, &state,
8069 struct rpccli_PNP_ModifyResDes_state);
8070 if (req == NULL) {
8071 return NULL;
8073 state->out_mem_ctx = NULL;
8074 state->dispatch_recv = cli->dispatch_recv;
8076 /* In parameters */
8078 /* Out parameters */
8080 /* Result */
8081 ZERO_STRUCT(state->orig.out.result);
8083 if (DEBUGLEVEL >= 10) {
8084 NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &state->orig);
8087 /* make a temporary copy, that we pass to the dispatch function */
8088 state->tmp = state->orig;
8090 subreq = cli->dispatch_send(state, ev, cli,
8091 &ndr_table_ntsvcs,
8092 NDR_PNP_MODIFYRESDES,
8093 &state->tmp);
8094 if (tevent_req_nomem(subreq, req)) {
8095 return tevent_req_post(req, ev);
8097 tevent_req_set_callback(subreq, rpccli_PNP_ModifyResDes_done, req);
8098 return req;
8101 static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq)
8103 struct tevent_req *req = tevent_req_callback_data(
8104 subreq, struct tevent_req);
8105 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
8106 req, struct rpccli_PNP_ModifyResDes_state);
8107 NTSTATUS status;
8108 TALLOC_CTX *mem_ctx;
8110 if (state->out_mem_ctx) {
8111 mem_ctx = state->out_mem_ctx;
8112 } else {
8113 mem_ctx = state;
8116 status = state->dispatch_recv(subreq, mem_ctx);
8117 TALLOC_FREE(subreq);
8118 if (!NT_STATUS_IS_OK(status)) {
8119 tevent_req_nterror(req, status);
8120 return;
8123 /* Copy out parameters */
8125 /* Copy result */
8126 state->orig.out.result = state->tmp.out.result;
8128 /* Reset temporary structure */
8129 ZERO_STRUCT(state->tmp);
8131 if (DEBUGLEVEL >= 10) {
8132 NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &state->orig);
8135 tevent_req_done(req);
8138 NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req,
8139 TALLOC_CTX *mem_ctx,
8140 WERROR *result)
8142 struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data(
8143 req, struct rpccli_PNP_ModifyResDes_state);
8144 NTSTATUS status;
8146 if (tevent_req_is_nterror(req, &status)) {
8147 tevent_req_received(req);
8148 return status;
8151 /* Steal possbile out parameters to the callers context */
8152 talloc_steal(mem_ctx, state->out_mem_ctx);
8154 /* Return result */
8155 *result = state->orig.out.result;
8157 tevent_req_received(req);
8158 return NT_STATUS_OK;
8161 NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
8162 TALLOC_CTX *mem_ctx,
8163 WERROR *werror)
8165 struct PNP_ModifyResDes r;
8166 NTSTATUS status;
8168 /* In parameters */
8170 if (DEBUGLEVEL >= 10) {
8171 NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &r);
8174 status = cli->dispatch(cli,
8175 mem_ctx,
8176 &ndr_table_ntsvcs,
8177 NDR_PNP_MODIFYRESDES,
8178 &r);
8180 if (!NT_STATUS_IS_OK(status)) {
8181 return status;
8184 if (DEBUGLEVEL >= 10) {
8185 NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &r);
8188 if (NT_STATUS_IS_ERR(status)) {
8189 return status;
8192 /* Return variables */
8194 /* Return result */
8195 if (werror) {
8196 *werror = r.out.result;
8199 return werror_to_ntstatus(r.out.result);
8202 struct rpccli_PNP_DetectResourceLimit_state {
8203 struct PNP_DetectResourceLimit orig;
8204 struct PNP_DetectResourceLimit tmp;
8205 TALLOC_CTX *out_mem_ctx;
8206 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8209 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq);
8211 struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx,
8212 struct tevent_context *ev,
8213 struct rpc_pipe_client *cli)
8215 struct tevent_req *req;
8216 struct rpccli_PNP_DetectResourceLimit_state *state;
8217 struct tevent_req *subreq;
8219 req = tevent_req_create(mem_ctx, &state,
8220 struct rpccli_PNP_DetectResourceLimit_state);
8221 if (req == NULL) {
8222 return NULL;
8224 state->out_mem_ctx = NULL;
8225 state->dispatch_recv = cli->dispatch_recv;
8227 /* In parameters */
8229 /* Out parameters */
8231 /* Result */
8232 ZERO_STRUCT(state->orig.out.result);
8234 if (DEBUGLEVEL >= 10) {
8235 NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &state->orig);
8238 /* make a temporary copy, that we pass to the dispatch function */
8239 state->tmp = state->orig;
8241 subreq = cli->dispatch_send(state, ev, cli,
8242 &ndr_table_ntsvcs,
8243 NDR_PNP_DETECTRESOURCELIMIT,
8244 &state->tmp);
8245 if (tevent_req_nomem(subreq, req)) {
8246 return tevent_req_post(req, ev);
8248 tevent_req_set_callback(subreq, rpccli_PNP_DetectResourceLimit_done, req);
8249 return req;
8252 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq)
8254 struct tevent_req *req = tevent_req_callback_data(
8255 subreq, struct tevent_req);
8256 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
8257 req, struct rpccli_PNP_DetectResourceLimit_state);
8258 NTSTATUS status;
8259 TALLOC_CTX *mem_ctx;
8261 if (state->out_mem_ctx) {
8262 mem_ctx = state->out_mem_ctx;
8263 } else {
8264 mem_ctx = state;
8267 status = state->dispatch_recv(subreq, mem_ctx);
8268 TALLOC_FREE(subreq);
8269 if (!NT_STATUS_IS_OK(status)) {
8270 tevent_req_nterror(req, status);
8271 return;
8274 /* Copy out parameters */
8276 /* Copy result */
8277 state->orig.out.result = state->tmp.out.result;
8279 /* Reset temporary structure */
8280 ZERO_STRUCT(state->tmp);
8282 if (DEBUGLEVEL >= 10) {
8283 NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &state->orig);
8286 tevent_req_done(req);
8289 NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req,
8290 TALLOC_CTX *mem_ctx,
8291 WERROR *result)
8293 struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data(
8294 req, struct rpccli_PNP_DetectResourceLimit_state);
8295 NTSTATUS status;
8297 if (tevent_req_is_nterror(req, &status)) {
8298 tevent_req_received(req);
8299 return status;
8302 /* Steal possbile out parameters to the callers context */
8303 talloc_steal(mem_ctx, state->out_mem_ctx);
8305 /* Return result */
8306 *result = state->orig.out.result;
8308 tevent_req_received(req);
8309 return NT_STATUS_OK;
8312 NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
8313 TALLOC_CTX *mem_ctx,
8314 WERROR *werror)
8316 struct PNP_DetectResourceLimit r;
8317 NTSTATUS status;
8319 /* In parameters */
8321 if (DEBUGLEVEL >= 10) {
8322 NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &r);
8325 status = cli->dispatch(cli,
8326 mem_ctx,
8327 &ndr_table_ntsvcs,
8328 NDR_PNP_DETECTRESOURCELIMIT,
8329 &r);
8331 if (!NT_STATUS_IS_OK(status)) {
8332 return status;
8335 if (DEBUGLEVEL >= 10) {
8336 NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &r);
8339 if (NT_STATUS_IS_ERR(status)) {
8340 return status;
8343 /* Return variables */
8345 /* Return result */
8346 if (werror) {
8347 *werror = r.out.result;
8350 return werror_to_ntstatus(r.out.result);
8353 struct rpccli_PNP_QueryResConfList_state {
8354 struct PNP_QueryResConfList orig;
8355 struct PNP_QueryResConfList tmp;
8356 TALLOC_CTX *out_mem_ctx;
8357 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8360 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq);
8362 struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx,
8363 struct tevent_context *ev,
8364 struct rpc_pipe_client *cli)
8366 struct tevent_req *req;
8367 struct rpccli_PNP_QueryResConfList_state *state;
8368 struct tevent_req *subreq;
8370 req = tevent_req_create(mem_ctx, &state,
8371 struct rpccli_PNP_QueryResConfList_state);
8372 if (req == NULL) {
8373 return NULL;
8375 state->out_mem_ctx = NULL;
8376 state->dispatch_recv = cli->dispatch_recv;
8378 /* In parameters */
8380 /* Out parameters */
8382 /* Result */
8383 ZERO_STRUCT(state->orig.out.result);
8385 if (DEBUGLEVEL >= 10) {
8386 NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &state->orig);
8389 /* make a temporary copy, that we pass to the dispatch function */
8390 state->tmp = state->orig;
8392 subreq = cli->dispatch_send(state, ev, cli,
8393 &ndr_table_ntsvcs,
8394 NDR_PNP_QUERYRESCONFLIST,
8395 &state->tmp);
8396 if (tevent_req_nomem(subreq, req)) {
8397 return tevent_req_post(req, ev);
8399 tevent_req_set_callback(subreq, rpccli_PNP_QueryResConfList_done, req);
8400 return req;
8403 static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq)
8405 struct tevent_req *req = tevent_req_callback_data(
8406 subreq, struct tevent_req);
8407 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
8408 req, struct rpccli_PNP_QueryResConfList_state);
8409 NTSTATUS status;
8410 TALLOC_CTX *mem_ctx;
8412 if (state->out_mem_ctx) {
8413 mem_ctx = state->out_mem_ctx;
8414 } else {
8415 mem_ctx = state;
8418 status = state->dispatch_recv(subreq, mem_ctx);
8419 TALLOC_FREE(subreq);
8420 if (!NT_STATUS_IS_OK(status)) {
8421 tevent_req_nterror(req, status);
8422 return;
8425 /* Copy out parameters */
8427 /* Copy result */
8428 state->orig.out.result = state->tmp.out.result;
8430 /* Reset temporary structure */
8431 ZERO_STRUCT(state->tmp);
8433 if (DEBUGLEVEL >= 10) {
8434 NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &state->orig);
8437 tevent_req_done(req);
8440 NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req,
8441 TALLOC_CTX *mem_ctx,
8442 WERROR *result)
8444 struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data(
8445 req, struct rpccli_PNP_QueryResConfList_state);
8446 NTSTATUS status;
8448 if (tevent_req_is_nterror(req, &status)) {
8449 tevent_req_received(req);
8450 return status;
8453 /* Steal possbile out parameters to the callers context */
8454 talloc_steal(mem_ctx, state->out_mem_ctx);
8456 /* Return result */
8457 *result = state->orig.out.result;
8459 tevent_req_received(req);
8460 return NT_STATUS_OK;
8463 NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
8464 TALLOC_CTX *mem_ctx,
8465 WERROR *werror)
8467 struct PNP_QueryResConfList r;
8468 NTSTATUS status;
8470 /* In parameters */
8472 if (DEBUGLEVEL >= 10) {
8473 NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &r);
8476 status = cli->dispatch(cli,
8477 mem_ctx,
8478 &ndr_table_ntsvcs,
8479 NDR_PNP_QUERYRESCONFLIST,
8480 &r);
8482 if (!NT_STATUS_IS_OK(status)) {
8483 return status;
8486 if (DEBUGLEVEL >= 10) {
8487 NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &r);
8490 if (NT_STATUS_IS_ERR(status)) {
8491 return status;
8494 /* Return variables */
8496 /* Return result */
8497 if (werror) {
8498 *werror = r.out.result;
8501 return werror_to_ntstatus(r.out.result);
8504 struct rpccli_PNP_SetHwProf_state {
8505 struct PNP_SetHwProf orig;
8506 struct PNP_SetHwProf tmp;
8507 TALLOC_CTX *out_mem_ctx;
8508 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8511 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq);
8513 struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx,
8514 struct tevent_context *ev,
8515 struct rpc_pipe_client *cli)
8517 struct tevent_req *req;
8518 struct rpccli_PNP_SetHwProf_state *state;
8519 struct tevent_req *subreq;
8521 req = tevent_req_create(mem_ctx, &state,
8522 struct rpccli_PNP_SetHwProf_state);
8523 if (req == NULL) {
8524 return NULL;
8526 state->out_mem_ctx = NULL;
8527 state->dispatch_recv = cli->dispatch_recv;
8529 /* In parameters */
8531 /* Out parameters */
8533 /* Result */
8534 ZERO_STRUCT(state->orig.out.result);
8536 if (DEBUGLEVEL >= 10) {
8537 NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &state->orig);
8540 /* make a temporary copy, that we pass to the dispatch function */
8541 state->tmp = state->orig;
8543 subreq = cli->dispatch_send(state, ev, cli,
8544 &ndr_table_ntsvcs,
8545 NDR_PNP_SETHWPROF,
8546 &state->tmp);
8547 if (tevent_req_nomem(subreq, req)) {
8548 return tevent_req_post(req, ev);
8550 tevent_req_set_callback(subreq, rpccli_PNP_SetHwProf_done, req);
8551 return req;
8554 static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq)
8556 struct tevent_req *req = tevent_req_callback_data(
8557 subreq, struct tevent_req);
8558 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
8559 req, struct rpccli_PNP_SetHwProf_state);
8560 NTSTATUS status;
8561 TALLOC_CTX *mem_ctx;
8563 if (state->out_mem_ctx) {
8564 mem_ctx = state->out_mem_ctx;
8565 } else {
8566 mem_ctx = state;
8569 status = state->dispatch_recv(subreq, mem_ctx);
8570 TALLOC_FREE(subreq);
8571 if (!NT_STATUS_IS_OK(status)) {
8572 tevent_req_nterror(req, status);
8573 return;
8576 /* Copy out parameters */
8578 /* Copy result */
8579 state->orig.out.result = state->tmp.out.result;
8581 /* Reset temporary structure */
8582 ZERO_STRUCT(state->tmp);
8584 if (DEBUGLEVEL >= 10) {
8585 NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &state->orig);
8588 tevent_req_done(req);
8591 NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req,
8592 TALLOC_CTX *mem_ctx,
8593 WERROR *result)
8595 struct rpccli_PNP_SetHwProf_state *state = tevent_req_data(
8596 req, struct rpccli_PNP_SetHwProf_state);
8597 NTSTATUS status;
8599 if (tevent_req_is_nterror(req, &status)) {
8600 tevent_req_received(req);
8601 return status;
8604 /* Steal possbile out parameters to the callers context */
8605 talloc_steal(mem_ctx, state->out_mem_ctx);
8607 /* Return result */
8608 *result = state->orig.out.result;
8610 tevent_req_received(req);
8611 return NT_STATUS_OK;
8614 NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
8615 TALLOC_CTX *mem_ctx,
8616 WERROR *werror)
8618 struct PNP_SetHwProf r;
8619 NTSTATUS status;
8621 /* In parameters */
8623 if (DEBUGLEVEL >= 10) {
8624 NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &r);
8627 status = cli->dispatch(cli,
8628 mem_ctx,
8629 &ndr_table_ntsvcs,
8630 NDR_PNP_SETHWPROF,
8631 &r);
8633 if (!NT_STATUS_IS_OK(status)) {
8634 return status;
8637 if (DEBUGLEVEL >= 10) {
8638 NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &r);
8641 if (NT_STATUS_IS_ERR(status)) {
8642 return status;
8645 /* Return variables */
8647 /* Return result */
8648 if (werror) {
8649 *werror = r.out.result;
8652 return werror_to_ntstatus(r.out.result);
8655 struct rpccli_PNP_QueryArbitratorFreeData_state {
8656 struct PNP_QueryArbitratorFreeData orig;
8657 struct PNP_QueryArbitratorFreeData tmp;
8658 TALLOC_CTX *out_mem_ctx;
8659 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8662 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq);
8664 struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx,
8665 struct tevent_context *ev,
8666 struct rpc_pipe_client *cli)
8668 struct tevent_req *req;
8669 struct rpccli_PNP_QueryArbitratorFreeData_state *state;
8670 struct tevent_req *subreq;
8672 req = tevent_req_create(mem_ctx, &state,
8673 struct rpccli_PNP_QueryArbitratorFreeData_state);
8674 if (req == NULL) {
8675 return NULL;
8677 state->out_mem_ctx = NULL;
8678 state->dispatch_recv = cli->dispatch_recv;
8680 /* In parameters */
8682 /* Out parameters */
8684 /* Result */
8685 ZERO_STRUCT(state->orig.out.result);
8687 if (DEBUGLEVEL >= 10) {
8688 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &state->orig);
8691 /* make a temporary copy, that we pass to the dispatch function */
8692 state->tmp = state->orig;
8694 subreq = cli->dispatch_send(state, ev, cli,
8695 &ndr_table_ntsvcs,
8696 NDR_PNP_QUERYARBITRATORFREEDATA,
8697 &state->tmp);
8698 if (tevent_req_nomem(subreq, req)) {
8699 return tevent_req_post(req, ev);
8701 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeData_done, req);
8702 return req;
8705 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq)
8707 struct tevent_req *req = tevent_req_callback_data(
8708 subreq, struct tevent_req);
8709 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
8710 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
8711 NTSTATUS status;
8712 TALLOC_CTX *mem_ctx;
8714 if (state->out_mem_ctx) {
8715 mem_ctx = state->out_mem_ctx;
8716 } else {
8717 mem_ctx = state;
8720 status = state->dispatch_recv(subreq, mem_ctx);
8721 TALLOC_FREE(subreq);
8722 if (!NT_STATUS_IS_OK(status)) {
8723 tevent_req_nterror(req, status);
8724 return;
8727 /* Copy out parameters */
8729 /* Copy result */
8730 state->orig.out.result = state->tmp.out.result;
8732 /* Reset temporary structure */
8733 ZERO_STRUCT(state->tmp);
8735 if (DEBUGLEVEL >= 10) {
8736 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &state->orig);
8739 tevent_req_done(req);
8742 NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req,
8743 TALLOC_CTX *mem_ctx,
8744 WERROR *result)
8746 struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data(
8747 req, struct rpccli_PNP_QueryArbitratorFreeData_state);
8748 NTSTATUS status;
8750 if (tevent_req_is_nterror(req, &status)) {
8751 tevent_req_received(req);
8752 return status;
8755 /* Steal possbile out parameters to the callers context */
8756 talloc_steal(mem_ctx, state->out_mem_ctx);
8758 /* Return result */
8759 *result = state->orig.out.result;
8761 tevent_req_received(req);
8762 return NT_STATUS_OK;
8765 NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
8766 TALLOC_CTX *mem_ctx,
8767 WERROR *werror)
8769 struct PNP_QueryArbitratorFreeData r;
8770 NTSTATUS status;
8772 /* In parameters */
8774 if (DEBUGLEVEL >= 10) {
8775 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &r);
8778 status = cli->dispatch(cli,
8779 mem_ctx,
8780 &ndr_table_ntsvcs,
8781 NDR_PNP_QUERYARBITRATORFREEDATA,
8782 &r);
8784 if (!NT_STATUS_IS_OK(status)) {
8785 return status;
8788 if (DEBUGLEVEL >= 10) {
8789 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &r);
8792 if (NT_STATUS_IS_ERR(status)) {
8793 return status;
8796 /* Return variables */
8798 /* Return result */
8799 if (werror) {
8800 *werror = r.out.result;
8803 return werror_to_ntstatus(r.out.result);
8806 struct rpccli_PNP_QueryArbitratorFreeSize_state {
8807 struct PNP_QueryArbitratorFreeSize orig;
8808 struct PNP_QueryArbitratorFreeSize tmp;
8809 TALLOC_CTX *out_mem_ctx;
8810 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8813 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq);
8815 struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx,
8816 struct tevent_context *ev,
8817 struct rpc_pipe_client *cli)
8819 struct tevent_req *req;
8820 struct rpccli_PNP_QueryArbitratorFreeSize_state *state;
8821 struct tevent_req *subreq;
8823 req = tevent_req_create(mem_ctx, &state,
8824 struct rpccli_PNP_QueryArbitratorFreeSize_state);
8825 if (req == NULL) {
8826 return NULL;
8828 state->out_mem_ctx = NULL;
8829 state->dispatch_recv = cli->dispatch_recv;
8831 /* In parameters */
8833 /* Out parameters */
8835 /* Result */
8836 ZERO_STRUCT(state->orig.out.result);
8838 if (DEBUGLEVEL >= 10) {
8839 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &state->orig);
8842 /* make a temporary copy, that we pass to the dispatch function */
8843 state->tmp = state->orig;
8845 subreq = cli->dispatch_send(state, ev, cli,
8846 &ndr_table_ntsvcs,
8847 NDR_PNP_QUERYARBITRATORFREESIZE,
8848 &state->tmp);
8849 if (tevent_req_nomem(subreq, req)) {
8850 return tevent_req_post(req, ev);
8852 tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeSize_done, req);
8853 return req;
8856 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq)
8858 struct tevent_req *req = tevent_req_callback_data(
8859 subreq, struct tevent_req);
8860 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
8861 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
8862 NTSTATUS status;
8863 TALLOC_CTX *mem_ctx;
8865 if (state->out_mem_ctx) {
8866 mem_ctx = state->out_mem_ctx;
8867 } else {
8868 mem_ctx = state;
8871 status = state->dispatch_recv(subreq, mem_ctx);
8872 TALLOC_FREE(subreq);
8873 if (!NT_STATUS_IS_OK(status)) {
8874 tevent_req_nterror(req, status);
8875 return;
8878 /* Copy out parameters */
8880 /* Copy result */
8881 state->orig.out.result = state->tmp.out.result;
8883 /* Reset temporary structure */
8884 ZERO_STRUCT(state->tmp);
8886 if (DEBUGLEVEL >= 10) {
8887 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &state->orig);
8890 tevent_req_done(req);
8893 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req,
8894 TALLOC_CTX *mem_ctx,
8895 WERROR *result)
8897 struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data(
8898 req, struct rpccli_PNP_QueryArbitratorFreeSize_state);
8899 NTSTATUS status;
8901 if (tevent_req_is_nterror(req, &status)) {
8902 tevent_req_received(req);
8903 return status;
8906 /* Steal possbile out parameters to the callers context */
8907 talloc_steal(mem_ctx, state->out_mem_ctx);
8909 /* Return result */
8910 *result = state->orig.out.result;
8912 tevent_req_received(req);
8913 return NT_STATUS_OK;
8916 NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
8917 TALLOC_CTX *mem_ctx,
8918 WERROR *werror)
8920 struct PNP_QueryArbitratorFreeSize r;
8921 NTSTATUS status;
8923 /* In parameters */
8925 if (DEBUGLEVEL >= 10) {
8926 NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &r);
8929 status = cli->dispatch(cli,
8930 mem_ctx,
8931 &ndr_table_ntsvcs,
8932 NDR_PNP_QUERYARBITRATORFREESIZE,
8933 &r);
8935 if (!NT_STATUS_IS_OK(status)) {
8936 return status;
8939 if (DEBUGLEVEL >= 10) {
8940 NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &r);
8943 if (NT_STATUS_IS_ERR(status)) {
8944 return status;
8947 /* Return variables */
8949 /* Return result */
8950 if (werror) {
8951 *werror = r.out.result;
8954 return werror_to_ntstatus(r.out.result);
8957 struct rpccli_PNP_RunDetection_state {
8958 struct PNP_RunDetection orig;
8959 struct PNP_RunDetection tmp;
8960 TALLOC_CTX *out_mem_ctx;
8961 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8964 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq);
8966 struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx,
8967 struct tevent_context *ev,
8968 struct rpc_pipe_client *cli)
8970 struct tevent_req *req;
8971 struct rpccli_PNP_RunDetection_state *state;
8972 struct tevent_req *subreq;
8974 req = tevent_req_create(mem_ctx, &state,
8975 struct rpccli_PNP_RunDetection_state);
8976 if (req == NULL) {
8977 return NULL;
8979 state->out_mem_ctx = NULL;
8980 state->dispatch_recv = cli->dispatch_recv;
8982 /* In parameters */
8984 /* Out parameters */
8986 /* Result */
8987 ZERO_STRUCT(state->orig.out.result);
8989 if (DEBUGLEVEL >= 10) {
8990 NDR_PRINT_IN_DEBUG(PNP_RunDetection, &state->orig);
8993 /* make a temporary copy, that we pass to the dispatch function */
8994 state->tmp = state->orig;
8996 subreq = cli->dispatch_send(state, ev, cli,
8997 &ndr_table_ntsvcs,
8998 NDR_PNP_RUNDETECTION,
8999 &state->tmp);
9000 if (tevent_req_nomem(subreq, req)) {
9001 return tevent_req_post(req, ev);
9003 tevent_req_set_callback(subreq, rpccli_PNP_RunDetection_done, req);
9004 return req;
9007 static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq)
9009 struct tevent_req *req = tevent_req_callback_data(
9010 subreq, struct tevent_req);
9011 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
9012 req, struct rpccli_PNP_RunDetection_state);
9013 NTSTATUS status;
9014 TALLOC_CTX *mem_ctx;
9016 if (state->out_mem_ctx) {
9017 mem_ctx = state->out_mem_ctx;
9018 } else {
9019 mem_ctx = state;
9022 status = state->dispatch_recv(subreq, mem_ctx);
9023 TALLOC_FREE(subreq);
9024 if (!NT_STATUS_IS_OK(status)) {
9025 tevent_req_nterror(req, status);
9026 return;
9029 /* Copy out parameters */
9031 /* Copy result */
9032 state->orig.out.result = state->tmp.out.result;
9034 /* Reset temporary structure */
9035 ZERO_STRUCT(state->tmp);
9037 if (DEBUGLEVEL >= 10) {
9038 NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &state->orig);
9041 tevent_req_done(req);
9044 NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req,
9045 TALLOC_CTX *mem_ctx,
9046 WERROR *result)
9048 struct rpccli_PNP_RunDetection_state *state = tevent_req_data(
9049 req, struct rpccli_PNP_RunDetection_state);
9050 NTSTATUS status;
9052 if (tevent_req_is_nterror(req, &status)) {
9053 tevent_req_received(req);
9054 return status;
9057 /* Steal possbile out parameters to the callers context */
9058 talloc_steal(mem_ctx, state->out_mem_ctx);
9060 /* Return result */
9061 *result = state->orig.out.result;
9063 tevent_req_received(req);
9064 return NT_STATUS_OK;
9067 NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
9068 TALLOC_CTX *mem_ctx,
9069 WERROR *werror)
9071 struct PNP_RunDetection r;
9072 NTSTATUS status;
9074 /* In parameters */
9076 if (DEBUGLEVEL >= 10) {
9077 NDR_PRINT_IN_DEBUG(PNP_RunDetection, &r);
9080 status = cli->dispatch(cli,
9081 mem_ctx,
9082 &ndr_table_ntsvcs,
9083 NDR_PNP_RUNDETECTION,
9084 &r);
9086 if (!NT_STATUS_IS_OK(status)) {
9087 return status;
9090 if (DEBUGLEVEL >= 10) {
9091 NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &r);
9094 if (NT_STATUS_IS_ERR(status)) {
9095 return status;
9098 /* Return variables */
9100 /* Return result */
9101 if (werror) {
9102 *werror = r.out.result;
9105 return werror_to_ntstatus(r.out.result);
9108 struct rpccli_PNP_RegisterNotification_state {
9109 struct PNP_RegisterNotification orig;
9110 struct PNP_RegisterNotification tmp;
9111 TALLOC_CTX *out_mem_ctx;
9112 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9115 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq);
9117 struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx,
9118 struct tevent_context *ev,
9119 struct rpc_pipe_client *cli)
9121 struct tevent_req *req;
9122 struct rpccli_PNP_RegisterNotification_state *state;
9123 struct tevent_req *subreq;
9125 req = tevent_req_create(mem_ctx, &state,
9126 struct rpccli_PNP_RegisterNotification_state);
9127 if (req == NULL) {
9128 return NULL;
9130 state->out_mem_ctx = NULL;
9131 state->dispatch_recv = cli->dispatch_recv;
9133 /* In parameters */
9135 /* Out parameters */
9137 /* Result */
9138 ZERO_STRUCT(state->orig.out.result);
9140 if (DEBUGLEVEL >= 10) {
9141 NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &state->orig);
9144 /* make a temporary copy, that we pass to the dispatch function */
9145 state->tmp = state->orig;
9147 subreq = cli->dispatch_send(state, ev, cli,
9148 &ndr_table_ntsvcs,
9149 NDR_PNP_REGISTERNOTIFICATION,
9150 &state->tmp);
9151 if (tevent_req_nomem(subreq, req)) {
9152 return tevent_req_post(req, ev);
9154 tevent_req_set_callback(subreq, rpccli_PNP_RegisterNotification_done, req);
9155 return req;
9158 static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq)
9160 struct tevent_req *req = tevent_req_callback_data(
9161 subreq, struct tevent_req);
9162 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
9163 req, struct rpccli_PNP_RegisterNotification_state);
9164 NTSTATUS status;
9165 TALLOC_CTX *mem_ctx;
9167 if (state->out_mem_ctx) {
9168 mem_ctx = state->out_mem_ctx;
9169 } else {
9170 mem_ctx = state;
9173 status = state->dispatch_recv(subreq, mem_ctx);
9174 TALLOC_FREE(subreq);
9175 if (!NT_STATUS_IS_OK(status)) {
9176 tevent_req_nterror(req, status);
9177 return;
9180 /* Copy out parameters */
9182 /* Copy result */
9183 state->orig.out.result = state->tmp.out.result;
9185 /* Reset temporary structure */
9186 ZERO_STRUCT(state->tmp);
9188 if (DEBUGLEVEL >= 10) {
9189 NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &state->orig);
9192 tevent_req_done(req);
9195 NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req,
9196 TALLOC_CTX *mem_ctx,
9197 WERROR *result)
9199 struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data(
9200 req, struct rpccli_PNP_RegisterNotification_state);
9201 NTSTATUS status;
9203 if (tevent_req_is_nterror(req, &status)) {
9204 tevent_req_received(req);
9205 return status;
9208 /* Steal possbile out parameters to the callers context */
9209 talloc_steal(mem_ctx, state->out_mem_ctx);
9211 /* Return result */
9212 *result = state->orig.out.result;
9214 tevent_req_received(req);
9215 return NT_STATUS_OK;
9218 NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
9219 TALLOC_CTX *mem_ctx,
9220 WERROR *werror)
9222 struct PNP_RegisterNotification r;
9223 NTSTATUS status;
9225 /* In parameters */
9227 if (DEBUGLEVEL >= 10) {
9228 NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &r);
9231 status = cli->dispatch(cli,
9232 mem_ctx,
9233 &ndr_table_ntsvcs,
9234 NDR_PNP_REGISTERNOTIFICATION,
9235 &r);
9237 if (!NT_STATUS_IS_OK(status)) {
9238 return status;
9241 if (DEBUGLEVEL >= 10) {
9242 NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &r);
9245 if (NT_STATUS_IS_ERR(status)) {
9246 return status;
9249 /* Return variables */
9251 /* Return result */
9252 if (werror) {
9253 *werror = r.out.result;
9256 return werror_to_ntstatus(r.out.result);
9259 struct rpccli_PNP_UnregisterNotification_state {
9260 struct PNP_UnregisterNotification orig;
9261 struct PNP_UnregisterNotification tmp;
9262 TALLOC_CTX *out_mem_ctx;
9263 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9266 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq);
9268 struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx,
9269 struct tevent_context *ev,
9270 struct rpc_pipe_client *cli)
9272 struct tevent_req *req;
9273 struct rpccli_PNP_UnregisterNotification_state *state;
9274 struct tevent_req *subreq;
9276 req = tevent_req_create(mem_ctx, &state,
9277 struct rpccli_PNP_UnregisterNotification_state);
9278 if (req == NULL) {
9279 return NULL;
9281 state->out_mem_ctx = NULL;
9282 state->dispatch_recv = cli->dispatch_recv;
9284 /* In parameters */
9286 /* Out parameters */
9288 /* Result */
9289 ZERO_STRUCT(state->orig.out.result);
9291 if (DEBUGLEVEL >= 10) {
9292 NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &state->orig);
9295 /* make a temporary copy, that we pass to the dispatch function */
9296 state->tmp = state->orig;
9298 subreq = cli->dispatch_send(state, ev, cli,
9299 &ndr_table_ntsvcs,
9300 NDR_PNP_UNREGISTERNOTIFICATION,
9301 &state->tmp);
9302 if (tevent_req_nomem(subreq, req)) {
9303 return tevent_req_post(req, ev);
9305 tevent_req_set_callback(subreq, rpccli_PNP_UnregisterNotification_done, req);
9306 return req;
9309 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq)
9311 struct tevent_req *req = tevent_req_callback_data(
9312 subreq, struct tevent_req);
9313 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
9314 req, struct rpccli_PNP_UnregisterNotification_state);
9315 NTSTATUS status;
9316 TALLOC_CTX *mem_ctx;
9318 if (state->out_mem_ctx) {
9319 mem_ctx = state->out_mem_ctx;
9320 } else {
9321 mem_ctx = state;
9324 status = state->dispatch_recv(subreq, mem_ctx);
9325 TALLOC_FREE(subreq);
9326 if (!NT_STATUS_IS_OK(status)) {
9327 tevent_req_nterror(req, status);
9328 return;
9331 /* Copy out parameters */
9333 /* Copy result */
9334 state->orig.out.result = state->tmp.out.result;
9336 /* Reset temporary structure */
9337 ZERO_STRUCT(state->tmp);
9339 if (DEBUGLEVEL >= 10) {
9340 NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &state->orig);
9343 tevent_req_done(req);
9346 NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req,
9347 TALLOC_CTX *mem_ctx,
9348 WERROR *result)
9350 struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data(
9351 req, struct rpccli_PNP_UnregisterNotification_state);
9352 NTSTATUS status;
9354 if (tevent_req_is_nterror(req, &status)) {
9355 tevent_req_received(req);
9356 return status;
9359 /* Steal possbile out parameters to the callers context */
9360 talloc_steal(mem_ctx, state->out_mem_ctx);
9362 /* Return result */
9363 *result = state->orig.out.result;
9365 tevent_req_received(req);
9366 return NT_STATUS_OK;
9369 NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
9370 TALLOC_CTX *mem_ctx,
9371 WERROR *werror)
9373 struct PNP_UnregisterNotification r;
9374 NTSTATUS status;
9376 /* In parameters */
9378 if (DEBUGLEVEL >= 10) {
9379 NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &r);
9382 status = cli->dispatch(cli,
9383 mem_ctx,
9384 &ndr_table_ntsvcs,
9385 NDR_PNP_UNREGISTERNOTIFICATION,
9386 &r);
9388 if (!NT_STATUS_IS_OK(status)) {
9389 return status;
9392 if (DEBUGLEVEL >= 10) {
9393 NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &r);
9396 if (NT_STATUS_IS_ERR(status)) {
9397 return status;
9400 /* Return variables */
9402 /* Return result */
9403 if (werror) {
9404 *werror = r.out.result;
9407 return werror_to_ntstatus(r.out.result);
9410 struct rpccli_PNP_GetCustomDevProp_state {
9411 struct PNP_GetCustomDevProp orig;
9412 struct PNP_GetCustomDevProp tmp;
9413 TALLOC_CTX *out_mem_ctx;
9414 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9417 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq);
9419 struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx,
9420 struct tevent_context *ev,
9421 struct rpc_pipe_client *cli)
9423 struct tevent_req *req;
9424 struct rpccli_PNP_GetCustomDevProp_state *state;
9425 struct tevent_req *subreq;
9427 req = tevent_req_create(mem_ctx, &state,
9428 struct rpccli_PNP_GetCustomDevProp_state);
9429 if (req == NULL) {
9430 return NULL;
9432 state->out_mem_ctx = NULL;
9433 state->dispatch_recv = cli->dispatch_recv;
9435 /* In parameters */
9437 /* Out parameters */
9439 /* Result */
9440 ZERO_STRUCT(state->orig.out.result);
9442 if (DEBUGLEVEL >= 10) {
9443 NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &state->orig);
9446 /* make a temporary copy, that we pass to the dispatch function */
9447 state->tmp = state->orig;
9449 subreq = cli->dispatch_send(state, ev, cli,
9450 &ndr_table_ntsvcs,
9451 NDR_PNP_GETCUSTOMDEVPROP,
9452 &state->tmp);
9453 if (tevent_req_nomem(subreq, req)) {
9454 return tevent_req_post(req, ev);
9456 tevent_req_set_callback(subreq, rpccli_PNP_GetCustomDevProp_done, req);
9457 return req;
9460 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq)
9462 struct tevent_req *req = tevent_req_callback_data(
9463 subreq, struct tevent_req);
9464 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
9465 req, struct rpccli_PNP_GetCustomDevProp_state);
9466 NTSTATUS status;
9467 TALLOC_CTX *mem_ctx;
9469 if (state->out_mem_ctx) {
9470 mem_ctx = state->out_mem_ctx;
9471 } else {
9472 mem_ctx = state;
9475 status = state->dispatch_recv(subreq, mem_ctx);
9476 TALLOC_FREE(subreq);
9477 if (!NT_STATUS_IS_OK(status)) {
9478 tevent_req_nterror(req, status);
9479 return;
9482 /* Copy out parameters */
9484 /* Copy result */
9485 state->orig.out.result = state->tmp.out.result;
9487 /* Reset temporary structure */
9488 ZERO_STRUCT(state->tmp);
9490 if (DEBUGLEVEL >= 10) {
9491 NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &state->orig);
9494 tevent_req_done(req);
9497 NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req,
9498 TALLOC_CTX *mem_ctx,
9499 WERROR *result)
9501 struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data(
9502 req, struct rpccli_PNP_GetCustomDevProp_state);
9503 NTSTATUS status;
9505 if (tevent_req_is_nterror(req, &status)) {
9506 tevent_req_received(req);
9507 return status;
9510 /* Steal possbile out parameters to the callers context */
9511 talloc_steal(mem_ctx, state->out_mem_ctx);
9513 /* Return result */
9514 *result = state->orig.out.result;
9516 tevent_req_received(req);
9517 return NT_STATUS_OK;
9520 NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
9521 TALLOC_CTX *mem_ctx,
9522 WERROR *werror)
9524 struct PNP_GetCustomDevProp r;
9525 NTSTATUS status;
9527 /* In parameters */
9529 if (DEBUGLEVEL >= 10) {
9530 NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &r);
9533 status = cli->dispatch(cli,
9534 mem_ctx,
9535 &ndr_table_ntsvcs,
9536 NDR_PNP_GETCUSTOMDEVPROP,
9537 &r);
9539 if (!NT_STATUS_IS_OK(status)) {
9540 return status;
9543 if (DEBUGLEVEL >= 10) {
9544 NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &r);
9547 if (NT_STATUS_IS_ERR(status)) {
9548 return status;
9551 /* Return variables */
9553 /* Return result */
9554 if (werror) {
9555 *werror = r.out.result;
9558 return werror_to_ntstatus(r.out.result);
9561 struct rpccli_PNP_GetVersionInternal_state {
9562 struct PNP_GetVersionInternal orig;
9563 struct PNP_GetVersionInternal tmp;
9564 TALLOC_CTX *out_mem_ctx;
9565 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9568 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq);
9570 struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx,
9571 struct tevent_context *ev,
9572 struct rpc_pipe_client *cli)
9574 struct tevent_req *req;
9575 struct rpccli_PNP_GetVersionInternal_state *state;
9576 struct tevent_req *subreq;
9578 req = tevent_req_create(mem_ctx, &state,
9579 struct rpccli_PNP_GetVersionInternal_state);
9580 if (req == NULL) {
9581 return NULL;
9583 state->out_mem_ctx = NULL;
9584 state->dispatch_recv = cli->dispatch_recv;
9586 /* In parameters */
9588 /* Out parameters */
9590 /* Result */
9591 ZERO_STRUCT(state->orig.out.result);
9593 if (DEBUGLEVEL >= 10) {
9594 NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &state->orig);
9597 /* make a temporary copy, that we pass to the dispatch function */
9598 state->tmp = state->orig;
9600 subreq = cli->dispatch_send(state, ev, cli,
9601 &ndr_table_ntsvcs,
9602 NDR_PNP_GETVERSIONINTERNAL,
9603 &state->tmp);
9604 if (tevent_req_nomem(subreq, req)) {
9605 return tevent_req_post(req, ev);
9607 tevent_req_set_callback(subreq, rpccli_PNP_GetVersionInternal_done, req);
9608 return req;
9611 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq)
9613 struct tevent_req *req = tevent_req_callback_data(
9614 subreq, struct tevent_req);
9615 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
9616 req, struct rpccli_PNP_GetVersionInternal_state);
9617 NTSTATUS status;
9618 TALLOC_CTX *mem_ctx;
9620 if (state->out_mem_ctx) {
9621 mem_ctx = state->out_mem_ctx;
9622 } else {
9623 mem_ctx = state;
9626 status = state->dispatch_recv(subreq, mem_ctx);
9627 TALLOC_FREE(subreq);
9628 if (!NT_STATUS_IS_OK(status)) {
9629 tevent_req_nterror(req, status);
9630 return;
9633 /* Copy out parameters */
9635 /* Copy result */
9636 state->orig.out.result = state->tmp.out.result;
9638 /* Reset temporary structure */
9639 ZERO_STRUCT(state->tmp);
9641 if (DEBUGLEVEL >= 10) {
9642 NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &state->orig);
9645 tevent_req_done(req);
9648 NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req,
9649 TALLOC_CTX *mem_ctx,
9650 WERROR *result)
9652 struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data(
9653 req, struct rpccli_PNP_GetVersionInternal_state);
9654 NTSTATUS status;
9656 if (tevent_req_is_nterror(req, &status)) {
9657 tevent_req_received(req);
9658 return status;
9661 /* Steal possbile out parameters to the callers context */
9662 talloc_steal(mem_ctx, state->out_mem_ctx);
9664 /* Return result */
9665 *result = state->orig.out.result;
9667 tevent_req_received(req);
9668 return NT_STATUS_OK;
9671 NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
9672 TALLOC_CTX *mem_ctx,
9673 WERROR *werror)
9675 struct PNP_GetVersionInternal r;
9676 NTSTATUS status;
9678 /* In parameters */
9680 if (DEBUGLEVEL >= 10) {
9681 NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &r);
9684 status = cli->dispatch(cli,
9685 mem_ctx,
9686 &ndr_table_ntsvcs,
9687 NDR_PNP_GETVERSIONINTERNAL,
9688 &r);
9690 if (!NT_STATUS_IS_OK(status)) {
9691 return status;
9694 if (DEBUGLEVEL >= 10) {
9695 NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &r);
9698 if (NT_STATUS_IS_ERR(status)) {
9699 return status;
9702 /* Return variables */
9704 /* Return result */
9705 if (werror) {
9706 *werror = r.out.result;
9709 return werror_to_ntstatus(r.out.result);
9712 struct rpccli_PNP_GetBlockedDriverInfo_state {
9713 struct PNP_GetBlockedDriverInfo orig;
9714 struct PNP_GetBlockedDriverInfo tmp;
9715 TALLOC_CTX *out_mem_ctx;
9716 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9719 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq);
9721 struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx,
9722 struct tevent_context *ev,
9723 struct rpc_pipe_client *cli)
9725 struct tevent_req *req;
9726 struct rpccli_PNP_GetBlockedDriverInfo_state *state;
9727 struct tevent_req *subreq;
9729 req = tevent_req_create(mem_ctx, &state,
9730 struct rpccli_PNP_GetBlockedDriverInfo_state);
9731 if (req == NULL) {
9732 return NULL;
9734 state->out_mem_ctx = NULL;
9735 state->dispatch_recv = cli->dispatch_recv;
9737 /* In parameters */
9739 /* Out parameters */
9741 /* Result */
9742 ZERO_STRUCT(state->orig.out.result);
9744 if (DEBUGLEVEL >= 10) {
9745 NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &state->orig);
9748 /* make a temporary copy, that we pass to the dispatch function */
9749 state->tmp = state->orig;
9751 subreq = cli->dispatch_send(state, ev, cli,
9752 &ndr_table_ntsvcs,
9753 NDR_PNP_GETBLOCKEDDRIVERINFO,
9754 &state->tmp);
9755 if (tevent_req_nomem(subreq, req)) {
9756 return tevent_req_post(req, ev);
9758 tevent_req_set_callback(subreq, rpccli_PNP_GetBlockedDriverInfo_done, req);
9759 return req;
9762 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq)
9764 struct tevent_req *req = tevent_req_callback_data(
9765 subreq, struct tevent_req);
9766 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
9767 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
9768 NTSTATUS status;
9769 TALLOC_CTX *mem_ctx;
9771 if (state->out_mem_ctx) {
9772 mem_ctx = state->out_mem_ctx;
9773 } else {
9774 mem_ctx = state;
9777 status = state->dispatch_recv(subreq, mem_ctx);
9778 TALLOC_FREE(subreq);
9779 if (!NT_STATUS_IS_OK(status)) {
9780 tevent_req_nterror(req, status);
9781 return;
9784 /* Copy out parameters */
9786 /* Copy result */
9787 state->orig.out.result = state->tmp.out.result;
9789 /* Reset temporary structure */
9790 ZERO_STRUCT(state->tmp);
9792 if (DEBUGLEVEL >= 10) {
9793 NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &state->orig);
9796 tevent_req_done(req);
9799 NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req,
9800 TALLOC_CTX *mem_ctx,
9801 WERROR *result)
9803 struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data(
9804 req, struct rpccli_PNP_GetBlockedDriverInfo_state);
9805 NTSTATUS status;
9807 if (tevent_req_is_nterror(req, &status)) {
9808 tevent_req_received(req);
9809 return status;
9812 /* Steal possbile out parameters to the callers context */
9813 talloc_steal(mem_ctx, state->out_mem_ctx);
9815 /* Return result */
9816 *result = state->orig.out.result;
9818 tevent_req_received(req);
9819 return NT_STATUS_OK;
9822 NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
9823 TALLOC_CTX *mem_ctx,
9824 WERROR *werror)
9826 struct PNP_GetBlockedDriverInfo r;
9827 NTSTATUS status;
9829 /* In parameters */
9831 if (DEBUGLEVEL >= 10) {
9832 NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &r);
9835 status = cli->dispatch(cli,
9836 mem_ctx,
9837 &ndr_table_ntsvcs,
9838 NDR_PNP_GETBLOCKEDDRIVERINFO,
9839 &r);
9841 if (!NT_STATUS_IS_OK(status)) {
9842 return status;
9845 if (DEBUGLEVEL >= 10) {
9846 NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &r);
9849 if (NT_STATUS_IS_ERR(status)) {
9850 return status;
9853 /* Return variables */
9855 /* Return result */
9856 if (werror) {
9857 *werror = r.out.result;
9860 return werror_to_ntstatus(r.out.result);
9863 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state {
9864 struct PNP_GetServerSideDeviceInstallFlags orig;
9865 struct PNP_GetServerSideDeviceInstallFlags tmp;
9866 TALLOC_CTX *out_mem_ctx;
9867 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9870 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq);
9872 struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx,
9873 struct tevent_context *ev,
9874 struct rpc_pipe_client *cli)
9876 struct tevent_req *req;
9877 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state;
9878 struct tevent_req *subreq;
9880 req = tevent_req_create(mem_ctx, &state,
9881 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
9882 if (req == NULL) {
9883 return NULL;
9885 state->out_mem_ctx = NULL;
9886 state->dispatch_recv = cli->dispatch_recv;
9888 /* In parameters */
9890 /* Out parameters */
9892 /* Result */
9893 ZERO_STRUCT(state->orig.out.result);
9895 if (DEBUGLEVEL >= 10) {
9896 NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &state->orig);
9899 /* make a temporary copy, that we pass to the dispatch function */
9900 state->tmp = state->orig;
9902 subreq = cli->dispatch_send(state, ev, cli,
9903 &ndr_table_ntsvcs,
9904 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
9905 &state->tmp);
9906 if (tevent_req_nomem(subreq, req)) {
9907 return tevent_req_post(req, ev);
9909 tevent_req_set_callback(subreq, rpccli_PNP_GetServerSideDeviceInstallFlags_done, req);
9910 return req;
9913 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq)
9915 struct tevent_req *req = tevent_req_callback_data(
9916 subreq, struct tevent_req);
9917 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
9918 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
9919 NTSTATUS status;
9920 TALLOC_CTX *mem_ctx;
9922 if (state->out_mem_ctx) {
9923 mem_ctx = state->out_mem_ctx;
9924 } else {
9925 mem_ctx = state;
9928 status = state->dispatch_recv(subreq, mem_ctx);
9929 TALLOC_FREE(subreq);
9930 if (!NT_STATUS_IS_OK(status)) {
9931 tevent_req_nterror(req, status);
9932 return;
9935 /* Copy out parameters */
9937 /* Copy result */
9938 state->orig.out.result = state->tmp.out.result;
9940 /* Reset temporary structure */
9941 ZERO_STRUCT(state->tmp);
9943 if (DEBUGLEVEL >= 10) {
9944 NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &state->orig);
9947 tevent_req_done(req);
9950 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req,
9951 TALLOC_CTX *mem_ctx,
9952 WERROR *result)
9954 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data(
9955 req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state);
9956 NTSTATUS status;
9958 if (tevent_req_is_nterror(req, &status)) {
9959 tevent_req_received(req);
9960 return status;
9963 /* Steal possbile out parameters to the callers context */
9964 talloc_steal(mem_ctx, state->out_mem_ctx);
9966 /* Return result */
9967 *result = state->orig.out.result;
9969 tevent_req_received(req);
9970 return NT_STATUS_OK;
9973 NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
9974 TALLOC_CTX *mem_ctx,
9975 WERROR *werror)
9977 struct PNP_GetServerSideDeviceInstallFlags r;
9978 NTSTATUS status;
9980 /* In parameters */
9982 if (DEBUGLEVEL >= 10) {
9983 NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
9986 status = cli->dispatch(cli,
9987 mem_ctx,
9988 &ndr_table_ntsvcs,
9989 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
9990 &r);
9992 if (!NT_STATUS_IS_OK(status)) {
9993 return status;
9996 if (DEBUGLEVEL >= 10) {
9997 NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
10000 if (NT_STATUS_IS_ERR(status)) {
10001 return status;
10004 /* Return variables */
10006 /* Return result */
10007 if (werror) {
10008 *werror = r.out.result;
10011 return werror_to_ntstatus(r.out.result);