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 memcpy(state
->orig
.out
.entries
, state
->tmp
.out
.entries
, (state
->tmp
.in
.max_ents
) * sizeof(*state
->orig
.out
.entries
));
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_epm_Lookup_recv(struct tevent_req
*req
,
398 struct rpccli_epm_Lookup_state
*state
= tevent_req_data(
399 req
, struct rpccli_epm_Lookup_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_epm_Lookup(struct rpc_pipe_client
*cli
,
419 uint32_t inquiry_type
/* [in] */,
420 struct GUID
*object
/* [in] [ptr] */,
421 struct rpc_if_id_t
*interface_id
/* [in] [ptr] */,
422 uint32_t vers_option
/* [in] */,
423 struct policy_handle
*entry_handle
/* [in,out] [ref] */,
424 uint32_t max_ents
/* [in] */,
425 uint32_t *num_ents
/* [out] [ref] */,
426 struct epm_entry_t
*entries
/* [out] [length_is(*num_ents),size_is(max_ents)] */)
432 r
.in
.inquiry_type
= inquiry_type
;
433 r
.in
.object
= object
;
434 r
.in
.interface_id
= interface_id
;
435 r
.in
.vers_option
= vers_option
;
436 r
.in
.entry_handle
= entry_handle
;
437 r
.in
.max_ents
= max_ents
;
439 status
= cli
->dispatch(cli
,
445 if (!NT_STATUS_IS_OK(status
)) {
449 if (NT_STATUS_IS_ERR(status
)) {
453 /* Return variables */
454 *entry_handle
= *r
.out
.entry_handle
;
455 *num_ents
= *r
.out
.num_ents
;
456 memcpy(entries
, r
.out
.entries
, (r
.in
.max_ents
) * sizeof(*entries
));
462 struct rpccli_epm_Map_state
{
465 TALLOC_CTX
*out_mem_ctx
;
466 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
469 static void rpccli_epm_Map_done(struct tevent_req
*subreq
);
471 struct tevent_req
*rpccli_epm_Map_send(TALLOC_CTX
*mem_ctx
,
472 struct tevent_context
*ev
,
473 struct rpc_pipe_client
*cli
,
474 struct GUID
*_object
/* [in] [ptr] */,
475 struct epm_twr_t
*_map_tower
/* [in] [ptr] */,
476 struct policy_handle
*_entry_handle
/* [in,out] [ref] */,
477 uint32_t _max_towers
/* [in] */,
478 uint32_t *_num_towers
/* [out] [ref] */,
479 struct epm_twr_p_t
*_towers
/* [out] [length_is(*num_towers),size_is(max_towers)] */)
481 struct tevent_req
*req
;
482 struct rpccli_epm_Map_state
*state
;
483 struct tevent_req
*subreq
;
485 req
= tevent_req_create(mem_ctx
, &state
,
486 struct rpccli_epm_Map_state
);
490 state
->out_mem_ctx
= NULL
;
491 state
->dispatch_recv
= cli
->dispatch_recv
;
494 state
->orig
.in
.object
= _object
;
495 state
->orig
.in
.map_tower
= _map_tower
;
496 state
->orig
.in
.entry_handle
= _entry_handle
;
497 state
->orig
.in
.max_towers
= _max_towers
;
500 state
->orig
.out
.entry_handle
= _entry_handle
;
501 state
->orig
.out
.num_towers
= _num_towers
;
502 state
->orig
.out
.towers
= _towers
;
505 ZERO_STRUCT(state
->orig
.out
.result
);
507 state
->out_mem_ctx
= talloc_named_const(state
, 0,
508 "rpccli_epm_Map_out_memory");
509 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
510 return tevent_req_post(req
, ev
);
513 /* make a temporary copy, that we pass to the dispatch function */
514 state
->tmp
= state
->orig
;
516 subreq
= cli
->dispatch_send(state
, ev
, cli
,
520 if (tevent_req_nomem(subreq
, req
)) {
521 return tevent_req_post(req
, ev
);
523 tevent_req_set_callback(subreq
, rpccli_epm_Map_done
, req
);
527 static void rpccli_epm_Map_done(struct tevent_req
*subreq
)
529 struct tevent_req
*req
= tevent_req_callback_data(
530 subreq
, struct tevent_req
);
531 struct rpccli_epm_Map_state
*state
= tevent_req_data(
532 req
, struct rpccli_epm_Map_state
);
536 if (state
->out_mem_ctx
) {
537 mem_ctx
= state
->out_mem_ctx
;
542 status
= state
->dispatch_recv(subreq
, mem_ctx
);
544 if (!NT_STATUS_IS_OK(status
)) {
545 tevent_req_nterror(req
, status
);
549 /* Copy out parameters */
550 *state
->orig
.out
.entry_handle
= *state
->tmp
.out
.entry_handle
;
551 *state
->orig
.out
.num_towers
= *state
->tmp
.out
.num_towers
;
552 memcpy(state
->orig
.out
.towers
, state
->tmp
.out
.towers
, (state
->tmp
.in
.max_towers
) * sizeof(*state
->orig
.out
.towers
));
555 state
->orig
.out
.result
= state
->tmp
.out
.result
;
557 /* Reset temporary structure */
558 ZERO_STRUCT(state
->tmp
);
560 tevent_req_done(req
);
563 NTSTATUS
rpccli_epm_Map_recv(struct tevent_req
*req
,
567 struct rpccli_epm_Map_state
*state
= tevent_req_data(
568 req
, struct rpccli_epm_Map_state
);
571 if (tevent_req_is_nterror(req
, &status
)) {
572 tevent_req_received(req
);
576 /* Steal possbile out parameters to the callers context */
577 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
580 *result
= state
->orig
.out
.result
;
582 tevent_req_received(req
);
586 NTSTATUS
rpccli_epm_Map(struct rpc_pipe_client
*cli
,
588 struct GUID
*object
/* [in] [ptr] */,
589 struct epm_twr_t
*map_tower
/* [in] [ptr] */,
590 struct policy_handle
*entry_handle
/* [in,out] [ref] */,
591 uint32_t max_towers
/* [in] */,
592 uint32_t *num_towers
/* [out] [ref] */,
593 struct epm_twr_p_t
*towers
/* [out] [length_is(*num_towers),size_is(max_towers)] */)
599 r
.in
.object
= object
;
600 r
.in
.map_tower
= map_tower
;
601 r
.in
.entry_handle
= entry_handle
;
602 r
.in
.max_towers
= max_towers
;
604 status
= cli
->dispatch(cli
,
610 if (!NT_STATUS_IS_OK(status
)) {
614 if (NT_STATUS_IS_ERR(status
)) {
618 /* Return variables */
619 *entry_handle
= *r
.out
.entry_handle
;
620 *num_towers
= *r
.out
.num_towers
;
621 memcpy(towers
, r
.out
.towers
, (r
.in
.max_towers
) * sizeof(*towers
));
627 struct rpccli_epm_LookupHandleFree_state
{
628 struct epm_LookupHandleFree orig
;
629 struct epm_LookupHandleFree tmp
;
630 TALLOC_CTX
*out_mem_ctx
;
631 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
634 static void rpccli_epm_LookupHandleFree_done(struct tevent_req
*subreq
);
636 struct tevent_req
*rpccli_epm_LookupHandleFree_send(TALLOC_CTX
*mem_ctx
,
637 struct tevent_context
*ev
,
638 struct rpc_pipe_client
*cli
,
639 struct policy_handle
*_entry_handle
/* [in,out] [ref] */)
641 struct tevent_req
*req
;
642 struct rpccli_epm_LookupHandleFree_state
*state
;
643 struct tevent_req
*subreq
;
645 req
= tevent_req_create(mem_ctx
, &state
,
646 struct rpccli_epm_LookupHandleFree_state
);
650 state
->out_mem_ctx
= NULL
;
651 state
->dispatch_recv
= cli
->dispatch_recv
;
654 state
->orig
.in
.entry_handle
= _entry_handle
;
657 state
->orig
.out
.entry_handle
= _entry_handle
;
660 ZERO_STRUCT(state
->orig
.out
.result
);
662 state
->out_mem_ctx
= talloc_named_const(state
, 0,
663 "rpccli_epm_LookupHandleFree_out_memory");
664 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
665 return tevent_req_post(req
, ev
);
668 /* make a temporary copy, that we pass to the dispatch function */
669 state
->tmp
= state
->orig
;
671 subreq
= cli
->dispatch_send(state
, ev
, cli
,
673 NDR_EPM_LOOKUPHANDLEFREE
,
675 if (tevent_req_nomem(subreq
, req
)) {
676 return tevent_req_post(req
, ev
);
678 tevent_req_set_callback(subreq
, rpccli_epm_LookupHandleFree_done
, req
);
682 static void rpccli_epm_LookupHandleFree_done(struct tevent_req
*subreq
)
684 struct tevent_req
*req
= tevent_req_callback_data(
685 subreq
, struct tevent_req
);
686 struct rpccli_epm_LookupHandleFree_state
*state
= tevent_req_data(
687 req
, struct rpccli_epm_LookupHandleFree_state
);
691 if (state
->out_mem_ctx
) {
692 mem_ctx
= state
->out_mem_ctx
;
697 status
= state
->dispatch_recv(subreq
, mem_ctx
);
699 if (!NT_STATUS_IS_OK(status
)) {
700 tevent_req_nterror(req
, status
);
704 /* Copy out parameters */
705 *state
->orig
.out
.entry_handle
= *state
->tmp
.out
.entry_handle
;
708 state
->orig
.out
.result
= state
->tmp
.out
.result
;
710 /* Reset temporary structure */
711 ZERO_STRUCT(state
->tmp
);
713 tevent_req_done(req
);
716 NTSTATUS
rpccli_epm_LookupHandleFree_recv(struct tevent_req
*req
,
720 struct rpccli_epm_LookupHandleFree_state
*state
= tevent_req_data(
721 req
, struct rpccli_epm_LookupHandleFree_state
);
724 if (tevent_req_is_nterror(req
, &status
)) {
725 tevent_req_received(req
);
729 /* Steal possbile out parameters to the callers context */
730 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
733 *result
= state
->orig
.out
.result
;
735 tevent_req_received(req
);
739 NTSTATUS
rpccli_epm_LookupHandleFree(struct rpc_pipe_client
*cli
,
741 struct policy_handle
*entry_handle
/* [in,out] [ref] */)
743 struct epm_LookupHandleFree r
;
747 r
.in
.entry_handle
= entry_handle
;
749 status
= cli
->dispatch(cli
,
752 NDR_EPM_LOOKUPHANDLEFREE
,
755 if (!NT_STATUS_IS_OK(status
)) {
759 if (NT_STATUS_IS_ERR(status
)) {
763 /* Return variables */
764 *entry_handle
= *r
.out
.entry_handle
;
770 struct rpccli_epm_InqObject_state
{
771 struct epm_InqObject orig
;
772 struct epm_InqObject tmp
;
773 TALLOC_CTX
*out_mem_ctx
;
774 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
777 static void rpccli_epm_InqObject_done(struct tevent_req
*subreq
);
779 struct tevent_req
*rpccli_epm_InqObject_send(TALLOC_CTX
*mem_ctx
,
780 struct tevent_context
*ev
,
781 struct rpc_pipe_client
*cli
,
782 struct GUID
*_epm_object
/* [in] [ref] */)
784 struct tevent_req
*req
;
785 struct rpccli_epm_InqObject_state
*state
;
786 struct tevent_req
*subreq
;
788 req
= tevent_req_create(mem_ctx
, &state
,
789 struct rpccli_epm_InqObject_state
);
793 state
->out_mem_ctx
= NULL
;
794 state
->dispatch_recv
= cli
->dispatch_recv
;
797 state
->orig
.in
.epm_object
= _epm_object
;
802 ZERO_STRUCT(state
->orig
.out
.result
);
804 /* make a temporary copy, that we pass to the dispatch function */
805 state
->tmp
= state
->orig
;
807 subreq
= cli
->dispatch_send(state
, ev
, cli
,
811 if (tevent_req_nomem(subreq
, req
)) {
812 return tevent_req_post(req
, ev
);
814 tevent_req_set_callback(subreq
, rpccli_epm_InqObject_done
, req
);
818 static void rpccli_epm_InqObject_done(struct tevent_req
*subreq
)
820 struct tevent_req
*req
= tevent_req_callback_data(
821 subreq
, struct tevent_req
);
822 struct rpccli_epm_InqObject_state
*state
= tevent_req_data(
823 req
, struct rpccli_epm_InqObject_state
);
827 if (state
->out_mem_ctx
) {
828 mem_ctx
= state
->out_mem_ctx
;
833 status
= state
->dispatch_recv(subreq
, mem_ctx
);
835 if (!NT_STATUS_IS_OK(status
)) {
836 tevent_req_nterror(req
, status
);
840 /* Copy out parameters */
843 state
->orig
.out
.result
= state
->tmp
.out
.result
;
845 /* Reset temporary structure */
846 ZERO_STRUCT(state
->tmp
);
848 tevent_req_done(req
);
851 NTSTATUS
rpccli_epm_InqObject_recv(struct tevent_req
*req
,
855 struct rpccli_epm_InqObject_state
*state
= tevent_req_data(
856 req
, struct rpccli_epm_InqObject_state
);
859 if (tevent_req_is_nterror(req
, &status
)) {
860 tevent_req_received(req
);
864 /* Steal possbile out parameters to the callers context */
865 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
868 *result
= state
->orig
.out
.result
;
870 tevent_req_received(req
);
874 NTSTATUS
rpccli_epm_InqObject(struct rpc_pipe_client
*cli
,
876 struct GUID
*epm_object
/* [in] [ref] */)
878 struct epm_InqObject r
;
882 r
.in
.epm_object
= epm_object
;
884 status
= cli
->dispatch(cli
,
890 if (!NT_STATUS_IS_OK(status
)) {
894 if (NT_STATUS_IS_ERR(status
)) {
898 /* Return variables */
904 struct rpccli_epm_MgmtDelete_state
{
905 struct epm_MgmtDelete orig
;
906 struct epm_MgmtDelete tmp
;
907 TALLOC_CTX
*out_mem_ctx
;
908 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
911 static void rpccli_epm_MgmtDelete_done(struct tevent_req
*subreq
);
913 struct tevent_req
*rpccli_epm_MgmtDelete_send(TALLOC_CTX
*mem_ctx
,
914 struct tevent_context
*ev
,
915 struct rpc_pipe_client
*cli
,
916 uint32_t _object_speced
/* [in] */,
917 struct GUID
*_object
/* [in] [ptr] */,
918 struct epm_twr_t
*_tower
/* [in] [ptr] */)
920 struct tevent_req
*req
;
921 struct rpccli_epm_MgmtDelete_state
*state
;
922 struct tevent_req
*subreq
;
924 req
= tevent_req_create(mem_ctx
, &state
,
925 struct rpccli_epm_MgmtDelete_state
);
929 state
->out_mem_ctx
= NULL
;
930 state
->dispatch_recv
= cli
->dispatch_recv
;
933 state
->orig
.in
.object_speced
= _object_speced
;
934 state
->orig
.in
.object
= _object
;
935 state
->orig
.in
.tower
= _tower
;
940 ZERO_STRUCT(state
->orig
.out
.result
);
942 /* make a temporary copy, that we pass to the dispatch function */
943 state
->tmp
= state
->orig
;
945 subreq
= cli
->dispatch_send(state
, ev
, cli
,
949 if (tevent_req_nomem(subreq
, req
)) {
950 return tevent_req_post(req
, ev
);
952 tevent_req_set_callback(subreq
, rpccli_epm_MgmtDelete_done
, req
);
956 static void rpccli_epm_MgmtDelete_done(struct tevent_req
*subreq
)
958 struct tevent_req
*req
= tevent_req_callback_data(
959 subreq
, struct tevent_req
);
960 struct rpccli_epm_MgmtDelete_state
*state
= tevent_req_data(
961 req
, struct rpccli_epm_MgmtDelete_state
);
965 if (state
->out_mem_ctx
) {
966 mem_ctx
= state
->out_mem_ctx
;
971 status
= state
->dispatch_recv(subreq
, mem_ctx
);
973 if (!NT_STATUS_IS_OK(status
)) {
974 tevent_req_nterror(req
, status
);
978 /* Copy out parameters */
981 state
->orig
.out
.result
= state
->tmp
.out
.result
;
983 /* Reset temporary structure */
984 ZERO_STRUCT(state
->tmp
);
986 tevent_req_done(req
);
989 NTSTATUS
rpccli_epm_MgmtDelete_recv(struct tevent_req
*req
,
993 struct rpccli_epm_MgmtDelete_state
*state
= tevent_req_data(
994 req
, struct rpccli_epm_MgmtDelete_state
);
997 if (tevent_req_is_nterror(req
, &status
)) {
998 tevent_req_received(req
);
1002 /* Steal possbile out parameters to the callers context */
1003 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1006 *result
= state
->orig
.out
.result
;
1008 tevent_req_received(req
);
1009 return NT_STATUS_OK
;
1012 NTSTATUS
rpccli_epm_MgmtDelete(struct rpc_pipe_client
*cli
,
1013 TALLOC_CTX
*mem_ctx
,
1014 uint32_t object_speced
/* [in] */,
1015 struct GUID
*object
/* [in] [ptr] */,
1016 struct epm_twr_t
*tower
/* [in] [ptr] */)
1018 struct epm_MgmtDelete r
;
1022 r
.in
.object_speced
= object_speced
;
1023 r
.in
.object
= object
;
1026 status
= cli
->dispatch(cli
,
1028 &ndr_table_epmapper
,
1032 if (!NT_STATUS_IS_OK(status
)) {
1036 if (NT_STATUS_IS_ERR(status
)) {
1040 /* Return variables */
1043 return NT_STATUS_OK
;
1046 struct rpccli_epm_MapAuth_state
{
1047 struct epm_MapAuth orig
;
1048 struct epm_MapAuth tmp
;
1049 TALLOC_CTX
*out_mem_ctx
;
1050 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1053 static void rpccli_epm_MapAuth_done(struct tevent_req
*subreq
);
1055 struct tevent_req
*rpccli_epm_MapAuth_send(TALLOC_CTX
*mem_ctx
,
1056 struct tevent_context
*ev
,
1057 struct rpc_pipe_client
*cli
)
1059 struct tevent_req
*req
;
1060 struct rpccli_epm_MapAuth_state
*state
;
1061 struct tevent_req
*subreq
;
1063 req
= tevent_req_create(mem_ctx
, &state
,
1064 struct rpccli_epm_MapAuth_state
);
1068 state
->out_mem_ctx
= NULL
;
1069 state
->dispatch_recv
= cli
->dispatch_recv
;
1073 /* Out parameters */
1076 ZERO_STRUCT(state
->orig
.out
.result
);
1078 /* make a temporary copy, that we pass to the dispatch function */
1079 state
->tmp
= state
->orig
;
1081 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1082 &ndr_table_epmapper
,
1085 if (tevent_req_nomem(subreq
, req
)) {
1086 return tevent_req_post(req
, ev
);
1088 tevent_req_set_callback(subreq
, rpccli_epm_MapAuth_done
, req
);
1092 static void rpccli_epm_MapAuth_done(struct tevent_req
*subreq
)
1094 struct tevent_req
*req
= tevent_req_callback_data(
1095 subreq
, struct tevent_req
);
1096 struct rpccli_epm_MapAuth_state
*state
= tevent_req_data(
1097 req
, struct rpccli_epm_MapAuth_state
);
1099 TALLOC_CTX
*mem_ctx
;
1101 if (state
->out_mem_ctx
) {
1102 mem_ctx
= state
->out_mem_ctx
;
1107 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1108 TALLOC_FREE(subreq
);
1109 if (!NT_STATUS_IS_OK(status
)) {
1110 tevent_req_nterror(req
, status
);
1114 /* Copy out parameters */
1117 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1119 /* Reset temporary structure */
1120 ZERO_STRUCT(state
->tmp
);
1122 tevent_req_done(req
);
1125 NTSTATUS
rpccli_epm_MapAuth_recv(struct tevent_req
*req
,
1126 TALLOC_CTX
*mem_ctx
,
1129 struct rpccli_epm_MapAuth_state
*state
= tevent_req_data(
1130 req
, struct rpccli_epm_MapAuth_state
);
1133 if (tevent_req_is_nterror(req
, &status
)) {
1134 tevent_req_received(req
);
1138 /* Steal possbile out parameters to the callers context */
1139 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1142 *result
= state
->orig
.out
.result
;
1144 tevent_req_received(req
);
1145 return NT_STATUS_OK
;
1148 NTSTATUS
rpccli_epm_MapAuth(struct rpc_pipe_client
*cli
,
1149 TALLOC_CTX
*mem_ctx
)
1151 struct epm_MapAuth r
;
1156 status
= cli
->dispatch(cli
,
1158 &ndr_table_epmapper
,
1162 if (!NT_STATUS_IS_OK(status
)) {
1166 if (NT_STATUS_IS_ERR(status
)) {
1170 /* Return variables */
1173 return NT_STATUS_OK
;