2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_epmapper.h"
9 struct rpccli_epm_Insert_state
{
10 struct epm_Insert orig
;
11 struct epm_Insert tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_epm_Insert_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_epm_Insert_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 uint32_t _num_ents
/* [in] */,
22 struct epm_entry_t
*_entries
/* [in] [size_is(num_ents)] */,
23 uint32_t _replace
/* [in] */)
25 struct tevent_req
*req
;
26 struct rpccli_epm_Insert_state
*state
;
27 struct tevent_req
*subreq
;
29 req
= tevent_req_create(mem_ctx
, &state
,
30 struct rpccli_epm_Insert_state
);
34 state
->out_mem_ctx
= NULL
;
35 state
->dispatch_recv
= cli
->dispatch_recv
;
38 state
->orig
.in
.num_ents
= _num_ents
;
39 state
->orig
.in
.entries
= _entries
;
40 state
->orig
.in
.replace
= _replace
;
45 ZERO_STRUCT(state
->orig
.out
.result
);
47 /* make a temporary copy, that we pass to the dispatch function */
48 state
->tmp
= state
->orig
;
50 subreq
= cli
->dispatch_send(state
, ev
, cli
,
54 if (tevent_req_nomem(subreq
, req
)) {
55 return tevent_req_post(req
, ev
);
57 tevent_req_set_callback(subreq
, rpccli_epm_Insert_done
, req
);
61 static void rpccli_epm_Insert_done(struct tevent_req
*subreq
)
63 struct tevent_req
*req
= tevent_req_callback_data(
64 subreq
, struct tevent_req
);
65 struct rpccli_epm_Insert_state
*state
= tevent_req_data(
66 req
, struct rpccli_epm_Insert_state
);
70 if (state
->out_mem_ctx
) {
71 mem_ctx
= state
->out_mem_ctx
;
76 status
= state
->dispatch_recv(subreq
, mem_ctx
);
78 if (!NT_STATUS_IS_OK(status
)) {
79 tevent_req_nterror(req
, status
);
83 /* Copy out parameters */
86 state
->orig
.out
.result
= state
->tmp
.out
.result
;
88 /* Reset temporary structure */
89 ZERO_STRUCT(state
->tmp
);
94 NTSTATUS
rpccli_epm_Insert_recv(struct tevent_req
*req
,
98 struct rpccli_epm_Insert_state
*state
= tevent_req_data(
99 req
, struct rpccli_epm_Insert_state
);
102 if (tevent_req_is_nterror(req
, &status
)) {
103 tevent_req_received(req
);
107 /* Steal possbile out parameters to the callers context */
108 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
111 *result
= state
->orig
.out
.result
;
113 tevent_req_received(req
);
117 NTSTATUS
rpccli_epm_Insert(struct rpc_pipe_client
*cli
,
119 uint32_t num_ents
/* [in] */,
120 struct epm_entry_t
*entries
/* [in] [size_is(num_ents)] */,
121 uint32_t replace
/* [in] */)
127 r
.in
.num_ents
= num_ents
;
128 r
.in
.entries
= entries
;
129 r
.in
.replace
= replace
;
131 status
= cli
->dispatch(cli
,
137 if (!NT_STATUS_IS_OK(status
)) {
141 if (NT_STATUS_IS_ERR(status
)) {
145 /* Return variables */
151 struct rpccli_epm_Delete_state
{
152 struct epm_Delete orig
;
153 struct epm_Delete tmp
;
154 TALLOC_CTX
*out_mem_ctx
;
155 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
158 static void rpccli_epm_Delete_done(struct tevent_req
*subreq
);
160 struct tevent_req
*rpccli_epm_Delete_send(TALLOC_CTX
*mem_ctx
,
161 struct tevent_context
*ev
,
162 struct rpc_pipe_client
*cli
,
163 uint32_t _num_ents
/* [in] */,
164 struct epm_entry_t
*_entries
/* [in] [size_is(num_ents)] */)
166 struct tevent_req
*req
;
167 struct rpccli_epm_Delete_state
*state
;
168 struct tevent_req
*subreq
;
170 req
= tevent_req_create(mem_ctx
, &state
,
171 struct rpccli_epm_Delete_state
);
175 state
->out_mem_ctx
= NULL
;
176 state
->dispatch_recv
= cli
->dispatch_recv
;
179 state
->orig
.in
.num_ents
= _num_ents
;
180 state
->orig
.in
.entries
= _entries
;
185 ZERO_STRUCT(state
->orig
.out
.result
);
187 /* make a temporary copy, that we pass to the dispatch function */
188 state
->tmp
= state
->orig
;
190 subreq
= cli
->dispatch_send(state
, ev
, cli
,
194 if (tevent_req_nomem(subreq
, req
)) {
195 return tevent_req_post(req
, ev
);
197 tevent_req_set_callback(subreq
, rpccli_epm_Delete_done
, req
);
201 static void rpccli_epm_Delete_done(struct tevent_req
*subreq
)
203 struct tevent_req
*req
= tevent_req_callback_data(
204 subreq
, struct tevent_req
);
205 struct rpccli_epm_Delete_state
*state
= tevent_req_data(
206 req
, struct rpccli_epm_Delete_state
);
210 if (state
->out_mem_ctx
) {
211 mem_ctx
= state
->out_mem_ctx
;
216 status
= state
->dispatch_recv(subreq
, mem_ctx
);
218 if (!NT_STATUS_IS_OK(status
)) {
219 tevent_req_nterror(req
, status
);
223 /* Copy out parameters */
226 state
->orig
.out
.result
= state
->tmp
.out
.result
;
228 /* Reset temporary structure */
229 ZERO_STRUCT(state
->tmp
);
231 tevent_req_done(req
);
234 NTSTATUS
rpccli_epm_Delete_recv(struct tevent_req
*req
,
238 struct rpccli_epm_Delete_state
*state
= tevent_req_data(
239 req
, struct rpccli_epm_Delete_state
);
242 if (tevent_req_is_nterror(req
, &status
)) {
243 tevent_req_received(req
);
247 /* Steal possbile out parameters to the callers context */
248 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
251 *result
= state
->orig
.out
.result
;
253 tevent_req_received(req
);
257 NTSTATUS
rpccli_epm_Delete(struct rpc_pipe_client
*cli
,
259 uint32_t num_ents
/* [in] */,
260 struct epm_entry_t
*entries
/* [in] [size_is(num_ents)] */)
266 r
.in
.num_ents
= num_ents
;
267 r
.in
.entries
= entries
;
269 status
= cli
->dispatch(cli
,
275 if (!NT_STATUS_IS_OK(status
)) {
279 if (NT_STATUS_IS_ERR(status
)) {
283 /* Return variables */
289 struct rpccli_epm_Lookup_state
{
290 struct epm_Lookup orig
;
291 struct epm_Lookup tmp
;
292 TALLOC_CTX
*out_mem_ctx
;
293 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
296 static void rpccli_epm_Lookup_done(struct tevent_req
*subreq
);
298 struct tevent_req
*rpccli_epm_Lookup_send(TALLOC_CTX
*mem_ctx
,
299 struct tevent_context
*ev
,
300 struct rpc_pipe_client
*cli
,
301 uint32_t _inquiry_type
/* [in] */,
302 struct GUID
*_object
/* [in] [ptr] */,
303 struct rpc_if_id_t
*_interface_id
/* [in] [ptr] */,
304 uint32_t _vers_option
/* [in] */,
305 struct policy_handle
*_entry_handle
/* [in,out] [ref] */,
306 uint32_t _max_ents
/* [in] */,
307 uint32_t *_num_ents
/* [out] [ref] */,
308 struct epm_entry_t
*_entries
/* [out] [length_is(*num_ents),size_is(max_ents)] */)
310 struct tevent_req
*req
;
311 struct rpccli_epm_Lookup_state
*state
;
312 struct tevent_req
*subreq
;
314 req
= tevent_req_create(mem_ctx
, &state
,
315 struct rpccli_epm_Lookup_state
);
319 state
->out_mem_ctx
= NULL
;
320 state
->dispatch_recv
= cli
->dispatch_recv
;
323 state
->orig
.in
.inquiry_type
= _inquiry_type
;
324 state
->orig
.in
.object
= _object
;
325 state
->orig
.in
.interface_id
= _interface_id
;
326 state
->orig
.in
.vers_option
= _vers_option
;
327 state
->orig
.in
.entry_handle
= _entry_handle
;
328 state
->orig
.in
.max_ents
= _max_ents
;
331 state
->orig
.out
.entry_handle
= _entry_handle
;
332 state
->orig
.out
.num_ents
= _num_ents
;
333 state
->orig
.out
.entries
= _entries
;
336 ZERO_STRUCT(state
->orig
.out
.result
);
338 state
->out_mem_ctx
= talloc_named_const(state
, 0,
339 "rpccli_epm_Lookup_out_memory");
340 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
341 return tevent_req_post(req
, ev
);
344 /* make a temporary copy, that we pass to the dispatch function */
345 state
->tmp
= state
->orig
;
347 subreq
= cli
->dispatch_send(state
, ev
, cli
,
351 if (tevent_req_nomem(subreq
, req
)) {
352 return tevent_req_post(req
, ev
);
354 tevent_req_set_callback(subreq
, rpccli_epm_Lookup_done
, req
);
358 static void rpccli_epm_Lookup_done(struct tevent_req
*subreq
)
360 struct tevent_req
*req
= tevent_req_callback_data(
361 subreq
, struct tevent_req
);
362 struct rpccli_epm_Lookup_state
*state
= tevent_req_data(
363 req
, struct rpccli_epm_Lookup_state
);
367 if (state
->out_mem_ctx
) {
368 mem_ctx
= state
->out_mem_ctx
;
373 status
= state
->dispatch_recv(subreq
, mem_ctx
);
375 if (!NT_STATUS_IS_OK(status
)) {
376 tevent_req_nterror(req
, status
);
380 /* Copy out parameters */
381 *state
->orig
.out
.entry_handle
= *state
->tmp
.out
.entry_handle
;
382 *state
->orig
.out
.num_ents
= *state
->tmp
.out
.num_ents
;
383 if ((*state
->tmp
.out
.num_ents
) > (state
->tmp
.in
.max_ents
)) {
384 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
387 memcpy(state
->orig
.out
.entries
, state
->tmp
.out
.entries
, (*state
->tmp
.out
.num_ents
) * sizeof(*state
->orig
.out
.entries
));
390 state
->orig
.out
.result
= state
->tmp
.out
.result
;
392 /* Reset temporary structure */
393 ZERO_STRUCT(state
->tmp
);
395 tevent_req_done(req
);
398 NTSTATUS
rpccli_epm_Lookup_recv(struct tevent_req
*req
,
402 struct rpccli_epm_Lookup_state
*state
= tevent_req_data(
403 req
, struct rpccli_epm_Lookup_state
);
406 if (tevent_req_is_nterror(req
, &status
)) {
407 tevent_req_received(req
);
411 /* Steal possbile out parameters to the callers context */
412 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
415 *result
= state
->orig
.out
.result
;
417 tevent_req_received(req
);
421 NTSTATUS
rpccli_epm_Lookup(struct rpc_pipe_client
*cli
,
423 uint32_t inquiry_type
/* [in] */,
424 struct GUID
*object
/* [in] [ptr] */,
425 struct rpc_if_id_t
*interface_id
/* [in] [ptr] */,
426 uint32_t vers_option
/* [in] */,
427 struct policy_handle
*entry_handle
/* [in,out] [ref] */,
428 uint32_t max_ents
/* [in] */,
429 uint32_t *num_ents
/* [out] [ref] */,
430 struct epm_entry_t
*entries
/* [out] [length_is(*num_ents),size_is(max_ents)] */)
436 r
.in
.inquiry_type
= inquiry_type
;
437 r
.in
.object
= object
;
438 r
.in
.interface_id
= interface_id
;
439 r
.in
.vers_option
= vers_option
;
440 r
.in
.entry_handle
= entry_handle
;
441 r
.in
.max_ents
= max_ents
;
443 status
= cli
->dispatch(cli
,
449 if (!NT_STATUS_IS_OK(status
)) {
453 if (NT_STATUS_IS_ERR(status
)) {
457 /* Return variables */
458 *entry_handle
= *r
.out
.entry_handle
;
459 *num_ents
= *r
.out
.num_ents
;
460 if ((*r
.out
.num_ents
) > (r
.in
.max_ents
)) {
461 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
463 memcpy(entries
, r
.out
.entries
, (*r
.out
.num_ents
) * sizeof(*entries
));
469 struct rpccli_epm_Map_state
{
472 TALLOC_CTX
*out_mem_ctx
;
473 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
476 static void rpccli_epm_Map_done(struct tevent_req
*subreq
);
478 struct tevent_req
*rpccli_epm_Map_send(TALLOC_CTX
*mem_ctx
,
479 struct tevent_context
*ev
,
480 struct rpc_pipe_client
*cli
,
481 struct GUID
*_object
/* [in] [ptr] */,
482 struct epm_twr_t
*_map_tower
/* [in] [ptr] */,
483 struct policy_handle
*_entry_handle
/* [in,out] [ref] */,
484 uint32_t _max_towers
/* [in] */,
485 uint32_t *_num_towers
/* [out] [ref] */,
486 struct epm_twr_p_t
*_towers
/* [out] [length_is(*num_towers),size_is(max_towers)] */)
488 struct tevent_req
*req
;
489 struct rpccli_epm_Map_state
*state
;
490 struct tevent_req
*subreq
;
492 req
= tevent_req_create(mem_ctx
, &state
,
493 struct rpccli_epm_Map_state
);
497 state
->out_mem_ctx
= NULL
;
498 state
->dispatch_recv
= cli
->dispatch_recv
;
501 state
->orig
.in
.object
= _object
;
502 state
->orig
.in
.map_tower
= _map_tower
;
503 state
->orig
.in
.entry_handle
= _entry_handle
;
504 state
->orig
.in
.max_towers
= _max_towers
;
507 state
->orig
.out
.entry_handle
= _entry_handle
;
508 state
->orig
.out
.num_towers
= _num_towers
;
509 state
->orig
.out
.towers
= _towers
;
512 ZERO_STRUCT(state
->orig
.out
.result
);
514 state
->out_mem_ctx
= talloc_named_const(state
, 0,
515 "rpccli_epm_Map_out_memory");
516 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
517 return tevent_req_post(req
, ev
);
520 /* make a temporary copy, that we pass to the dispatch function */
521 state
->tmp
= state
->orig
;
523 subreq
= cli
->dispatch_send(state
, ev
, cli
,
527 if (tevent_req_nomem(subreq
, req
)) {
528 return tevent_req_post(req
, ev
);
530 tevent_req_set_callback(subreq
, rpccli_epm_Map_done
, req
);
534 static void rpccli_epm_Map_done(struct tevent_req
*subreq
)
536 struct tevent_req
*req
= tevent_req_callback_data(
537 subreq
, struct tevent_req
);
538 struct rpccli_epm_Map_state
*state
= tevent_req_data(
539 req
, struct rpccli_epm_Map_state
);
543 if (state
->out_mem_ctx
) {
544 mem_ctx
= state
->out_mem_ctx
;
549 status
= state
->dispatch_recv(subreq
, mem_ctx
);
551 if (!NT_STATUS_IS_OK(status
)) {
552 tevent_req_nterror(req
, status
);
556 /* Copy out parameters */
557 *state
->orig
.out
.entry_handle
= *state
->tmp
.out
.entry_handle
;
558 *state
->orig
.out
.num_towers
= *state
->tmp
.out
.num_towers
;
559 if ((*state
->tmp
.out
.num_towers
) > (state
->tmp
.in
.max_towers
)) {
560 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
563 memcpy(state
->orig
.out
.towers
, state
->tmp
.out
.towers
, (*state
->tmp
.out
.num_towers
) * sizeof(*state
->orig
.out
.towers
));
566 state
->orig
.out
.result
= state
->tmp
.out
.result
;
568 /* Reset temporary structure */
569 ZERO_STRUCT(state
->tmp
);
571 tevent_req_done(req
);
574 NTSTATUS
rpccli_epm_Map_recv(struct tevent_req
*req
,
578 struct rpccli_epm_Map_state
*state
= tevent_req_data(
579 req
, struct rpccli_epm_Map_state
);
582 if (tevent_req_is_nterror(req
, &status
)) {
583 tevent_req_received(req
);
587 /* Steal possbile out parameters to the callers context */
588 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
591 *result
= state
->orig
.out
.result
;
593 tevent_req_received(req
);
597 NTSTATUS
rpccli_epm_Map(struct rpc_pipe_client
*cli
,
599 struct GUID
*object
/* [in] [ptr] */,
600 struct epm_twr_t
*map_tower
/* [in] [ptr] */,
601 struct policy_handle
*entry_handle
/* [in,out] [ref] */,
602 uint32_t max_towers
/* [in] */,
603 uint32_t *num_towers
/* [out] [ref] */,
604 struct epm_twr_p_t
*towers
/* [out] [length_is(*num_towers),size_is(max_towers)] */)
610 r
.in
.object
= object
;
611 r
.in
.map_tower
= map_tower
;
612 r
.in
.entry_handle
= entry_handle
;
613 r
.in
.max_towers
= max_towers
;
615 status
= cli
->dispatch(cli
,
621 if (!NT_STATUS_IS_OK(status
)) {
625 if (NT_STATUS_IS_ERR(status
)) {
629 /* Return variables */
630 *entry_handle
= *r
.out
.entry_handle
;
631 *num_towers
= *r
.out
.num_towers
;
632 if ((*r
.out
.num_towers
) > (r
.in
.max_towers
)) {
633 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
635 memcpy(towers
, r
.out
.towers
, (*r
.out
.num_towers
) * sizeof(*towers
));
641 struct rpccli_epm_LookupHandleFree_state
{
642 struct epm_LookupHandleFree orig
;
643 struct epm_LookupHandleFree tmp
;
644 TALLOC_CTX
*out_mem_ctx
;
645 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
648 static void rpccli_epm_LookupHandleFree_done(struct tevent_req
*subreq
);
650 struct tevent_req
*rpccli_epm_LookupHandleFree_send(TALLOC_CTX
*mem_ctx
,
651 struct tevent_context
*ev
,
652 struct rpc_pipe_client
*cli
,
653 struct policy_handle
*_entry_handle
/* [in,out] [ref] */)
655 struct tevent_req
*req
;
656 struct rpccli_epm_LookupHandleFree_state
*state
;
657 struct tevent_req
*subreq
;
659 req
= tevent_req_create(mem_ctx
, &state
,
660 struct rpccli_epm_LookupHandleFree_state
);
664 state
->out_mem_ctx
= NULL
;
665 state
->dispatch_recv
= cli
->dispatch_recv
;
668 state
->orig
.in
.entry_handle
= _entry_handle
;
671 state
->orig
.out
.entry_handle
= _entry_handle
;
674 ZERO_STRUCT(state
->orig
.out
.result
);
676 state
->out_mem_ctx
= talloc_named_const(state
, 0,
677 "rpccli_epm_LookupHandleFree_out_memory");
678 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
679 return tevent_req_post(req
, ev
);
682 /* make a temporary copy, that we pass to the dispatch function */
683 state
->tmp
= state
->orig
;
685 subreq
= cli
->dispatch_send(state
, ev
, cli
,
687 NDR_EPM_LOOKUPHANDLEFREE
,
689 if (tevent_req_nomem(subreq
, req
)) {
690 return tevent_req_post(req
, ev
);
692 tevent_req_set_callback(subreq
, rpccli_epm_LookupHandleFree_done
, req
);
696 static void rpccli_epm_LookupHandleFree_done(struct tevent_req
*subreq
)
698 struct tevent_req
*req
= tevent_req_callback_data(
699 subreq
, struct tevent_req
);
700 struct rpccli_epm_LookupHandleFree_state
*state
= tevent_req_data(
701 req
, struct rpccli_epm_LookupHandleFree_state
);
705 if (state
->out_mem_ctx
) {
706 mem_ctx
= state
->out_mem_ctx
;
711 status
= state
->dispatch_recv(subreq
, mem_ctx
);
713 if (!NT_STATUS_IS_OK(status
)) {
714 tevent_req_nterror(req
, status
);
718 /* Copy out parameters */
719 *state
->orig
.out
.entry_handle
= *state
->tmp
.out
.entry_handle
;
722 state
->orig
.out
.result
= state
->tmp
.out
.result
;
724 /* Reset temporary structure */
725 ZERO_STRUCT(state
->tmp
);
727 tevent_req_done(req
);
730 NTSTATUS
rpccli_epm_LookupHandleFree_recv(struct tevent_req
*req
,
734 struct rpccli_epm_LookupHandleFree_state
*state
= tevent_req_data(
735 req
, struct rpccli_epm_LookupHandleFree_state
);
738 if (tevent_req_is_nterror(req
, &status
)) {
739 tevent_req_received(req
);
743 /* Steal possbile out parameters to the callers context */
744 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
747 *result
= state
->orig
.out
.result
;
749 tevent_req_received(req
);
753 NTSTATUS
rpccli_epm_LookupHandleFree(struct rpc_pipe_client
*cli
,
755 struct policy_handle
*entry_handle
/* [in,out] [ref] */)
757 struct epm_LookupHandleFree r
;
761 r
.in
.entry_handle
= entry_handle
;
763 status
= cli
->dispatch(cli
,
766 NDR_EPM_LOOKUPHANDLEFREE
,
769 if (!NT_STATUS_IS_OK(status
)) {
773 if (NT_STATUS_IS_ERR(status
)) {
777 /* Return variables */
778 *entry_handle
= *r
.out
.entry_handle
;
784 struct rpccli_epm_InqObject_state
{
785 struct epm_InqObject orig
;
786 struct epm_InqObject tmp
;
787 TALLOC_CTX
*out_mem_ctx
;
788 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
791 static void rpccli_epm_InqObject_done(struct tevent_req
*subreq
);
793 struct tevent_req
*rpccli_epm_InqObject_send(TALLOC_CTX
*mem_ctx
,
794 struct tevent_context
*ev
,
795 struct rpc_pipe_client
*cli
,
796 struct GUID
*_epm_object
/* [in] [ref] */)
798 struct tevent_req
*req
;
799 struct rpccli_epm_InqObject_state
*state
;
800 struct tevent_req
*subreq
;
802 req
= tevent_req_create(mem_ctx
, &state
,
803 struct rpccli_epm_InqObject_state
);
807 state
->out_mem_ctx
= NULL
;
808 state
->dispatch_recv
= cli
->dispatch_recv
;
811 state
->orig
.in
.epm_object
= _epm_object
;
816 ZERO_STRUCT(state
->orig
.out
.result
);
818 /* make a temporary copy, that we pass to the dispatch function */
819 state
->tmp
= state
->orig
;
821 subreq
= cli
->dispatch_send(state
, ev
, cli
,
825 if (tevent_req_nomem(subreq
, req
)) {
826 return tevent_req_post(req
, ev
);
828 tevent_req_set_callback(subreq
, rpccli_epm_InqObject_done
, req
);
832 static void rpccli_epm_InqObject_done(struct tevent_req
*subreq
)
834 struct tevent_req
*req
= tevent_req_callback_data(
835 subreq
, struct tevent_req
);
836 struct rpccli_epm_InqObject_state
*state
= tevent_req_data(
837 req
, struct rpccli_epm_InqObject_state
);
841 if (state
->out_mem_ctx
) {
842 mem_ctx
= state
->out_mem_ctx
;
847 status
= state
->dispatch_recv(subreq
, mem_ctx
);
849 if (!NT_STATUS_IS_OK(status
)) {
850 tevent_req_nterror(req
, status
);
854 /* Copy out parameters */
857 state
->orig
.out
.result
= state
->tmp
.out
.result
;
859 /* Reset temporary structure */
860 ZERO_STRUCT(state
->tmp
);
862 tevent_req_done(req
);
865 NTSTATUS
rpccli_epm_InqObject_recv(struct tevent_req
*req
,
869 struct rpccli_epm_InqObject_state
*state
= tevent_req_data(
870 req
, struct rpccli_epm_InqObject_state
);
873 if (tevent_req_is_nterror(req
, &status
)) {
874 tevent_req_received(req
);
878 /* Steal possbile out parameters to the callers context */
879 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
882 *result
= state
->orig
.out
.result
;
884 tevent_req_received(req
);
888 NTSTATUS
rpccli_epm_InqObject(struct rpc_pipe_client
*cli
,
890 struct GUID
*epm_object
/* [in] [ref] */)
892 struct epm_InqObject r
;
896 r
.in
.epm_object
= epm_object
;
898 status
= cli
->dispatch(cli
,
904 if (!NT_STATUS_IS_OK(status
)) {
908 if (NT_STATUS_IS_ERR(status
)) {
912 /* Return variables */
918 struct rpccli_epm_MgmtDelete_state
{
919 struct epm_MgmtDelete orig
;
920 struct epm_MgmtDelete tmp
;
921 TALLOC_CTX
*out_mem_ctx
;
922 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
925 static void rpccli_epm_MgmtDelete_done(struct tevent_req
*subreq
);
927 struct tevent_req
*rpccli_epm_MgmtDelete_send(TALLOC_CTX
*mem_ctx
,
928 struct tevent_context
*ev
,
929 struct rpc_pipe_client
*cli
,
930 uint32_t _object_speced
/* [in] */,
931 struct GUID
*_object
/* [in] [ptr] */,
932 struct epm_twr_t
*_tower
/* [in] [ptr] */)
934 struct tevent_req
*req
;
935 struct rpccli_epm_MgmtDelete_state
*state
;
936 struct tevent_req
*subreq
;
938 req
= tevent_req_create(mem_ctx
, &state
,
939 struct rpccli_epm_MgmtDelete_state
);
943 state
->out_mem_ctx
= NULL
;
944 state
->dispatch_recv
= cli
->dispatch_recv
;
947 state
->orig
.in
.object_speced
= _object_speced
;
948 state
->orig
.in
.object
= _object
;
949 state
->orig
.in
.tower
= _tower
;
954 ZERO_STRUCT(state
->orig
.out
.result
);
956 /* make a temporary copy, that we pass to the dispatch function */
957 state
->tmp
= state
->orig
;
959 subreq
= cli
->dispatch_send(state
, ev
, cli
,
963 if (tevent_req_nomem(subreq
, req
)) {
964 return tevent_req_post(req
, ev
);
966 tevent_req_set_callback(subreq
, rpccli_epm_MgmtDelete_done
, req
);
970 static void rpccli_epm_MgmtDelete_done(struct tevent_req
*subreq
)
972 struct tevent_req
*req
= tevent_req_callback_data(
973 subreq
, struct tevent_req
);
974 struct rpccli_epm_MgmtDelete_state
*state
= tevent_req_data(
975 req
, struct rpccli_epm_MgmtDelete_state
);
979 if (state
->out_mem_ctx
) {
980 mem_ctx
= state
->out_mem_ctx
;
985 status
= state
->dispatch_recv(subreq
, mem_ctx
);
987 if (!NT_STATUS_IS_OK(status
)) {
988 tevent_req_nterror(req
, status
);
992 /* Copy out parameters */
995 state
->orig
.out
.result
= state
->tmp
.out
.result
;
997 /* Reset temporary structure */
998 ZERO_STRUCT(state
->tmp
);
1000 tevent_req_done(req
);
1003 NTSTATUS
rpccli_epm_MgmtDelete_recv(struct tevent_req
*req
,
1004 TALLOC_CTX
*mem_ctx
,
1007 struct rpccli_epm_MgmtDelete_state
*state
= tevent_req_data(
1008 req
, struct rpccli_epm_MgmtDelete_state
);
1011 if (tevent_req_is_nterror(req
, &status
)) {
1012 tevent_req_received(req
);
1016 /* Steal possbile out parameters to the callers context */
1017 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1020 *result
= state
->orig
.out
.result
;
1022 tevent_req_received(req
);
1023 return NT_STATUS_OK
;
1026 NTSTATUS
rpccli_epm_MgmtDelete(struct rpc_pipe_client
*cli
,
1027 TALLOC_CTX
*mem_ctx
,
1028 uint32_t object_speced
/* [in] */,
1029 struct GUID
*object
/* [in] [ptr] */,
1030 struct epm_twr_t
*tower
/* [in] [ptr] */)
1032 struct epm_MgmtDelete r
;
1036 r
.in
.object_speced
= object_speced
;
1037 r
.in
.object
= object
;
1040 status
= cli
->dispatch(cli
,
1042 &ndr_table_epmapper
,
1046 if (!NT_STATUS_IS_OK(status
)) {
1050 if (NT_STATUS_IS_ERR(status
)) {
1054 /* Return variables */
1057 return NT_STATUS_OK
;
1060 struct rpccli_epm_MapAuth_state
{
1061 struct epm_MapAuth orig
;
1062 struct epm_MapAuth tmp
;
1063 TALLOC_CTX
*out_mem_ctx
;
1064 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1067 static void rpccli_epm_MapAuth_done(struct tevent_req
*subreq
);
1069 struct tevent_req
*rpccli_epm_MapAuth_send(TALLOC_CTX
*mem_ctx
,
1070 struct tevent_context
*ev
,
1071 struct rpc_pipe_client
*cli
)
1073 struct tevent_req
*req
;
1074 struct rpccli_epm_MapAuth_state
*state
;
1075 struct tevent_req
*subreq
;
1077 req
= tevent_req_create(mem_ctx
, &state
,
1078 struct rpccli_epm_MapAuth_state
);
1082 state
->out_mem_ctx
= NULL
;
1083 state
->dispatch_recv
= cli
->dispatch_recv
;
1087 /* Out parameters */
1090 ZERO_STRUCT(state
->orig
.out
.result
);
1092 /* make a temporary copy, that we pass to the dispatch function */
1093 state
->tmp
= state
->orig
;
1095 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1096 &ndr_table_epmapper
,
1099 if (tevent_req_nomem(subreq
, req
)) {
1100 return tevent_req_post(req
, ev
);
1102 tevent_req_set_callback(subreq
, rpccli_epm_MapAuth_done
, req
);
1106 static void rpccli_epm_MapAuth_done(struct tevent_req
*subreq
)
1108 struct tevent_req
*req
= tevent_req_callback_data(
1109 subreq
, struct tevent_req
);
1110 struct rpccli_epm_MapAuth_state
*state
= tevent_req_data(
1111 req
, struct rpccli_epm_MapAuth_state
);
1113 TALLOC_CTX
*mem_ctx
;
1115 if (state
->out_mem_ctx
) {
1116 mem_ctx
= state
->out_mem_ctx
;
1121 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1122 TALLOC_FREE(subreq
);
1123 if (!NT_STATUS_IS_OK(status
)) {
1124 tevent_req_nterror(req
, status
);
1128 /* Copy out parameters */
1131 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1133 /* Reset temporary structure */
1134 ZERO_STRUCT(state
->tmp
);
1136 tevent_req_done(req
);
1139 NTSTATUS
rpccli_epm_MapAuth_recv(struct tevent_req
*req
,
1140 TALLOC_CTX
*mem_ctx
,
1143 struct rpccli_epm_MapAuth_state
*state
= tevent_req_data(
1144 req
, struct rpccli_epm_MapAuth_state
);
1147 if (tevent_req_is_nterror(req
, &status
)) {
1148 tevent_req_received(req
);
1152 /* Steal possbile out parameters to the callers context */
1153 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1156 *result
= state
->orig
.out
.result
;
1158 tevent_req_received(req
);
1159 return NT_STATUS_OK
;
1162 NTSTATUS
rpccli_epm_MapAuth(struct rpc_pipe_client
*cli
,
1163 TALLOC_CTX
*mem_ctx
)
1165 struct epm_MapAuth r
;
1170 status
= cli
->dispatch(cli
,
1172 &ndr_table_epmapper
,
1176 if (!NT_STATUS_IS_OK(status
)) {
1180 if (NT_STATUS_IS_ERR(status
)) {
1184 /* Return variables */
1187 return NT_STATUS_OK
;