2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
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
);
31 state
->out_mem_ctx
= NULL
;
32 state
->dispatch_recv
= cli
->dispatch_recv
;
39 ZERO_STRUCT(state
->orig
.out
.result
);
41 /* make a temporary copy, that we pass to the dispatch function */
42 state
->tmp
= state
->orig
;
44 subreq
= cli
->dispatch_send(state
, ev
, cli
,
48 if (tevent_req_nomem(subreq
, req
)) {
49 return tevent_req_post(req
, ev
);
51 tevent_req_set_callback(subreq
, rpccli_PNP_Disconnect_done
, req
);
55 static void rpccli_PNP_Disconnect_done(struct tevent_req
*subreq
)
57 struct tevent_req
*req
= tevent_req_callback_data(
58 subreq
, struct tevent_req
);
59 struct rpccli_PNP_Disconnect_state
*state
= tevent_req_data(
60 req
, struct rpccli_PNP_Disconnect_state
);
64 if (state
->out_mem_ctx
) {
65 mem_ctx
= state
->out_mem_ctx
;
70 status
= state
->dispatch_recv(subreq
, mem_ctx
);
72 if (!NT_STATUS_IS_OK(status
)) {
73 tevent_req_nterror(req
, status
);
77 /* Copy out parameters */
80 state
->orig
.out
.result
= state
->tmp
.out
.result
;
82 /* Reset temporary structure */
83 ZERO_STRUCT(state
->tmp
);
88 NTSTATUS
rpccli_PNP_Disconnect_recv(struct tevent_req
*req
,
92 struct rpccli_PNP_Disconnect_state
*state
= tevent_req_data(
93 req
, struct rpccli_PNP_Disconnect_state
);
96 if (tevent_req_is_nterror(req
, &status
)) {
97 tevent_req_received(req
);
101 /* Steal possbile out parameters to the callers context */
102 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
105 *result
= state
->orig
.out
.result
;
107 tevent_req_received(req
);
111 NTSTATUS
rpccli_PNP_Disconnect(struct rpc_pipe_client
*cli
,
115 struct PNP_Disconnect r
;
120 status
= cli
->dispatch(cli
,
126 if (!NT_STATUS_IS_OK(status
)) {
130 if (NT_STATUS_IS_ERR(status
)) {
134 /* Return variables */
138 *werror
= r
.out
.result
;
141 return werror_to_ntstatus(r
.out
.result
);
144 struct rpccli_PNP_Connect_state
{
145 struct PNP_Connect orig
;
146 struct PNP_Connect tmp
;
147 TALLOC_CTX
*out_mem_ctx
;
148 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
151 static void rpccli_PNP_Connect_done(struct tevent_req
*subreq
);
153 struct tevent_req
*rpccli_PNP_Connect_send(TALLOC_CTX
*mem_ctx
,
154 struct tevent_context
*ev
,
155 struct rpc_pipe_client
*cli
)
157 struct tevent_req
*req
;
158 struct rpccli_PNP_Connect_state
*state
;
159 struct tevent_req
*subreq
;
161 req
= tevent_req_create(mem_ctx
, &state
,
162 struct rpccli_PNP_Connect_state
);
166 state
->out_mem_ctx
= NULL
;
167 state
->dispatch_recv
= cli
->dispatch_recv
;
174 ZERO_STRUCT(state
->orig
.out
.result
);
176 /* make a temporary copy, that we pass to the dispatch function */
177 state
->tmp
= state
->orig
;
179 subreq
= cli
->dispatch_send(state
, ev
, cli
,
183 if (tevent_req_nomem(subreq
, req
)) {
184 return tevent_req_post(req
, ev
);
186 tevent_req_set_callback(subreq
, rpccli_PNP_Connect_done
, req
);
190 static void rpccli_PNP_Connect_done(struct tevent_req
*subreq
)
192 struct tevent_req
*req
= tevent_req_callback_data(
193 subreq
, struct tevent_req
);
194 struct rpccli_PNP_Connect_state
*state
= tevent_req_data(
195 req
, struct rpccli_PNP_Connect_state
);
199 if (state
->out_mem_ctx
) {
200 mem_ctx
= state
->out_mem_ctx
;
205 status
= state
->dispatch_recv(subreq
, mem_ctx
);
207 if (!NT_STATUS_IS_OK(status
)) {
208 tevent_req_nterror(req
, status
);
212 /* Copy out parameters */
215 state
->orig
.out
.result
= state
->tmp
.out
.result
;
217 /* Reset temporary structure */
218 ZERO_STRUCT(state
->tmp
);
220 tevent_req_done(req
);
223 NTSTATUS
rpccli_PNP_Connect_recv(struct tevent_req
*req
,
227 struct rpccli_PNP_Connect_state
*state
= tevent_req_data(
228 req
, struct rpccli_PNP_Connect_state
);
231 if (tevent_req_is_nterror(req
, &status
)) {
232 tevent_req_received(req
);
236 /* Steal possbile out parameters to the callers context */
237 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
240 *result
= state
->orig
.out
.result
;
242 tevent_req_received(req
);
246 NTSTATUS
rpccli_PNP_Connect(struct rpc_pipe_client
*cli
,
250 struct PNP_Connect r
;
255 status
= cli
->dispatch(cli
,
261 if (!NT_STATUS_IS_OK(status
)) {
265 if (NT_STATUS_IS_ERR(status
)) {
269 /* Return variables */
273 *werror
= r
.out
.result
;
276 return werror_to_ntstatus(r
.out
.result
);
279 struct rpccli_PNP_GetVersion_state
{
280 struct PNP_GetVersion orig
;
281 struct PNP_GetVersion tmp
;
282 TALLOC_CTX
*out_mem_ctx
;
283 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
286 static void rpccli_PNP_GetVersion_done(struct tevent_req
*subreq
);
288 struct tevent_req
*rpccli_PNP_GetVersion_send(TALLOC_CTX
*mem_ctx
,
289 struct tevent_context
*ev
,
290 struct rpc_pipe_client
*cli
,
291 uint16_t *_version
/* [out] [ref] */)
293 struct tevent_req
*req
;
294 struct rpccli_PNP_GetVersion_state
*state
;
295 struct tevent_req
*subreq
;
297 req
= tevent_req_create(mem_ctx
, &state
,
298 struct rpccli_PNP_GetVersion_state
);
302 state
->out_mem_ctx
= NULL
;
303 state
->dispatch_recv
= cli
->dispatch_recv
;
308 state
->orig
.out
.version
= _version
;
311 ZERO_STRUCT(state
->orig
.out
.result
);
313 state
->out_mem_ctx
= talloc_named_const(state
, 0,
314 "rpccli_PNP_GetVersion_out_memory");
315 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
316 return tevent_req_post(req
, ev
);
319 /* make a temporary copy, that we pass to the dispatch function */
320 state
->tmp
= state
->orig
;
322 subreq
= cli
->dispatch_send(state
, ev
, cli
,
326 if (tevent_req_nomem(subreq
, req
)) {
327 return tevent_req_post(req
, ev
);
329 tevent_req_set_callback(subreq
, rpccli_PNP_GetVersion_done
, req
);
333 static void rpccli_PNP_GetVersion_done(struct tevent_req
*subreq
)
335 struct tevent_req
*req
= tevent_req_callback_data(
336 subreq
, struct tevent_req
);
337 struct rpccli_PNP_GetVersion_state
*state
= tevent_req_data(
338 req
, struct rpccli_PNP_GetVersion_state
);
342 if (state
->out_mem_ctx
) {
343 mem_ctx
= state
->out_mem_ctx
;
348 status
= state
->dispatch_recv(subreq
, mem_ctx
);
350 if (!NT_STATUS_IS_OK(status
)) {
351 tevent_req_nterror(req
, status
);
355 /* Copy out parameters */
356 *state
->orig
.out
.version
= *state
->tmp
.out
.version
;
359 state
->orig
.out
.result
= state
->tmp
.out
.result
;
361 /* Reset temporary structure */
362 ZERO_STRUCT(state
->tmp
);
364 tevent_req_done(req
);
367 NTSTATUS
rpccli_PNP_GetVersion_recv(struct tevent_req
*req
,
371 struct rpccli_PNP_GetVersion_state
*state
= tevent_req_data(
372 req
, struct rpccli_PNP_GetVersion_state
);
375 if (tevent_req_is_nterror(req
, &status
)) {
376 tevent_req_received(req
);
380 /* Steal possbile out parameters to the callers context */
381 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
384 *result
= state
->orig
.out
.result
;
386 tevent_req_received(req
);
390 NTSTATUS
rpccli_PNP_GetVersion(struct rpc_pipe_client
*cli
,
392 uint16_t *version
/* [out] [ref] */,
395 struct PNP_GetVersion r
;
400 status
= cli
->dispatch(cli
,
406 if (!NT_STATUS_IS_OK(status
)) {
410 if (NT_STATUS_IS_ERR(status
)) {
414 /* Return variables */
415 *version
= *r
.out
.version
;
419 *werror
= r
.out
.result
;
422 return werror_to_ntstatus(r
.out
.result
);
425 struct rpccli_PNP_GetGlobalState_state
{
426 struct PNP_GetGlobalState orig
;
427 struct PNP_GetGlobalState tmp
;
428 TALLOC_CTX
*out_mem_ctx
;
429 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
432 static void rpccli_PNP_GetGlobalState_done(struct tevent_req
*subreq
);
434 struct tevent_req
*rpccli_PNP_GetGlobalState_send(TALLOC_CTX
*mem_ctx
,
435 struct tevent_context
*ev
,
436 struct rpc_pipe_client
*cli
)
438 struct tevent_req
*req
;
439 struct rpccli_PNP_GetGlobalState_state
*state
;
440 struct tevent_req
*subreq
;
442 req
= tevent_req_create(mem_ctx
, &state
,
443 struct rpccli_PNP_GetGlobalState_state
);
447 state
->out_mem_ctx
= NULL
;
448 state
->dispatch_recv
= cli
->dispatch_recv
;
455 ZERO_STRUCT(state
->orig
.out
.result
);
457 /* make a temporary copy, that we pass to the dispatch function */
458 state
->tmp
= state
->orig
;
460 subreq
= cli
->dispatch_send(state
, ev
, cli
,
462 NDR_PNP_GETGLOBALSTATE
,
464 if (tevent_req_nomem(subreq
, req
)) {
465 return tevent_req_post(req
, ev
);
467 tevent_req_set_callback(subreq
, rpccli_PNP_GetGlobalState_done
, req
);
471 static void rpccli_PNP_GetGlobalState_done(struct tevent_req
*subreq
)
473 struct tevent_req
*req
= tevent_req_callback_data(
474 subreq
, struct tevent_req
);
475 struct rpccli_PNP_GetGlobalState_state
*state
= tevent_req_data(
476 req
, struct rpccli_PNP_GetGlobalState_state
);
480 if (state
->out_mem_ctx
) {
481 mem_ctx
= state
->out_mem_ctx
;
486 status
= state
->dispatch_recv(subreq
, mem_ctx
);
488 if (!NT_STATUS_IS_OK(status
)) {
489 tevent_req_nterror(req
, status
);
493 /* Copy out parameters */
496 state
->orig
.out
.result
= state
->tmp
.out
.result
;
498 /* Reset temporary structure */
499 ZERO_STRUCT(state
->tmp
);
501 tevent_req_done(req
);
504 NTSTATUS
rpccli_PNP_GetGlobalState_recv(struct tevent_req
*req
,
508 struct rpccli_PNP_GetGlobalState_state
*state
= tevent_req_data(
509 req
, struct rpccli_PNP_GetGlobalState_state
);
512 if (tevent_req_is_nterror(req
, &status
)) {
513 tevent_req_received(req
);
517 /* Steal possbile out parameters to the callers context */
518 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
521 *result
= state
->orig
.out
.result
;
523 tevent_req_received(req
);
527 NTSTATUS
rpccli_PNP_GetGlobalState(struct rpc_pipe_client
*cli
,
531 struct PNP_GetGlobalState r
;
536 status
= cli
->dispatch(cli
,
539 NDR_PNP_GETGLOBALSTATE
,
542 if (!NT_STATUS_IS_OK(status
)) {
546 if (NT_STATUS_IS_ERR(status
)) {
550 /* Return variables */
554 *werror
= r
.out
.result
;
557 return werror_to_ntstatus(r
.out
.result
);
560 struct rpccli_PNP_InitDetection_state
{
561 struct PNP_InitDetection orig
;
562 struct PNP_InitDetection tmp
;
563 TALLOC_CTX
*out_mem_ctx
;
564 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
567 static void rpccli_PNP_InitDetection_done(struct tevent_req
*subreq
);
569 struct tevent_req
*rpccli_PNP_InitDetection_send(TALLOC_CTX
*mem_ctx
,
570 struct tevent_context
*ev
,
571 struct rpc_pipe_client
*cli
)
573 struct tevent_req
*req
;
574 struct rpccli_PNP_InitDetection_state
*state
;
575 struct tevent_req
*subreq
;
577 req
= tevent_req_create(mem_ctx
, &state
,
578 struct rpccli_PNP_InitDetection_state
);
582 state
->out_mem_ctx
= NULL
;
583 state
->dispatch_recv
= cli
->dispatch_recv
;
590 ZERO_STRUCT(state
->orig
.out
.result
);
592 /* make a temporary copy, that we pass to the dispatch function */
593 state
->tmp
= state
->orig
;
595 subreq
= cli
->dispatch_send(state
, ev
, cli
,
597 NDR_PNP_INITDETECTION
,
599 if (tevent_req_nomem(subreq
, req
)) {
600 return tevent_req_post(req
, ev
);
602 tevent_req_set_callback(subreq
, rpccli_PNP_InitDetection_done
, req
);
606 static void rpccli_PNP_InitDetection_done(struct tevent_req
*subreq
)
608 struct tevent_req
*req
= tevent_req_callback_data(
609 subreq
, struct tevent_req
);
610 struct rpccli_PNP_InitDetection_state
*state
= tevent_req_data(
611 req
, struct rpccli_PNP_InitDetection_state
);
615 if (state
->out_mem_ctx
) {
616 mem_ctx
= state
->out_mem_ctx
;
621 status
= state
->dispatch_recv(subreq
, mem_ctx
);
623 if (!NT_STATUS_IS_OK(status
)) {
624 tevent_req_nterror(req
, status
);
628 /* Copy out parameters */
631 state
->orig
.out
.result
= state
->tmp
.out
.result
;
633 /* Reset temporary structure */
634 ZERO_STRUCT(state
->tmp
);
636 tevent_req_done(req
);
639 NTSTATUS
rpccli_PNP_InitDetection_recv(struct tevent_req
*req
,
643 struct rpccli_PNP_InitDetection_state
*state
= tevent_req_data(
644 req
, struct rpccli_PNP_InitDetection_state
);
647 if (tevent_req_is_nterror(req
, &status
)) {
648 tevent_req_received(req
);
652 /* Steal possbile out parameters to the callers context */
653 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
656 *result
= state
->orig
.out
.result
;
658 tevent_req_received(req
);
662 NTSTATUS
rpccli_PNP_InitDetection(struct rpc_pipe_client
*cli
,
666 struct PNP_InitDetection r
;
671 status
= cli
->dispatch(cli
,
674 NDR_PNP_INITDETECTION
,
677 if (!NT_STATUS_IS_OK(status
)) {
681 if (NT_STATUS_IS_ERR(status
)) {
685 /* Return variables */
689 *werror
= r
.out
.result
;
692 return werror_to_ntstatus(r
.out
.result
);
695 struct rpccli_PNP_ReportLogOn_state
{
696 struct PNP_ReportLogOn orig
;
697 struct PNP_ReportLogOn tmp
;
698 TALLOC_CTX
*out_mem_ctx
;
699 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
702 static void rpccli_PNP_ReportLogOn_done(struct tevent_req
*subreq
);
704 struct tevent_req
*rpccli_PNP_ReportLogOn_send(TALLOC_CTX
*mem_ctx
,
705 struct tevent_context
*ev
,
706 struct rpc_pipe_client
*cli
)
708 struct tevent_req
*req
;
709 struct rpccli_PNP_ReportLogOn_state
*state
;
710 struct tevent_req
*subreq
;
712 req
= tevent_req_create(mem_ctx
, &state
,
713 struct rpccli_PNP_ReportLogOn_state
);
717 state
->out_mem_ctx
= NULL
;
718 state
->dispatch_recv
= cli
->dispatch_recv
;
725 ZERO_STRUCT(state
->orig
.out
.result
);
727 /* make a temporary copy, that we pass to the dispatch function */
728 state
->tmp
= state
->orig
;
730 subreq
= cli
->dispatch_send(state
, ev
, cli
,
734 if (tevent_req_nomem(subreq
, req
)) {
735 return tevent_req_post(req
, ev
);
737 tevent_req_set_callback(subreq
, rpccli_PNP_ReportLogOn_done
, req
);
741 static void rpccli_PNP_ReportLogOn_done(struct tevent_req
*subreq
)
743 struct tevent_req
*req
= tevent_req_callback_data(
744 subreq
, struct tevent_req
);
745 struct rpccli_PNP_ReportLogOn_state
*state
= tevent_req_data(
746 req
, struct rpccli_PNP_ReportLogOn_state
);
750 if (state
->out_mem_ctx
) {
751 mem_ctx
= state
->out_mem_ctx
;
756 status
= state
->dispatch_recv(subreq
, mem_ctx
);
758 if (!NT_STATUS_IS_OK(status
)) {
759 tevent_req_nterror(req
, status
);
763 /* Copy out parameters */
766 state
->orig
.out
.result
= state
->tmp
.out
.result
;
768 /* Reset temporary structure */
769 ZERO_STRUCT(state
->tmp
);
771 tevent_req_done(req
);
774 NTSTATUS
rpccli_PNP_ReportLogOn_recv(struct tevent_req
*req
,
778 struct rpccli_PNP_ReportLogOn_state
*state
= tevent_req_data(
779 req
, struct rpccli_PNP_ReportLogOn_state
);
782 if (tevent_req_is_nterror(req
, &status
)) {
783 tevent_req_received(req
);
787 /* Steal possbile out parameters to the callers context */
788 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
791 *result
= state
->orig
.out
.result
;
793 tevent_req_received(req
);
797 NTSTATUS
rpccli_PNP_ReportLogOn(struct rpc_pipe_client
*cli
,
801 struct PNP_ReportLogOn r
;
806 status
= cli
->dispatch(cli
,
812 if (!NT_STATUS_IS_OK(status
)) {
816 if (NT_STATUS_IS_ERR(status
)) {
820 /* Return variables */
824 *werror
= r
.out
.result
;
827 return werror_to_ntstatus(r
.out
.result
);
830 struct rpccli_PNP_ValidateDeviceInstance_state
{
831 struct PNP_ValidateDeviceInstance orig
;
832 struct PNP_ValidateDeviceInstance tmp
;
833 TALLOC_CTX
*out_mem_ctx
;
834 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
837 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req
*subreq
);
839 struct tevent_req
*rpccli_PNP_ValidateDeviceInstance_send(TALLOC_CTX
*mem_ctx
,
840 struct tevent_context
*ev
,
841 struct rpc_pipe_client
*cli
,
842 const char *_devicepath
/* [in] [ref,charset(UTF16)] */,
843 uint32_t _flags
/* [in] */)
845 struct tevent_req
*req
;
846 struct rpccli_PNP_ValidateDeviceInstance_state
*state
;
847 struct tevent_req
*subreq
;
849 req
= tevent_req_create(mem_ctx
, &state
,
850 struct rpccli_PNP_ValidateDeviceInstance_state
);
854 state
->out_mem_ctx
= NULL
;
855 state
->dispatch_recv
= cli
->dispatch_recv
;
858 state
->orig
.in
.devicepath
= _devicepath
;
859 state
->orig
.in
.flags
= _flags
;
864 ZERO_STRUCT(state
->orig
.out
.result
);
866 /* make a temporary copy, that we pass to the dispatch function */
867 state
->tmp
= state
->orig
;
869 subreq
= cli
->dispatch_send(state
, ev
, cli
,
871 NDR_PNP_VALIDATEDEVICEINSTANCE
,
873 if (tevent_req_nomem(subreq
, req
)) {
874 return tevent_req_post(req
, ev
);
876 tevent_req_set_callback(subreq
, rpccli_PNP_ValidateDeviceInstance_done
, req
);
880 static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req
*subreq
)
882 struct tevent_req
*req
= tevent_req_callback_data(
883 subreq
, struct tevent_req
);
884 struct rpccli_PNP_ValidateDeviceInstance_state
*state
= tevent_req_data(
885 req
, struct rpccli_PNP_ValidateDeviceInstance_state
);
889 if (state
->out_mem_ctx
) {
890 mem_ctx
= state
->out_mem_ctx
;
895 status
= state
->dispatch_recv(subreq
, mem_ctx
);
897 if (!NT_STATUS_IS_OK(status
)) {
898 tevent_req_nterror(req
, status
);
902 /* Copy out parameters */
905 state
->orig
.out
.result
= state
->tmp
.out
.result
;
907 /* Reset temporary structure */
908 ZERO_STRUCT(state
->tmp
);
910 tevent_req_done(req
);
913 NTSTATUS
rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req
*req
,
917 struct rpccli_PNP_ValidateDeviceInstance_state
*state
= tevent_req_data(
918 req
, struct rpccli_PNP_ValidateDeviceInstance_state
);
921 if (tevent_req_is_nterror(req
, &status
)) {
922 tevent_req_received(req
);
926 /* Steal possbile out parameters to the callers context */
927 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
930 *result
= state
->orig
.out
.result
;
932 tevent_req_received(req
);
936 NTSTATUS
rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client
*cli
,
938 const char *devicepath
/* [in] [ref,charset(UTF16)] */,
939 uint32_t flags
/* [in] */,
942 struct PNP_ValidateDeviceInstance r
;
946 r
.in
.devicepath
= devicepath
;
949 status
= cli
->dispatch(cli
,
952 NDR_PNP_VALIDATEDEVICEINSTANCE
,
955 if (!NT_STATUS_IS_OK(status
)) {
959 if (NT_STATUS_IS_ERR(status
)) {
963 /* Return variables */
967 *werror
= r
.out
.result
;
970 return werror_to_ntstatus(r
.out
.result
);
973 struct rpccli_PNP_GetRootDeviceInstance_state
{
974 struct PNP_GetRootDeviceInstance orig
;
975 struct PNP_GetRootDeviceInstance tmp
;
976 TALLOC_CTX
*out_mem_ctx
;
977 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
980 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req
*subreq
);
982 struct tevent_req
*rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX
*mem_ctx
,
983 struct tevent_context
*ev
,
984 struct rpc_pipe_client
*cli
)
986 struct tevent_req
*req
;
987 struct rpccli_PNP_GetRootDeviceInstance_state
*state
;
988 struct tevent_req
*subreq
;
990 req
= tevent_req_create(mem_ctx
, &state
,
991 struct rpccli_PNP_GetRootDeviceInstance_state
);
995 state
->out_mem_ctx
= NULL
;
996 state
->dispatch_recv
= cli
->dispatch_recv
;
1000 /* Out parameters */
1003 ZERO_STRUCT(state
->orig
.out
.result
);
1005 /* make a temporary copy, that we pass to the dispatch function */
1006 state
->tmp
= state
->orig
;
1008 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1010 NDR_PNP_GETROOTDEVICEINSTANCE
,
1012 if (tevent_req_nomem(subreq
, req
)) {
1013 return tevent_req_post(req
, ev
);
1015 tevent_req_set_callback(subreq
, rpccli_PNP_GetRootDeviceInstance_done
, req
);
1019 static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req
*subreq
)
1021 struct tevent_req
*req
= tevent_req_callback_data(
1022 subreq
, struct tevent_req
);
1023 struct rpccli_PNP_GetRootDeviceInstance_state
*state
= tevent_req_data(
1024 req
, struct rpccli_PNP_GetRootDeviceInstance_state
);
1026 TALLOC_CTX
*mem_ctx
;
1028 if (state
->out_mem_ctx
) {
1029 mem_ctx
= state
->out_mem_ctx
;
1034 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1035 TALLOC_FREE(subreq
);
1036 if (!NT_STATUS_IS_OK(status
)) {
1037 tevent_req_nterror(req
, status
);
1041 /* Copy out parameters */
1044 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1046 /* Reset temporary structure */
1047 ZERO_STRUCT(state
->tmp
);
1049 tevent_req_done(req
);
1052 NTSTATUS
rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req
*req
,
1053 TALLOC_CTX
*mem_ctx
,
1056 struct rpccli_PNP_GetRootDeviceInstance_state
*state
= tevent_req_data(
1057 req
, struct rpccli_PNP_GetRootDeviceInstance_state
);
1060 if (tevent_req_is_nterror(req
, &status
)) {
1061 tevent_req_received(req
);
1065 /* Steal possbile out parameters to the callers context */
1066 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1069 *result
= state
->orig
.out
.result
;
1071 tevent_req_received(req
);
1072 return NT_STATUS_OK
;
1075 NTSTATUS
rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client
*cli
,
1076 TALLOC_CTX
*mem_ctx
,
1079 struct PNP_GetRootDeviceInstance r
;
1084 status
= cli
->dispatch(cli
,
1087 NDR_PNP_GETROOTDEVICEINSTANCE
,
1090 if (!NT_STATUS_IS_OK(status
)) {
1094 if (NT_STATUS_IS_ERR(status
)) {
1098 /* Return variables */
1102 *werror
= r
.out
.result
;
1105 return werror_to_ntstatus(r
.out
.result
);
1108 struct rpccli_PNP_GetRelatedDeviceInstance_state
{
1109 struct PNP_GetRelatedDeviceInstance orig
;
1110 struct PNP_GetRelatedDeviceInstance tmp
;
1111 TALLOC_CTX
*out_mem_ctx
;
1112 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1115 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req
*subreq
);
1117 struct tevent_req
*rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX
*mem_ctx
,
1118 struct tevent_context
*ev
,
1119 struct rpc_pipe_client
*cli
)
1121 struct tevent_req
*req
;
1122 struct rpccli_PNP_GetRelatedDeviceInstance_state
*state
;
1123 struct tevent_req
*subreq
;
1125 req
= tevent_req_create(mem_ctx
, &state
,
1126 struct rpccli_PNP_GetRelatedDeviceInstance_state
);
1130 state
->out_mem_ctx
= NULL
;
1131 state
->dispatch_recv
= cli
->dispatch_recv
;
1135 /* Out parameters */
1138 ZERO_STRUCT(state
->orig
.out
.result
);
1140 /* make a temporary copy, that we pass to the dispatch function */
1141 state
->tmp
= state
->orig
;
1143 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1145 NDR_PNP_GETRELATEDDEVICEINSTANCE
,
1147 if (tevent_req_nomem(subreq
, req
)) {
1148 return tevent_req_post(req
, ev
);
1150 tevent_req_set_callback(subreq
, rpccli_PNP_GetRelatedDeviceInstance_done
, req
);
1154 static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req
*subreq
)
1156 struct tevent_req
*req
= tevent_req_callback_data(
1157 subreq
, struct tevent_req
);
1158 struct rpccli_PNP_GetRelatedDeviceInstance_state
*state
= tevent_req_data(
1159 req
, struct rpccli_PNP_GetRelatedDeviceInstance_state
);
1161 TALLOC_CTX
*mem_ctx
;
1163 if (state
->out_mem_ctx
) {
1164 mem_ctx
= state
->out_mem_ctx
;
1169 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1170 TALLOC_FREE(subreq
);
1171 if (!NT_STATUS_IS_OK(status
)) {
1172 tevent_req_nterror(req
, status
);
1176 /* Copy out parameters */
1179 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1181 /* Reset temporary structure */
1182 ZERO_STRUCT(state
->tmp
);
1184 tevent_req_done(req
);
1187 NTSTATUS
rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req
*req
,
1188 TALLOC_CTX
*mem_ctx
,
1191 struct rpccli_PNP_GetRelatedDeviceInstance_state
*state
= tevent_req_data(
1192 req
, struct rpccli_PNP_GetRelatedDeviceInstance_state
);
1195 if (tevent_req_is_nterror(req
, &status
)) {
1196 tevent_req_received(req
);
1200 /* Steal possbile out parameters to the callers context */
1201 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1204 *result
= state
->orig
.out
.result
;
1206 tevent_req_received(req
);
1207 return NT_STATUS_OK
;
1210 NTSTATUS
rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client
*cli
,
1211 TALLOC_CTX
*mem_ctx
,
1214 struct PNP_GetRelatedDeviceInstance r
;
1219 status
= cli
->dispatch(cli
,
1222 NDR_PNP_GETRELATEDDEVICEINSTANCE
,
1225 if (!NT_STATUS_IS_OK(status
)) {
1229 if (NT_STATUS_IS_ERR(status
)) {
1233 /* Return variables */
1237 *werror
= r
.out
.result
;
1240 return werror_to_ntstatus(r
.out
.result
);
1243 struct rpccli_PNP_EnumerateSubKeys_state
{
1244 struct PNP_EnumerateSubKeys orig
;
1245 struct PNP_EnumerateSubKeys tmp
;
1246 TALLOC_CTX
*out_mem_ctx
;
1247 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1250 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req
*subreq
);
1252 struct tevent_req
*rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX
*mem_ctx
,
1253 struct tevent_context
*ev
,
1254 struct rpc_pipe_client
*cli
)
1256 struct tevent_req
*req
;
1257 struct rpccli_PNP_EnumerateSubKeys_state
*state
;
1258 struct tevent_req
*subreq
;
1260 req
= tevent_req_create(mem_ctx
, &state
,
1261 struct rpccli_PNP_EnumerateSubKeys_state
);
1265 state
->out_mem_ctx
= NULL
;
1266 state
->dispatch_recv
= cli
->dispatch_recv
;
1270 /* Out parameters */
1273 ZERO_STRUCT(state
->orig
.out
.result
);
1275 /* make a temporary copy, that we pass to the dispatch function */
1276 state
->tmp
= state
->orig
;
1278 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1280 NDR_PNP_ENUMERATESUBKEYS
,
1282 if (tevent_req_nomem(subreq
, req
)) {
1283 return tevent_req_post(req
, ev
);
1285 tevent_req_set_callback(subreq
, rpccli_PNP_EnumerateSubKeys_done
, req
);
1289 static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req
*subreq
)
1291 struct tevent_req
*req
= tevent_req_callback_data(
1292 subreq
, struct tevent_req
);
1293 struct rpccli_PNP_EnumerateSubKeys_state
*state
= tevent_req_data(
1294 req
, struct rpccli_PNP_EnumerateSubKeys_state
);
1296 TALLOC_CTX
*mem_ctx
;
1298 if (state
->out_mem_ctx
) {
1299 mem_ctx
= state
->out_mem_ctx
;
1304 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1305 TALLOC_FREE(subreq
);
1306 if (!NT_STATUS_IS_OK(status
)) {
1307 tevent_req_nterror(req
, status
);
1311 /* Copy out parameters */
1314 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1316 /* Reset temporary structure */
1317 ZERO_STRUCT(state
->tmp
);
1319 tevent_req_done(req
);
1322 NTSTATUS
rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req
*req
,
1323 TALLOC_CTX
*mem_ctx
,
1326 struct rpccli_PNP_EnumerateSubKeys_state
*state
= tevent_req_data(
1327 req
, struct rpccli_PNP_EnumerateSubKeys_state
);
1330 if (tevent_req_is_nterror(req
, &status
)) {
1331 tevent_req_received(req
);
1335 /* Steal possbile out parameters to the callers context */
1336 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1339 *result
= state
->orig
.out
.result
;
1341 tevent_req_received(req
);
1342 return NT_STATUS_OK
;
1345 NTSTATUS
rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client
*cli
,
1346 TALLOC_CTX
*mem_ctx
,
1349 struct PNP_EnumerateSubKeys r
;
1354 status
= cli
->dispatch(cli
,
1357 NDR_PNP_ENUMERATESUBKEYS
,
1360 if (!NT_STATUS_IS_OK(status
)) {
1364 if (NT_STATUS_IS_ERR(status
)) {
1368 /* Return variables */
1372 *werror
= r
.out
.result
;
1375 return werror_to_ntstatus(r
.out
.result
);
1378 struct rpccli_PNP_GetDeviceList_state
{
1379 struct PNP_GetDeviceList orig
;
1380 struct PNP_GetDeviceList tmp
;
1381 TALLOC_CTX
*out_mem_ctx
;
1382 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1385 static void rpccli_PNP_GetDeviceList_done(struct tevent_req
*subreq
);
1387 struct tevent_req
*rpccli_PNP_GetDeviceList_send(TALLOC_CTX
*mem_ctx
,
1388 struct tevent_context
*ev
,
1389 struct rpc_pipe_client
*cli
,
1390 const char *_filter
/* [in] [unique,charset(UTF16)] */,
1391 uint16_t *_buffer
/* [out] [ref,length_is(*length),size_is(*length)] */,
1392 uint32_t *_length
/* [in,out] [ref] */,
1393 uint32_t _flags
/* [in] */)
1395 struct tevent_req
*req
;
1396 struct rpccli_PNP_GetDeviceList_state
*state
;
1397 struct tevent_req
*subreq
;
1399 req
= tevent_req_create(mem_ctx
, &state
,
1400 struct rpccli_PNP_GetDeviceList_state
);
1404 state
->out_mem_ctx
= NULL
;
1405 state
->dispatch_recv
= cli
->dispatch_recv
;
1408 state
->orig
.in
.filter
= _filter
;
1409 state
->orig
.in
.length
= _length
;
1410 state
->orig
.in
.flags
= _flags
;
1412 /* Out parameters */
1413 state
->orig
.out
.buffer
= _buffer
;
1414 state
->orig
.out
.length
= _length
;
1417 ZERO_STRUCT(state
->orig
.out
.result
);
1419 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1420 "rpccli_PNP_GetDeviceList_out_memory");
1421 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1422 return tevent_req_post(req
, ev
);
1425 /* make a temporary copy, that we pass to the dispatch function */
1426 state
->tmp
= state
->orig
;
1428 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1430 NDR_PNP_GETDEVICELIST
,
1432 if (tevent_req_nomem(subreq
, req
)) {
1433 return tevent_req_post(req
, ev
);
1435 tevent_req_set_callback(subreq
, rpccli_PNP_GetDeviceList_done
, req
);
1439 static void rpccli_PNP_GetDeviceList_done(struct tevent_req
*subreq
)
1441 struct tevent_req
*req
= tevent_req_callback_data(
1442 subreq
, struct tevent_req
);
1443 struct rpccli_PNP_GetDeviceList_state
*state
= tevent_req_data(
1444 req
, struct rpccli_PNP_GetDeviceList_state
);
1446 TALLOC_CTX
*mem_ctx
;
1448 if (state
->out_mem_ctx
) {
1449 mem_ctx
= state
->out_mem_ctx
;
1454 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1455 TALLOC_FREE(subreq
);
1456 if (!NT_STATUS_IS_OK(status
)) {
1457 tevent_req_nterror(req
, status
);
1461 /* Copy out parameters */
1462 if ((*state
->tmp
.out
.length
) > (*state
->tmp
.in
.length
)) {
1463 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
1466 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (*state
->tmp
.out
.length
) * sizeof(*state
->orig
.out
.buffer
));
1467 *state
->orig
.out
.length
= *state
->tmp
.out
.length
;
1470 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1472 /* Reset temporary structure */
1473 ZERO_STRUCT(state
->tmp
);
1475 tevent_req_done(req
);
1478 NTSTATUS
rpccli_PNP_GetDeviceList_recv(struct tevent_req
*req
,
1479 TALLOC_CTX
*mem_ctx
,
1482 struct rpccli_PNP_GetDeviceList_state
*state
= tevent_req_data(
1483 req
, struct rpccli_PNP_GetDeviceList_state
);
1486 if (tevent_req_is_nterror(req
, &status
)) {
1487 tevent_req_received(req
);
1491 /* Steal possbile out parameters to the callers context */
1492 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1495 *result
= state
->orig
.out
.result
;
1497 tevent_req_received(req
);
1498 return NT_STATUS_OK
;
1501 NTSTATUS
rpccli_PNP_GetDeviceList(struct rpc_pipe_client
*cli
,
1502 TALLOC_CTX
*mem_ctx
,
1503 const char *filter
/* [in] [unique,charset(UTF16)] */,
1504 uint16_t *buffer
/* [out] [ref,length_is(*length),size_is(*length)] */,
1505 uint32_t *length
/* [in,out] [ref] */,
1506 uint32_t flags
/* [in] */,
1509 struct PNP_GetDeviceList r
;
1513 r
.in
.filter
= filter
;
1514 r
.in
.length
= length
;
1517 status
= cli
->dispatch(cli
,
1520 NDR_PNP_GETDEVICELIST
,
1523 if (!NT_STATUS_IS_OK(status
)) {
1527 if (NT_STATUS_IS_ERR(status
)) {
1531 /* Return variables */
1532 if ((*r
.out
.length
) > (*r
.in
.length
)) {
1533 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
1535 memcpy(buffer
, r
.out
.buffer
, (*r
.out
.length
) * sizeof(*buffer
));
1536 *length
= *r
.out
.length
;
1540 *werror
= r
.out
.result
;
1543 return werror_to_ntstatus(r
.out
.result
);
1546 struct rpccli_PNP_GetDeviceListSize_state
{
1547 struct PNP_GetDeviceListSize orig
;
1548 struct PNP_GetDeviceListSize tmp
;
1549 TALLOC_CTX
*out_mem_ctx
;
1550 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1553 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req
*subreq
);
1555 struct tevent_req
*rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX
*mem_ctx
,
1556 struct tevent_context
*ev
,
1557 struct rpc_pipe_client
*cli
,
1558 const char *_devicename
/* [in] [unique,charset(UTF16)] */,
1559 uint32_t *_size
/* [out] [ref] */,
1560 uint32_t _flags
/* [in] */)
1562 struct tevent_req
*req
;
1563 struct rpccli_PNP_GetDeviceListSize_state
*state
;
1564 struct tevent_req
*subreq
;
1566 req
= tevent_req_create(mem_ctx
, &state
,
1567 struct rpccli_PNP_GetDeviceListSize_state
);
1571 state
->out_mem_ctx
= NULL
;
1572 state
->dispatch_recv
= cli
->dispatch_recv
;
1575 state
->orig
.in
.devicename
= _devicename
;
1576 state
->orig
.in
.flags
= _flags
;
1578 /* Out parameters */
1579 state
->orig
.out
.size
= _size
;
1582 ZERO_STRUCT(state
->orig
.out
.result
);
1584 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1585 "rpccli_PNP_GetDeviceListSize_out_memory");
1586 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1587 return tevent_req_post(req
, ev
);
1590 /* make a temporary copy, that we pass to the dispatch function */
1591 state
->tmp
= state
->orig
;
1593 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1595 NDR_PNP_GETDEVICELISTSIZE
,
1597 if (tevent_req_nomem(subreq
, req
)) {
1598 return tevent_req_post(req
, ev
);
1600 tevent_req_set_callback(subreq
, rpccli_PNP_GetDeviceListSize_done
, req
);
1604 static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req
*subreq
)
1606 struct tevent_req
*req
= tevent_req_callback_data(
1607 subreq
, struct tevent_req
);
1608 struct rpccli_PNP_GetDeviceListSize_state
*state
= tevent_req_data(
1609 req
, struct rpccli_PNP_GetDeviceListSize_state
);
1611 TALLOC_CTX
*mem_ctx
;
1613 if (state
->out_mem_ctx
) {
1614 mem_ctx
= state
->out_mem_ctx
;
1619 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1620 TALLOC_FREE(subreq
);
1621 if (!NT_STATUS_IS_OK(status
)) {
1622 tevent_req_nterror(req
, status
);
1626 /* Copy out parameters */
1627 *state
->orig
.out
.size
= *state
->tmp
.out
.size
;
1630 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1632 /* Reset temporary structure */
1633 ZERO_STRUCT(state
->tmp
);
1635 tevent_req_done(req
);
1638 NTSTATUS
rpccli_PNP_GetDeviceListSize_recv(struct tevent_req
*req
,
1639 TALLOC_CTX
*mem_ctx
,
1642 struct rpccli_PNP_GetDeviceListSize_state
*state
= tevent_req_data(
1643 req
, struct rpccli_PNP_GetDeviceListSize_state
);
1646 if (tevent_req_is_nterror(req
, &status
)) {
1647 tevent_req_received(req
);
1651 /* Steal possbile out parameters to the callers context */
1652 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1655 *result
= state
->orig
.out
.result
;
1657 tevent_req_received(req
);
1658 return NT_STATUS_OK
;
1661 NTSTATUS
rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client
*cli
,
1662 TALLOC_CTX
*mem_ctx
,
1663 const char *devicename
/* [in] [unique,charset(UTF16)] */,
1664 uint32_t *size
/* [out] [ref] */,
1665 uint32_t flags
/* [in] */,
1668 struct PNP_GetDeviceListSize r
;
1672 r
.in
.devicename
= devicename
;
1675 status
= cli
->dispatch(cli
,
1678 NDR_PNP_GETDEVICELISTSIZE
,
1681 if (!NT_STATUS_IS_OK(status
)) {
1685 if (NT_STATUS_IS_ERR(status
)) {
1689 /* Return variables */
1690 *size
= *r
.out
.size
;
1694 *werror
= r
.out
.result
;
1697 return werror_to_ntstatus(r
.out
.result
);
1700 struct rpccli_PNP_GetDepth_state
{
1701 struct PNP_GetDepth orig
;
1702 struct PNP_GetDepth tmp
;
1703 TALLOC_CTX
*out_mem_ctx
;
1704 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1707 static void rpccli_PNP_GetDepth_done(struct tevent_req
*subreq
);
1709 struct tevent_req
*rpccli_PNP_GetDepth_send(TALLOC_CTX
*mem_ctx
,
1710 struct tevent_context
*ev
,
1711 struct rpc_pipe_client
*cli
)
1713 struct tevent_req
*req
;
1714 struct rpccli_PNP_GetDepth_state
*state
;
1715 struct tevent_req
*subreq
;
1717 req
= tevent_req_create(mem_ctx
, &state
,
1718 struct rpccli_PNP_GetDepth_state
);
1722 state
->out_mem_ctx
= NULL
;
1723 state
->dispatch_recv
= cli
->dispatch_recv
;
1727 /* Out parameters */
1730 ZERO_STRUCT(state
->orig
.out
.result
);
1732 /* make a temporary copy, that we pass to the dispatch function */
1733 state
->tmp
= state
->orig
;
1735 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1739 if (tevent_req_nomem(subreq
, req
)) {
1740 return tevent_req_post(req
, ev
);
1742 tevent_req_set_callback(subreq
, rpccli_PNP_GetDepth_done
, req
);
1746 static void rpccli_PNP_GetDepth_done(struct tevent_req
*subreq
)
1748 struct tevent_req
*req
= tevent_req_callback_data(
1749 subreq
, struct tevent_req
);
1750 struct rpccli_PNP_GetDepth_state
*state
= tevent_req_data(
1751 req
, struct rpccli_PNP_GetDepth_state
);
1753 TALLOC_CTX
*mem_ctx
;
1755 if (state
->out_mem_ctx
) {
1756 mem_ctx
= state
->out_mem_ctx
;
1761 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1762 TALLOC_FREE(subreq
);
1763 if (!NT_STATUS_IS_OK(status
)) {
1764 tevent_req_nterror(req
, status
);
1768 /* Copy out parameters */
1771 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1773 /* Reset temporary structure */
1774 ZERO_STRUCT(state
->tmp
);
1776 tevent_req_done(req
);
1779 NTSTATUS
rpccli_PNP_GetDepth_recv(struct tevent_req
*req
,
1780 TALLOC_CTX
*mem_ctx
,
1783 struct rpccli_PNP_GetDepth_state
*state
= tevent_req_data(
1784 req
, struct rpccli_PNP_GetDepth_state
);
1787 if (tevent_req_is_nterror(req
, &status
)) {
1788 tevent_req_received(req
);
1792 /* Steal possbile out parameters to the callers context */
1793 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1796 *result
= state
->orig
.out
.result
;
1798 tevent_req_received(req
);
1799 return NT_STATUS_OK
;
1802 NTSTATUS
rpccli_PNP_GetDepth(struct rpc_pipe_client
*cli
,
1803 TALLOC_CTX
*mem_ctx
,
1806 struct PNP_GetDepth r
;
1811 status
= cli
->dispatch(cli
,
1817 if (!NT_STATUS_IS_OK(status
)) {
1821 if (NT_STATUS_IS_ERR(status
)) {
1825 /* Return variables */
1829 *werror
= r
.out
.result
;
1832 return werror_to_ntstatus(r
.out
.result
);
1835 struct rpccli_PNP_GetDeviceRegProp_state
{
1836 struct PNP_GetDeviceRegProp orig
;
1837 struct PNP_GetDeviceRegProp tmp
;
1838 TALLOC_CTX
*out_mem_ctx
;
1839 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1842 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req
*subreq
);
1844 struct tevent_req
*rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX
*mem_ctx
,
1845 struct tevent_context
*ev
,
1846 struct rpc_pipe_client
*cli
,
1847 const char *_devicepath
/* [in] [ref,charset(UTF16)] */,
1848 uint32_t _property
/* [in] */,
1849 enum winreg_Type
*_reg_data_type
/* [in,out] [ref] */,
1850 uint8_t *_buffer
/* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1851 uint32_t *_buffer_size
/* [in,out] [ref] */,
1852 uint32_t *_needed
/* [in,out] [ref] */,
1853 uint32_t _flags
/* [in] */)
1855 struct tevent_req
*req
;
1856 struct rpccli_PNP_GetDeviceRegProp_state
*state
;
1857 struct tevent_req
*subreq
;
1859 req
= tevent_req_create(mem_ctx
, &state
,
1860 struct rpccli_PNP_GetDeviceRegProp_state
);
1864 state
->out_mem_ctx
= NULL
;
1865 state
->dispatch_recv
= cli
->dispatch_recv
;
1868 state
->orig
.in
.devicepath
= _devicepath
;
1869 state
->orig
.in
.property
= _property
;
1870 state
->orig
.in
.reg_data_type
= _reg_data_type
;
1871 state
->orig
.in
.buffer_size
= _buffer_size
;
1872 state
->orig
.in
.needed
= _needed
;
1873 state
->orig
.in
.flags
= _flags
;
1875 /* Out parameters */
1876 state
->orig
.out
.reg_data_type
= _reg_data_type
;
1877 state
->orig
.out
.buffer
= _buffer
;
1878 state
->orig
.out
.buffer_size
= _buffer_size
;
1879 state
->orig
.out
.needed
= _needed
;
1882 ZERO_STRUCT(state
->orig
.out
.result
);
1884 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1885 "rpccli_PNP_GetDeviceRegProp_out_memory");
1886 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1887 return tevent_req_post(req
, ev
);
1890 /* make a temporary copy, that we pass to the dispatch function */
1891 state
->tmp
= state
->orig
;
1893 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1895 NDR_PNP_GETDEVICEREGPROP
,
1897 if (tevent_req_nomem(subreq
, req
)) {
1898 return tevent_req_post(req
, ev
);
1900 tevent_req_set_callback(subreq
, rpccli_PNP_GetDeviceRegProp_done
, req
);
1904 static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req
*subreq
)
1906 struct tevent_req
*req
= tevent_req_callback_data(
1907 subreq
, struct tevent_req
);
1908 struct rpccli_PNP_GetDeviceRegProp_state
*state
= tevent_req_data(
1909 req
, struct rpccli_PNP_GetDeviceRegProp_state
);
1911 TALLOC_CTX
*mem_ctx
;
1913 if (state
->out_mem_ctx
) {
1914 mem_ctx
= state
->out_mem_ctx
;
1919 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1920 TALLOC_FREE(subreq
);
1921 if (!NT_STATUS_IS_OK(status
)) {
1922 tevent_req_nterror(req
, status
);
1926 /* Copy out parameters */
1927 *state
->orig
.out
.reg_data_type
= *state
->tmp
.out
.reg_data_type
;
1928 if ((*state
->tmp
.out
.buffer_size
) > (*state
->tmp
.in
.buffer_size
)) {
1929 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
1932 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (*state
->tmp
.out
.buffer_size
) * sizeof(*state
->orig
.out
.buffer
));
1933 *state
->orig
.out
.buffer_size
= *state
->tmp
.out
.buffer_size
;
1934 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
1937 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1939 /* Reset temporary structure */
1940 ZERO_STRUCT(state
->tmp
);
1942 tevent_req_done(req
);
1945 NTSTATUS
rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req
*req
,
1946 TALLOC_CTX
*mem_ctx
,
1949 struct rpccli_PNP_GetDeviceRegProp_state
*state
= tevent_req_data(
1950 req
, struct rpccli_PNP_GetDeviceRegProp_state
);
1953 if (tevent_req_is_nterror(req
, &status
)) {
1954 tevent_req_received(req
);
1958 /* Steal possbile out parameters to the callers context */
1959 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1962 *result
= state
->orig
.out
.result
;
1964 tevent_req_received(req
);
1965 return NT_STATUS_OK
;
1968 NTSTATUS
rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client
*cli
,
1969 TALLOC_CTX
*mem_ctx
,
1970 const char *devicepath
/* [in] [ref,charset(UTF16)] */,
1971 uint32_t property
/* [in] */,
1972 enum winreg_Type
*reg_data_type
/* [in,out] [ref] */,
1973 uint8_t *buffer
/* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
1974 uint32_t *buffer_size
/* [in,out] [ref] */,
1975 uint32_t *needed
/* [in,out] [ref] */,
1976 uint32_t flags
/* [in] */,
1979 struct PNP_GetDeviceRegProp r
;
1983 r
.in
.devicepath
= devicepath
;
1984 r
.in
.property
= property
;
1985 r
.in
.reg_data_type
= reg_data_type
;
1986 r
.in
.buffer_size
= buffer_size
;
1987 r
.in
.needed
= needed
;
1990 status
= cli
->dispatch(cli
,
1993 NDR_PNP_GETDEVICEREGPROP
,
1996 if (!NT_STATUS_IS_OK(status
)) {
2000 if (NT_STATUS_IS_ERR(status
)) {
2004 /* Return variables */
2005 *reg_data_type
= *r
.out
.reg_data_type
;
2006 if ((*r
.out
.buffer_size
) > (*r
.in
.buffer_size
)) {
2007 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
2009 memcpy(buffer
, r
.out
.buffer
, (*r
.out
.buffer_size
) * sizeof(*buffer
));
2010 *buffer_size
= *r
.out
.buffer_size
;
2011 *needed
= *r
.out
.needed
;
2015 *werror
= r
.out
.result
;
2018 return werror_to_ntstatus(r
.out
.result
);
2021 struct rpccli_PNP_SetDeviceRegProp_state
{
2022 struct PNP_SetDeviceRegProp orig
;
2023 struct PNP_SetDeviceRegProp tmp
;
2024 TALLOC_CTX
*out_mem_ctx
;
2025 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2028 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req
*subreq
);
2030 struct tevent_req
*rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX
*mem_ctx
,
2031 struct tevent_context
*ev
,
2032 struct rpc_pipe_client
*cli
)
2034 struct tevent_req
*req
;
2035 struct rpccli_PNP_SetDeviceRegProp_state
*state
;
2036 struct tevent_req
*subreq
;
2038 req
= tevent_req_create(mem_ctx
, &state
,
2039 struct rpccli_PNP_SetDeviceRegProp_state
);
2043 state
->out_mem_ctx
= NULL
;
2044 state
->dispatch_recv
= cli
->dispatch_recv
;
2048 /* Out parameters */
2051 ZERO_STRUCT(state
->orig
.out
.result
);
2053 /* make a temporary copy, that we pass to the dispatch function */
2054 state
->tmp
= state
->orig
;
2056 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2058 NDR_PNP_SETDEVICEREGPROP
,
2060 if (tevent_req_nomem(subreq
, req
)) {
2061 return tevent_req_post(req
, ev
);
2063 tevent_req_set_callback(subreq
, rpccli_PNP_SetDeviceRegProp_done
, req
);
2067 static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req
*subreq
)
2069 struct tevent_req
*req
= tevent_req_callback_data(
2070 subreq
, struct tevent_req
);
2071 struct rpccli_PNP_SetDeviceRegProp_state
*state
= tevent_req_data(
2072 req
, struct rpccli_PNP_SetDeviceRegProp_state
);
2074 TALLOC_CTX
*mem_ctx
;
2076 if (state
->out_mem_ctx
) {
2077 mem_ctx
= state
->out_mem_ctx
;
2082 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2083 TALLOC_FREE(subreq
);
2084 if (!NT_STATUS_IS_OK(status
)) {
2085 tevent_req_nterror(req
, status
);
2089 /* Copy out parameters */
2092 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2094 /* Reset temporary structure */
2095 ZERO_STRUCT(state
->tmp
);
2097 tevent_req_done(req
);
2100 NTSTATUS
rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req
*req
,
2101 TALLOC_CTX
*mem_ctx
,
2104 struct rpccli_PNP_SetDeviceRegProp_state
*state
= tevent_req_data(
2105 req
, struct rpccli_PNP_SetDeviceRegProp_state
);
2108 if (tevent_req_is_nterror(req
, &status
)) {
2109 tevent_req_received(req
);
2113 /* Steal possbile out parameters to the callers context */
2114 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2117 *result
= state
->orig
.out
.result
;
2119 tevent_req_received(req
);
2120 return NT_STATUS_OK
;
2123 NTSTATUS
rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client
*cli
,
2124 TALLOC_CTX
*mem_ctx
,
2127 struct PNP_SetDeviceRegProp r
;
2132 status
= cli
->dispatch(cli
,
2135 NDR_PNP_SETDEVICEREGPROP
,
2138 if (!NT_STATUS_IS_OK(status
)) {
2142 if (NT_STATUS_IS_ERR(status
)) {
2146 /* Return variables */
2150 *werror
= r
.out
.result
;
2153 return werror_to_ntstatus(r
.out
.result
);
2156 struct rpccli_PNP_GetClassInstance_state
{
2157 struct PNP_GetClassInstance orig
;
2158 struct PNP_GetClassInstance tmp
;
2159 TALLOC_CTX
*out_mem_ctx
;
2160 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2163 static void rpccli_PNP_GetClassInstance_done(struct tevent_req
*subreq
);
2165 struct tevent_req
*rpccli_PNP_GetClassInstance_send(TALLOC_CTX
*mem_ctx
,
2166 struct tevent_context
*ev
,
2167 struct rpc_pipe_client
*cli
)
2169 struct tevent_req
*req
;
2170 struct rpccli_PNP_GetClassInstance_state
*state
;
2171 struct tevent_req
*subreq
;
2173 req
= tevent_req_create(mem_ctx
, &state
,
2174 struct rpccli_PNP_GetClassInstance_state
);
2178 state
->out_mem_ctx
= NULL
;
2179 state
->dispatch_recv
= cli
->dispatch_recv
;
2183 /* Out parameters */
2186 ZERO_STRUCT(state
->orig
.out
.result
);
2188 /* make a temporary copy, that we pass to the dispatch function */
2189 state
->tmp
= state
->orig
;
2191 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2193 NDR_PNP_GETCLASSINSTANCE
,
2195 if (tevent_req_nomem(subreq
, req
)) {
2196 return tevent_req_post(req
, ev
);
2198 tevent_req_set_callback(subreq
, rpccli_PNP_GetClassInstance_done
, req
);
2202 static void rpccli_PNP_GetClassInstance_done(struct tevent_req
*subreq
)
2204 struct tevent_req
*req
= tevent_req_callback_data(
2205 subreq
, struct tevent_req
);
2206 struct rpccli_PNP_GetClassInstance_state
*state
= tevent_req_data(
2207 req
, struct rpccli_PNP_GetClassInstance_state
);
2209 TALLOC_CTX
*mem_ctx
;
2211 if (state
->out_mem_ctx
) {
2212 mem_ctx
= state
->out_mem_ctx
;
2217 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2218 TALLOC_FREE(subreq
);
2219 if (!NT_STATUS_IS_OK(status
)) {
2220 tevent_req_nterror(req
, status
);
2224 /* Copy out parameters */
2227 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2229 /* Reset temporary structure */
2230 ZERO_STRUCT(state
->tmp
);
2232 tevent_req_done(req
);
2235 NTSTATUS
rpccli_PNP_GetClassInstance_recv(struct tevent_req
*req
,
2236 TALLOC_CTX
*mem_ctx
,
2239 struct rpccli_PNP_GetClassInstance_state
*state
= tevent_req_data(
2240 req
, struct rpccli_PNP_GetClassInstance_state
);
2243 if (tevent_req_is_nterror(req
, &status
)) {
2244 tevent_req_received(req
);
2248 /* Steal possbile out parameters to the callers context */
2249 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2252 *result
= state
->orig
.out
.result
;
2254 tevent_req_received(req
);
2255 return NT_STATUS_OK
;
2258 NTSTATUS
rpccli_PNP_GetClassInstance(struct rpc_pipe_client
*cli
,
2259 TALLOC_CTX
*mem_ctx
,
2262 struct PNP_GetClassInstance r
;
2267 status
= cli
->dispatch(cli
,
2270 NDR_PNP_GETCLASSINSTANCE
,
2273 if (!NT_STATUS_IS_OK(status
)) {
2277 if (NT_STATUS_IS_ERR(status
)) {
2281 /* Return variables */
2285 *werror
= r
.out
.result
;
2288 return werror_to_ntstatus(r
.out
.result
);
2291 struct rpccli_PNP_CreateKey_state
{
2292 struct PNP_CreateKey orig
;
2293 struct PNP_CreateKey tmp
;
2294 TALLOC_CTX
*out_mem_ctx
;
2295 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2298 static void rpccli_PNP_CreateKey_done(struct tevent_req
*subreq
);
2300 struct tevent_req
*rpccli_PNP_CreateKey_send(TALLOC_CTX
*mem_ctx
,
2301 struct tevent_context
*ev
,
2302 struct rpc_pipe_client
*cli
)
2304 struct tevent_req
*req
;
2305 struct rpccli_PNP_CreateKey_state
*state
;
2306 struct tevent_req
*subreq
;
2308 req
= tevent_req_create(mem_ctx
, &state
,
2309 struct rpccli_PNP_CreateKey_state
);
2313 state
->out_mem_ctx
= NULL
;
2314 state
->dispatch_recv
= cli
->dispatch_recv
;
2318 /* Out parameters */
2321 ZERO_STRUCT(state
->orig
.out
.result
);
2323 /* make a temporary copy, that we pass to the dispatch function */
2324 state
->tmp
= state
->orig
;
2326 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2330 if (tevent_req_nomem(subreq
, req
)) {
2331 return tevent_req_post(req
, ev
);
2333 tevent_req_set_callback(subreq
, rpccli_PNP_CreateKey_done
, req
);
2337 static void rpccli_PNP_CreateKey_done(struct tevent_req
*subreq
)
2339 struct tevent_req
*req
= tevent_req_callback_data(
2340 subreq
, struct tevent_req
);
2341 struct rpccli_PNP_CreateKey_state
*state
= tevent_req_data(
2342 req
, struct rpccli_PNP_CreateKey_state
);
2344 TALLOC_CTX
*mem_ctx
;
2346 if (state
->out_mem_ctx
) {
2347 mem_ctx
= state
->out_mem_ctx
;
2352 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2353 TALLOC_FREE(subreq
);
2354 if (!NT_STATUS_IS_OK(status
)) {
2355 tevent_req_nterror(req
, status
);
2359 /* Copy out parameters */
2362 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2364 /* Reset temporary structure */
2365 ZERO_STRUCT(state
->tmp
);
2367 tevent_req_done(req
);
2370 NTSTATUS
rpccli_PNP_CreateKey_recv(struct tevent_req
*req
,
2371 TALLOC_CTX
*mem_ctx
,
2374 struct rpccli_PNP_CreateKey_state
*state
= tevent_req_data(
2375 req
, struct rpccli_PNP_CreateKey_state
);
2378 if (tevent_req_is_nterror(req
, &status
)) {
2379 tevent_req_received(req
);
2383 /* Steal possbile out parameters to the callers context */
2384 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2387 *result
= state
->orig
.out
.result
;
2389 tevent_req_received(req
);
2390 return NT_STATUS_OK
;
2393 NTSTATUS
rpccli_PNP_CreateKey(struct rpc_pipe_client
*cli
,
2394 TALLOC_CTX
*mem_ctx
,
2397 struct PNP_CreateKey r
;
2402 status
= cli
->dispatch(cli
,
2408 if (!NT_STATUS_IS_OK(status
)) {
2412 if (NT_STATUS_IS_ERR(status
)) {
2416 /* Return variables */
2420 *werror
= r
.out
.result
;
2423 return werror_to_ntstatus(r
.out
.result
);
2426 struct rpccli_PNP_DeleteRegistryKey_state
{
2427 struct PNP_DeleteRegistryKey orig
;
2428 struct PNP_DeleteRegistryKey tmp
;
2429 TALLOC_CTX
*out_mem_ctx
;
2430 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2433 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req
*subreq
);
2435 struct tevent_req
*rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX
*mem_ctx
,
2436 struct tevent_context
*ev
,
2437 struct rpc_pipe_client
*cli
)
2439 struct tevent_req
*req
;
2440 struct rpccli_PNP_DeleteRegistryKey_state
*state
;
2441 struct tevent_req
*subreq
;
2443 req
= tevent_req_create(mem_ctx
, &state
,
2444 struct rpccli_PNP_DeleteRegistryKey_state
);
2448 state
->out_mem_ctx
= NULL
;
2449 state
->dispatch_recv
= cli
->dispatch_recv
;
2453 /* Out parameters */
2456 ZERO_STRUCT(state
->orig
.out
.result
);
2458 /* make a temporary copy, that we pass to the dispatch function */
2459 state
->tmp
= state
->orig
;
2461 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2463 NDR_PNP_DELETEREGISTRYKEY
,
2465 if (tevent_req_nomem(subreq
, req
)) {
2466 return tevent_req_post(req
, ev
);
2468 tevent_req_set_callback(subreq
, rpccli_PNP_DeleteRegistryKey_done
, req
);
2472 static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req
*subreq
)
2474 struct tevent_req
*req
= tevent_req_callback_data(
2475 subreq
, struct tevent_req
);
2476 struct rpccli_PNP_DeleteRegistryKey_state
*state
= tevent_req_data(
2477 req
, struct rpccli_PNP_DeleteRegistryKey_state
);
2479 TALLOC_CTX
*mem_ctx
;
2481 if (state
->out_mem_ctx
) {
2482 mem_ctx
= state
->out_mem_ctx
;
2487 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2488 TALLOC_FREE(subreq
);
2489 if (!NT_STATUS_IS_OK(status
)) {
2490 tevent_req_nterror(req
, status
);
2494 /* Copy out parameters */
2497 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2499 /* Reset temporary structure */
2500 ZERO_STRUCT(state
->tmp
);
2502 tevent_req_done(req
);
2505 NTSTATUS
rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req
*req
,
2506 TALLOC_CTX
*mem_ctx
,
2509 struct rpccli_PNP_DeleteRegistryKey_state
*state
= tevent_req_data(
2510 req
, struct rpccli_PNP_DeleteRegistryKey_state
);
2513 if (tevent_req_is_nterror(req
, &status
)) {
2514 tevent_req_received(req
);
2518 /* Steal possbile out parameters to the callers context */
2519 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2522 *result
= state
->orig
.out
.result
;
2524 tevent_req_received(req
);
2525 return NT_STATUS_OK
;
2528 NTSTATUS
rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client
*cli
,
2529 TALLOC_CTX
*mem_ctx
,
2532 struct PNP_DeleteRegistryKey r
;
2537 status
= cli
->dispatch(cli
,
2540 NDR_PNP_DELETEREGISTRYKEY
,
2543 if (!NT_STATUS_IS_OK(status
)) {
2547 if (NT_STATUS_IS_ERR(status
)) {
2551 /* Return variables */
2555 *werror
= r
.out
.result
;
2558 return werror_to_ntstatus(r
.out
.result
);
2561 struct rpccli_PNP_GetClassCount_state
{
2562 struct PNP_GetClassCount orig
;
2563 struct PNP_GetClassCount tmp
;
2564 TALLOC_CTX
*out_mem_ctx
;
2565 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2568 static void rpccli_PNP_GetClassCount_done(struct tevent_req
*subreq
);
2570 struct tevent_req
*rpccli_PNP_GetClassCount_send(TALLOC_CTX
*mem_ctx
,
2571 struct tevent_context
*ev
,
2572 struct rpc_pipe_client
*cli
)
2574 struct tevent_req
*req
;
2575 struct rpccli_PNP_GetClassCount_state
*state
;
2576 struct tevent_req
*subreq
;
2578 req
= tevent_req_create(mem_ctx
, &state
,
2579 struct rpccli_PNP_GetClassCount_state
);
2583 state
->out_mem_ctx
= NULL
;
2584 state
->dispatch_recv
= cli
->dispatch_recv
;
2588 /* Out parameters */
2591 ZERO_STRUCT(state
->orig
.out
.result
);
2593 /* make a temporary copy, that we pass to the dispatch function */
2594 state
->tmp
= state
->orig
;
2596 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2598 NDR_PNP_GETCLASSCOUNT
,
2600 if (tevent_req_nomem(subreq
, req
)) {
2601 return tevent_req_post(req
, ev
);
2603 tevent_req_set_callback(subreq
, rpccli_PNP_GetClassCount_done
, req
);
2607 static void rpccli_PNP_GetClassCount_done(struct tevent_req
*subreq
)
2609 struct tevent_req
*req
= tevent_req_callback_data(
2610 subreq
, struct tevent_req
);
2611 struct rpccli_PNP_GetClassCount_state
*state
= tevent_req_data(
2612 req
, struct rpccli_PNP_GetClassCount_state
);
2614 TALLOC_CTX
*mem_ctx
;
2616 if (state
->out_mem_ctx
) {
2617 mem_ctx
= state
->out_mem_ctx
;
2622 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2623 TALLOC_FREE(subreq
);
2624 if (!NT_STATUS_IS_OK(status
)) {
2625 tevent_req_nterror(req
, status
);
2629 /* Copy out parameters */
2632 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2634 /* Reset temporary structure */
2635 ZERO_STRUCT(state
->tmp
);
2637 tevent_req_done(req
);
2640 NTSTATUS
rpccli_PNP_GetClassCount_recv(struct tevent_req
*req
,
2641 TALLOC_CTX
*mem_ctx
,
2644 struct rpccli_PNP_GetClassCount_state
*state
= tevent_req_data(
2645 req
, struct rpccli_PNP_GetClassCount_state
);
2648 if (tevent_req_is_nterror(req
, &status
)) {
2649 tevent_req_received(req
);
2653 /* Steal possbile out parameters to the callers context */
2654 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2657 *result
= state
->orig
.out
.result
;
2659 tevent_req_received(req
);
2660 return NT_STATUS_OK
;
2663 NTSTATUS
rpccli_PNP_GetClassCount(struct rpc_pipe_client
*cli
,
2664 TALLOC_CTX
*mem_ctx
,
2667 struct PNP_GetClassCount r
;
2672 status
= cli
->dispatch(cli
,
2675 NDR_PNP_GETCLASSCOUNT
,
2678 if (!NT_STATUS_IS_OK(status
)) {
2682 if (NT_STATUS_IS_ERR(status
)) {
2686 /* Return variables */
2690 *werror
= r
.out
.result
;
2693 return werror_to_ntstatus(r
.out
.result
);
2696 struct rpccli_PNP_GetClassName_state
{
2697 struct PNP_GetClassName orig
;
2698 struct PNP_GetClassName tmp
;
2699 TALLOC_CTX
*out_mem_ctx
;
2700 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2703 static void rpccli_PNP_GetClassName_done(struct tevent_req
*subreq
);
2705 struct tevent_req
*rpccli_PNP_GetClassName_send(TALLOC_CTX
*mem_ctx
,
2706 struct tevent_context
*ev
,
2707 struct rpc_pipe_client
*cli
)
2709 struct tevent_req
*req
;
2710 struct rpccli_PNP_GetClassName_state
*state
;
2711 struct tevent_req
*subreq
;
2713 req
= tevent_req_create(mem_ctx
, &state
,
2714 struct rpccli_PNP_GetClassName_state
);
2718 state
->out_mem_ctx
= NULL
;
2719 state
->dispatch_recv
= cli
->dispatch_recv
;
2723 /* Out parameters */
2726 ZERO_STRUCT(state
->orig
.out
.result
);
2728 /* make a temporary copy, that we pass to the dispatch function */
2729 state
->tmp
= state
->orig
;
2731 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2733 NDR_PNP_GETCLASSNAME
,
2735 if (tevent_req_nomem(subreq
, req
)) {
2736 return tevent_req_post(req
, ev
);
2738 tevent_req_set_callback(subreq
, rpccli_PNP_GetClassName_done
, req
);
2742 static void rpccli_PNP_GetClassName_done(struct tevent_req
*subreq
)
2744 struct tevent_req
*req
= tevent_req_callback_data(
2745 subreq
, struct tevent_req
);
2746 struct rpccli_PNP_GetClassName_state
*state
= tevent_req_data(
2747 req
, struct rpccli_PNP_GetClassName_state
);
2749 TALLOC_CTX
*mem_ctx
;
2751 if (state
->out_mem_ctx
) {
2752 mem_ctx
= state
->out_mem_ctx
;
2757 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2758 TALLOC_FREE(subreq
);
2759 if (!NT_STATUS_IS_OK(status
)) {
2760 tevent_req_nterror(req
, status
);
2764 /* Copy out parameters */
2767 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2769 /* Reset temporary structure */
2770 ZERO_STRUCT(state
->tmp
);
2772 tevent_req_done(req
);
2775 NTSTATUS
rpccli_PNP_GetClassName_recv(struct tevent_req
*req
,
2776 TALLOC_CTX
*mem_ctx
,
2779 struct rpccli_PNP_GetClassName_state
*state
= tevent_req_data(
2780 req
, struct rpccli_PNP_GetClassName_state
);
2783 if (tevent_req_is_nterror(req
, &status
)) {
2784 tevent_req_received(req
);
2788 /* Steal possbile out parameters to the callers context */
2789 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2792 *result
= state
->orig
.out
.result
;
2794 tevent_req_received(req
);
2795 return NT_STATUS_OK
;
2798 NTSTATUS
rpccli_PNP_GetClassName(struct rpc_pipe_client
*cli
,
2799 TALLOC_CTX
*mem_ctx
,
2802 struct PNP_GetClassName r
;
2807 status
= cli
->dispatch(cli
,
2810 NDR_PNP_GETCLASSNAME
,
2813 if (!NT_STATUS_IS_OK(status
)) {
2817 if (NT_STATUS_IS_ERR(status
)) {
2821 /* Return variables */
2825 *werror
= r
.out
.result
;
2828 return werror_to_ntstatus(r
.out
.result
);
2831 struct rpccli_PNP_DeleteClassKey_state
{
2832 struct PNP_DeleteClassKey orig
;
2833 struct PNP_DeleteClassKey tmp
;
2834 TALLOC_CTX
*out_mem_ctx
;
2835 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2838 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req
*subreq
);
2840 struct tevent_req
*rpccli_PNP_DeleteClassKey_send(TALLOC_CTX
*mem_ctx
,
2841 struct tevent_context
*ev
,
2842 struct rpc_pipe_client
*cli
)
2844 struct tevent_req
*req
;
2845 struct rpccli_PNP_DeleteClassKey_state
*state
;
2846 struct tevent_req
*subreq
;
2848 req
= tevent_req_create(mem_ctx
, &state
,
2849 struct rpccli_PNP_DeleteClassKey_state
);
2853 state
->out_mem_ctx
= NULL
;
2854 state
->dispatch_recv
= cli
->dispatch_recv
;
2858 /* Out parameters */
2861 ZERO_STRUCT(state
->orig
.out
.result
);
2863 /* make a temporary copy, that we pass to the dispatch function */
2864 state
->tmp
= state
->orig
;
2866 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2868 NDR_PNP_DELETECLASSKEY
,
2870 if (tevent_req_nomem(subreq
, req
)) {
2871 return tevent_req_post(req
, ev
);
2873 tevent_req_set_callback(subreq
, rpccli_PNP_DeleteClassKey_done
, req
);
2877 static void rpccli_PNP_DeleteClassKey_done(struct tevent_req
*subreq
)
2879 struct tevent_req
*req
= tevent_req_callback_data(
2880 subreq
, struct tevent_req
);
2881 struct rpccli_PNP_DeleteClassKey_state
*state
= tevent_req_data(
2882 req
, struct rpccli_PNP_DeleteClassKey_state
);
2884 TALLOC_CTX
*mem_ctx
;
2886 if (state
->out_mem_ctx
) {
2887 mem_ctx
= state
->out_mem_ctx
;
2892 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2893 TALLOC_FREE(subreq
);
2894 if (!NT_STATUS_IS_OK(status
)) {
2895 tevent_req_nterror(req
, status
);
2899 /* Copy out parameters */
2902 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2904 /* Reset temporary structure */
2905 ZERO_STRUCT(state
->tmp
);
2907 tevent_req_done(req
);
2910 NTSTATUS
rpccli_PNP_DeleteClassKey_recv(struct tevent_req
*req
,
2911 TALLOC_CTX
*mem_ctx
,
2914 struct rpccli_PNP_DeleteClassKey_state
*state
= tevent_req_data(
2915 req
, struct rpccli_PNP_DeleteClassKey_state
);
2918 if (tevent_req_is_nterror(req
, &status
)) {
2919 tevent_req_received(req
);
2923 /* Steal possbile out parameters to the callers context */
2924 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2927 *result
= state
->orig
.out
.result
;
2929 tevent_req_received(req
);
2930 return NT_STATUS_OK
;
2933 NTSTATUS
rpccli_PNP_DeleteClassKey(struct rpc_pipe_client
*cli
,
2934 TALLOC_CTX
*mem_ctx
,
2937 struct PNP_DeleteClassKey r
;
2942 status
= cli
->dispatch(cli
,
2945 NDR_PNP_DELETECLASSKEY
,
2948 if (!NT_STATUS_IS_OK(status
)) {
2952 if (NT_STATUS_IS_ERR(status
)) {
2956 /* Return variables */
2960 *werror
= r
.out
.result
;
2963 return werror_to_ntstatus(r
.out
.result
);
2966 struct rpccli_PNP_GetInterfaceDeviceAlias_state
{
2967 struct PNP_GetInterfaceDeviceAlias orig
;
2968 struct PNP_GetInterfaceDeviceAlias tmp
;
2969 TALLOC_CTX
*out_mem_ctx
;
2970 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2973 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req
*subreq
);
2975 struct tevent_req
*rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX
*mem_ctx
,
2976 struct tevent_context
*ev
,
2977 struct rpc_pipe_client
*cli
)
2979 struct tevent_req
*req
;
2980 struct rpccli_PNP_GetInterfaceDeviceAlias_state
*state
;
2981 struct tevent_req
*subreq
;
2983 req
= tevent_req_create(mem_ctx
, &state
,
2984 struct rpccli_PNP_GetInterfaceDeviceAlias_state
);
2988 state
->out_mem_ctx
= NULL
;
2989 state
->dispatch_recv
= cli
->dispatch_recv
;
2993 /* Out parameters */
2996 ZERO_STRUCT(state
->orig
.out
.result
);
2998 /* make a temporary copy, that we pass to the dispatch function */
2999 state
->tmp
= state
->orig
;
3001 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3003 NDR_PNP_GETINTERFACEDEVICEALIAS
,
3005 if (tevent_req_nomem(subreq
, req
)) {
3006 return tevent_req_post(req
, ev
);
3008 tevent_req_set_callback(subreq
, rpccli_PNP_GetInterfaceDeviceAlias_done
, req
);
3012 static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req
*subreq
)
3014 struct tevent_req
*req
= tevent_req_callback_data(
3015 subreq
, struct tevent_req
);
3016 struct rpccli_PNP_GetInterfaceDeviceAlias_state
*state
= tevent_req_data(
3017 req
, struct rpccli_PNP_GetInterfaceDeviceAlias_state
);
3019 TALLOC_CTX
*mem_ctx
;
3021 if (state
->out_mem_ctx
) {
3022 mem_ctx
= state
->out_mem_ctx
;
3027 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3028 TALLOC_FREE(subreq
);
3029 if (!NT_STATUS_IS_OK(status
)) {
3030 tevent_req_nterror(req
, status
);
3034 /* Copy out parameters */
3037 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3039 /* Reset temporary structure */
3040 ZERO_STRUCT(state
->tmp
);
3042 tevent_req_done(req
);
3045 NTSTATUS
rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req
*req
,
3046 TALLOC_CTX
*mem_ctx
,
3049 struct rpccli_PNP_GetInterfaceDeviceAlias_state
*state
= tevent_req_data(
3050 req
, struct rpccli_PNP_GetInterfaceDeviceAlias_state
);
3053 if (tevent_req_is_nterror(req
, &status
)) {
3054 tevent_req_received(req
);
3058 /* Steal possbile out parameters to the callers context */
3059 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3062 *result
= state
->orig
.out
.result
;
3064 tevent_req_received(req
);
3065 return NT_STATUS_OK
;
3068 NTSTATUS
rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client
*cli
,
3069 TALLOC_CTX
*mem_ctx
,
3072 struct PNP_GetInterfaceDeviceAlias r
;
3077 status
= cli
->dispatch(cli
,
3080 NDR_PNP_GETINTERFACEDEVICEALIAS
,
3083 if (!NT_STATUS_IS_OK(status
)) {
3087 if (NT_STATUS_IS_ERR(status
)) {
3091 /* Return variables */
3095 *werror
= r
.out
.result
;
3098 return werror_to_ntstatus(r
.out
.result
);
3101 struct rpccli_PNP_GetInterfaceDeviceList_state
{
3102 struct PNP_GetInterfaceDeviceList orig
;
3103 struct PNP_GetInterfaceDeviceList tmp
;
3104 TALLOC_CTX
*out_mem_ctx
;
3105 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3108 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req
*subreq
);
3110 struct tevent_req
*rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX
*mem_ctx
,
3111 struct tevent_context
*ev
,
3112 struct rpc_pipe_client
*cli
)
3114 struct tevent_req
*req
;
3115 struct rpccli_PNP_GetInterfaceDeviceList_state
*state
;
3116 struct tevent_req
*subreq
;
3118 req
= tevent_req_create(mem_ctx
, &state
,
3119 struct rpccli_PNP_GetInterfaceDeviceList_state
);
3123 state
->out_mem_ctx
= NULL
;
3124 state
->dispatch_recv
= cli
->dispatch_recv
;
3128 /* Out parameters */
3131 ZERO_STRUCT(state
->orig
.out
.result
);
3133 /* make a temporary copy, that we pass to the dispatch function */
3134 state
->tmp
= state
->orig
;
3136 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3138 NDR_PNP_GETINTERFACEDEVICELIST
,
3140 if (tevent_req_nomem(subreq
, req
)) {
3141 return tevent_req_post(req
, ev
);
3143 tevent_req_set_callback(subreq
, rpccli_PNP_GetInterfaceDeviceList_done
, req
);
3147 static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req
*subreq
)
3149 struct tevent_req
*req
= tevent_req_callback_data(
3150 subreq
, struct tevent_req
);
3151 struct rpccli_PNP_GetInterfaceDeviceList_state
*state
= tevent_req_data(
3152 req
, struct rpccli_PNP_GetInterfaceDeviceList_state
);
3154 TALLOC_CTX
*mem_ctx
;
3156 if (state
->out_mem_ctx
) {
3157 mem_ctx
= state
->out_mem_ctx
;
3162 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3163 TALLOC_FREE(subreq
);
3164 if (!NT_STATUS_IS_OK(status
)) {
3165 tevent_req_nterror(req
, status
);
3169 /* Copy out parameters */
3172 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3174 /* Reset temporary structure */
3175 ZERO_STRUCT(state
->tmp
);
3177 tevent_req_done(req
);
3180 NTSTATUS
rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req
*req
,
3181 TALLOC_CTX
*mem_ctx
,
3184 struct rpccli_PNP_GetInterfaceDeviceList_state
*state
= tevent_req_data(
3185 req
, struct rpccli_PNP_GetInterfaceDeviceList_state
);
3188 if (tevent_req_is_nterror(req
, &status
)) {
3189 tevent_req_received(req
);
3193 /* Steal possbile out parameters to the callers context */
3194 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3197 *result
= state
->orig
.out
.result
;
3199 tevent_req_received(req
);
3200 return NT_STATUS_OK
;
3203 NTSTATUS
rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client
*cli
,
3204 TALLOC_CTX
*mem_ctx
,
3207 struct PNP_GetInterfaceDeviceList r
;
3212 status
= cli
->dispatch(cli
,
3215 NDR_PNP_GETINTERFACEDEVICELIST
,
3218 if (!NT_STATUS_IS_OK(status
)) {
3222 if (NT_STATUS_IS_ERR(status
)) {
3226 /* Return variables */
3230 *werror
= r
.out
.result
;
3233 return werror_to_ntstatus(r
.out
.result
);
3236 struct rpccli_PNP_GetInterfaceDeviceListSize_state
{
3237 struct PNP_GetInterfaceDeviceListSize orig
;
3238 struct PNP_GetInterfaceDeviceListSize tmp
;
3239 TALLOC_CTX
*out_mem_ctx
;
3240 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3243 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req
*subreq
);
3245 struct tevent_req
*rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX
*mem_ctx
,
3246 struct tevent_context
*ev
,
3247 struct rpc_pipe_client
*cli
)
3249 struct tevent_req
*req
;
3250 struct rpccli_PNP_GetInterfaceDeviceListSize_state
*state
;
3251 struct tevent_req
*subreq
;
3253 req
= tevent_req_create(mem_ctx
, &state
,
3254 struct rpccli_PNP_GetInterfaceDeviceListSize_state
);
3258 state
->out_mem_ctx
= NULL
;
3259 state
->dispatch_recv
= cli
->dispatch_recv
;
3263 /* Out parameters */
3266 ZERO_STRUCT(state
->orig
.out
.result
);
3268 /* make a temporary copy, that we pass to the dispatch function */
3269 state
->tmp
= state
->orig
;
3271 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3273 NDR_PNP_GETINTERFACEDEVICELISTSIZE
,
3275 if (tevent_req_nomem(subreq
, req
)) {
3276 return tevent_req_post(req
, ev
);
3278 tevent_req_set_callback(subreq
, rpccli_PNP_GetInterfaceDeviceListSize_done
, req
);
3282 static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req
*subreq
)
3284 struct tevent_req
*req
= tevent_req_callback_data(
3285 subreq
, struct tevent_req
);
3286 struct rpccli_PNP_GetInterfaceDeviceListSize_state
*state
= tevent_req_data(
3287 req
, struct rpccli_PNP_GetInterfaceDeviceListSize_state
);
3289 TALLOC_CTX
*mem_ctx
;
3291 if (state
->out_mem_ctx
) {
3292 mem_ctx
= state
->out_mem_ctx
;
3297 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3298 TALLOC_FREE(subreq
);
3299 if (!NT_STATUS_IS_OK(status
)) {
3300 tevent_req_nterror(req
, status
);
3304 /* Copy out parameters */
3307 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3309 /* Reset temporary structure */
3310 ZERO_STRUCT(state
->tmp
);
3312 tevent_req_done(req
);
3315 NTSTATUS
rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req
*req
,
3316 TALLOC_CTX
*mem_ctx
,
3319 struct rpccli_PNP_GetInterfaceDeviceListSize_state
*state
= tevent_req_data(
3320 req
, struct rpccli_PNP_GetInterfaceDeviceListSize_state
);
3323 if (tevent_req_is_nterror(req
, &status
)) {
3324 tevent_req_received(req
);
3328 /* Steal possbile out parameters to the callers context */
3329 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3332 *result
= state
->orig
.out
.result
;
3334 tevent_req_received(req
);
3335 return NT_STATUS_OK
;
3338 NTSTATUS
rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client
*cli
,
3339 TALLOC_CTX
*mem_ctx
,
3342 struct PNP_GetInterfaceDeviceListSize r
;
3347 status
= cli
->dispatch(cli
,
3350 NDR_PNP_GETINTERFACEDEVICELISTSIZE
,
3353 if (!NT_STATUS_IS_OK(status
)) {
3357 if (NT_STATUS_IS_ERR(status
)) {
3361 /* Return variables */
3365 *werror
= r
.out
.result
;
3368 return werror_to_ntstatus(r
.out
.result
);
3371 struct rpccli_PNP_RegisterDeviceClassAssociation_state
{
3372 struct PNP_RegisterDeviceClassAssociation orig
;
3373 struct PNP_RegisterDeviceClassAssociation tmp
;
3374 TALLOC_CTX
*out_mem_ctx
;
3375 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3378 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req
*subreq
);
3380 struct tevent_req
*rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX
*mem_ctx
,
3381 struct tevent_context
*ev
,
3382 struct rpc_pipe_client
*cli
)
3384 struct tevent_req
*req
;
3385 struct rpccli_PNP_RegisterDeviceClassAssociation_state
*state
;
3386 struct tevent_req
*subreq
;
3388 req
= tevent_req_create(mem_ctx
, &state
,
3389 struct rpccli_PNP_RegisterDeviceClassAssociation_state
);
3393 state
->out_mem_ctx
= NULL
;
3394 state
->dispatch_recv
= cli
->dispatch_recv
;
3398 /* Out parameters */
3401 ZERO_STRUCT(state
->orig
.out
.result
);
3403 /* make a temporary copy, that we pass to the dispatch function */
3404 state
->tmp
= state
->orig
;
3406 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3408 NDR_PNP_REGISTERDEVICECLASSASSOCIATION
,
3410 if (tevent_req_nomem(subreq
, req
)) {
3411 return tevent_req_post(req
, ev
);
3413 tevent_req_set_callback(subreq
, rpccli_PNP_RegisterDeviceClassAssociation_done
, req
);
3417 static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req
*subreq
)
3419 struct tevent_req
*req
= tevent_req_callback_data(
3420 subreq
, struct tevent_req
);
3421 struct rpccli_PNP_RegisterDeviceClassAssociation_state
*state
= tevent_req_data(
3422 req
, struct rpccli_PNP_RegisterDeviceClassAssociation_state
);
3424 TALLOC_CTX
*mem_ctx
;
3426 if (state
->out_mem_ctx
) {
3427 mem_ctx
= state
->out_mem_ctx
;
3432 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3433 TALLOC_FREE(subreq
);
3434 if (!NT_STATUS_IS_OK(status
)) {
3435 tevent_req_nterror(req
, status
);
3439 /* Copy out parameters */
3442 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3444 /* Reset temporary structure */
3445 ZERO_STRUCT(state
->tmp
);
3447 tevent_req_done(req
);
3450 NTSTATUS
rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req
*req
,
3451 TALLOC_CTX
*mem_ctx
,
3454 struct rpccli_PNP_RegisterDeviceClassAssociation_state
*state
= tevent_req_data(
3455 req
, struct rpccli_PNP_RegisterDeviceClassAssociation_state
);
3458 if (tevent_req_is_nterror(req
, &status
)) {
3459 tevent_req_received(req
);
3463 /* Steal possbile out parameters to the callers context */
3464 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3467 *result
= state
->orig
.out
.result
;
3469 tevent_req_received(req
);
3470 return NT_STATUS_OK
;
3473 NTSTATUS
rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client
*cli
,
3474 TALLOC_CTX
*mem_ctx
,
3477 struct PNP_RegisterDeviceClassAssociation r
;
3482 status
= cli
->dispatch(cli
,
3485 NDR_PNP_REGISTERDEVICECLASSASSOCIATION
,
3488 if (!NT_STATUS_IS_OK(status
)) {
3492 if (NT_STATUS_IS_ERR(status
)) {
3496 /* Return variables */
3500 *werror
= r
.out
.result
;
3503 return werror_to_ntstatus(r
.out
.result
);
3506 struct rpccli_PNP_UnregisterDeviceClassAssociation_state
{
3507 struct PNP_UnregisterDeviceClassAssociation orig
;
3508 struct PNP_UnregisterDeviceClassAssociation tmp
;
3509 TALLOC_CTX
*out_mem_ctx
;
3510 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3513 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req
*subreq
);
3515 struct tevent_req
*rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX
*mem_ctx
,
3516 struct tevent_context
*ev
,
3517 struct rpc_pipe_client
*cli
)
3519 struct tevent_req
*req
;
3520 struct rpccli_PNP_UnregisterDeviceClassAssociation_state
*state
;
3521 struct tevent_req
*subreq
;
3523 req
= tevent_req_create(mem_ctx
, &state
,
3524 struct rpccli_PNP_UnregisterDeviceClassAssociation_state
);
3528 state
->out_mem_ctx
= NULL
;
3529 state
->dispatch_recv
= cli
->dispatch_recv
;
3533 /* Out parameters */
3536 ZERO_STRUCT(state
->orig
.out
.result
);
3538 /* make a temporary copy, that we pass to the dispatch function */
3539 state
->tmp
= state
->orig
;
3541 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3543 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION
,
3545 if (tevent_req_nomem(subreq
, req
)) {
3546 return tevent_req_post(req
, ev
);
3548 tevent_req_set_callback(subreq
, rpccli_PNP_UnregisterDeviceClassAssociation_done
, req
);
3552 static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req
*subreq
)
3554 struct tevent_req
*req
= tevent_req_callback_data(
3555 subreq
, struct tevent_req
);
3556 struct rpccli_PNP_UnregisterDeviceClassAssociation_state
*state
= tevent_req_data(
3557 req
, struct rpccli_PNP_UnregisterDeviceClassAssociation_state
);
3559 TALLOC_CTX
*mem_ctx
;
3561 if (state
->out_mem_ctx
) {
3562 mem_ctx
= state
->out_mem_ctx
;
3567 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3568 TALLOC_FREE(subreq
);
3569 if (!NT_STATUS_IS_OK(status
)) {
3570 tevent_req_nterror(req
, status
);
3574 /* Copy out parameters */
3577 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3579 /* Reset temporary structure */
3580 ZERO_STRUCT(state
->tmp
);
3582 tevent_req_done(req
);
3585 NTSTATUS
rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req
*req
,
3586 TALLOC_CTX
*mem_ctx
,
3589 struct rpccli_PNP_UnregisterDeviceClassAssociation_state
*state
= tevent_req_data(
3590 req
, struct rpccli_PNP_UnregisterDeviceClassAssociation_state
);
3593 if (tevent_req_is_nterror(req
, &status
)) {
3594 tevent_req_received(req
);
3598 /* Steal possbile out parameters to the callers context */
3599 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3602 *result
= state
->orig
.out
.result
;
3604 tevent_req_received(req
);
3605 return NT_STATUS_OK
;
3608 NTSTATUS
rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client
*cli
,
3609 TALLOC_CTX
*mem_ctx
,
3612 struct PNP_UnregisterDeviceClassAssociation r
;
3617 status
= cli
->dispatch(cli
,
3620 NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION
,
3623 if (!NT_STATUS_IS_OK(status
)) {
3627 if (NT_STATUS_IS_ERR(status
)) {
3631 /* Return variables */
3635 *werror
= r
.out
.result
;
3638 return werror_to_ntstatus(r
.out
.result
);
3641 struct rpccli_PNP_GetClassRegProp_state
{
3642 struct PNP_GetClassRegProp orig
;
3643 struct PNP_GetClassRegProp tmp
;
3644 TALLOC_CTX
*out_mem_ctx
;
3645 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3648 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req
*subreq
);
3650 struct tevent_req
*rpccli_PNP_GetClassRegProp_send(TALLOC_CTX
*mem_ctx
,
3651 struct tevent_context
*ev
,
3652 struct rpc_pipe_client
*cli
)
3654 struct tevent_req
*req
;
3655 struct rpccli_PNP_GetClassRegProp_state
*state
;
3656 struct tevent_req
*subreq
;
3658 req
= tevent_req_create(mem_ctx
, &state
,
3659 struct rpccli_PNP_GetClassRegProp_state
);
3663 state
->out_mem_ctx
= NULL
;
3664 state
->dispatch_recv
= cli
->dispatch_recv
;
3668 /* Out parameters */
3671 ZERO_STRUCT(state
->orig
.out
.result
);
3673 /* make a temporary copy, that we pass to the dispatch function */
3674 state
->tmp
= state
->orig
;
3676 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3678 NDR_PNP_GETCLASSREGPROP
,
3680 if (tevent_req_nomem(subreq
, req
)) {
3681 return tevent_req_post(req
, ev
);
3683 tevent_req_set_callback(subreq
, rpccli_PNP_GetClassRegProp_done
, req
);
3687 static void rpccli_PNP_GetClassRegProp_done(struct tevent_req
*subreq
)
3689 struct tevent_req
*req
= tevent_req_callback_data(
3690 subreq
, struct tevent_req
);
3691 struct rpccli_PNP_GetClassRegProp_state
*state
= tevent_req_data(
3692 req
, struct rpccli_PNP_GetClassRegProp_state
);
3694 TALLOC_CTX
*mem_ctx
;
3696 if (state
->out_mem_ctx
) {
3697 mem_ctx
= state
->out_mem_ctx
;
3702 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3703 TALLOC_FREE(subreq
);
3704 if (!NT_STATUS_IS_OK(status
)) {
3705 tevent_req_nterror(req
, status
);
3709 /* Copy out parameters */
3712 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3714 /* Reset temporary structure */
3715 ZERO_STRUCT(state
->tmp
);
3717 tevent_req_done(req
);
3720 NTSTATUS
rpccli_PNP_GetClassRegProp_recv(struct tevent_req
*req
,
3721 TALLOC_CTX
*mem_ctx
,
3724 struct rpccli_PNP_GetClassRegProp_state
*state
= tevent_req_data(
3725 req
, struct rpccli_PNP_GetClassRegProp_state
);
3728 if (tevent_req_is_nterror(req
, &status
)) {
3729 tevent_req_received(req
);
3733 /* Steal possbile out parameters to the callers context */
3734 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3737 *result
= state
->orig
.out
.result
;
3739 tevent_req_received(req
);
3740 return NT_STATUS_OK
;
3743 NTSTATUS
rpccli_PNP_GetClassRegProp(struct rpc_pipe_client
*cli
,
3744 TALLOC_CTX
*mem_ctx
,
3747 struct PNP_GetClassRegProp r
;
3752 status
= cli
->dispatch(cli
,
3755 NDR_PNP_GETCLASSREGPROP
,
3758 if (!NT_STATUS_IS_OK(status
)) {
3762 if (NT_STATUS_IS_ERR(status
)) {
3766 /* Return variables */
3770 *werror
= r
.out
.result
;
3773 return werror_to_ntstatus(r
.out
.result
);
3776 struct rpccli_PNP_SetClassRegProp_state
{
3777 struct PNP_SetClassRegProp orig
;
3778 struct PNP_SetClassRegProp tmp
;
3779 TALLOC_CTX
*out_mem_ctx
;
3780 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3783 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req
*subreq
);
3785 struct tevent_req
*rpccli_PNP_SetClassRegProp_send(TALLOC_CTX
*mem_ctx
,
3786 struct tevent_context
*ev
,
3787 struct rpc_pipe_client
*cli
)
3789 struct tevent_req
*req
;
3790 struct rpccli_PNP_SetClassRegProp_state
*state
;
3791 struct tevent_req
*subreq
;
3793 req
= tevent_req_create(mem_ctx
, &state
,
3794 struct rpccli_PNP_SetClassRegProp_state
);
3798 state
->out_mem_ctx
= NULL
;
3799 state
->dispatch_recv
= cli
->dispatch_recv
;
3803 /* Out parameters */
3806 ZERO_STRUCT(state
->orig
.out
.result
);
3808 /* make a temporary copy, that we pass to the dispatch function */
3809 state
->tmp
= state
->orig
;
3811 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3813 NDR_PNP_SETCLASSREGPROP
,
3815 if (tevent_req_nomem(subreq
, req
)) {
3816 return tevent_req_post(req
, ev
);
3818 tevent_req_set_callback(subreq
, rpccli_PNP_SetClassRegProp_done
, req
);
3822 static void rpccli_PNP_SetClassRegProp_done(struct tevent_req
*subreq
)
3824 struct tevent_req
*req
= tevent_req_callback_data(
3825 subreq
, struct tevent_req
);
3826 struct rpccli_PNP_SetClassRegProp_state
*state
= tevent_req_data(
3827 req
, struct rpccli_PNP_SetClassRegProp_state
);
3829 TALLOC_CTX
*mem_ctx
;
3831 if (state
->out_mem_ctx
) {
3832 mem_ctx
= state
->out_mem_ctx
;
3837 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3838 TALLOC_FREE(subreq
);
3839 if (!NT_STATUS_IS_OK(status
)) {
3840 tevent_req_nterror(req
, status
);
3844 /* Copy out parameters */
3847 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3849 /* Reset temporary structure */
3850 ZERO_STRUCT(state
->tmp
);
3852 tevent_req_done(req
);
3855 NTSTATUS
rpccli_PNP_SetClassRegProp_recv(struct tevent_req
*req
,
3856 TALLOC_CTX
*mem_ctx
,
3859 struct rpccli_PNP_SetClassRegProp_state
*state
= tevent_req_data(
3860 req
, struct rpccli_PNP_SetClassRegProp_state
);
3863 if (tevent_req_is_nterror(req
, &status
)) {
3864 tevent_req_received(req
);
3868 /* Steal possbile out parameters to the callers context */
3869 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3872 *result
= state
->orig
.out
.result
;
3874 tevent_req_received(req
);
3875 return NT_STATUS_OK
;
3878 NTSTATUS
rpccli_PNP_SetClassRegProp(struct rpc_pipe_client
*cli
,
3879 TALLOC_CTX
*mem_ctx
,
3882 struct PNP_SetClassRegProp r
;
3887 status
= cli
->dispatch(cli
,
3890 NDR_PNP_SETCLASSREGPROP
,
3893 if (!NT_STATUS_IS_OK(status
)) {
3897 if (NT_STATUS_IS_ERR(status
)) {
3901 /* Return variables */
3905 *werror
= r
.out
.result
;
3908 return werror_to_ntstatus(r
.out
.result
);
3911 struct rpccli_PNP_CreateDevInst_state
{
3912 struct PNP_CreateDevInst orig
;
3913 struct PNP_CreateDevInst tmp
;
3914 TALLOC_CTX
*out_mem_ctx
;
3915 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3918 static void rpccli_PNP_CreateDevInst_done(struct tevent_req
*subreq
);
3920 struct tevent_req
*rpccli_PNP_CreateDevInst_send(TALLOC_CTX
*mem_ctx
,
3921 struct tevent_context
*ev
,
3922 struct rpc_pipe_client
*cli
)
3924 struct tevent_req
*req
;
3925 struct rpccli_PNP_CreateDevInst_state
*state
;
3926 struct tevent_req
*subreq
;
3928 req
= tevent_req_create(mem_ctx
, &state
,
3929 struct rpccli_PNP_CreateDevInst_state
);
3933 state
->out_mem_ctx
= NULL
;
3934 state
->dispatch_recv
= cli
->dispatch_recv
;
3938 /* Out parameters */
3941 ZERO_STRUCT(state
->orig
.out
.result
);
3943 /* make a temporary copy, that we pass to the dispatch function */
3944 state
->tmp
= state
->orig
;
3946 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3948 NDR_PNP_CREATEDEVINST
,
3950 if (tevent_req_nomem(subreq
, req
)) {
3951 return tevent_req_post(req
, ev
);
3953 tevent_req_set_callback(subreq
, rpccli_PNP_CreateDevInst_done
, req
);
3957 static void rpccli_PNP_CreateDevInst_done(struct tevent_req
*subreq
)
3959 struct tevent_req
*req
= tevent_req_callback_data(
3960 subreq
, struct tevent_req
);
3961 struct rpccli_PNP_CreateDevInst_state
*state
= tevent_req_data(
3962 req
, struct rpccli_PNP_CreateDevInst_state
);
3964 TALLOC_CTX
*mem_ctx
;
3966 if (state
->out_mem_ctx
) {
3967 mem_ctx
= state
->out_mem_ctx
;
3972 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3973 TALLOC_FREE(subreq
);
3974 if (!NT_STATUS_IS_OK(status
)) {
3975 tevent_req_nterror(req
, status
);
3979 /* Copy out parameters */
3982 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3984 /* Reset temporary structure */
3985 ZERO_STRUCT(state
->tmp
);
3987 tevent_req_done(req
);
3990 NTSTATUS
rpccli_PNP_CreateDevInst_recv(struct tevent_req
*req
,
3991 TALLOC_CTX
*mem_ctx
,
3994 struct rpccli_PNP_CreateDevInst_state
*state
= tevent_req_data(
3995 req
, struct rpccli_PNP_CreateDevInst_state
);
3998 if (tevent_req_is_nterror(req
, &status
)) {
3999 tevent_req_received(req
);
4003 /* Steal possbile out parameters to the callers context */
4004 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4007 *result
= state
->orig
.out
.result
;
4009 tevent_req_received(req
);
4010 return NT_STATUS_OK
;
4013 NTSTATUS
rpccli_PNP_CreateDevInst(struct rpc_pipe_client
*cli
,
4014 TALLOC_CTX
*mem_ctx
,
4017 struct PNP_CreateDevInst r
;
4022 status
= cli
->dispatch(cli
,
4025 NDR_PNP_CREATEDEVINST
,
4028 if (!NT_STATUS_IS_OK(status
)) {
4032 if (NT_STATUS_IS_ERR(status
)) {
4036 /* Return variables */
4040 *werror
= r
.out
.result
;
4043 return werror_to_ntstatus(r
.out
.result
);
4046 struct rpccli_PNP_DeviceInstanceAction_state
{
4047 struct PNP_DeviceInstanceAction orig
;
4048 struct PNP_DeviceInstanceAction tmp
;
4049 TALLOC_CTX
*out_mem_ctx
;
4050 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4053 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req
*subreq
);
4055 struct tevent_req
*rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX
*mem_ctx
,
4056 struct tevent_context
*ev
,
4057 struct rpc_pipe_client
*cli
)
4059 struct tevent_req
*req
;
4060 struct rpccli_PNP_DeviceInstanceAction_state
*state
;
4061 struct tevent_req
*subreq
;
4063 req
= tevent_req_create(mem_ctx
, &state
,
4064 struct rpccli_PNP_DeviceInstanceAction_state
);
4068 state
->out_mem_ctx
= NULL
;
4069 state
->dispatch_recv
= cli
->dispatch_recv
;
4073 /* Out parameters */
4076 ZERO_STRUCT(state
->orig
.out
.result
);
4078 /* make a temporary copy, that we pass to the dispatch function */
4079 state
->tmp
= state
->orig
;
4081 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4083 NDR_PNP_DEVICEINSTANCEACTION
,
4085 if (tevent_req_nomem(subreq
, req
)) {
4086 return tevent_req_post(req
, ev
);
4088 tevent_req_set_callback(subreq
, rpccli_PNP_DeviceInstanceAction_done
, req
);
4092 static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req
*subreq
)
4094 struct tevent_req
*req
= tevent_req_callback_data(
4095 subreq
, struct tevent_req
);
4096 struct rpccli_PNP_DeviceInstanceAction_state
*state
= tevent_req_data(
4097 req
, struct rpccli_PNP_DeviceInstanceAction_state
);
4099 TALLOC_CTX
*mem_ctx
;
4101 if (state
->out_mem_ctx
) {
4102 mem_ctx
= state
->out_mem_ctx
;
4107 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4108 TALLOC_FREE(subreq
);
4109 if (!NT_STATUS_IS_OK(status
)) {
4110 tevent_req_nterror(req
, status
);
4114 /* Copy out parameters */
4117 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4119 /* Reset temporary structure */
4120 ZERO_STRUCT(state
->tmp
);
4122 tevent_req_done(req
);
4125 NTSTATUS
rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req
*req
,
4126 TALLOC_CTX
*mem_ctx
,
4129 struct rpccli_PNP_DeviceInstanceAction_state
*state
= tevent_req_data(
4130 req
, struct rpccli_PNP_DeviceInstanceAction_state
);
4133 if (tevent_req_is_nterror(req
, &status
)) {
4134 tevent_req_received(req
);
4138 /* Steal possbile out parameters to the callers context */
4139 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4142 *result
= state
->orig
.out
.result
;
4144 tevent_req_received(req
);
4145 return NT_STATUS_OK
;
4148 NTSTATUS
rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client
*cli
,
4149 TALLOC_CTX
*mem_ctx
,
4152 struct PNP_DeviceInstanceAction r
;
4157 status
= cli
->dispatch(cli
,
4160 NDR_PNP_DEVICEINSTANCEACTION
,
4163 if (!NT_STATUS_IS_OK(status
)) {
4167 if (NT_STATUS_IS_ERR(status
)) {
4171 /* Return variables */
4175 *werror
= r
.out
.result
;
4178 return werror_to_ntstatus(r
.out
.result
);
4181 struct rpccli_PNP_GetDeviceStatus_state
{
4182 struct PNP_GetDeviceStatus orig
;
4183 struct PNP_GetDeviceStatus tmp
;
4184 TALLOC_CTX
*out_mem_ctx
;
4185 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4188 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req
*subreq
);
4190 struct tevent_req
*rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX
*mem_ctx
,
4191 struct tevent_context
*ev
,
4192 struct rpc_pipe_client
*cli
)
4194 struct tevent_req
*req
;
4195 struct rpccli_PNP_GetDeviceStatus_state
*state
;
4196 struct tevent_req
*subreq
;
4198 req
= tevent_req_create(mem_ctx
, &state
,
4199 struct rpccli_PNP_GetDeviceStatus_state
);
4203 state
->out_mem_ctx
= NULL
;
4204 state
->dispatch_recv
= cli
->dispatch_recv
;
4208 /* Out parameters */
4211 ZERO_STRUCT(state
->orig
.out
.result
);
4213 /* make a temporary copy, that we pass to the dispatch function */
4214 state
->tmp
= state
->orig
;
4216 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4218 NDR_PNP_GETDEVICESTATUS
,
4220 if (tevent_req_nomem(subreq
, req
)) {
4221 return tevent_req_post(req
, ev
);
4223 tevent_req_set_callback(subreq
, rpccli_PNP_GetDeviceStatus_done
, req
);
4227 static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req
*subreq
)
4229 struct tevent_req
*req
= tevent_req_callback_data(
4230 subreq
, struct tevent_req
);
4231 struct rpccli_PNP_GetDeviceStatus_state
*state
= tevent_req_data(
4232 req
, struct rpccli_PNP_GetDeviceStatus_state
);
4234 TALLOC_CTX
*mem_ctx
;
4236 if (state
->out_mem_ctx
) {
4237 mem_ctx
= state
->out_mem_ctx
;
4242 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4243 TALLOC_FREE(subreq
);
4244 if (!NT_STATUS_IS_OK(status
)) {
4245 tevent_req_nterror(req
, status
);
4249 /* Copy out parameters */
4252 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4254 /* Reset temporary structure */
4255 ZERO_STRUCT(state
->tmp
);
4257 tevent_req_done(req
);
4260 NTSTATUS
rpccli_PNP_GetDeviceStatus_recv(struct tevent_req
*req
,
4261 TALLOC_CTX
*mem_ctx
,
4264 struct rpccli_PNP_GetDeviceStatus_state
*state
= tevent_req_data(
4265 req
, struct rpccli_PNP_GetDeviceStatus_state
);
4268 if (tevent_req_is_nterror(req
, &status
)) {
4269 tevent_req_received(req
);
4273 /* Steal possbile out parameters to the callers context */
4274 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4277 *result
= state
->orig
.out
.result
;
4279 tevent_req_received(req
);
4280 return NT_STATUS_OK
;
4283 NTSTATUS
rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client
*cli
,
4284 TALLOC_CTX
*mem_ctx
,
4287 struct PNP_GetDeviceStatus r
;
4292 status
= cli
->dispatch(cli
,
4295 NDR_PNP_GETDEVICESTATUS
,
4298 if (!NT_STATUS_IS_OK(status
)) {
4302 if (NT_STATUS_IS_ERR(status
)) {
4306 /* Return variables */
4310 *werror
= r
.out
.result
;
4313 return werror_to_ntstatus(r
.out
.result
);
4316 struct rpccli_PNP_SetDeviceProblem_state
{
4317 struct PNP_SetDeviceProblem orig
;
4318 struct PNP_SetDeviceProblem tmp
;
4319 TALLOC_CTX
*out_mem_ctx
;
4320 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4323 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req
*subreq
);
4325 struct tevent_req
*rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX
*mem_ctx
,
4326 struct tevent_context
*ev
,
4327 struct rpc_pipe_client
*cli
)
4329 struct tevent_req
*req
;
4330 struct rpccli_PNP_SetDeviceProblem_state
*state
;
4331 struct tevent_req
*subreq
;
4333 req
= tevent_req_create(mem_ctx
, &state
,
4334 struct rpccli_PNP_SetDeviceProblem_state
);
4338 state
->out_mem_ctx
= NULL
;
4339 state
->dispatch_recv
= cli
->dispatch_recv
;
4343 /* Out parameters */
4346 ZERO_STRUCT(state
->orig
.out
.result
);
4348 /* make a temporary copy, that we pass to the dispatch function */
4349 state
->tmp
= state
->orig
;
4351 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4353 NDR_PNP_SETDEVICEPROBLEM
,
4355 if (tevent_req_nomem(subreq
, req
)) {
4356 return tevent_req_post(req
, ev
);
4358 tevent_req_set_callback(subreq
, rpccli_PNP_SetDeviceProblem_done
, req
);
4362 static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req
*subreq
)
4364 struct tevent_req
*req
= tevent_req_callback_data(
4365 subreq
, struct tevent_req
);
4366 struct rpccli_PNP_SetDeviceProblem_state
*state
= tevent_req_data(
4367 req
, struct rpccli_PNP_SetDeviceProblem_state
);
4369 TALLOC_CTX
*mem_ctx
;
4371 if (state
->out_mem_ctx
) {
4372 mem_ctx
= state
->out_mem_ctx
;
4377 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4378 TALLOC_FREE(subreq
);
4379 if (!NT_STATUS_IS_OK(status
)) {
4380 tevent_req_nterror(req
, status
);
4384 /* Copy out parameters */
4387 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4389 /* Reset temporary structure */
4390 ZERO_STRUCT(state
->tmp
);
4392 tevent_req_done(req
);
4395 NTSTATUS
rpccli_PNP_SetDeviceProblem_recv(struct tevent_req
*req
,
4396 TALLOC_CTX
*mem_ctx
,
4399 struct rpccli_PNP_SetDeviceProblem_state
*state
= tevent_req_data(
4400 req
, struct rpccli_PNP_SetDeviceProblem_state
);
4403 if (tevent_req_is_nterror(req
, &status
)) {
4404 tevent_req_received(req
);
4408 /* Steal possbile out parameters to the callers context */
4409 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4412 *result
= state
->orig
.out
.result
;
4414 tevent_req_received(req
);
4415 return NT_STATUS_OK
;
4418 NTSTATUS
rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client
*cli
,
4419 TALLOC_CTX
*mem_ctx
,
4422 struct PNP_SetDeviceProblem r
;
4427 status
= cli
->dispatch(cli
,
4430 NDR_PNP_SETDEVICEPROBLEM
,
4433 if (!NT_STATUS_IS_OK(status
)) {
4437 if (NT_STATUS_IS_ERR(status
)) {
4441 /* Return variables */
4445 *werror
= r
.out
.result
;
4448 return werror_to_ntstatus(r
.out
.result
);
4451 struct rpccli_PNP_DisableDevInst_state
{
4452 struct PNP_DisableDevInst orig
;
4453 struct PNP_DisableDevInst tmp
;
4454 TALLOC_CTX
*out_mem_ctx
;
4455 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4458 static void rpccli_PNP_DisableDevInst_done(struct tevent_req
*subreq
);
4460 struct tevent_req
*rpccli_PNP_DisableDevInst_send(TALLOC_CTX
*mem_ctx
,
4461 struct tevent_context
*ev
,
4462 struct rpc_pipe_client
*cli
)
4464 struct tevent_req
*req
;
4465 struct rpccli_PNP_DisableDevInst_state
*state
;
4466 struct tevent_req
*subreq
;
4468 req
= tevent_req_create(mem_ctx
, &state
,
4469 struct rpccli_PNP_DisableDevInst_state
);
4473 state
->out_mem_ctx
= NULL
;
4474 state
->dispatch_recv
= cli
->dispatch_recv
;
4478 /* Out parameters */
4481 ZERO_STRUCT(state
->orig
.out
.result
);
4483 /* make a temporary copy, that we pass to the dispatch function */
4484 state
->tmp
= state
->orig
;
4486 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4488 NDR_PNP_DISABLEDEVINST
,
4490 if (tevent_req_nomem(subreq
, req
)) {
4491 return tevent_req_post(req
, ev
);
4493 tevent_req_set_callback(subreq
, rpccli_PNP_DisableDevInst_done
, req
);
4497 static void rpccli_PNP_DisableDevInst_done(struct tevent_req
*subreq
)
4499 struct tevent_req
*req
= tevent_req_callback_data(
4500 subreq
, struct tevent_req
);
4501 struct rpccli_PNP_DisableDevInst_state
*state
= tevent_req_data(
4502 req
, struct rpccli_PNP_DisableDevInst_state
);
4504 TALLOC_CTX
*mem_ctx
;
4506 if (state
->out_mem_ctx
) {
4507 mem_ctx
= state
->out_mem_ctx
;
4512 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4513 TALLOC_FREE(subreq
);
4514 if (!NT_STATUS_IS_OK(status
)) {
4515 tevent_req_nterror(req
, status
);
4519 /* Copy out parameters */
4522 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4524 /* Reset temporary structure */
4525 ZERO_STRUCT(state
->tmp
);
4527 tevent_req_done(req
);
4530 NTSTATUS
rpccli_PNP_DisableDevInst_recv(struct tevent_req
*req
,
4531 TALLOC_CTX
*mem_ctx
,
4534 struct rpccli_PNP_DisableDevInst_state
*state
= tevent_req_data(
4535 req
, struct rpccli_PNP_DisableDevInst_state
);
4538 if (tevent_req_is_nterror(req
, &status
)) {
4539 tevent_req_received(req
);
4543 /* Steal possbile out parameters to the callers context */
4544 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4547 *result
= state
->orig
.out
.result
;
4549 tevent_req_received(req
);
4550 return NT_STATUS_OK
;
4553 NTSTATUS
rpccli_PNP_DisableDevInst(struct rpc_pipe_client
*cli
,
4554 TALLOC_CTX
*mem_ctx
,
4557 struct PNP_DisableDevInst r
;
4562 status
= cli
->dispatch(cli
,
4565 NDR_PNP_DISABLEDEVINST
,
4568 if (!NT_STATUS_IS_OK(status
)) {
4572 if (NT_STATUS_IS_ERR(status
)) {
4576 /* Return variables */
4580 *werror
= r
.out
.result
;
4583 return werror_to_ntstatus(r
.out
.result
);
4586 struct rpccli_PNP_UninstallDevInst_state
{
4587 struct PNP_UninstallDevInst orig
;
4588 struct PNP_UninstallDevInst tmp
;
4589 TALLOC_CTX
*out_mem_ctx
;
4590 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4593 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req
*subreq
);
4595 struct tevent_req
*rpccli_PNP_UninstallDevInst_send(TALLOC_CTX
*mem_ctx
,
4596 struct tevent_context
*ev
,
4597 struct rpc_pipe_client
*cli
)
4599 struct tevent_req
*req
;
4600 struct rpccli_PNP_UninstallDevInst_state
*state
;
4601 struct tevent_req
*subreq
;
4603 req
= tevent_req_create(mem_ctx
, &state
,
4604 struct rpccli_PNP_UninstallDevInst_state
);
4608 state
->out_mem_ctx
= NULL
;
4609 state
->dispatch_recv
= cli
->dispatch_recv
;
4613 /* Out parameters */
4616 ZERO_STRUCT(state
->orig
.out
.result
);
4618 /* make a temporary copy, that we pass to the dispatch function */
4619 state
->tmp
= state
->orig
;
4621 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4623 NDR_PNP_UNINSTALLDEVINST
,
4625 if (tevent_req_nomem(subreq
, req
)) {
4626 return tevent_req_post(req
, ev
);
4628 tevent_req_set_callback(subreq
, rpccli_PNP_UninstallDevInst_done
, req
);
4632 static void rpccli_PNP_UninstallDevInst_done(struct tevent_req
*subreq
)
4634 struct tevent_req
*req
= tevent_req_callback_data(
4635 subreq
, struct tevent_req
);
4636 struct rpccli_PNP_UninstallDevInst_state
*state
= tevent_req_data(
4637 req
, struct rpccli_PNP_UninstallDevInst_state
);
4639 TALLOC_CTX
*mem_ctx
;
4641 if (state
->out_mem_ctx
) {
4642 mem_ctx
= state
->out_mem_ctx
;
4647 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4648 TALLOC_FREE(subreq
);
4649 if (!NT_STATUS_IS_OK(status
)) {
4650 tevent_req_nterror(req
, status
);
4654 /* Copy out parameters */
4657 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4659 /* Reset temporary structure */
4660 ZERO_STRUCT(state
->tmp
);
4662 tevent_req_done(req
);
4665 NTSTATUS
rpccli_PNP_UninstallDevInst_recv(struct tevent_req
*req
,
4666 TALLOC_CTX
*mem_ctx
,
4669 struct rpccli_PNP_UninstallDevInst_state
*state
= tevent_req_data(
4670 req
, struct rpccli_PNP_UninstallDevInst_state
);
4673 if (tevent_req_is_nterror(req
, &status
)) {
4674 tevent_req_received(req
);
4678 /* Steal possbile out parameters to the callers context */
4679 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4682 *result
= state
->orig
.out
.result
;
4684 tevent_req_received(req
);
4685 return NT_STATUS_OK
;
4688 NTSTATUS
rpccli_PNP_UninstallDevInst(struct rpc_pipe_client
*cli
,
4689 TALLOC_CTX
*mem_ctx
,
4692 struct PNP_UninstallDevInst r
;
4697 status
= cli
->dispatch(cli
,
4700 NDR_PNP_UNINSTALLDEVINST
,
4703 if (!NT_STATUS_IS_OK(status
)) {
4707 if (NT_STATUS_IS_ERR(status
)) {
4711 /* Return variables */
4715 *werror
= r
.out
.result
;
4718 return werror_to_ntstatus(r
.out
.result
);
4721 struct rpccli_PNP_AddID_state
{
4722 struct PNP_AddID orig
;
4723 struct PNP_AddID tmp
;
4724 TALLOC_CTX
*out_mem_ctx
;
4725 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4728 static void rpccli_PNP_AddID_done(struct tevent_req
*subreq
);
4730 struct tevent_req
*rpccli_PNP_AddID_send(TALLOC_CTX
*mem_ctx
,
4731 struct tevent_context
*ev
,
4732 struct rpc_pipe_client
*cli
)
4734 struct tevent_req
*req
;
4735 struct rpccli_PNP_AddID_state
*state
;
4736 struct tevent_req
*subreq
;
4738 req
= tevent_req_create(mem_ctx
, &state
,
4739 struct rpccli_PNP_AddID_state
);
4743 state
->out_mem_ctx
= NULL
;
4744 state
->dispatch_recv
= cli
->dispatch_recv
;
4748 /* Out parameters */
4751 ZERO_STRUCT(state
->orig
.out
.result
);
4753 /* make a temporary copy, that we pass to the dispatch function */
4754 state
->tmp
= state
->orig
;
4756 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4760 if (tevent_req_nomem(subreq
, req
)) {
4761 return tevent_req_post(req
, ev
);
4763 tevent_req_set_callback(subreq
, rpccli_PNP_AddID_done
, req
);
4767 static void rpccli_PNP_AddID_done(struct tevent_req
*subreq
)
4769 struct tevent_req
*req
= tevent_req_callback_data(
4770 subreq
, struct tevent_req
);
4771 struct rpccli_PNP_AddID_state
*state
= tevent_req_data(
4772 req
, struct rpccli_PNP_AddID_state
);
4774 TALLOC_CTX
*mem_ctx
;
4776 if (state
->out_mem_ctx
) {
4777 mem_ctx
= state
->out_mem_ctx
;
4782 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4783 TALLOC_FREE(subreq
);
4784 if (!NT_STATUS_IS_OK(status
)) {
4785 tevent_req_nterror(req
, status
);
4789 /* Copy out parameters */
4792 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4794 /* Reset temporary structure */
4795 ZERO_STRUCT(state
->tmp
);
4797 tevent_req_done(req
);
4800 NTSTATUS
rpccli_PNP_AddID_recv(struct tevent_req
*req
,
4801 TALLOC_CTX
*mem_ctx
,
4804 struct rpccli_PNP_AddID_state
*state
= tevent_req_data(
4805 req
, struct rpccli_PNP_AddID_state
);
4808 if (tevent_req_is_nterror(req
, &status
)) {
4809 tevent_req_received(req
);
4813 /* Steal possbile out parameters to the callers context */
4814 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4817 *result
= state
->orig
.out
.result
;
4819 tevent_req_received(req
);
4820 return NT_STATUS_OK
;
4823 NTSTATUS
rpccli_PNP_AddID(struct rpc_pipe_client
*cli
,
4824 TALLOC_CTX
*mem_ctx
,
4832 status
= cli
->dispatch(cli
,
4838 if (!NT_STATUS_IS_OK(status
)) {
4842 if (NT_STATUS_IS_ERR(status
)) {
4846 /* Return variables */
4850 *werror
= r
.out
.result
;
4853 return werror_to_ntstatus(r
.out
.result
);
4856 struct rpccli_PNP_RegisterDriver_state
{
4857 struct PNP_RegisterDriver orig
;
4858 struct PNP_RegisterDriver tmp
;
4859 TALLOC_CTX
*out_mem_ctx
;
4860 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4863 static void rpccli_PNP_RegisterDriver_done(struct tevent_req
*subreq
);
4865 struct tevent_req
*rpccli_PNP_RegisterDriver_send(TALLOC_CTX
*mem_ctx
,
4866 struct tevent_context
*ev
,
4867 struct rpc_pipe_client
*cli
)
4869 struct tevent_req
*req
;
4870 struct rpccli_PNP_RegisterDriver_state
*state
;
4871 struct tevent_req
*subreq
;
4873 req
= tevent_req_create(mem_ctx
, &state
,
4874 struct rpccli_PNP_RegisterDriver_state
);
4878 state
->out_mem_ctx
= NULL
;
4879 state
->dispatch_recv
= cli
->dispatch_recv
;
4883 /* Out parameters */
4886 ZERO_STRUCT(state
->orig
.out
.result
);
4888 /* make a temporary copy, that we pass to the dispatch function */
4889 state
->tmp
= state
->orig
;
4891 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4893 NDR_PNP_REGISTERDRIVER
,
4895 if (tevent_req_nomem(subreq
, req
)) {
4896 return tevent_req_post(req
, ev
);
4898 tevent_req_set_callback(subreq
, rpccli_PNP_RegisterDriver_done
, req
);
4902 static void rpccli_PNP_RegisterDriver_done(struct tevent_req
*subreq
)
4904 struct tevent_req
*req
= tevent_req_callback_data(
4905 subreq
, struct tevent_req
);
4906 struct rpccli_PNP_RegisterDriver_state
*state
= tevent_req_data(
4907 req
, struct rpccli_PNP_RegisterDriver_state
);
4909 TALLOC_CTX
*mem_ctx
;
4911 if (state
->out_mem_ctx
) {
4912 mem_ctx
= state
->out_mem_ctx
;
4917 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4918 TALLOC_FREE(subreq
);
4919 if (!NT_STATUS_IS_OK(status
)) {
4920 tevent_req_nterror(req
, status
);
4924 /* Copy out parameters */
4927 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4929 /* Reset temporary structure */
4930 ZERO_STRUCT(state
->tmp
);
4932 tevent_req_done(req
);
4935 NTSTATUS
rpccli_PNP_RegisterDriver_recv(struct tevent_req
*req
,
4936 TALLOC_CTX
*mem_ctx
,
4939 struct rpccli_PNP_RegisterDriver_state
*state
= tevent_req_data(
4940 req
, struct rpccli_PNP_RegisterDriver_state
);
4943 if (tevent_req_is_nterror(req
, &status
)) {
4944 tevent_req_received(req
);
4948 /* Steal possbile out parameters to the callers context */
4949 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4952 *result
= state
->orig
.out
.result
;
4954 tevent_req_received(req
);
4955 return NT_STATUS_OK
;
4958 NTSTATUS
rpccli_PNP_RegisterDriver(struct rpc_pipe_client
*cli
,
4959 TALLOC_CTX
*mem_ctx
,
4962 struct PNP_RegisterDriver r
;
4967 status
= cli
->dispatch(cli
,
4970 NDR_PNP_REGISTERDRIVER
,
4973 if (!NT_STATUS_IS_OK(status
)) {
4977 if (NT_STATUS_IS_ERR(status
)) {
4981 /* Return variables */
4985 *werror
= r
.out
.result
;
4988 return werror_to_ntstatus(r
.out
.result
);
4991 struct rpccli_PNP_QueryRemove_state
{
4992 struct PNP_QueryRemove orig
;
4993 struct PNP_QueryRemove tmp
;
4994 TALLOC_CTX
*out_mem_ctx
;
4995 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4998 static void rpccli_PNP_QueryRemove_done(struct tevent_req
*subreq
);
5000 struct tevent_req
*rpccli_PNP_QueryRemove_send(TALLOC_CTX
*mem_ctx
,
5001 struct tevent_context
*ev
,
5002 struct rpc_pipe_client
*cli
)
5004 struct tevent_req
*req
;
5005 struct rpccli_PNP_QueryRemove_state
*state
;
5006 struct tevent_req
*subreq
;
5008 req
= tevent_req_create(mem_ctx
, &state
,
5009 struct rpccli_PNP_QueryRemove_state
);
5013 state
->out_mem_ctx
= NULL
;
5014 state
->dispatch_recv
= cli
->dispatch_recv
;
5018 /* Out parameters */
5021 ZERO_STRUCT(state
->orig
.out
.result
);
5023 /* make a temporary copy, that we pass to the dispatch function */
5024 state
->tmp
= state
->orig
;
5026 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5028 NDR_PNP_QUERYREMOVE
,
5030 if (tevent_req_nomem(subreq
, req
)) {
5031 return tevent_req_post(req
, ev
);
5033 tevent_req_set_callback(subreq
, rpccli_PNP_QueryRemove_done
, req
);
5037 static void rpccli_PNP_QueryRemove_done(struct tevent_req
*subreq
)
5039 struct tevent_req
*req
= tevent_req_callback_data(
5040 subreq
, struct tevent_req
);
5041 struct rpccli_PNP_QueryRemove_state
*state
= tevent_req_data(
5042 req
, struct rpccli_PNP_QueryRemove_state
);
5044 TALLOC_CTX
*mem_ctx
;
5046 if (state
->out_mem_ctx
) {
5047 mem_ctx
= state
->out_mem_ctx
;
5052 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5053 TALLOC_FREE(subreq
);
5054 if (!NT_STATUS_IS_OK(status
)) {
5055 tevent_req_nterror(req
, status
);
5059 /* Copy out parameters */
5062 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5064 /* Reset temporary structure */
5065 ZERO_STRUCT(state
->tmp
);
5067 tevent_req_done(req
);
5070 NTSTATUS
rpccli_PNP_QueryRemove_recv(struct tevent_req
*req
,
5071 TALLOC_CTX
*mem_ctx
,
5074 struct rpccli_PNP_QueryRemove_state
*state
= tevent_req_data(
5075 req
, struct rpccli_PNP_QueryRemove_state
);
5078 if (tevent_req_is_nterror(req
, &status
)) {
5079 tevent_req_received(req
);
5083 /* Steal possbile out parameters to the callers context */
5084 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5087 *result
= state
->orig
.out
.result
;
5089 tevent_req_received(req
);
5090 return NT_STATUS_OK
;
5093 NTSTATUS
rpccli_PNP_QueryRemove(struct rpc_pipe_client
*cli
,
5094 TALLOC_CTX
*mem_ctx
,
5097 struct PNP_QueryRemove r
;
5102 status
= cli
->dispatch(cli
,
5105 NDR_PNP_QUERYREMOVE
,
5108 if (!NT_STATUS_IS_OK(status
)) {
5112 if (NT_STATUS_IS_ERR(status
)) {
5116 /* Return variables */
5120 *werror
= r
.out
.result
;
5123 return werror_to_ntstatus(r
.out
.result
);
5126 struct rpccli_PNP_RequestDeviceEject_state
{
5127 struct PNP_RequestDeviceEject orig
;
5128 struct PNP_RequestDeviceEject tmp
;
5129 TALLOC_CTX
*out_mem_ctx
;
5130 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5133 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req
*subreq
);
5135 struct tevent_req
*rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX
*mem_ctx
,
5136 struct tevent_context
*ev
,
5137 struct rpc_pipe_client
*cli
)
5139 struct tevent_req
*req
;
5140 struct rpccli_PNP_RequestDeviceEject_state
*state
;
5141 struct tevent_req
*subreq
;
5143 req
= tevent_req_create(mem_ctx
, &state
,
5144 struct rpccli_PNP_RequestDeviceEject_state
);
5148 state
->out_mem_ctx
= NULL
;
5149 state
->dispatch_recv
= cli
->dispatch_recv
;
5153 /* Out parameters */
5156 ZERO_STRUCT(state
->orig
.out
.result
);
5158 /* make a temporary copy, that we pass to the dispatch function */
5159 state
->tmp
= state
->orig
;
5161 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5163 NDR_PNP_REQUESTDEVICEEJECT
,
5165 if (tevent_req_nomem(subreq
, req
)) {
5166 return tevent_req_post(req
, ev
);
5168 tevent_req_set_callback(subreq
, rpccli_PNP_RequestDeviceEject_done
, req
);
5172 static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req
*subreq
)
5174 struct tevent_req
*req
= tevent_req_callback_data(
5175 subreq
, struct tevent_req
);
5176 struct rpccli_PNP_RequestDeviceEject_state
*state
= tevent_req_data(
5177 req
, struct rpccli_PNP_RequestDeviceEject_state
);
5179 TALLOC_CTX
*mem_ctx
;
5181 if (state
->out_mem_ctx
) {
5182 mem_ctx
= state
->out_mem_ctx
;
5187 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5188 TALLOC_FREE(subreq
);
5189 if (!NT_STATUS_IS_OK(status
)) {
5190 tevent_req_nterror(req
, status
);
5194 /* Copy out parameters */
5197 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5199 /* Reset temporary structure */
5200 ZERO_STRUCT(state
->tmp
);
5202 tevent_req_done(req
);
5205 NTSTATUS
rpccli_PNP_RequestDeviceEject_recv(struct tevent_req
*req
,
5206 TALLOC_CTX
*mem_ctx
,
5209 struct rpccli_PNP_RequestDeviceEject_state
*state
= tevent_req_data(
5210 req
, struct rpccli_PNP_RequestDeviceEject_state
);
5213 if (tevent_req_is_nterror(req
, &status
)) {
5214 tevent_req_received(req
);
5218 /* Steal possbile out parameters to the callers context */
5219 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5222 *result
= state
->orig
.out
.result
;
5224 tevent_req_received(req
);
5225 return NT_STATUS_OK
;
5228 NTSTATUS
rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client
*cli
,
5229 TALLOC_CTX
*mem_ctx
,
5232 struct PNP_RequestDeviceEject r
;
5237 status
= cli
->dispatch(cli
,
5240 NDR_PNP_REQUESTDEVICEEJECT
,
5243 if (!NT_STATUS_IS_OK(status
)) {
5247 if (NT_STATUS_IS_ERR(status
)) {
5251 /* Return variables */
5255 *werror
= r
.out
.result
;
5258 return werror_to_ntstatus(r
.out
.result
);
5261 struct rpccli_PNP_IsDockStationPresent_state
{
5262 struct PNP_IsDockStationPresent orig
;
5263 struct PNP_IsDockStationPresent tmp
;
5264 TALLOC_CTX
*out_mem_ctx
;
5265 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5268 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req
*subreq
);
5270 struct tevent_req
*rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX
*mem_ctx
,
5271 struct tevent_context
*ev
,
5272 struct rpc_pipe_client
*cli
)
5274 struct tevent_req
*req
;
5275 struct rpccli_PNP_IsDockStationPresent_state
*state
;
5276 struct tevent_req
*subreq
;
5278 req
= tevent_req_create(mem_ctx
, &state
,
5279 struct rpccli_PNP_IsDockStationPresent_state
);
5283 state
->out_mem_ctx
= NULL
;
5284 state
->dispatch_recv
= cli
->dispatch_recv
;
5288 /* Out parameters */
5291 ZERO_STRUCT(state
->orig
.out
.result
);
5293 /* make a temporary copy, that we pass to the dispatch function */
5294 state
->tmp
= state
->orig
;
5296 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5298 NDR_PNP_ISDOCKSTATIONPRESENT
,
5300 if (tevent_req_nomem(subreq
, req
)) {
5301 return tevent_req_post(req
, ev
);
5303 tevent_req_set_callback(subreq
, rpccli_PNP_IsDockStationPresent_done
, req
);
5307 static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req
*subreq
)
5309 struct tevent_req
*req
= tevent_req_callback_data(
5310 subreq
, struct tevent_req
);
5311 struct rpccli_PNP_IsDockStationPresent_state
*state
= tevent_req_data(
5312 req
, struct rpccli_PNP_IsDockStationPresent_state
);
5314 TALLOC_CTX
*mem_ctx
;
5316 if (state
->out_mem_ctx
) {
5317 mem_ctx
= state
->out_mem_ctx
;
5322 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5323 TALLOC_FREE(subreq
);
5324 if (!NT_STATUS_IS_OK(status
)) {
5325 tevent_req_nterror(req
, status
);
5329 /* Copy out parameters */
5332 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5334 /* Reset temporary structure */
5335 ZERO_STRUCT(state
->tmp
);
5337 tevent_req_done(req
);
5340 NTSTATUS
rpccli_PNP_IsDockStationPresent_recv(struct tevent_req
*req
,
5341 TALLOC_CTX
*mem_ctx
,
5344 struct rpccli_PNP_IsDockStationPresent_state
*state
= tevent_req_data(
5345 req
, struct rpccli_PNP_IsDockStationPresent_state
);
5348 if (tevent_req_is_nterror(req
, &status
)) {
5349 tevent_req_received(req
);
5353 /* Steal possbile out parameters to the callers context */
5354 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5357 *result
= state
->orig
.out
.result
;
5359 tevent_req_received(req
);
5360 return NT_STATUS_OK
;
5363 NTSTATUS
rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client
*cli
,
5364 TALLOC_CTX
*mem_ctx
,
5367 struct PNP_IsDockStationPresent r
;
5372 status
= cli
->dispatch(cli
,
5375 NDR_PNP_ISDOCKSTATIONPRESENT
,
5378 if (!NT_STATUS_IS_OK(status
)) {
5382 if (NT_STATUS_IS_ERR(status
)) {
5386 /* Return variables */
5390 *werror
= r
.out
.result
;
5393 return werror_to_ntstatus(r
.out
.result
);
5396 struct rpccli_PNP_RequestEjectPC_state
{
5397 struct PNP_RequestEjectPC orig
;
5398 struct PNP_RequestEjectPC tmp
;
5399 TALLOC_CTX
*out_mem_ctx
;
5400 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5403 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req
*subreq
);
5405 struct tevent_req
*rpccli_PNP_RequestEjectPC_send(TALLOC_CTX
*mem_ctx
,
5406 struct tevent_context
*ev
,
5407 struct rpc_pipe_client
*cli
)
5409 struct tevent_req
*req
;
5410 struct rpccli_PNP_RequestEjectPC_state
*state
;
5411 struct tevent_req
*subreq
;
5413 req
= tevent_req_create(mem_ctx
, &state
,
5414 struct rpccli_PNP_RequestEjectPC_state
);
5418 state
->out_mem_ctx
= NULL
;
5419 state
->dispatch_recv
= cli
->dispatch_recv
;
5423 /* Out parameters */
5426 ZERO_STRUCT(state
->orig
.out
.result
);
5428 /* make a temporary copy, that we pass to the dispatch function */
5429 state
->tmp
= state
->orig
;
5431 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5433 NDR_PNP_REQUESTEJECTPC
,
5435 if (tevent_req_nomem(subreq
, req
)) {
5436 return tevent_req_post(req
, ev
);
5438 tevent_req_set_callback(subreq
, rpccli_PNP_RequestEjectPC_done
, req
);
5442 static void rpccli_PNP_RequestEjectPC_done(struct tevent_req
*subreq
)
5444 struct tevent_req
*req
= tevent_req_callback_data(
5445 subreq
, struct tevent_req
);
5446 struct rpccli_PNP_RequestEjectPC_state
*state
= tevent_req_data(
5447 req
, struct rpccli_PNP_RequestEjectPC_state
);
5449 TALLOC_CTX
*mem_ctx
;
5451 if (state
->out_mem_ctx
) {
5452 mem_ctx
= state
->out_mem_ctx
;
5457 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5458 TALLOC_FREE(subreq
);
5459 if (!NT_STATUS_IS_OK(status
)) {
5460 tevent_req_nterror(req
, status
);
5464 /* Copy out parameters */
5467 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5469 /* Reset temporary structure */
5470 ZERO_STRUCT(state
->tmp
);
5472 tevent_req_done(req
);
5475 NTSTATUS
rpccli_PNP_RequestEjectPC_recv(struct tevent_req
*req
,
5476 TALLOC_CTX
*mem_ctx
,
5479 struct rpccli_PNP_RequestEjectPC_state
*state
= tevent_req_data(
5480 req
, struct rpccli_PNP_RequestEjectPC_state
);
5483 if (tevent_req_is_nterror(req
, &status
)) {
5484 tevent_req_received(req
);
5488 /* Steal possbile out parameters to the callers context */
5489 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5492 *result
= state
->orig
.out
.result
;
5494 tevent_req_received(req
);
5495 return NT_STATUS_OK
;
5498 NTSTATUS
rpccli_PNP_RequestEjectPC(struct rpc_pipe_client
*cli
,
5499 TALLOC_CTX
*mem_ctx
,
5502 struct PNP_RequestEjectPC r
;
5507 status
= cli
->dispatch(cli
,
5510 NDR_PNP_REQUESTEJECTPC
,
5513 if (!NT_STATUS_IS_OK(status
)) {
5517 if (NT_STATUS_IS_ERR(status
)) {
5521 /* Return variables */
5525 *werror
= r
.out
.result
;
5528 return werror_to_ntstatus(r
.out
.result
);
5531 struct rpccli_PNP_HwProfFlags_state
{
5532 struct PNP_HwProfFlags orig
;
5533 struct PNP_HwProfFlags tmp
;
5534 TALLOC_CTX
*out_mem_ctx
;
5535 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5538 static void rpccli_PNP_HwProfFlags_done(struct tevent_req
*subreq
);
5540 struct tevent_req
*rpccli_PNP_HwProfFlags_send(TALLOC_CTX
*mem_ctx
,
5541 struct tevent_context
*ev
,
5542 struct rpc_pipe_client
*cli
,
5543 uint32_t _action
/* [in] */,
5544 const char *_devicepath
/* [in] [ref,charset(UTF16)] */,
5545 uint32_t _config
/* [in] */,
5546 uint32_t *_profile_flags
/* [in,out] [ref] */,
5547 uint16_t *_veto_type
/* [in,out] [unique] */,
5548 const char *_unknown5
/* [in] [unique,charset(UTF16)] */,
5549 const char **_unknown5a
/* [out] [unique,charset(UTF16)] */,
5550 uint32_t _name_length
/* [in] */,
5551 uint32_t _flags
/* [in] */)
5553 struct tevent_req
*req
;
5554 struct rpccli_PNP_HwProfFlags_state
*state
;
5555 struct tevent_req
*subreq
;
5557 req
= tevent_req_create(mem_ctx
, &state
,
5558 struct rpccli_PNP_HwProfFlags_state
);
5562 state
->out_mem_ctx
= NULL
;
5563 state
->dispatch_recv
= cli
->dispatch_recv
;
5566 state
->orig
.in
.action
= _action
;
5567 state
->orig
.in
.devicepath
= _devicepath
;
5568 state
->orig
.in
.config
= _config
;
5569 state
->orig
.in
.profile_flags
= _profile_flags
;
5570 state
->orig
.in
.veto_type
= _veto_type
;
5571 state
->orig
.in
.unknown5
= _unknown5
;
5572 state
->orig
.in
.name_length
= _name_length
;
5573 state
->orig
.in
.flags
= _flags
;
5575 /* Out parameters */
5576 state
->orig
.out
.profile_flags
= _profile_flags
;
5577 state
->orig
.out
.veto_type
= _veto_type
;
5578 state
->orig
.out
.unknown5a
= _unknown5a
;
5581 ZERO_STRUCT(state
->orig
.out
.result
);
5583 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5584 "rpccli_PNP_HwProfFlags_out_memory");
5585 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5586 return tevent_req_post(req
, ev
);
5589 /* make a temporary copy, that we pass to the dispatch function */
5590 state
->tmp
= state
->orig
;
5592 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5594 NDR_PNP_HWPROFFLAGS
,
5596 if (tevent_req_nomem(subreq
, req
)) {
5597 return tevent_req_post(req
, ev
);
5599 tevent_req_set_callback(subreq
, rpccli_PNP_HwProfFlags_done
, req
);
5603 static void rpccli_PNP_HwProfFlags_done(struct tevent_req
*subreq
)
5605 struct tevent_req
*req
= tevent_req_callback_data(
5606 subreq
, struct tevent_req
);
5607 struct rpccli_PNP_HwProfFlags_state
*state
= tevent_req_data(
5608 req
, struct rpccli_PNP_HwProfFlags_state
);
5610 TALLOC_CTX
*mem_ctx
;
5612 if (state
->out_mem_ctx
) {
5613 mem_ctx
= state
->out_mem_ctx
;
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
);
5625 /* Copy out parameters */
5626 *state
->orig
.out
.profile_flags
= *state
->tmp
.out
.profile_flags
;
5627 if (state
->orig
.out
.veto_type
&& state
->tmp
.out
.veto_type
) {
5628 *state
->orig
.out
.veto_type
= *state
->tmp
.out
.veto_type
;
5630 if (state
->orig
.out
.unknown5a
&& state
->tmp
.out
.unknown5a
) {
5631 *state
->orig
.out
.unknown5a
= *state
->tmp
.out
.unknown5a
;
5635 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5637 /* Reset temporary structure */
5638 ZERO_STRUCT(state
->tmp
);
5640 tevent_req_done(req
);
5643 NTSTATUS
rpccli_PNP_HwProfFlags_recv(struct tevent_req
*req
,
5644 TALLOC_CTX
*mem_ctx
,
5647 struct rpccli_PNP_HwProfFlags_state
*state
= tevent_req_data(
5648 req
, struct rpccli_PNP_HwProfFlags_state
);
5651 if (tevent_req_is_nterror(req
, &status
)) {
5652 tevent_req_received(req
);
5656 /* Steal possbile out parameters to the callers context */
5657 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5660 *result
= state
->orig
.out
.result
;
5662 tevent_req_received(req
);
5663 return NT_STATUS_OK
;
5666 NTSTATUS
rpccli_PNP_HwProfFlags(struct rpc_pipe_client
*cli
,
5667 TALLOC_CTX
*mem_ctx
,
5668 uint32_t action
/* [in] */,
5669 const char *devicepath
/* [in] [ref,charset(UTF16)] */,
5670 uint32_t config
/* [in] */,
5671 uint32_t *profile_flags
/* [in,out] [ref] */,
5672 uint16_t *veto_type
/* [in,out] [unique] */,
5673 const char *unknown5
/* [in] [unique,charset(UTF16)] */,
5674 const char **unknown5a
/* [out] [unique,charset(UTF16)] */,
5675 uint32_t name_length
/* [in] */,
5676 uint32_t flags
/* [in] */,
5679 struct PNP_HwProfFlags r
;
5683 r
.in
.action
= action
;
5684 r
.in
.devicepath
= devicepath
;
5685 r
.in
.config
= config
;
5686 r
.in
.profile_flags
= profile_flags
;
5687 r
.in
.veto_type
= veto_type
;
5688 r
.in
.unknown5
= unknown5
;
5689 r
.in
.name_length
= name_length
;
5692 status
= cli
->dispatch(cli
,
5695 NDR_PNP_HWPROFFLAGS
,
5698 if (!NT_STATUS_IS_OK(status
)) {
5702 if (NT_STATUS_IS_ERR(status
)) {
5706 /* Return variables */
5707 *profile_flags
= *r
.out
.profile_flags
;
5708 if (veto_type
&& r
.out
.veto_type
) {
5709 *veto_type
= *r
.out
.veto_type
;
5711 if (unknown5a
&& r
.out
.unknown5a
) {
5712 *unknown5a
= *r
.out
.unknown5a
;
5717 *werror
= r
.out
.result
;
5720 return werror_to_ntstatus(r
.out
.result
);
5723 struct rpccli_PNP_GetHwProfInfo_state
{
5724 struct PNP_GetHwProfInfo orig
;
5725 struct PNP_GetHwProfInfo tmp
;
5726 TALLOC_CTX
*out_mem_ctx
;
5727 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5730 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req
*subreq
);
5732 struct tevent_req
*rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX
*mem_ctx
,
5733 struct tevent_context
*ev
,
5734 struct rpc_pipe_client
*cli
,
5735 uint32_t _idx
/* [in] */,
5736 struct PNP_HwProfInfo
*_info
/* [in,out] [ref] */,
5737 uint32_t _size
/* [in] */,
5738 uint32_t _flags
/* [in] */)
5740 struct tevent_req
*req
;
5741 struct rpccli_PNP_GetHwProfInfo_state
*state
;
5742 struct tevent_req
*subreq
;
5744 req
= tevent_req_create(mem_ctx
, &state
,
5745 struct rpccli_PNP_GetHwProfInfo_state
);
5749 state
->out_mem_ctx
= NULL
;
5750 state
->dispatch_recv
= cli
->dispatch_recv
;
5753 state
->orig
.in
.idx
= _idx
;
5754 state
->orig
.in
.info
= _info
;
5755 state
->orig
.in
.size
= _size
;
5756 state
->orig
.in
.flags
= _flags
;
5758 /* Out parameters */
5759 state
->orig
.out
.info
= _info
;
5762 ZERO_STRUCT(state
->orig
.out
.result
);
5764 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5765 "rpccli_PNP_GetHwProfInfo_out_memory");
5766 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5767 return tevent_req_post(req
, ev
);
5770 /* make a temporary copy, that we pass to the dispatch function */
5771 state
->tmp
= state
->orig
;
5773 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5775 NDR_PNP_GETHWPROFINFO
,
5777 if (tevent_req_nomem(subreq
, req
)) {
5778 return tevent_req_post(req
, ev
);
5780 tevent_req_set_callback(subreq
, rpccli_PNP_GetHwProfInfo_done
, req
);
5784 static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req
*subreq
)
5786 struct tevent_req
*req
= tevent_req_callback_data(
5787 subreq
, struct tevent_req
);
5788 struct rpccli_PNP_GetHwProfInfo_state
*state
= tevent_req_data(
5789 req
, struct rpccli_PNP_GetHwProfInfo_state
);
5791 TALLOC_CTX
*mem_ctx
;
5793 if (state
->out_mem_ctx
) {
5794 mem_ctx
= state
->out_mem_ctx
;
5799 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5800 TALLOC_FREE(subreq
);
5801 if (!NT_STATUS_IS_OK(status
)) {
5802 tevent_req_nterror(req
, status
);
5806 /* Copy out parameters */
5807 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
5810 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5812 /* Reset temporary structure */
5813 ZERO_STRUCT(state
->tmp
);
5815 tevent_req_done(req
);
5818 NTSTATUS
rpccli_PNP_GetHwProfInfo_recv(struct tevent_req
*req
,
5819 TALLOC_CTX
*mem_ctx
,
5822 struct rpccli_PNP_GetHwProfInfo_state
*state
= tevent_req_data(
5823 req
, struct rpccli_PNP_GetHwProfInfo_state
);
5826 if (tevent_req_is_nterror(req
, &status
)) {
5827 tevent_req_received(req
);
5831 /* Steal possbile out parameters to the callers context */
5832 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5835 *result
= state
->orig
.out
.result
;
5837 tevent_req_received(req
);
5838 return NT_STATUS_OK
;
5841 NTSTATUS
rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client
*cli
,
5842 TALLOC_CTX
*mem_ctx
,
5843 uint32_t idx
/* [in] */,
5844 struct PNP_HwProfInfo
*info
/* [in,out] [ref] */,
5845 uint32_t size
/* [in] */,
5846 uint32_t flags
/* [in] */,
5849 struct PNP_GetHwProfInfo r
;
5858 status
= cli
->dispatch(cli
,
5861 NDR_PNP_GETHWPROFINFO
,
5864 if (!NT_STATUS_IS_OK(status
)) {
5868 if (NT_STATUS_IS_ERR(status
)) {
5872 /* Return variables */
5873 *info
= *r
.out
.info
;
5877 *werror
= r
.out
.result
;
5880 return werror_to_ntstatus(r
.out
.result
);
5883 struct rpccli_PNP_AddEmptyLogConf_state
{
5884 struct PNP_AddEmptyLogConf orig
;
5885 struct PNP_AddEmptyLogConf tmp
;
5886 TALLOC_CTX
*out_mem_ctx
;
5887 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5890 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req
*subreq
);
5892 struct tevent_req
*rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX
*mem_ctx
,
5893 struct tevent_context
*ev
,
5894 struct rpc_pipe_client
*cli
)
5896 struct tevent_req
*req
;
5897 struct rpccli_PNP_AddEmptyLogConf_state
*state
;
5898 struct tevent_req
*subreq
;
5900 req
= tevent_req_create(mem_ctx
, &state
,
5901 struct rpccli_PNP_AddEmptyLogConf_state
);
5905 state
->out_mem_ctx
= NULL
;
5906 state
->dispatch_recv
= cli
->dispatch_recv
;
5910 /* Out parameters */
5913 ZERO_STRUCT(state
->orig
.out
.result
);
5915 /* make a temporary copy, that we pass to the dispatch function */
5916 state
->tmp
= state
->orig
;
5918 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5920 NDR_PNP_ADDEMPTYLOGCONF
,
5922 if (tevent_req_nomem(subreq
, req
)) {
5923 return tevent_req_post(req
, ev
);
5925 tevent_req_set_callback(subreq
, rpccli_PNP_AddEmptyLogConf_done
, req
);
5929 static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req
*subreq
)
5931 struct tevent_req
*req
= tevent_req_callback_data(
5932 subreq
, struct tevent_req
);
5933 struct rpccli_PNP_AddEmptyLogConf_state
*state
= tevent_req_data(
5934 req
, struct rpccli_PNP_AddEmptyLogConf_state
);
5936 TALLOC_CTX
*mem_ctx
;
5938 if (state
->out_mem_ctx
) {
5939 mem_ctx
= state
->out_mem_ctx
;
5944 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5945 TALLOC_FREE(subreq
);
5946 if (!NT_STATUS_IS_OK(status
)) {
5947 tevent_req_nterror(req
, status
);
5951 /* Copy out parameters */
5954 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5956 /* Reset temporary structure */
5957 ZERO_STRUCT(state
->tmp
);
5959 tevent_req_done(req
);
5962 NTSTATUS
rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req
*req
,
5963 TALLOC_CTX
*mem_ctx
,
5966 struct rpccli_PNP_AddEmptyLogConf_state
*state
= tevent_req_data(
5967 req
, struct rpccli_PNP_AddEmptyLogConf_state
);
5970 if (tevent_req_is_nterror(req
, &status
)) {
5971 tevent_req_received(req
);
5975 /* Steal possbile out parameters to the callers context */
5976 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5979 *result
= state
->orig
.out
.result
;
5981 tevent_req_received(req
);
5982 return NT_STATUS_OK
;
5985 NTSTATUS
rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client
*cli
,
5986 TALLOC_CTX
*mem_ctx
,
5989 struct PNP_AddEmptyLogConf r
;
5994 status
= cli
->dispatch(cli
,
5997 NDR_PNP_ADDEMPTYLOGCONF
,
6000 if (!NT_STATUS_IS_OK(status
)) {
6004 if (NT_STATUS_IS_ERR(status
)) {
6008 /* Return variables */
6012 *werror
= r
.out
.result
;
6015 return werror_to_ntstatus(r
.out
.result
);
6018 struct rpccli_PNP_FreeLogConf_state
{
6019 struct PNP_FreeLogConf orig
;
6020 struct PNP_FreeLogConf tmp
;
6021 TALLOC_CTX
*out_mem_ctx
;
6022 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6025 static void rpccli_PNP_FreeLogConf_done(struct tevent_req
*subreq
);
6027 struct tevent_req
*rpccli_PNP_FreeLogConf_send(TALLOC_CTX
*mem_ctx
,
6028 struct tevent_context
*ev
,
6029 struct rpc_pipe_client
*cli
)
6031 struct tevent_req
*req
;
6032 struct rpccli_PNP_FreeLogConf_state
*state
;
6033 struct tevent_req
*subreq
;
6035 req
= tevent_req_create(mem_ctx
, &state
,
6036 struct rpccli_PNP_FreeLogConf_state
);
6040 state
->out_mem_ctx
= NULL
;
6041 state
->dispatch_recv
= cli
->dispatch_recv
;
6045 /* Out parameters */
6048 ZERO_STRUCT(state
->orig
.out
.result
);
6050 /* make a temporary copy, that we pass to the dispatch function */
6051 state
->tmp
= state
->orig
;
6053 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6055 NDR_PNP_FREELOGCONF
,
6057 if (tevent_req_nomem(subreq
, req
)) {
6058 return tevent_req_post(req
, ev
);
6060 tevent_req_set_callback(subreq
, rpccli_PNP_FreeLogConf_done
, req
);
6064 static void rpccli_PNP_FreeLogConf_done(struct tevent_req
*subreq
)
6066 struct tevent_req
*req
= tevent_req_callback_data(
6067 subreq
, struct tevent_req
);
6068 struct rpccli_PNP_FreeLogConf_state
*state
= tevent_req_data(
6069 req
, struct rpccli_PNP_FreeLogConf_state
);
6071 TALLOC_CTX
*mem_ctx
;
6073 if (state
->out_mem_ctx
) {
6074 mem_ctx
= state
->out_mem_ctx
;
6079 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6080 TALLOC_FREE(subreq
);
6081 if (!NT_STATUS_IS_OK(status
)) {
6082 tevent_req_nterror(req
, status
);
6086 /* Copy out parameters */
6089 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6091 /* Reset temporary structure */
6092 ZERO_STRUCT(state
->tmp
);
6094 tevent_req_done(req
);
6097 NTSTATUS
rpccli_PNP_FreeLogConf_recv(struct tevent_req
*req
,
6098 TALLOC_CTX
*mem_ctx
,
6101 struct rpccli_PNP_FreeLogConf_state
*state
= tevent_req_data(
6102 req
, struct rpccli_PNP_FreeLogConf_state
);
6105 if (tevent_req_is_nterror(req
, &status
)) {
6106 tevent_req_received(req
);
6110 /* Steal possbile out parameters to the callers context */
6111 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6114 *result
= state
->orig
.out
.result
;
6116 tevent_req_received(req
);
6117 return NT_STATUS_OK
;
6120 NTSTATUS
rpccli_PNP_FreeLogConf(struct rpc_pipe_client
*cli
,
6121 TALLOC_CTX
*mem_ctx
,
6124 struct PNP_FreeLogConf r
;
6129 status
= cli
->dispatch(cli
,
6132 NDR_PNP_FREELOGCONF
,
6135 if (!NT_STATUS_IS_OK(status
)) {
6139 if (NT_STATUS_IS_ERR(status
)) {
6143 /* Return variables */
6147 *werror
= r
.out
.result
;
6150 return werror_to_ntstatus(r
.out
.result
);
6153 struct rpccli_PNP_GetFirstLogConf_state
{
6154 struct PNP_GetFirstLogConf orig
;
6155 struct PNP_GetFirstLogConf tmp
;
6156 TALLOC_CTX
*out_mem_ctx
;
6157 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6160 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req
*subreq
);
6162 struct tevent_req
*rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX
*mem_ctx
,
6163 struct tevent_context
*ev
,
6164 struct rpc_pipe_client
*cli
)
6166 struct tevent_req
*req
;
6167 struct rpccli_PNP_GetFirstLogConf_state
*state
;
6168 struct tevent_req
*subreq
;
6170 req
= tevent_req_create(mem_ctx
, &state
,
6171 struct rpccli_PNP_GetFirstLogConf_state
);
6175 state
->out_mem_ctx
= NULL
;
6176 state
->dispatch_recv
= cli
->dispatch_recv
;
6180 /* Out parameters */
6183 ZERO_STRUCT(state
->orig
.out
.result
);
6185 /* make a temporary copy, that we pass to the dispatch function */
6186 state
->tmp
= state
->orig
;
6188 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6190 NDR_PNP_GETFIRSTLOGCONF
,
6192 if (tevent_req_nomem(subreq
, req
)) {
6193 return tevent_req_post(req
, ev
);
6195 tevent_req_set_callback(subreq
, rpccli_PNP_GetFirstLogConf_done
, req
);
6199 static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req
*subreq
)
6201 struct tevent_req
*req
= tevent_req_callback_data(
6202 subreq
, struct tevent_req
);
6203 struct rpccli_PNP_GetFirstLogConf_state
*state
= tevent_req_data(
6204 req
, struct rpccli_PNP_GetFirstLogConf_state
);
6206 TALLOC_CTX
*mem_ctx
;
6208 if (state
->out_mem_ctx
) {
6209 mem_ctx
= state
->out_mem_ctx
;
6214 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6215 TALLOC_FREE(subreq
);
6216 if (!NT_STATUS_IS_OK(status
)) {
6217 tevent_req_nterror(req
, status
);
6221 /* Copy out parameters */
6224 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6226 /* Reset temporary structure */
6227 ZERO_STRUCT(state
->tmp
);
6229 tevent_req_done(req
);
6232 NTSTATUS
rpccli_PNP_GetFirstLogConf_recv(struct tevent_req
*req
,
6233 TALLOC_CTX
*mem_ctx
,
6236 struct rpccli_PNP_GetFirstLogConf_state
*state
= tevent_req_data(
6237 req
, struct rpccli_PNP_GetFirstLogConf_state
);
6240 if (tevent_req_is_nterror(req
, &status
)) {
6241 tevent_req_received(req
);
6245 /* Steal possbile out parameters to the callers context */
6246 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6249 *result
= state
->orig
.out
.result
;
6251 tevent_req_received(req
);
6252 return NT_STATUS_OK
;
6255 NTSTATUS
rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client
*cli
,
6256 TALLOC_CTX
*mem_ctx
,
6259 struct PNP_GetFirstLogConf r
;
6264 status
= cli
->dispatch(cli
,
6267 NDR_PNP_GETFIRSTLOGCONF
,
6270 if (!NT_STATUS_IS_OK(status
)) {
6274 if (NT_STATUS_IS_ERR(status
)) {
6278 /* Return variables */
6282 *werror
= r
.out
.result
;
6285 return werror_to_ntstatus(r
.out
.result
);
6288 struct rpccli_PNP_GetNextLogConf_state
{
6289 struct PNP_GetNextLogConf orig
;
6290 struct PNP_GetNextLogConf tmp
;
6291 TALLOC_CTX
*out_mem_ctx
;
6292 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6295 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req
*subreq
);
6297 struct tevent_req
*rpccli_PNP_GetNextLogConf_send(TALLOC_CTX
*mem_ctx
,
6298 struct tevent_context
*ev
,
6299 struct rpc_pipe_client
*cli
)
6301 struct tevent_req
*req
;
6302 struct rpccli_PNP_GetNextLogConf_state
*state
;
6303 struct tevent_req
*subreq
;
6305 req
= tevent_req_create(mem_ctx
, &state
,
6306 struct rpccli_PNP_GetNextLogConf_state
);
6310 state
->out_mem_ctx
= NULL
;
6311 state
->dispatch_recv
= cli
->dispatch_recv
;
6315 /* Out parameters */
6318 ZERO_STRUCT(state
->orig
.out
.result
);
6320 /* make a temporary copy, that we pass to the dispatch function */
6321 state
->tmp
= state
->orig
;
6323 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6325 NDR_PNP_GETNEXTLOGCONF
,
6327 if (tevent_req_nomem(subreq
, req
)) {
6328 return tevent_req_post(req
, ev
);
6330 tevent_req_set_callback(subreq
, rpccli_PNP_GetNextLogConf_done
, req
);
6334 static void rpccli_PNP_GetNextLogConf_done(struct tevent_req
*subreq
)
6336 struct tevent_req
*req
= tevent_req_callback_data(
6337 subreq
, struct tevent_req
);
6338 struct rpccli_PNP_GetNextLogConf_state
*state
= tevent_req_data(
6339 req
, struct rpccli_PNP_GetNextLogConf_state
);
6341 TALLOC_CTX
*mem_ctx
;
6343 if (state
->out_mem_ctx
) {
6344 mem_ctx
= state
->out_mem_ctx
;
6349 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6350 TALLOC_FREE(subreq
);
6351 if (!NT_STATUS_IS_OK(status
)) {
6352 tevent_req_nterror(req
, status
);
6356 /* Copy out parameters */
6359 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6361 /* Reset temporary structure */
6362 ZERO_STRUCT(state
->tmp
);
6364 tevent_req_done(req
);
6367 NTSTATUS
rpccli_PNP_GetNextLogConf_recv(struct tevent_req
*req
,
6368 TALLOC_CTX
*mem_ctx
,
6371 struct rpccli_PNP_GetNextLogConf_state
*state
= tevent_req_data(
6372 req
, struct rpccli_PNP_GetNextLogConf_state
);
6375 if (tevent_req_is_nterror(req
, &status
)) {
6376 tevent_req_received(req
);
6380 /* Steal possbile out parameters to the callers context */
6381 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6384 *result
= state
->orig
.out
.result
;
6386 tevent_req_received(req
);
6387 return NT_STATUS_OK
;
6390 NTSTATUS
rpccli_PNP_GetNextLogConf(struct rpc_pipe_client
*cli
,
6391 TALLOC_CTX
*mem_ctx
,
6394 struct PNP_GetNextLogConf r
;
6399 status
= cli
->dispatch(cli
,
6402 NDR_PNP_GETNEXTLOGCONF
,
6405 if (!NT_STATUS_IS_OK(status
)) {
6409 if (NT_STATUS_IS_ERR(status
)) {
6413 /* Return variables */
6417 *werror
= r
.out
.result
;
6420 return werror_to_ntstatus(r
.out
.result
);
6423 struct rpccli_PNP_GetLogConfPriority_state
{
6424 struct PNP_GetLogConfPriority orig
;
6425 struct PNP_GetLogConfPriority tmp
;
6426 TALLOC_CTX
*out_mem_ctx
;
6427 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6430 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req
*subreq
);
6432 struct tevent_req
*rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX
*mem_ctx
,
6433 struct tevent_context
*ev
,
6434 struct rpc_pipe_client
*cli
)
6436 struct tevent_req
*req
;
6437 struct rpccli_PNP_GetLogConfPriority_state
*state
;
6438 struct tevent_req
*subreq
;
6440 req
= tevent_req_create(mem_ctx
, &state
,
6441 struct rpccli_PNP_GetLogConfPriority_state
);
6445 state
->out_mem_ctx
= NULL
;
6446 state
->dispatch_recv
= cli
->dispatch_recv
;
6450 /* Out parameters */
6453 ZERO_STRUCT(state
->orig
.out
.result
);
6455 /* make a temporary copy, that we pass to the dispatch function */
6456 state
->tmp
= state
->orig
;
6458 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6460 NDR_PNP_GETLOGCONFPRIORITY
,
6462 if (tevent_req_nomem(subreq
, req
)) {
6463 return tevent_req_post(req
, ev
);
6465 tevent_req_set_callback(subreq
, rpccli_PNP_GetLogConfPriority_done
, req
);
6469 static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req
*subreq
)
6471 struct tevent_req
*req
= tevent_req_callback_data(
6472 subreq
, struct tevent_req
);
6473 struct rpccli_PNP_GetLogConfPriority_state
*state
= tevent_req_data(
6474 req
, struct rpccli_PNP_GetLogConfPriority_state
);
6476 TALLOC_CTX
*mem_ctx
;
6478 if (state
->out_mem_ctx
) {
6479 mem_ctx
= state
->out_mem_ctx
;
6484 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6485 TALLOC_FREE(subreq
);
6486 if (!NT_STATUS_IS_OK(status
)) {
6487 tevent_req_nterror(req
, status
);
6491 /* Copy out parameters */
6494 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6496 /* Reset temporary structure */
6497 ZERO_STRUCT(state
->tmp
);
6499 tevent_req_done(req
);
6502 NTSTATUS
rpccli_PNP_GetLogConfPriority_recv(struct tevent_req
*req
,
6503 TALLOC_CTX
*mem_ctx
,
6506 struct rpccli_PNP_GetLogConfPriority_state
*state
= tevent_req_data(
6507 req
, struct rpccli_PNP_GetLogConfPriority_state
);
6510 if (tevent_req_is_nterror(req
, &status
)) {
6511 tevent_req_received(req
);
6515 /* Steal possbile out parameters to the callers context */
6516 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6519 *result
= state
->orig
.out
.result
;
6521 tevent_req_received(req
);
6522 return NT_STATUS_OK
;
6525 NTSTATUS
rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client
*cli
,
6526 TALLOC_CTX
*mem_ctx
,
6529 struct PNP_GetLogConfPriority r
;
6534 status
= cli
->dispatch(cli
,
6537 NDR_PNP_GETLOGCONFPRIORITY
,
6540 if (!NT_STATUS_IS_OK(status
)) {
6544 if (NT_STATUS_IS_ERR(status
)) {
6548 /* Return variables */
6552 *werror
= r
.out
.result
;
6555 return werror_to_ntstatus(r
.out
.result
);
6558 struct rpccli_PNP_AddResDes_state
{
6559 struct PNP_AddResDes orig
;
6560 struct PNP_AddResDes tmp
;
6561 TALLOC_CTX
*out_mem_ctx
;
6562 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6565 static void rpccli_PNP_AddResDes_done(struct tevent_req
*subreq
);
6567 struct tevent_req
*rpccli_PNP_AddResDes_send(TALLOC_CTX
*mem_ctx
,
6568 struct tevent_context
*ev
,
6569 struct rpc_pipe_client
*cli
)
6571 struct tevent_req
*req
;
6572 struct rpccli_PNP_AddResDes_state
*state
;
6573 struct tevent_req
*subreq
;
6575 req
= tevent_req_create(mem_ctx
, &state
,
6576 struct rpccli_PNP_AddResDes_state
);
6580 state
->out_mem_ctx
= NULL
;
6581 state
->dispatch_recv
= cli
->dispatch_recv
;
6585 /* Out parameters */
6588 ZERO_STRUCT(state
->orig
.out
.result
);
6590 /* make a temporary copy, that we pass to the dispatch function */
6591 state
->tmp
= state
->orig
;
6593 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6597 if (tevent_req_nomem(subreq
, req
)) {
6598 return tevent_req_post(req
, ev
);
6600 tevent_req_set_callback(subreq
, rpccli_PNP_AddResDes_done
, req
);
6604 static void rpccli_PNP_AddResDes_done(struct tevent_req
*subreq
)
6606 struct tevent_req
*req
= tevent_req_callback_data(
6607 subreq
, struct tevent_req
);
6608 struct rpccli_PNP_AddResDes_state
*state
= tevent_req_data(
6609 req
, struct rpccli_PNP_AddResDes_state
);
6611 TALLOC_CTX
*mem_ctx
;
6613 if (state
->out_mem_ctx
) {
6614 mem_ctx
= state
->out_mem_ctx
;
6619 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6620 TALLOC_FREE(subreq
);
6621 if (!NT_STATUS_IS_OK(status
)) {
6622 tevent_req_nterror(req
, status
);
6626 /* Copy out parameters */
6629 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6631 /* Reset temporary structure */
6632 ZERO_STRUCT(state
->tmp
);
6634 tevent_req_done(req
);
6637 NTSTATUS
rpccli_PNP_AddResDes_recv(struct tevent_req
*req
,
6638 TALLOC_CTX
*mem_ctx
,
6641 struct rpccli_PNP_AddResDes_state
*state
= tevent_req_data(
6642 req
, struct rpccli_PNP_AddResDes_state
);
6645 if (tevent_req_is_nterror(req
, &status
)) {
6646 tevent_req_received(req
);
6650 /* Steal possbile out parameters to the callers context */
6651 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6654 *result
= state
->orig
.out
.result
;
6656 tevent_req_received(req
);
6657 return NT_STATUS_OK
;
6660 NTSTATUS
rpccli_PNP_AddResDes(struct rpc_pipe_client
*cli
,
6661 TALLOC_CTX
*mem_ctx
,
6664 struct PNP_AddResDes r
;
6669 status
= cli
->dispatch(cli
,
6675 if (!NT_STATUS_IS_OK(status
)) {
6679 if (NT_STATUS_IS_ERR(status
)) {
6683 /* Return variables */
6687 *werror
= r
.out
.result
;
6690 return werror_to_ntstatus(r
.out
.result
);
6693 struct rpccli_PNP_FreeResDes_state
{
6694 struct PNP_FreeResDes orig
;
6695 struct PNP_FreeResDes tmp
;
6696 TALLOC_CTX
*out_mem_ctx
;
6697 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6700 static void rpccli_PNP_FreeResDes_done(struct tevent_req
*subreq
);
6702 struct tevent_req
*rpccli_PNP_FreeResDes_send(TALLOC_CTX
*mem_ctx
,
6703 struct tevent_context
*ev
,
6704 struct rpc_pipe_client
*cli
)
6706 struct tevent_req
*req
;
6707 struct rpccli_PNP_FreeResDes_state
*state
;
6708 struct tevent_req
*subreq
;
6710 req
= tevent_req_create(mem_ctx
, &state
,
6711 struct rpccli_PNP_FreeResDes_state
);
6715 state
->out_mem_ctx
= NULL
;
6716 state
->dispatch_recv
= cli
->dispatch_recv
;
6720 /* Out parameters */
6723 ZERO_STRUCT(state
->orig
.out
.result
);
6725 /* make a temporary copy, that we pass to the dispatch function */
6726 state
->tmp
= state
->orig
;
6728 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6732 if (tevent_req_nomem(subreq
, req
)) {
6733 return tevent_req_post(req
, ev
);
6735 tevent_req_set_callback(subreq
, rpccli_PNP_FreeResDes_done
, req
);
6739 static void rpccli_PNP_FreeResDes_done(struct tevent_req
*subreq
)
6741 struct tevent_req
*req
= tevent_req_callback_data(
6742 subreq
, struct tevent_req
);
6743 struct rpccli_PNP_FreeResDes_state
*state
= tevent_req_data(
6744 req
, struct rpccli_PNP_FreeResDes_state
);
6746 TALLOC_CTX
*mem_ctx
;
6748 if (state
->out_mem_ctx
) {
6749 mem_ctx
= state
->out_mem_ctx
;
6754 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6755 TALLOC_FREE(subreq
);
6756 if (!NT_STATUS_IS_OK(status
)) {
6757 tevent_req_nterror(req
, status
);
6761 /* Copy out parameters */
6764 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6766 /* Reset temporary structure */
6767 ZERO_STRUCT(state
->tmp
);
6769 tevent_req_done(req
);
6772 NTSTATUS
rpccli_PNP_FreeResDes_recv(struct tevent_req
*req
,
6773 TALLOC_CTX
*mem_ctx
,
6776 struct rpccli_PNP_FreeResDes_state
*state
= tevent_req_data(
6777 req
, struct rpccli_PNP_FreeResDes_state
);
6780 if (tevent_req_is_nterror(req
, &status
)) {
6781 tevent_req_received(req
);
6785 /* Steal possbile out parameters to the callers context */
6786 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6789 *result
= state
->orig
.out
.result
;
6791 tevent_req_received(req
);
6792 return NT_STATUS_OK
;
6795 NTSTATUS
rpccli_PNP_FreeResDes(struct rpc_pipe_client
*cli
,
6796 TALLOC_CTX
*mem_ctx
,
6799 struct PNP_FreeResDes r
;
6804 status
= cli
->dispatch(cli
,
6810 if (!NT_STATUS_IS_OK(status
)) {
6814 if (NT_STATUS_IS_ERR(status
)) {
6818 /* Return variables */
6822 *werror
= r
.out
.result
;
6825 return werror_to_ntstatus(r
.out
.result
);
6828 struct rpccli_PNP_GetNextResDes_state
{
6829 struct PNP_GetNextResDes orig
;
6830 struct PNP_GetNextResDes tmp
;
6831 TALLOC_CTX
*out_mem_ctx
;
6832 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6835 static void rpccli_PNP_GetNextResDes_done(struct tevent_req
*subreq
);
6837 struct tevent_req
*rpccli_PNP_GetNextResDes_send(TALLOC_CTX
*mem_ctx
,
6838 struct tevent_context
*ev
,
6839 struct rpc_pipe_client
*cli
)
6841 struct tevent_req
*req
;
6842 struct rpccli_PNP_GetNextResDes_state
*state
;
6843 struct tevent_req
*subreq
;
6845 req
= tevent_req_create(mem_ctx
, &state
,
6846 struct rpccli_PNP_GetNextResDes_state
);
6850 state
->out_mem_ctx
= NULL
;
6851 state
->dispatch_recv
= cli
->dispatch_recv
;
6855 /* Out parameters */
6858 ZERO_STRUCT(state
->orig
.out
.result
);
6860 /* make a temporary copy, that we pass to the dispatch function */
6861 state
->tmp
= state
->orig
;
6863 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6865 NDR_PNP_GETNEXTRESDES
,
6867 if (tevent_req_nomem(subreq
, req
)) {
6868 return tevent_req_post(req
, ev
);
6870 tevent_req_set_callback(subreq
, rpccli_PNP_GetNextResDes_done
, req
);
6874 static void rpccli_PNP_GetNextResDes_done(struct tevent_req
*subreq
)
6876 struct tevent_req
*req
= tevent_req_callback_data(
6877 subreq
, struct tevent_req
);
6878 struct rpccli_PNP_GetNextResDes_state
*state
= tevent_req_data(
6879 req
, struct rpccli_PNP_GetNextResDes_state
);
6881 TALLOC_CTX
*mem_ctx
;
6883 if (state
->out_mem_ctx
) {
6884 mem_ctx
= state
->out_mem_ctx
;
6889 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6890 TALLOC_FREE(subreq
);
6891 if (!NT_STATUS_IS_OK(status
)) {
6892 tevent_req_nterror(req
, status
);
6896 /* Copy out parameters */
6899 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6901 /* Reset temporary structure */
6902 ZERO_STRUCT(state
->tmp
);
6904 tevent_req_done(req
);
6907 NTSTATUS
rpccli_PNP_GetNextResDes_recv(struct tevent_req
*req
,
6908 TALLOC_CTX
*mem_ctx
,
6911 struct rpccli_PNP_GetNextResDes_state
*state
= tevent_req_data(
6912 req
, struct rpccli_PNP_GetNextResDes_state
);
6915 if (tevent_req_is_nterror(req
, &status
)) {
6916 tevent_req_received(req
);
6920 /* Steal possbile out parameters to the callers context */
6921 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6924 *result
= state
->orig
.out
.result
;
6926 tevent_req_received(req
);
6927 return NT_STATUS_OK
;
6930 NTSTATUS
rpccli_PNP_GetNextResDes(struct rpc_pipe_client
*cli
,
6931 TALLOC_CTX
*mem_ctx
,
6934 struct PNP_GetNextResDes r
;
6939 status
= cli
->dispatch(cli
,
6942 NDR_PNP_GETNEXTRESDES
,
6945 if (!NT_STATUS_IS_OK(status
)) {
6949 if (NT_STATUS_IS_ERR(status
)) {
6953 /* Return variables */
6957 *werror
= r
.out
.result
;
6960 return werror_to_ntstatus(r
.out
.result
);
6963 struct rpccli_PNP_GetResDesData_state
{
6964 struct PNP_GetResDesData orig
;
6965 struct PNP_GetResDesData tmp
;
6966 TALLOC_CTX
*out_mem_ctx
;
6967 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6970 static void rpccli_PNP_GetResDesData_done(struct tevent_req
*subreq
);
6972 struct tevent_req
*rpccli_PNP_GetResDesData_send(TALLOC_CTX
*mem_ctx
,
6973 struct tevent_context
*ev
,
6974 struct rpc_pipe_client
*cli
)
6976 struct tevent_req
*req
;
6977 struct rpccli_PNP_GetResDesData_state
*state
;
6978 struct tevent_req
*subreq
;
6980 req
= tevent_req_create(mem_ctx
, &state
,
6981 struct rpccli_PNP_GetResDesData_state
);
6985 state
->out_mem_ctx
= NULL
;
6986 state
->dispatch_recv
= cli
->dispatch_recv
;
6990 /* Out parameters */
6993 ZERO_STRUCT(state
->orig
.out
.result
);
6995 /* make a temporary copy, that we pass to the dispatch function */
6996 state
->tmp
= state
->orig
;
6998 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7000 NDR_PNP_GETRESDESDATA
,
7002 if (tevent_req_nomem(subreq
, req
)) {
7003 return tevent_req_post(req
, ev
);
7005 tevent_req_set_callback(subreq
, rpccli_PNP_GetResDesData_done
, req
);
7009 static void rpccli_PNP_GetResDesData_done(struct tevent_req
*subreq
)
7011 struct tevent_req
*req
= tevent_req_callback_data(
7012 subreq
, struct tevent_req
);
7013 struct rpccli_PNP_GetResDesData_state
*state
= tevent_req_data(
7014 req
, struct rpccli_PNP_GetResDesData_state
);
7016 TALLOC_CTX
*mem_ctx
;
7018 if (state
->out_mem_ctx
) {
7019 mem_ctx
= state
->out_mem_ctx
;
7024 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7025 TALLOC_FREE(subreq
);
7026 if (!NT_STATUS_IS_OK(status
)) {
7027 tevent_req_nterror(req
, status
);
7031 /* Copy out parameters */
7034 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7036 /* Reset temporary structure */
7037 ZERO_STRUCT(state
->tmp
);
7039 tevent_req_done(req
);
7042 NTSTATUS
rpccli_PNP_GetResDesData_recv(struct tevent_req
*req
,
7043 TALLOC_CTX
*mem_ctx
,
7046 struct rpccli_PNP_GetResDesData_state
*state
= tevent_req_data(
7047 req
, struct rpccli_PNP_GetResDesData_state
);
7050 if (tevent_req_is_nterror(req
, &status
)) {
7051 tevent_req_received(req
);
7055 /* Steal possbile out parameters to the callers context */
7056 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7059 *result
= state
->orig
.out
.result
;
7061 tevent_req_received(req
);
7062 return NT_STATUS_OK
;
7065 NTSTATUS
rpccli_PNP_GetResDesData(struct rpc_pipe_client
*cli
,
7066 TALLOC_CTX
*mem_ctx
,
7069 struct PNP_GetResDesData r
;
7074 status
= cli
->dispatch(cli
,
7077 NDR_PNP_GETRESDESDATA
,
7080 if (!NT_STATUS_IS_OK(status
)) {
7084 if (NT_STATUS_IS_ERR(status
)) {
7088 /* Return variables */
7092 *werror
= r
.out
.result
;
7095 return werror_to_ntstatus(r
.out
.result
);
7098 struct rpccli_PNP_GetResDesDataSize_state
{
7099 struct PNP_GetResDesDataSize orig
;
7100 struct PNP_GetResDesDataSize tmp
;
7101 TALLOC_CTX
*out_mem_ctx
;
7102 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7105 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req
*subreq
);
7107 struct tevent_req
*rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX
*mem_ctx
,
7108 struct tevent_context
*ev
,
7109 struct rpc_pipe_client
*cli
)
7111 struct tevent_req
*req
;
7112 struct rpccli_PNP_GetResDesDataSize_state
*state
;
7113 struct tevent_req
*subreq
;
7115 req
= tevent_req_create(mem_ctx
, &state
,
7116 struct rpccli_PNP_GetResDesDataSize_state
);
7120 state
->out_mem_ctx
= NULL
;
7121 state
->dispatch_recv
= cli
->dispatch_recv
;
7125 /* Out parameters */
7128 ZERO_STRUCT(state
->orig
.out
.result
);
7130 /* make a temporary copy, that we pass to the dispatch function */
7131 state
->tmp
= state
->orig
;
7133 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7135 NDR_PNP_GETRESDESDATASIZE
,
7137 if (tevent_req_nomem(subreq
, req
)) {
7138 return tevent_req_post(req
, ev
);
7140 tevent_req_set_callback(subreq
, rpccli_PNP_GetResDesDataSize_done
, req
);
7144 static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req
*subreq
)
7146 struct tevent_req
*req
= tevent_req_callback_data(
7147 subreq
, struct tevent_req
);
7148 struct rpccli_PNP_GetResDesDataSize_state
*state
= tevent_req_data(
7149 req
, struct rpccli_PNP_GetResDesDataSize_state
);
7151 TALLOC_CTX
*mem_ctx
;
7153 if (state
->out_mem_ctx
) {
7154 mem_ctx
= state
->out_mem_ctx
;
7159 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7160 TALLOC_FREE(subreq
);
7161 if (!NT_STATUS_IS_OK(status
)) {
7162 tevent_req_nterror(req
, status
);
7166 /* Copy out parameters */
7169 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7171 /* Reset temporary structure */
7172 ZERO_STRUCT(state
->tmp
);
7174 tevent_req_done(req
);
7177 NTSTATUS
rpccli_PNP_GetResDesDataSize_recv(struct tevent_req
*req
,
7178 TALLOC_CTX
*mem_ctx
,
7181 struct rpccli_PNP_GetResDesDataSize_state
*state
= tevent_req_data(
7182 req
, struct rpccli_PNP_GetResDesDataSize_state
);
7185 if (tevent_req_is_nterror(req
, &status
)) {
7186 tevent_req_received(req
);
7190 /* Steal possbile out parameters to the callers context */
7191 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7194 *result
= state
->orig
.out
.result
;
7196 tevent_req_received(req
);
7197 return NT_STATUS_OK
;
7200 NTSTATUS
rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client
*cli
,
7201 TALLOC_CTX
*mem_ctx
,
7204 struct PNP_GetResDesDataSize r
;
7209 status
= cli
->dispatch(cli
,
7212 NDR_PNP_GETRESDESDATASIZE
,
7215 if (!NT_STATUS_IS_OK(status
)) {
7219 if (NT_STATUS_IS_ERR(status
)) {
7223 /* Return variables */
7227 *werror
= r
.out
.result
;
7230 return werror_to_ntstatus(r
.out
.result
);
7233 struct rpccli_PNP_ModifyResDes_state
{
7234 struct PNP_ModifyResDes orig
;
7235 struct PNP_ModifyResDes tmp
;
7236 TALLOC_CTX
*out_mem_ctx
;
7237 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7240 static void rpccli_PNP_ModifyResDes_done(struct tevent_req
*subreq
);
7242 struct tevent_req
*rpccli_PNP_ModifyResDes_send(TALLOC_CTX
*mem_ctx
,
7243 struct tevent_context
*ev
,
7244 struct rpc_pipe_client
*cli
)
7246 struct tevent_req
*req
;
7247 struct rpccli_PNP_ModifyResDes_state
*state
;
7248 struct tevent_req
*subreq
;
7250 req
= tevent_req_create(mem_ctx
, &state
,
7251 struct rpccli_PNP_ModifyResDes_state
);
7255 state
->out_mem_ctx
= NULL
;
7256 state
->dispatch_recv
= cli
->dispatch_recv
;
7260 /* Out parameters */
7263 ZERO_STRUCT(state
->orig
.out
.result
);
7265 /* make a temporary copy, that we pass to the dispatch function */
7266 state
->tmp
= state
->orig
;
7268 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7270 NDR_PNP_MODIFYRESDES
,
7272 if (tevent_req_nomem(subreq
, req
)) {
7273 return tevent_req_post(req
, ev
);
7275 tevent_req_set_callback(subreq
, rpccli_PNP_ModifyResDes_done
, req
);
7279 static void rpccli_PNP_ModifyResDes_done(struct tevent_req
*subreq
)
7281 struct tevent_req
*req
= tevent_req_callback_data(
7282 subreq
, struct tevent_req
);
7283 struct rpccli_PNP_ModifyResDes_state
*state
= tevent_req_data(
7284 req
, struct rpccli_PNP_ModifyResDes_state
);
7286 TALLOC_CTX
*mem_ctx
;
7288 if (state
->out_mem_ctx
) {
7289 mem_ctx
= state
->out_mem_ctx
;
7294 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7295 TALLOC_FREE(subreq
);
7296 if (!NT_STATUS_IS_OK(status
)) {
7297 tevent_req_nterror(req
, status
);
7301 /* Copy out parameters */
7304 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7306 /* Reset temporary structure */
7307 ZERO_STRUCT(state
->tmp
);
7309 tevent_req_done(req
);
7312 NTSTATUS
rpccli_PNP_ModifyResDes_recv(struct tevent_req
*req
,
7313 TALLOC_CTX
*mem_ctx
,
7316 struct rpccli_PNP_ModifyResDes_state
*state
= tevent_req_data(
7317 req
, struct rpccli_PNP_ModifyResDes_state
);
7320 if (tevent_req_is_nterror(req
, &status
)) {
7321 tevent_req_received(req
);
7325 /* Steal possbile out parameters to the callers context */
7326 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7329 *result
= state
->orig
.out
.result
;
7331 tevent_req_received(req
);
7332 return NT_STATUS_OK
;
7335 NTSTATUS
rpccli_PNP_ModifyResDes(struct rpc_pipe_client
*cli
,
7336 TALLOC_CTX
*mem_ctx
,
7339 struct PNP_ModifyResDes r
;
7344 status
= cli
->dispatch(cli
,
7347 NDR_PNP_MODIFYRESDES
,
7350 if (!NT_STATUS_IS_OK(status
)) {
7354 if (NT_STATUS_IS_ERR(status
)) {
7358 /* Return variables */
7362 *werror
= r
.out
.result
;
7365 return werror_to_ntstatus(r
.out
.result
);
7368 struct rpccli_PNP_DetectResourceLimit_state
{
7369 struct PNP_DetectResourceLimit orig
;
7370 struct PNP_DetectResourceLimit tmp
;
7371 TALLOC_CTX
*out_mem_ctx
;
7372 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7375 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req
*subreq
);
7377 struct tevent_req
*rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX
*mem_ctx
,
7378 struct tevent_context
*ev
,
7379 struct rpc_pipe_client
*cli
)
7381 struct tevent_req
*req
;
7382 struct rpccli_PNP_DetectResourceLimit_state
*state
;
7383 struct tevent_req
*subreq
;
7385 req
= tevent_req_create(mem_ctx
, &state
,
7386 struct rpccli_PNP_DetectResourceLimit_state
);
7390 state
->out_mem_ctx
= NULL
;
7391 state
->dispatch_recv
= cli
->dispatch_recv
;
7395 /* Out parameters */
7398 ZERO_STRUCT(state
->orig
.out
.result
);
7400 /* make a temporary copy, that we pass to the dispatch function */
7401 state
->tmp
= state
->orig
;
7403 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7405 NDR_PNP_DETECTRESOURCELIMIT
,
7407 if (tevent_req_nomem(subreq
, req
)) {
7408 return tevent_req_post(req
, ev
);
7410 tevent_req_set_callback(subreq
, rpccli_PNP_DetectResourceLimit_done
, req
);
7414 static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req
*subreq
)
7416 struct tevent_req
*req
= tevent_req_callback_data(
7417 subreq
, struct tevent_req
);
7418 struct rpccli_PNP_DetectResourceLimit_state
*state
= tevent_req_data(
7419 req
, struct rpccli_PNP_DetectResourceLimit_state
);
7421 TALLOC_CTX
*mem_ctx
;
7423 if (state
->out_mem_ctx
) {
7424 mem_ctx
= state
->out_mem_ctx
;
7429 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7430 TALLOC_FREE(subreq
);
7431 if (!NT_STATUS_IS_OK(status
)) {
7432 tevent_req_nterror(req
, status
);
7436 /* Copy out parameters */
7439 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7441 /* Reset temporary structure */
7442 ZERO_STRUCT(state
->tmp
);
7444 tevent_req_done(req
);
7447 NTSTATUS
rpccli_PNP_DetectResourceLimit_recv(struct tevent_req
*req
,
7448 TALLOC_CTX
*mem_ctx
,
7451 struct rpccli_PNP_DetectResourceLimit_state
*state
= tevent_req_data(
7452 req
, struct rpccli_PNP_DetectResourceLimit_state
);
7455 if (tevent_req_is_nterror(req
, &status
)) {
7456 tevent_req_received(req
);
7460 /* Steal possbile out parameters to the callers context */
7461 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7464 *result
= state
->orig
.out
.result
;
7466 tevent_req_received(req
);
7467 return NT_STATUS_OK
;
7470 NTSTATUS
rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client
*cli
,
7471 TALLOC_CTX
*mem_ctx
,
7474 struct PNP_DetectResourceLimit r
;
7479 status
= cli
->dispatch(cli
,
7482 NDR_PNP_DETECTRESOURCELIMIT
,
7485 if (!NT_STATUS_IS_OK(status
)) {
7489 if (NT_STATUS_IS_ERR(status
)) {
7493 /* Return variables */
7497 *werror
= r
.out
.result
;
7500 return werror_to_ntstatus(r
.out
.result
);
7503 struct rpccli_PNP_QueryResConfList_state
{
7504 struct PNP_QueryResConfList orig
;
7505 struct PNP_QueryResConfList tmp
;
7506 TALLOC_CTX
*out_mem_ctx
;
7507 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7510 static void rpccli_PNP_QueryResConfList_done(struct tevent_req
*subreq
);
7512 struct tevent_req
*rpccli_PNP_QueryResConfList_send(TALLOC_CTX
*mem_ctx
,
7513 struct tevent_context
*ev
,
7514 struct rpc_pipe_client
*cli
)
7516 struct tevent_req
*req
;
7517 struct rpccli_PNP_QueryResConfList_state
*state
;
7518 struct tevent_req
*subreq
;
7520 req
= tevent_req_create(mem_ctx
, &state
,
7521 struct rpccli_PNP_QueryResConfList_state
);
7525 state
->out_mem_ctx
= NULL
;
7526 state
->dispatch_recv
= cli
->dispatch_recv
;
7530 /* Out parameters */
7533 ZERO_STRUCT(state
->orig
.out
.result
);
7535 /* make a temporary copy, that we pass to the dispatch function */
7536 state
->tmp
= state
->orig
;
7538 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7540 NDR_PNP_QUERYRESCONFLIST
,
7542 if (tevent_req_nomem(subreq
, req
)) {
7543 return tevent_req_post(req
, ev
);
7545 tevent_req_set_callback(subreq
, rpccli_PNP_QueryResConfList_done
, req
);
7549 static void rpccli_PNP_QueryResConfList_done(struct tevent_req
*subreq
)
7551 struct tevent_req
*req
= tevent_req_callback_data(
7552 subreq
, struct tevent_req
);
7553 struct rpccli_PNP_QueryResConfList_state
*state
= tevent_req_data(
7554 req
, struct rpccli_PNP_QueryResConfList_state
);
7556 TALLOC_CTX
*mem_ctx
;
7558 if (state
->out_mem_ctx
) {
7559 mem_ctx
= state
->out_mem_ctx
;
7564 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7565 TALLOC_FREE(subreq
);
7566 if (!NT_STATUS_IS_OK(status
)) {
7567 tevent_req_nterror(req
, status
);
7571 /* Copy out parameters */
7574 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7576 /* Reset temporary structure */
7577 ZERO_STRUCT(state
->tmp
);
7579 tevent_req_done(req
);
7582 NTSTATUS
rpccli_PNP_QueryResConfList_recv(struct tevent_req
*req
,
7583 TALLOC_CTX
*mem_ctx
,
7586 struct rpccli_PNP_QueryResConfList_state
*state
= tevent_req_data(
7587 req
, struct rpccli_PNP_QueryResConfList_state
);
7590 if (tevent_req_is_nterror(req
, &status
)) {
7591 tevent_req_received(req
);
7595 /* Steal possbile out parameters to the callers context */
7596 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7599 *result
= state
->orig
.out
.result
;
7601 tevent_req_received(req
);
7602 return NT_STATUS_OK
;
7605 NTSTATUS
rpccli_PNP_QueryResConfList(struct rpc_pipe_client
*cli
,
7606 TALLOC_CTX
*mem_ctx
,
7609 struct PNP_QueryResConfList r
;
7614 status
= cli
->dispatch(cli
,
7617 NDR_PNP_QUERYRESCONFLIST
,
7620 if (!NT_STATUS_IS_OK(status
)) {
7624 if (NT_STATUS_IS_ERR(status
)) {
7628 /* Return variables */
7632 *werror
= r
.out
.result
;
7635 return werror_to_ntstatus(r
.out
.result
);
7638 struct rpccli_PNP_SetHwProf_state
{
7639 struct PNP_SetHwProf orig
;
7640 struct PNP_SetHwProf tmp
;
7641 TALLOC_CTX
*out_mem_ctx
;
7642 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7645 static void rpccli_PNP_SetHwProf_done(struct tevent_req
*subreq
);
7647 struct tevent_req
*rpccli_PNP_SetHwProf_send(TALLOC_CTX
*mem_ctx
,
7648 struct tevent_context
*ev
,
7649 struct rpc_pipe_client
*cli
)
7651 struct tevent_req
*req
;
7652 struct rpccli_PNP_SetHwProf_state
*state
;
7653 struct tevent_req
*subreq
;
7655 req
= tevent_req_create(mem_ctx
, &state
,
7656 struct rpccli_PNP_SetHwProf_state
);
7660 state
->out_mem_ctx
= NULL
;
7661 state
->dispatch_recv
= cli
->dispatch_recv
;
7665 /* Out parameters */
7668 ZERO_STRUCT(state
->orig
.out
.result
);
7670 /* make a temporary copy, that we pass to the dispatch function */
7671 state
->tmp
= state
->orig
;
7673 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7677 if (tevent_req_nomem(subreq
, req
)) {
7678 return tevent_req_post(req
, ev
);
7680 tevent_req_set_callback(subreq
, rpccli_PNP_SetHwProf_done
, req
);
7684 static void rpccli_PNP_SetHwProf_done(struct tevent_req
*subreq
)
7686 struct tevent_req
*req
= tevent_req_callback_data(
7687 subreq
, struct tevent_req
);
7688 struct rpccli_PNP_SetHwProf_state
*state
= tevent_req_data(
7689 req
, struct rpccli_PNP_SetHwProf_state
);
7691 TALLOC_CTX
*mem_ctx
;
7693 if (state
->out_mem_ctx
) {
7694 mem_ctx
= state
->out_mem_ctx
;
7699 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7700 TALLOC_FREE(subreq
);
7701 if (!NT_STATUS_IS_OK(status
)) {
7702 tevent_req_nterror(req
, status
);
7706 /* Copy out parameters */
7709 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7711 /* Reset temporary structure */
7712 ZERO_STRUCT(state
->tmp
);
7714 tevent_req_done(req
);
7717 NTSTATUS
rpccli_PNP_SetHwProf_recv(struct tevent_req
*req
,
7718 TALLOC_CTX
*mem_ctx
,
7721 struct rpccli_PNP_SetHwProf_state
*state
= tevent_req_data(
7722 req
, struct rpccli_PNP_SetHwProf_state
);
7725 if (tevent_req_is_nterror(req
, &status
)) {
7726 tevent_req_received(req
);
7730 /* Steal possbile out parameters to the callers context */
7731 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7734 *result
= state
->orig
.out
.result
;
7736 tevent_req_received(req
);
7737 return NT_STATUS_OK
;
7740 NTSTATUS
rpccli_PNP_SetHwProf(struct rpc_pipe_client
*cli
,
7741 TALLOC_CTX
*mem_ctx
,
7744 struct PNP_SetHwProf r
;
7749 status
= cli
->dispatch(cli
,
7755 if (!NT_STATUS_IS_OK(status
)) {
7759 if (NT_STATUS_IS_ERR(status
)) {
7763 /* Return variables */
7767 *werror
= r
.out
.result
;
7770 return werror_to_ntstatus(r
.out
.result
);
7773 struct rpccli_PNP_QueryArbitratorFreeData_state
{
7774 struct PNP_QueryArbitratorFreeData orig
;
7775 struct PNP_QueryArbitratorFreeData tmp
;
7776 TALLOC_CTX
*out_mem_ctx
;
7777 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7780 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req
*subreq
);
7782 struct tevent_req
*rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX
*mem_ctx
,
7783 struct tevent_context
*ev
,
7784 struct rpc_pipe_client
*cli
)
7786 struct tevent_req
*req
;
7787 struct rpccli_PNP_QueryArbitratorFreeData_state
*state
;
7788 struct tevent_req
*subreq
;
7790 req
= tevent_req_create(mem_ctx
, &state
,
7791 struct rpccli_PNP_QueryArbitratorFreeData_state
);
7795 state
->out_mem_ctx
= NULL
;
7796 state
->dispatch_recv
= cli
->dispatch_recv
;
7800 /* Out parameters */
7803 ZERO_STRUCT(state
->orig
.out
.result
);
7805 /* make a temporary copy, that we pass to the dispatch function */
7806 state
->tmp
= state
->orig
;
7808 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7810 NDR_PNP_QUERYARBITRATORFREEDATA
,
7812 if (tevent_req_nomem(subreq
, req
)) {
7813 return tevent_req_post(req
, ev
);
7815 tevent_req_set_callback(subreq
, rpccli_PNP_QueryArbitratorFreeData_done
, req
);
7819 static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req
*subreq
)
7821 struct tevent_req
*req
= tevent_req_callback_data(
7822 subreq
, struct tevent_req
);
7823 struct rpccli_PNP_QueryArbitratorFreeData_state
*state
= tevent_req_data(
7824 req
, struct rpccli_PNP_QueryArbitratorFreeData_state
);
7826 TALLOC_CTX
*mem_ctx
;
7828 if (state
->out_mem_ctx
) {
7829 mem_ctx
= state
->out_mem_ctx
;
7834 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7835 TALLOC_FREE(subreq
);
7836 if (!NT_STATUS_IS_OK(status
)) {
7837 tevent_req_nterror(req
, status
);
7841 /* Copy out parameters */
7844 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7846 /* Reset temporary structure */
7847 ZERO_STRUCT(state
->tmp
);
7849 tevent_req_done(req
);
7852 NTSTATUS
rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req
*req
,
7853 TALLOC_CTX
*mem_ctx
,
7856 struct rpccli_PNP_QueryArbitratorFreeData_state
*state
= tevent_req_data(
7857 req
, struct rpccli_PNP_QueryArbitratorFreeData_state
);
7860 if (tevent_req_is_nterror(req
, &status
)) {
7861 tevent_req_received(req
);
7865 /* Steal possbile out parameters to the callers context */
7866 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7869 *result
= state
->orig
.out
.result
;
7871 tevent_req_received(req
);
7872 return NT_STATUS_OK
;
7875 NTSTATUS
rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client
*cli
,
7876 TALLOC_CTX
*mem_ctx
,
7879 struct PNP_QueryArbitratorFreeData r
;
7884 status
= cli
->dispatch(cli
,
7887 NDR_PNP_QUERYARBITRATORFREEDATA
,
7890 if (!NT_STATUS_IS_OK(status
)) {
7894 if (NT_STATUS_IS_ERR(status
)) {
7898 /* Return variables */
7902 *werror
= r
.out
.result
;
7905 return werror_to_ntstatus(r
.out
.result
);
7908 struct rpccli_PNP_QueryArbitratorFreeSize_state
{
7909 struct PNP_QueryArbitratorFreeSize orig
;
7910 struct PNP_QueryArbitratorFreeSize tmp
;
7911 TALLOC_CTX
*out_mem_ctx
;
7912 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7915 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req
*subreq
);
7917 struct tevent_req
*rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX
*mem_ctx
,
7918 struct tevent_context
*ev
,
7919 struct rpc_pipe_client
*cli
)
7921 struct tevent_req
*req
;
7922 struct rpccli_PNP_QueryArbitratorFreeSize_state
*state
;
7923 struct tevent_req
*subreq
;
7925 req
= tevent_req_create(mem_ctx
, &state
,
7926 struct rpccli_PNP_QueryArbitratorFreeSize_state
);
7930 state
->out_mem_ctx
= NULL
;
7931 state
->dispatch_recv
= cli
->dispatch_recv
;
7935 /* Out parameters */
7938 ZERO_STRUCT(state
->orig
.out
.result
);
7940 /* make a temporary copy, that we pass to the dispatch function */
7941 state
->tmp
= state
->orig
;
7943 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7945 NDR_PNP_QUERYARBITRATORFREESIZE
,
7947 if (tevent_req_nomem(subreq
, req
)) {
7948 return tevent_req_post(req
, ev
);
7950 tevent_req_set_callback(subreq
, rpccli_PNP_QueryArbitratorFreeSize_done
, req
);
7954 static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req
*subreq
)
7956 struct tevent_req
*req
= tevent_req_callback_data(
7957 subreq
, struct tevent_req
);
7958 struct rpccli_PNP_QueryArbitratorFreeSize_state
*state
= tevent_req_data(
7959 req
, struct rpccli_PNP_QueryArbitratorFreeSize_state
);
7961 TALLOC_CTX
*mem_ctx
;
7963 if (state
->out_mem_ctx
) {
7964 mem_ctx
= state
->out_mem_ctx
;
7969 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7970 TALLOC_FREE(subreq
);
7971 if (!NT_STATUS_IS_OK(status
)) {
7972 tevent_req_nterror(req
, status
);
7976 /* Copy out parameters */
7979 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7981 /* Reset temporary structure */
7982 ZERO_STRUCT(state
->tmp
);
7984 tevent_req_done(req
);
7987 NTSTATUS
rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req
*req
,
7988 TALLOC_CTX
*mem_ctx
,
7991 struct rpccli_PNP_QueryArbitratorFreeSize_state
*state
= tevent_req_data(
7992 req
, struct rpccli_PNP_QueryArbitratorFreeSize_state
);
7995 if (tevent_req_is_nterror(req
, &status
)) {
7996 tevent_req_received(req
);
8000 /* Steal possbile out parameters to the callers context */
8001 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8004 *result
= state
->orig
.out
.result
;
8006 tevent_req_received(req
);
8007 return NT_STATUS_OK
;
8010 NTSTATUS
rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client
*cli
,
8011 TALLOC_CTX
*mem_ctx
,
8014 struct PNP_QueryArbitratorFreeSize r
;
8019 status
= cli
->dispatch(cli
,
8022 NDR_PNP_QUERYARBITRATORFREESIZE
,
8025 if (!NT_STATUS_IS_OK(status
)) {
8029 if (NT_STATUS_IS_ERR(status
)) {
8033 /* Return variables */
8037 *werror
= r
.out
.result
;
8040 return werror_to_ntstatus(r
.out
.result
);
8043 struct rpccli_PNP_RunDetection_state
{
8044 struct PNP_RunDetection orig
;
8045 struct PNP_RunDetection tmp
;
8046 TALLOC_CTX
*out_mem_ctx
;
8047 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8050 static void rpccli_PNP_RunDetection_done(struct tevent_req
*subreq
);
8052 struct tevent_req
*rpccli_PNP_RunDetection_send(TALLOC_CTX
*mem_ctx
,
8053 struct tevent_context
*ev
,
8054 struct rpc_pipe_client
*cli
)
8056 struct tevent_req
*req
;
8057 struct rpccli_PNP_RunDetection_state
*state
;
8058 struct tevent_req
*subreq
;
8060 req
= tevent_req_create(mem_ctx
, &state
,
8061 struct rpccli_PNP_RunDetection_state
);
8065 state
->out_mem_ctx
= NULL
;
8066 state
->dispatch_recv
= cli
->dispatch_recv
;
8070 /* Out parameters */
8073 ZERO_STRUCT(state
->orig
.out
.result
);
8075 /* make a temporary copy, that we pass to the dispatch function */
8076 state
->tmp
= state
->orig
;
8078 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8080 NDR_PNP_RUNDETECTION
,
8082 if (tevent_req_nomem(subreq
, req
)) {
8083 return tevent_req_post(req
, ev
);
8085 tevent_req_set_callback(subreq
, rpccli_PNP_RunDetection_done
, req
);
8089 static void rpccli_PNP_RunDetection_done(struct tevent_req
*subreq
)
8091 struct tevent_req
*req
= tevent_req_callback_data(
8092 subreq
, struct tevent_req
);
8093 struct rpccli_PNP_RunDetection_state
*state
= tevent_req_data(
8094 req
, struct rpccli_PNP_RunDetection_state
);
8096 TALLOC_CTX
*mem_ctx
;
8098 if (state
->out_mem_ctx
) {
8099 mem_ctx
= state
->out_mem_ctx
;
8104 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8105 TALLOC_FREE(subreq
);
8106 if (!NT_STATUS_IS_OK(status
)) {
8107 tevent_req_nterror(req
, status
);
8111 /* Copy out parameters */
8114 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8116 /* Reset temporary structure */
8117 ZERO_STRUCT(state
->tmp
);
8119 tevent_req_done(req
);
8122 NTSTATUS
rpccli_PNP_RunDetection_recv(struct tevent_req
*req
,
8123 TALLOC_CTX
*mem_ctx
,
8126 struct rpccli_PNP_RunDetection_state
*state
= tevent_req_data(
8127 req
, struct rpccli_PNP_RunDetection_state
);
8130 if (tevent_req_is_nterror(req
, &status
)) {
8131 tevent_req_received(req
);
8135 /* Steal possbile out parameters to the callers context */
8136 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8139 *result
= state
->orig
.out
.result
;
8141 tevent_req_received(req
);
8142 return NT_STATUS_OK
;
8145 NTSTATUS
rpccli_PNP_RunDetection(struct rpc_pipe_client
*cli
,
8146 TALLOC_CTX
*mem_ctx
,
8149 struct PNP_RunDetection r
;
8154 status
= cli
->dispatch(cli
,
8157 NDR_PNP_RUNDETECTION
,
8160 if (!NT_STATUS_IS_OK(status
)) {
8164 if (NT_STATUS_IS_ERR(status
)) {
8168 /* Return variables */
8172 *werror
= r
.out
.result
;
8175 return werror_to_ntstatus(r
.out
.result
);
8178 struct rpccli_PNP_RegisterNotification_state
{
8179 struct PNP_RegisterNotification orig
;
8180 struct PNP_RegisterNotification tmp
;
8181 TALLOC_CTX
*out_mem_ctx
;
8182 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8185 static void rpccli_PNP_RegisterNotification_done(struct tevent_req
*subreq
);
8187 struct tevent_req
*rpccli_PNP_RegisterNotification_send(TALLOC_CTX
*mem_ctx
,
8188 struct tevent_context
*ev
,
8189 struct rpc_pipe_client
*cli
)
8191 struct tevent_req
*req
;
8192 struct rpccli_PNP_RegisterNotification_state
*state
;
8193 struct tevent_req
*subreq
;
8195 req
= tevent_req_create(mem_ctx
, &state
,
8196 struct rpccli_PNP_RegisterNotification_state
);
8200 state
->out_mem_ctx
= NULL
;
8201 state
->dispatch_recv
= cli
->dispatch_recv
;
8205 /* Out parameters */
8208 ZERO_STRUCT(state
->orig
.out
.result
);
8210 /* make a temporary copy, that we pass to the dispatch function */
8211 state
->tmp
= state
->orig
;
8213 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8215 NDR_PNP_REGISTERNOTIFICATION
,
8217 if (tevent_req_nomem(subreq
, req
)) {
8218 return tevent_req_post(req
, ev
);
8220 tevent_req_set_callback(subreq
, rpccli_PNP_RegisterNotification_done
, req
);
8224 static void rpccli_PNP_RegisterNotification_done(struct tevent_req
*subreq
)
8226 struct tevent_req
*req
= tevent_req_callback_data(
8227 subreq
, struct tevent_req
);
8228 struct rpccli_PNP_RegisterNotification_state
*state
= tevent_req_data(
8229 req
, struct rpccli_PNP_RegisterNotification_state
);
8231 TALLOC_CTX
*mem_ctx
;
8233 if (state
->out_mem_ctx
) {
8234 mem_ctx
= state
->out_mem_ctx
;
8239 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8240 TALLOC_FREE(subreq
);
8241 if (!NT_STATUS_IS_OK(status
)) {
8242 tevent_req_nterror(req
, status
);
8246 /* Copy out parameters */
8249 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8251 /* Reset temporary structure */
8252 ZERO_STRUCT(state
->tmp
);
8254 tevent_req_done(req
);
8257 NTSTATUS
rpccli_PNP_RegisterNotification_recv(struct tevent_req
*req
,
8258 TALLOC_CTX
*mem_ctx
,
8261 struct rpccli_PNP_RegisterNotification_state
*state
= tevent_req_data(
8262 req
, struct rpccli_PNP_RegisterNotification_state
);
8265 if (tevent_req_is_nterror(req
, &status
)) {
8266 tevent_req_received(req
);
8270 /* Steal possbile out parameters to the callers context */
8271 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8274 *result
= state
->orig
.out
.result
;
8276 tevent_req_received(req
);
8277 return NT_STATUS_OK
;
8280 NTSTATUS
rpccli_PNP_RegisterNotification(struct rpc_pipe_client
*cli
,
8281 TALLOC_CTX
*mem_ctx
,
8284 struct PNP_RegisterNotification r
;
8289 status
= cli
->dispatch(cli
,
8292 NDR_PNP_REGISTERNOTIFICATION
,
8295 if (!NT_STATUS_IS_OK(status
)) {
8299 if (NT_STATUS_IS_ERR(status
)) {
8303 /* Return variables */
8307 *werror
= r
.out
.result
;
8310 return werror_to_ntstatus(r
.out
.result
);
8313 struct rpccli_PNP_UnregisterNotification_state
{
8314 struct PNP_UnregisterNotification orig
;
8315 struct PNP_UnregisterNotification tmp
;
8316 TALLOC_CTX
*out_mem_ctx
;
8317 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8320 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req
*subreq
);
8322 struct tevent_req
*rpccli_PNP_UnregisterNotification_send(TALLOC_CTX
*mem_ctx
,
8323 struct tevent_context
*ev
,
8324 struct rpc_pipe_client
*cli
)
8326 struct tevent_req
*req
;
8327 struct rpccli_PNP_UnregisterNotification_state
*state
;
8328 struct tevent_req
*subreq
;
8330 req
= tevent_req_create(mem_ctx
, &state
,
8331 struct rpccli_PNP_UnregisterNotification_state
);
8335 state
->out_mem_ctx
= NULL
;
8336 state
->dispatch_recv
= cli
->dispatch_recv
;
8340 /* Out parameters */
8343 ZERO_STRUCT(state
->orig
.out
.result
);
8345 /* make a temporary copy, that we pass to the dispatch function */
8346 state
->tmp
= state
->orig
;
8348 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8350 NDR_PNP_UNREGISTERNOTIFICATION
,
8352 if (tevent_req_nomem(subreq
, req
)) {
8353 return tevent_req_post(req
, ev
);
8355 tevent_req_set_callback(subreq
, rpccli_PNP_UnregisterNotification_done
, req
);
8359 static void rpccli_PNP_UnregisterNotification_done(struct tevent_req
*subreq
)
8361 struct tevent_req
*req
= tevent_req_callback_data(
8362 subreq
, struct tevent_req
);
8363 struct rpccli_PNP_UnregisterNotification_state
*state
= tevent_req_data(
8364 req
, struct rpccli_PNP_UnregisterNotification_state
);
8366 TALLOC_CTX
*mem_ctx
;
8368 if (state
->out_mem_ctx
) {
8369 mem_ctx
= state
->out_mem_ctx
;
8374 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8375 TALLOC_FREE(subreq
);
8376 if (!NT_STATUS_IS_OK(status
)) {
8377 tevent_req_nterror(req
, status
);
8381 /* Copy out parameters */
8384 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8386 /* Reset temporary structure */
8387 ZERO_STRUCT(state
->tmp
);
8389 tevent_req_done(req
);
8392 NTSTATUS
rpccli_PNP_UnregisterNotification_recv(struct tevent_req
*req
,
8393 TALLOC_CTX
*mem_ctx
,
8396 struct rpccli_PNP_UnregisterNotification_state
*state
= tevent_req_data(
8397 req
, struct rpccli_PNP_UnregisterNotification_state
);
8400 if (tevent_req_is_nterror(req
, &status
)) {
8401 tevent_req_received(req
);
8405 /* Steal possbile out parameters to the callers context */
8406 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8409 *result
= state
->orig
.out
.result
;
8411 tevent_req_received(req
);
8412 return NT_STATUS_OK
;
8415 NTSTATUS
rpccli_PNP_UnregisterNotification(struct rpc_pipe_client
*cli
,
8416 TALLOC_CTX
*mem_ctx
,
8419 struct PNP_UnregisterNotification r
;
8424 status
= cli
->dispatch(cli
,
8427 NDR_PNP_UNREGISTERNOTIFICATION
,
8430 if (!NT_STATUS_IS_OK(status
)) {
8434 if (NT_STATUS_IS_ERR(status
)) {
8438 /* Return variables */
8442 *werror
= r
.out
.result
;
8445 return werror_to_ntstatus(r
.out
.result
);
8448 struct rpccli_PNP_GetCustomDevProp_state
{
8449 struct PNP_GetCustomDevProp orig
;
8450 struct PNP_GetCustomDevProp tmp
;
8451 TALLOC_CTX
*out_mem_ctx
;
8452 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8455 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req
*subreq
);
8457 struct tevent_req
*rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX
*mem_ctx
,
8458 struct tevent_context
*ev
,
8459 struct rpc_pipe_client
*cli
)
8461 struct tevent_req
*req
;
8462 struct rpccli_PNP_GetCustomDevProp_state
*state
;
8463 struct tevent_req
*subreq
;
8465 req
= tevent_req_create(mem_ctx
, &state
,
8466 struct rpccli_PNP_GetCustomDevProp_state
);
8470 state
->out_mem_ctx
= NULL
;
8471 state
->dispatch_recv
= cli
->dispatch_recv
;
8475 /* Out parameters */
8478 ZERO_STRUCT(state
->orig
.out
.result
);
8480 /* make a temporary copy, that we pass to the dispatch function */
8481 state
->tmp
= state
->orig
;
8483 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8485 NDR_PNP_GETCUSTOMDEVPROP
,
8487 if (tevent_req_nomem(subreq
, req
)) {
8488 return tevent_req_post(req
, ev
);
8490 tevent_req_set_callback(subreq
, rpccli_PNP_GetCustomDevProp_done
, req
);
8494 static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req
*subreq
)
8496 struct tevent_req
*req
= tevent_req_callback_data(
8497 subreq
, struct tevent_req
);
8498 struct rpccli_PNP_GetCustomDevProp_state
*state
= tevent_req_data(
8499 req
, struct rpccli_PNP_GetCustomDevProp_state
);
8501 TALLOC_CTX
*mem_ctx
;
8503 if (state
->out_mem_ctx
) {
8504 mem_ctx
= state
->out_mem_ctx
;
8509 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8510 TALLOC_FREE(subreq
);
8511 if (!NT_STATUS_IS_OK(status
)) {
8512 tevent_req_nterror(req
, status
);
8516 /* Copy out parameters */
8519 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8521 /* Reset temporary structure */
8522 ZERO_STRUCT(state
->tmp
);
8524 tevent_req_done(req
);
8527 NTSTATUS
rpccli_PNP_GetCustomDevProp_recv(struct tevent_req
*req
,
8528 TALLOC_CTX
*mem_ctx
,
8531 struct rpccli_PNP_GetCustomDevProp_state
*state
= tevent_req_data(
8532 req
, struct rpccli_PNP_GetCustomDevProp_state
);
8535 if (tevent_req_is_nterror(req
, &status
)) {
8536 tevent_req_received(req
);
8540 /* Steal possbile out parameters to the callers context */
8541 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8544 *result
= state
->orig
.out
.result
;
8546 tevent_req_received(req
);
8547 return NT_STATUS_OK
;
8550 NTSTATUS
rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client
*cli
,
8551 TALLOC_CTX
*mem_ctx
,
8554 struct PNP_GetCustomDevProp r
;
8559 status
= cli
->dispatch(cli
,
8562 NDR_PNP_GETCUSTOMDEVPROP
,
8565 if (!NT_STATUS_IS_OK(status
)) {
8569 if (NT_STATUS_IS_ERR(status
)) {
8573 /* Return variables */
8577 *werror
= r
.out
.result
;
8580 return werror_to_ntstatus(r
.out
.result
);
8583 struct rpccli_PNP_GetVersionInternal_state
{
8584 struct PNP_GetVersionInternal orig
;
8585 struct PNP_GetVersionInternal tmp
;
8586 TALLOC_CTX
*out_mem_ctx
;
8587 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8590 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req
*subreq
);
8592 struct tevent_req
*rpccli_PNP_GetVersionInternal_send(TALLOC_CTX
*mem_ctx
,
8593 struct tevent_context
*ev
,
8594 struct rpc_pipe_client
*cli
)
8596 struct tevent_req
*req
;
8597 struct rpccli_PNP_GetVersionInternal_state
*state
;
8598 struct tevent_req
*subreq
;
8600 req
= tevent_req_create(mem_ctx
, &state
,
8601 struct rpccli_PNP_GetVersionInternal_state
);
8605 state
->out_mem_ctx
= NULL
;
8606 state
->dispatch_recv
= cli
->dispatch_recv
;
8610 /* Out parameters */
8613 ZERO_STRUCT(state
->orig
.out
.result
);
8615 /* make a temporary copy, that we pass to the dispatch function */
8616 state
->tmp
= state
->orig
;
8618 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8620 NDR_PNP_GETVERSIONINTERNAL
,
8622 if (tevent_req_nomem(subreq
, req
)) {
8623 return tevent_req_post(req
, ev
);
8625 tevent_req_set_callback(subreq
, rpccli_PNP_GetVersionInternal_done
, req
);
8629 static void rpccli_PNP_GetVersionInternal_done(struct tevent_req
*subreq
)
8631 struct tevent_req
*req
= tevent_req_callback_data(
8632 subreq
, struct tevent_req
);
8633 struct rpccli_PNP_GetVersionInternal_state
*state
= tevent_req_data(
8634 req
, struct rpccli_PNP_GetVersionInternal_state
);
8636 TALLOC_CTX
*mem_ctx
;
8638 if (state
->out_mem_ctx
) {
8639 mem_ctx
= state
->out_mem_ctx
;
8644 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8645 TALLOC_FREE(subreq
);
8646 if (!NT_STATUS_IS_OK(status
)) {
8647 tevent_req_nterror(req
, status
);
8651 /* Copy out parameters */
8654 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8656 /* Reset temporary structure */
8657 ZERO_STRUCT(state
->tmp
);
8659 tevent_req_done(req
);
8662 NTSTATUS
rpccli_PNP_GetVersionInternal_recv(struct tevent_req
*req
,
8663 TALLOC_CTX
*mem_ctx
,
8666 struct rpccli_PNP_GetVersionInternal_state
*state
= tevent_req_data(
8667 req
, struct rpccli_PNP_GetVersionInternal_state
);
8670 if (tevent_req_is_nterror(req
, &status
)) {
8671 tevent_req_received(req
);
8675 /* Steal possbile out parameters to the callers context */
8676 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8679 *result
= state
->orig
.out
.result
;
8681 tevent_req_received(req
);
8682 return NT_STATUS_OK
;
8685 NTSTATUS
rpccli_PNP_GetVersionInternal(struct rpc_pipe_client
*cli
,
8686 TALLOC_CTX
*mem_ctx
,
8689 struct PNP_GetVersionInternal r
;
8694 status
= cli
->dispatch(cli
,
8697 NDR_PNP_GETVERSIONINTERNAL
,
8700 if (!NT_STATUS_IS_OK(status
)) {
8704 if (NT_STATUS_IS_ERR(status
)) {
8708 /* Return variables */
8712 *werror
= r
.out
.result
;
8715 return werror_to_ntstatus(r
.out
.result
);
8718 struct rpccli_PNP_GetBlockedDriverInfo_state
{
8719 struct PNP_GetBlockedDriverInfo orig
;
8720 struct PNP_GetBlockedDriverInfo tmp
;
8721 TALLOC_CTX
*out_mem_ctx
;
8722 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8725 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req
*subreq
);
8727 struct tevent_req
*rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX
*mem_ctx
,
8728 struct tevent_context
*ev
,
8729 struct rpc_pipe_client
*cli
)
8731 struct tevent_req
*req
;
8732 struct rpccli_PNP_GetBlockedDriverInfo_state
*state
;
8733 struct tevent_req
*subreq
;
8735 req
= tevent_req_create(mem_ctx
, &state
,
8736 struct rpccli_PNP_GetBlockedDriverInfo_state
);
8740 state
->out_mem_ctx
= NULL
;
8741 state
->dispatch_recv
= cli
->dispatch_recv
;
8745 /* Out parameters */
8748 ZERO_STRUCT(state
->orig
.out
.result
);
8750 /* make a temporary copy, that we pass to the dispatch function */
8751 state
->tmp
= state
->orig
;
8753 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8755 NDR_PNP_GETBLOCKEDDRIVERINFO
,
8757 if (tevent_req_nomem(subreq
, req
)) {
8758 return tevent_req_post(req
, ev
);
8760 tevent_req_set_callback(subreq
, rpccli_PNP_GetBlockedDriverInfo_done
, req
);
8764 static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req
*subreq
)
8766 struct tevent_req
*req
= tevent_req_callback_data(
8767 subreq
, struct tevent_req
);
8768 struct rpccli_PNP_GetBlockedDriverInfo_state
*state
= tevent_req_data(
8769 req
, struct rpccli_PNP_GetBlockedDriverInfo_state
);
8771 TALLOC_CTX
*mem_ctx
;
8773 if (state
->out_mem_ctx
) {
8774 mem_ctx
= state
->out_mem_ctx
;
8779 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8780 TALLOC_FREE(subreq
);
8781 if (!NT_STATUS_IS_OK(status
)) {
8782 tevent_req_nterror(req
, status
);
8786 /* Copy out parameters */
8789 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8791 /* Reset temporary structure */
8792 ZERO_STRUCT(state
->tmp
);
8794 tevent_req_done(req
);
8797 NTSTATUS
rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req
*req
,
8798 TALLOC_CTX
*mem_ctx
,
8801 struct rpccli_PNP_GetBlockedDriverInfo_state
*state
= tevent_req_data(
8802 req
, struct rpccli_PNP_GetBlockedDriverInfo_state
);
8805 if (tevent_req_is_nterror(req
, &status
)) {
8806 tevent_req_received(req
);
8810 /* Steal possbile out parameters to the callers context */
8811 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8814 *result
= state
->orig
.out
.result
;
8816 tevent_req_received(req
);
8817 return NT_STATUS_OK
;
8820 NTSTATUS
rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client
*cli
,
8821 TALLOC_CTX
*mem_ctx
,
8824 struct PNP_GetBlockedDriverInfo r
;
8829 status
= cli
->dispatch(cli
,
8832 NDR_PNP_GETBLOCKEDDRIVERINFO
,
8835 if (!NT_STATUS_IS_OK(status
)) {
8839 if (NT_STATUS_IS_ERR(status
)) {
8843 /* Return variables */
8847 *werror
= r
.out
.result
;
8850 return werror_to_ntstatus(r
.out
.result
);
8853 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
{
8854 struct PNP_GetServerSideDeviceInstallFlags orig
;
8855 struct PNP_GetServerSideDeviceInstallFlags tmp
;
8856 TALLOC_CTX
*out_mem_ctx
;
8857 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
8860 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req
*subreq
);
8862 struct tevent_req
*rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX
*mem_ctx
,
8863 struct tevent_context
*ev
,
8864 struct rpc_pipe_client
*cli
)
8866 struct tevent_req
*req
;
8867 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
*state
;
8868 struct tevent_req
*subreq
;
8870 req
= tevent_req_create(mem_ctx
, &state
,
8871 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
);
8875 state
->out_mem_ctx
= NULL
;
8876 state
->dispatch_recv
= cli
->dispatch_recv
;
8880 /* Out parameters */
8883 ZERO_STRUCT(state
->orig
.out
.result
);
8885 /* make a temporary copy, that we pass to the dispatch function */
8886 state
->tmp
= state
->orig
;
8888 subreq
= cli
->dispatch_send(state
, ev
, cli
,
8890 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS
,
8892 if (tevent_req_nomem(subreq
, req
)) {
8893 return tevent_req_post(req
, ev
);
8895 tevent_req_set_callback(subreq
, rpccli_PNP_GetServerSideDeviceInstallFlags_done
, req
);
8899 static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req
*subreq
)
8901 struct tevent_req
*req
= tevent_req_callback_data(
8902 subreq
, struct tevent_req
);
8903 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
*state
= tevent_req_data(
8904 req
, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
);
8906 TALLOC_CTX
*mem_ctx
;
8908 if (state
->out_mem_ctx
) {
8909 mem_ctx
= state
->out_mem_ctx
;
8914 status
= state
->dispatch_recv(subreq
, mem_ctx
);
8915 TALLOC_FREE(subreq
);
8916 if (!NT_STATUS_IS_OK(status
)) {
8917 tevent_req_nterror(req
, status
);
8921 /* Copy out parameters */
8924 state
->orig
.out
.result
= state
->tmp
.out
.result
;
8926 /* Reset temporary structure */
8927 ZERO_STRUCT(state
->tmp
);
8929 tevent_req_done(req
);
8932 NTSTATUS
rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req
*req
,
8933 TALLOC_CTX
*mem_ctx
,
8936 struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
*state
= tevent_req_data(
8937 req
, struct rpccli_PNP_GetServerSideDeviceInstallFlags_state
);
8940 if (tevent_req_is_nterror(req
, &status
)) {
8941 tevent_req_received(req
);
8945 /* Steal possbile out parameters to the callers context */
8946 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
8949 *result
= state
->orig
.out
.result
;
8951 tevent_req_received(req
);
8952 return NT_STATUS_OK
;
8955 NTSTATUS
rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client
*cli
,
8956 TALLOC_CTX
*mem_ctx
,
8959 struct PNP_GetServerSideDeviceInstallFlags r
;
8964 status
= cli
->dispatch(cli
,
8967 NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS
,
8970 if (!NT_STATUS_IS_OK(status
)) {
8974 if (NT_STATUS_IS_ERR(status
)) {
8978 /* Return variables */
8982 *werror
= r
.out
.result
;
8985 return werror_to_ntstatus(r
.out
.result
);