2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_initshutdown.h"
9 struct rpccli_initshutdown_Init_state
{
10 struct initshutdown_Init orig
;
11 struct initshutdown_Init tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_initshutdown_Init_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_initshutdown_Init_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 uint16_t *_hostname
/* [in] [unique] */,
22 struct lsa_StringLarge
*_message
/* [in] [unique] */,
23 uint32_t _timeout
/* [in] */,
24 uint8_t _force_apps
/* [in] */,
25 uint8_t _do_reboot
/* [in] */)
27 struct tevent_req
*req
;
28 struct rpccli_initshutdown_Init_state
*state
;
29 struct tevent_req
*subreq
;
31 req
= tevent_req_create(mem_ctx
, &state
,
32 struct rpccli_initshutdown_Init_state
);
36 state
->out_mem_ctx
= NULL
;
37 state
->dispatch_recv
= cli
->dispatch_recv
;
40 state
->orig
.in
.hostname
= _hostname
;
41 state
->orig
.in
.message
= _message
;
42 state
->orig
.in
.timeout
= _timeout
;
43 state
->orig
.in
.force_apps
= _force_apps
;
44 state
->orig
.in
.do_reboot
= _do_reboot
;
49 ZERO_STRUCT(state
->orig
.out
.result
);
51 /* make a temporary copy, that we pass to the dispatch function */
52 state
->tmp
= state
->orig
;
54 subreq
= cli
->dispatch_send(state
, ev
, cli
,
55 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
56 NDR_INITSHUTDOWN_INIT
,
58 if (tevent_req_nomem(subreq
, req
)) {
59 return tevent_req_post(req
, ev
);
61 tevent_req_set_callback(subreq
, rpccli_initshutdown_Init_done
, req
);
65 static void rpccli_initshutdown_Init_done(struct tevent_req
*subreq
)
67 struct tevent_req
*req
= tevent_req_callback_data(
68 subreq
, struct tevent_req
);
69 struct rpccli_initshutdown_Init_state
*state
= tevent_req_data(
70 req
, struct rpccli_initshutdown_Init_state
);
74 if (state
->out_mem_ctx
) {
75 mem_ctx
= state
->out_mem_ctx
;
80 status
= state
->dispatch_recv(subreq
, mem_ctx
);
82 if (!NT_STATUS_IS_OK(status
)) {
83 tevent_req_nterror(req
, status
);
87 /* Copy out parameters */
90 state
->orig
.out
.result
= state
->tmp
.out
.result
;
92 /* Reset temporary structure */
93 ZERO_STRUCT(state
->tmp
);
98 NTSTATUS
rpccli_initshutdown_Init_recv(struct tevent_req
*req
,
102 struct rpccli_initshutdown_Init_state
*state
= tevent_req_data(
103 req
, struct rpccli_initshutdown_Init_state
);
106 if (tevent_req_is_nterror(req
, &status
)) {
107 tevent_req_received(req
);
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
115 *result
= state
->orig
.out
.result
;
117 tevent_req_received(req
);
121 NTSTATUS
rpccli_initshutdown_Init(struct rpc_pipe_client
*cli
,
123 uint16_t *hostname
/* [in] [unique] */,
124 struct lsa_StringLarge
*message
/* [in] [unique] */,
125 uint32_t timeout
/* [in] */,
126 uint8_t force_apps
/* [in] */,
127 uint8_t do_reboot
/* [in] */,
130 struct initshutdown_Init r
;
134 r
.in
.hostname
= hostname
;
135 r
.in
.message
= message
;
136 r
.in
.timeout
= timeout
;
137 r
.in
.force_apps
= force_apps
;
138 r
.in
.do_reboot
= do_reboot
;
140 status
= cli
->dispatch(cli
,
142 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
143 NDR_INITSHUTDOWN_INIT
,
146 if (!NT_STATUS_IS_OK(status
)) {
150 if (NT_STATUS_IS_ERR(status
)) {
154 /* Return variables */
158 *werror
= r
.out
.result
;
161 return werror_to_ntstatus(r
.out
.result
);
164 struct rpccli_initshutdown_Abort_state
{
165 struct initshutdown_Abort orig
;
166 struct initshutdown_Abort tmp
;
167 TALLOC_CTX
*out_mem_ctx
;
168 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
171 static void rpccli_initshutdown_Abort_done(struct tevent_req
*subreq
);
173 struct tevent_req
*rpccli_initshutdown_Abort_send(TALLOC_CTX
*mem_ctx
,
174 struct tevent_context
*ev
,
175 struct rpc_pipe_client
*cli
,
176 uint16_t *_server
/* [in] [unique] */)
178 struct tevent_req
*req
;
179 struct rpccli_initshutdown_Abort_state
*state
;
180 struct tevent_req
*subreq
;
182 req
= tevent_req_create(mem_ctx
, &state
,
183 struct rpccli_initshutdown_Abort_state
);
187 state
->out_mem_ctx
= NULL
;
188 state
->dispatch_recv
= cli
->dispatch_recv
;
191 state
->orig
.in
.server
= _server
;
196 ZERO_STRUCT(state
->orig
.out
.result
);
198 /* make a temporary copy, that we pass to the dispatch function */
199 state
->tmp
= state
->orig
;
201 subreq
= cli
->dispatch_send(state
, ev
, cli
,
202 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
203 NDR_INITSHUTDOWN_ABORT
,
205 if (tevent_req_nomem(subreq
, req
)) {
206 return tevent_req_post(req
, ev
);
208 tevent_req_set_callback(subreq
, rpccli_initshutdown_Abort_done
, req
);
212 static void rpccli_initshutdown_Abort_done(struct tevent_req
*subreq
)
214 struct tevent_req
*req
= tevent_req_callback_data(
215 subreq
, struct tevent_req
);
216 struct rpccli_initshutdown_Abort_state
*state
= tevent_req_data(
217 req
, struct rpccli_initshutdown_Abort_state
);
221 if (state
->out_mem_ctx
) {
222 mem_ctx
= state
->out_mem_ctx
;
227 status
= state
->dispatch_recv(subreq
, mem_ctx
);
229 if (!NT_STATUS_IS_OK(status
)) {
230 tevent_req_nterror(req
, status
);
234 /* Copy out parameters */
237 state
->orig
.out
.result
= state
->tmp
.out
.result
;
239 /* Reset temporary structure */
240 ZERO_STRUCT(state
->tmp
);
242 tevent_req_done(req
);
245 NTSTATUS
rpccli_initshutdown_Abort_recv(struct tevent_req
*req
,
249 struct rpccli_initshutdown_Abort_state
*state
= tevent_req_data(
250 req
, struct rpccli_initshutdown_Abort_state
);
253 if (tevent_req_is_nterror(req
, &status
)) {
254 tevent_req_received(req
);
258 /* Steal possbile out parameters to the callers context */
259 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
262 *result
= state
->orig
.out
.result
;
264 tevent_req_received(req
);
268 NTSTATUS
rpccli_initshutdown_Abort(struct rpc_pipe_client
*cli
,
270 uint16_t *server
/* [in] [unique] */,
273 struct initshutdown_Abort r
;
277 r
.in
.server
= server
;
279 status
= cli
->dispatch(cli
,
281 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
282 NDR_INITSHUTDOWN_ABORT
,
285 if (!NT_STATUS_IS_OK(status
)) {
289 if (NT_STATUS_IS_ERR(status
)) {
293 /* Return variables */
297 *werror
= r
.out
.result
;
300 return werror_to_ntstatus(r
.out
.result
);
303 struct rpccli_initshutdown_InitEx_state
{
304 struct initshutdown_InitEx orig
;
305 struct initshutdown_InitEx tmp
;
306 TALLOC_CTX
*out_mem_ctx
;
307 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
310 static void rpccli_initshutdown_InitEx_done(struct tevent_req
*subreq
);
312 struct tevent_req
*rpccli_initshutdown_InitEx_send(TALLOC_CTX
*mem_ctx
,
313 struct tevent_context
*ev
,
314 struct rpc_pipe_client
*cli
,
315 uint16_t *_hostname
/* [in] [unique] */,
316 struct lsa_StringLarge
*_message
/* [in] [unique] */,
317 uint32_t _timeout
/* [in] */,
318 uint8_t _force_apps
/* [in] */,
319 uint8_t _do_reboot
/* [in] */,
320 uint32_t _reason
/* [in] */)
322 struct tevent_req
*req
;
323 struct rpccli_initshutdown_InitEx_state
*state
;
324 struct tevent_req
*subreq
;
326 req
= tevent_req_create(mem_ctx
, &state
,
327 struct rpccli_initshutdown_InitEx_state
);
331 state
->out_mem_ctx
= NULL
;
332 state
->dispatch_recv
= cli
->dispatch_recv
;
335 state
->orig
.in
.hostname
= _hostname
;
336 state
->orig
.in
.message
= _message
;
337 state
->orig
.in
.timeout
= _timeout
;
338 state
->orig
.in
.force_apps
= _force_apps
;
339 state
->orig
.in
.do_reboot
= _do_reboot
;
340 state
->orig
.in
.reason
= _reason
;
345 ZERO_STRUCT(state
->orig
.out
.result
);
347 /* make a temporary copy, that we pass to the dispatch function */
348 state
->tmp
= state
->orig
;
350 subreq
= cli
->dispatch_send(state
, ev
, cli
,
351 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
352 NDR_INITSHUTDOWN_INITEX
,
354 if (tevent_req_nomem(subreq
, req
)) {
355 return tevent_req_post(req
, ev
);
357 tevent_req_set_callback(subreq
, rpccli_initshutdown_InitEx_done
, req
);
361 static void rpccli_initshutdown_InitEx_done(struct tevent_req
*subreq
)
363 struct tevent_req
*req
= tevent_req_callback_data(
364 subreq
, struct tevent_req
);
365 struct rpccli_initshutdown_InitEx_state
*state
= tevent_req_data(
366 req
, struct rpccli_initshutdown_InitEx_state
);
370 if (state
->out_mem_ctx
) {
371 mem_ctx
= state
->out_mem_ctx
;
376 status
= state
->dispatch_recv(subreq
, mem_ctx
);
378 if (!NT_STATUS_IS_OK(status
)) {
379 tevent_req_nterror(req
, status
);
383 /* Copy out parameters */
386 state
->orig
.out
.result
= state
->tmp
.out
.result
;
388 /* Reset temporary structure */
389 ZERO_STRUCT(state
->tmp
);
391 tevent_req_done(req
);
394 NTSTATUS
rpccli_initshutdown_InitEx_recv(struct tevent_req
*req
,
398 struct rpccli_initshutdown_InitEx_state
*state
= tevent_req_data(
399 req
, struct rpccli_initshutdown_InitEx_state
);
402 if (tevent_req_is_nterror(req
, &status
)) {
403 tevent_req_received(req
);
407 /* Steal possbile out parameters to the callers context */
408 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
411 *result
= state
->orig
.out
.result
;
413 tevent_req_received(req
);
417 NTSTATUS
rpccli_initshutdown_InitEx(struct rpc_pipe_client
*cli
,
419 uint16_t *hostname
/* [in] [unique] */,
420 struct lsa_StringLarge
*message
/* [in] [unique] */,
421 uint32_t timeout
/* [in] */,
422 uint8_t force_apps
/* [in] */,
423 uint8_t do_reboot
/* [in] */,
424 uint32_t reason
/* [in] */,
427 struct initshutdown_InitEx r
;
431 r
.in
.hostname
= hostname
;
432 r
.in
.message
= message
;
433 r
.in
.timeout
= timeout
;
434 r
.in
.force_apps
= force_apps
;
435 r
.in
.do_reboot
= do_reboot
;
436 r
.in
.reason
= reason
;
438 status
= cli
->dispatch(cli
,
440 NDR_INITSHUTDOWN_UUID
, NDR_INITSHUTDOWN_VERSION
,
441 NDR_INITSHUTDOWN_INITEX
,
444 if (!NT_STATUS_IS_OK(status
)) {
448 if (NT_STATUS_IS_ERR(status
)) {
452 /* Return variables */
456 *werror
= r
.out
.result
;
459 return werror_to_ntstatus(r
.out
.result
);