s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
[Samba/nascimento.git] / librpc / gen_ndr / cli_epmapper.c
blobc83dba6c86c81478278a386da397fbdd74293098
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_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);
31 if (req == NULL) {
32 return NULL;
34 state->out_mem_ctx = NULL;
35 state->dispatch_recv = cli->dispatch_recv;
37 /* In parameters */
38 state->orig.in.num_ents = _num_ents;
39 state->orig.in.entries = _entries;
40 state->orig.in.replace = _replace;
42 /* Out parameters */
44 /* Result */
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,
51 &ndr_table_epmapper,
52 NDR_EPM_INSERT,
53 &state->tmp);
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);
58 return 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);
67 NTSTATUS status;
68 TALLOC_CTX *mem_ctx;
70 if (state->out_mem_ctx) {
71 mem_ctx = state->out_mem_ctx;
72 } else {
73 mem_ctx = state;
76 status = state->dispatch_recv(subreq, mem_ctx);
77 TALLOC_FREE(subreq);
78 if (!NT_STATUS_IS_OK(status)) {
79 tevent_req_nterror(req, status);
80 return;
83 /* Copy out parameters */
85 /* Copy result */
86 state->orig.out.result = state->tmp.out.result;
88 /* Reset temporary structure */
89 ZERO_STRUCT(state->tmp);
91 tevent_req_done(req);
94 NTSTATUS rpccli_epm_Insert_recv(struct tevent_req *req,
95 TALLOC_CTX *mem_ctx,
96 uint32 *result)
98 struct rpccli_epm_Insert_state *state = tevent_req_data(
99 req, struct rpccli_epm_Insert_state);
100 NTSTATUS status;
102 if (tevent_req_is_nterror(req, &status)) {
103 tevent_req_received(req);
104 return status;
107 /* Steal possbile out parameters to the callers context */
108 talloc_steal(mem_ctx, state->out_mem_ctx);
110 /* Return result */
111 *result = state->orig.out.result;
113 tevent_req_received(req);
114 return NT_STATUS_OK;
117 NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli,
118 TALLOC_CTX *mem_ctx,
119 uint32_t num_ents /* [in] */,
120 struct epm_entry_t *entries /* [in] [size_is(num_ents)] */,
121 uint32_t replace /* [in] */)
123 struct epm_Insert r;
124 NTSTATUS status;
126 /* In parameters */
127 r.in.num_ents = num_ents;
128 r.in.entries = entries;
129 r.in.replace = replace;
131 status = cli->dispatch(cli,
132 mem_ctx,
133 &ndr_table_epmapper,
134 NDR_EPM_INSERT,
135 &r);
137 if (!NT_STATUS_IS_OK(status)) {
138 return status;
141 if (NT_STATUS_IS_ERR(status)) {
142 return status;
145 /* Return variables */
147 /* Return result */
148 return NT_STATUS_OK;
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);
172 if (req == NULL) {
173 return NULL;
175 state->out_mem_ctx = NULL;
176 state->dispatch_recv = cli->dispatch_recv;
178 /* In parameters */
179 state->orig.in.num_ents = _num_ents;
180 state->orig.in.entries = _entries;
182 /* Out parameters */
184 /* Result */
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,
191 &ndr_table_epmapper,
192 NDR_EPM_DELETE,
193 &state->tmp);
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);
198 return 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);
207 NTSTATUS status;
208 TALLOC_CTX *mem_ctx;
210 if (state->out_mem_ctx) {
211 mem_ctx = state->out_mem_ctx;
212 } else {
213 mem_ctx = state;
216 status = state->dispatch_recv(subreq, mem_ctx);
217 TALLOC_FREE(subreq);
218 if (!NT_STATUS_IS_OK(status)) {
219 tevent_req_nterror(req, status);
220 return;
223 /* Copy out parameters */
225 /* Copy result */
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,
235 TALLOC_CTX *mem_ctx,
236 uint32 *result)
238 struct rpccli_epm_Delete_state *state = tevent_req_data(
239 req, struct rpccli_epm_Delete_state);
240 NTSTATUS status;
242 if (tevent_req_is_nterror(req, &status)) {
243 tevent_req_received(req);
244 return status;
247 /* Steal possbile out parameters to the callers context */
248 talloc_steal(mem_ctx, state->out_mem_ctx);
250 /* Return result */
251 *result = state->orig.out.result;
253 tevent_req_received(req);
254 return NT_STATUS_OK;
257 NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli,
258 TALLOC_CTX *mem_ctx,
259 uint32_t num_ents /* [in] */,
260 struct epm_entry_t *entries /* [in] [size_is(num_ents)] */)
262 struct epm_Delete r;
263 NTSTATUS status;
265 /* In parameters */
266 r.in.num_ents = num_ents;
267 r.in.entries = entries;
269 status = cli->dispatch(cli,
270 mem_ctx,
271 &ndr_table_epmapper,
272 NDR_EPM_DELETE,
273 &r);
275 if (!NT_STATUS_IS_OK(status)) {
276 return status;
279 if (NT_STATUS_IS_ERR(status)) {
280 return status;
283 /* Return variables */
285 /* Return result */
286 return NT_STATUS_OK;
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);
316 if (req == NULL) {
317 return NULL;
319 state->out_mem_ctx = NULL;
320 state->dispatch_recv = cli->dispatch_recv;
322 /* In parameters */
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;
330 /* Out parameters */
331 state->orig.out.entry_handle = _entry_handle;
332 state->orig.out.num_ents = _num_ents;
333 state->orig.out.entries = _entries;
335 /* Result */
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,
348 &ndr_table_epmapper,
349 NDR_EPM_LOOKUP,
350 &state->tmp);
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);
355 return 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);
364 NTSTATUS status;
365 TALLOC_CTX *mem_ctx;
367 if (state->out_mem_ctx) {
368 mem_ctx = state->out_mem_ctx;
369 } else {
370 mem_ctx = state;
373 status = state->dispatch_recv(subreq, mem_ctx);
374 TALLOC_FREE(subreq);
375 if (!NT_STATUS_IS_OK(status)) {
376 tevent_req_nterror(req, status);
377 return;
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));
385 /* Copy result */
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,
395 TALLOC_CTX *mem_ctx,
396 uint32 *result)
398 struct rpccli_epm_Lookup_state *state = tevent_req_data(
399 req, struct rpccli_epm_Lookup_state);
400 NTSTATUS status;
402 if (tevent_req_is_nterror(req, &status)) {
403 tevent_req_received(req);
404 return status;
407 /* Steal possbile out parameters to the callers context */
408 talloc_steal(mem_ctx, state->out_mem_ctx);
410 /* Return result */
411 *result = state->orig.out.result;
413 tevent_req_received(req);
414 return NT_STATUS_OK;
417 NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli,
418 TALLOC_CTX *mem_ctx,
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)] */)
428 struct epm_Lookup r;
429 NTSTATUS status;
431 /* In parameters */
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,
440 mem_ctx,
441 &ndr_table_epmapper,
442 NDR_EPM_LOOKUP,
443 &r);
445 if (!NT_STATUS_IS_OK(status)) {
446 return status;
449 if (NT_STATUS_IS_ERR(status)) {
450 return 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));
458 /* Return result */
459 return NT_STATUS_OK;
462 struct rpccli_epm_Map_state {
463 struct epm_Map orig;
464 struct epm_Map tmp;
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);
487 if (req == NULL) {
488 return NULL;
490 state->out_mem_ctx = NULL;
491 state->dispatch_recv = cli->dispatch_recv;
493 /* In parameters */
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;
499 /* Out parameters */
500 state->orig.out.entry_handle = _entry_handle;
501 state->orig.out.num_towers = _num_towers;
502 state->orig.out.towers = _towers;
504 /* Result */
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,
517 &ndr_table_epmapper,
518 NDR_EPM_MAP,
519 &state->tmp);
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);
524 return 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);
533 NTSTATUS status;
534 TALLOC_CTX *mem_ctx;
536 if (state->out_mem_ctx) {
537 mem_ctx = state->out_mem_ctx;
538 } else {
539 mem_ctx = state;
542 status = state->dispatch_recv(subreq, mem_ctx);
543 TALLOC_FREE(subreq);
544 if (!NT_STATUS_IS_OK(status)) {
545 tevent_req_nterror(req, status);
546 return;
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));
554 /* Copy result */
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,
564 TALLOC_CTX *mem_ctx,
565 uint32 *result)
567 struct rpccli_epm_Map_state *state = tevent_req_data(
568 req, struct rpccli_epm_Map_state);
569 NTSTATUS status;
571 if (tevent_req_is_nterror(req, &status)) {
572 tevent_req_received(req);
573 return status;
576 /* Steal possbile out parameters to the callers context */
577 talloc_steal(mem_ctx, state->out_mem_ctx);
579 /* Return result */
580 *result = state->orig.out.result;
582 tevent_req_received(req);
583 return NT_STATUS_OK;
586 NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli,
587 TALLOC_CTX *mem_ctx,
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)] */)
595 struct epm_Map r;
596 NTSTATUS status;
598 /* In parameters */
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,
605 mem_ctx,
606 &ndr_table_epmapper,
607 NDR_EPM_MAP,
608 &r);
610 if (!NT_STATUS_IS_OK(status)) {
611 return status;
614 if (NT_STATUS_IS_ERR(status)) {
615 return 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));
623 /* Return result */
624 return NT_STATUS_OK;
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);
647 if (req == NULL) {
648 return NULL;
650 state->out_mem_ctx = NULL;
651 state->dispatch_recv = cli->dispatch_recv;
653 /* In parameters */
654 state->orig.in.entry_handle = _entry_handle;
656 /* Out parameters */
657 state->orig.out.entry_handle = _entry_handle;
659 /* Result */
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,
672 &ndr_table_epmapper,
673 NDR_EPM_LOOKUPHANDLEFREE,
674 &state->tmp);
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);
679 return 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);
688 NTSTATUS status;
689 TALLOC_CTX *mem_ctx;
691 if (state->out_mem_ctx) {
692 mem_ctx = state->out_mem_ctx;
693 } else {
694 mem_ctx = state;
697 status = state->dispatch_recv(subreq, mem_ctx);
698 TALLOC_FREE(subreq);
699 if (!NT_STATUS_IS_OK(status)) {
700 tevent_req_nterror(req, status);
701 return;
704 /* Copy out parameters */
705 *state->orig.out.entry_handle = *state->tmp.out.entry_handle;
707 /* Copy result */
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,
717 TALLOC_CTX *mem_ctx,
718 uint32 *result)
720 struct rpccli_epm_LookupHandleFree_state *state = tevent_req_data(
721 req, struct rpccli_epm_LookupHandleFree_state);
722 NTSTATUS status;
724 if (tevent_req_is_nterror(req, &status)) {
725 tevent_req_received(req);
726 return status;
729 /* Steal possbile out parameters to the callers context */
730 talloc_steal(mem_ctx, state->out_mem_ctx);
732 /* Return result */
733 *result = state->orig.out.result;
735 tevent_req_received(req);
736 return NT_STATUS_OK;
739 NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli,
740 TALLOC_CTX *mem_ctx,
741 struct policy_handle *entry_handle /* [in,out] [ref] */)
743 struct epm_LookupHandleFree r;
744 NTSTATUS status;
746 /* In parameters */
747 r.in.entry_handle = entry_handle;
749 status = cli->dispatch(cli,
750 mem_ctx,
751 &ndr_table_epmapper,
752 NDR_EPM_LOOKUPHANDLEFREE,
753 &r);
755 if (!NT_STATUS_IS_OK(status)) {
756 return status;
759 if (NT_STATUS_IS_ERR(status)) {
760 return status;
763 /* Return variables */
764 *entry_handle = *r.out.entry_handle;
766 /* Return result */
767 return NT_STATUS_OK;
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);
790 if (req == NULL) {
791 return NULL;
793 state->out_mem_ctx = NULL;
794 state->dispatch_recv = cli->dispatch_recv;
796 /* In parameters */
797 state->orig.in.epm_object = _epm_object;
799 /* Out parameters */
801 /* Result */
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,
808 &ndr_table_epmapper,
809 NDR_EPM_INQOBJECT,
810 &state->tmp);
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);
815 return 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);
824 NTSTATUS status;
825 TALLOC_CTX *mem_ctx;
827 if (state->out_mem_ctx) {
828 mem_ctx = state->out_mem_ctx;
829 } else {
830 mem_ctx = state;
833 status = state->dispatch_recv(subreq, mem_ctx);
834 TALLOC_FREE(subreq);
835 if (!NT_STATUS_IS_OK(status)) {
836 tevent_req_nterror(req, status);
837 return;
840 /* Copy out parameters */
842 /* Copy result */
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,
852 TALLOC_CTX *mem_ctx,
853 uint32 *result)
855 struct rpccli_epm_InqObject_state *state = tevent_req_data(
856 req, struct rpccli_epm_InqObject_state);
857 NTSTATUS status;
859 if (tevent_req_is_nterror(req, &status)) {
860 tevent_req_received(req);
861 return status;
864 /* Steal possbile out parameters to the callers context */
865 talloc_steal(mem_ctx, state->out_mem_ctx);
867 /* Return result */
868 *result = state->orig.out.result;
870 tevent_req_received(req);
871 return NT_STATUS_OK;
874 NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli,
875 TALLOC_CTX *mem_ctx,
876 struct GUID *epm_object /* [in] [ref] */)
878 struct epm_InqObject r;
879 NTSTATUS status;
881 /* In parameters */
882 r.in.epm_object = epm_object;
884 status = cli->dispatch(cli,
885 mem_ctx,
886 &ndr_table_epmapper,
887 NDR_EPM_INQOBJECT,
888 &r);
890 if (!NT_STATUS_IS_OK(status)) {
891 return status;
894 if (NT_STATUS_IS_ERR(status)) {
895 return status;
898 /* Return variables */
900 /* Return result */
901 return NT_STATUS_OK;
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);
926 if (req == NULL) {
927 return NULL;
929 state->out_mem_ctx = NULL;
930 state->dispatch_recv = cli->dispatch_recv;
932 /* In parameters */
933 state->orig.in.object_speced = _object_speced;
934 state->orig.in.object = _object;
935 state->orig.in.tower = _tower;
937 /* Out parameters */
939 /* Result */
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,
946 &ndr_table_epmapper,
947 NDR_EPM_MGMTDELETE,
948 &state->tmp);
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);
953 return 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);
962 NTSTATUS status;
963 TALLOC_CTX *mem_ctx;
965 if (state->out_mem_ctx) {
966 mem_ctx = state->out_mem_ctx;
967 } else {
968 mem_ctx = state;
971 status = state->dispatch_recv(subreq, mem_ctx);
972 TALLOC_FREE(subreq);
973 if (!NT_STATUS_IS_OK(status)) {
974 tevent_req_nterror(req, status);
975 return;
978 /* Copy out parameters */
980 /* Copy result */
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,
990 TALLOC_CTX *mem_ctx,
991 uint32 *result)
993 struct rpccli_epm_MgmtDelete_state *state = tevent_req_data(
994 req, struct rpccli_epm_MgmtDelete_state);
995 NTSTATUS status;
997 if (tevent_req_is_nterror(req, &status)) {
998 tevent_req_received(req);
999 return status;
1002 /* Steal possbile out parameters to the callers context */
1003 talloc_steal(mem_ctx, state->out_mem_ctx);
1005 /* Return result */
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;
1019 NTSTATUS status;
1021 /* In parameters */
1022 r.in.object_speced = object_speced;
1023 r.in.object = object;
1024 r.in.tower = tower;
1026 status = cli->dispatch(cli,
1027 mem_ctx,
1028 &ndr_table_epmapper,
1029 NDR_EPM_MGMTDELETE,
1030 &r);
1032 if (!NT_STATUS_IS_OK(status)) {
1033 return status;
1036 if (NT_STATUS_IS_ERR(status)) {
1037 return status;
1040 /* Return variables */
1042 /* Return result */
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);
1065 if (req == NULL) {
1066 return NULL;
1068 state->out_mem_ctx = NULL;
1069 state->dispatch_recv = cli->dispatch_recv;
1071 /* In parameters */
1073 /* Out parameters */
1075 /* Result */
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,
1083 NDR_EPM_MAPAUTH,
1084 &state->tmp);
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);
1089 return 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);
1098 NTSTATUS status;
1099 TALLOC_CTX *mem_ctx;
1101 if (state->out_mem_ctx) {
1102 mem_ctx = state->out_mem_ctx;
1103 } else {
1104 mem_ctx = state;
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);
1111 return;
1114 /* Copy out parameters */
1116 /* Copy result */
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,
1127 uint32 *result)
1129 struct rpccli_epm_MapAuth_state *state = tevent_req_data(
1130 req, struct rpccli_epm_MapAuth_state);
1131 NTSTATUS status;
1133 if (tevent_req_is_nterror(req, &status)) {
1134 tevent_req_received(req);
1135 return status;
1138 /* Steal possbile out parameters to the callers context */
1139 talloc_steal(mem_ctx, state->out_mem_ctx);
1141 /* Return result */
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;
1152 NTSTATUS status;
1154 /* In parameters */
1156 status = cli->dispatch(cli,
1157 mem_ctx,
1158 &ndr_table_epmapper,
1159 NDR_EPM_MAPAUTH,
1160 &r);
1162 if (!NT_STATUS_IS_OK(status)) {
1163 return status;
1166 if (NT_STATUS_IS_ERR(status)) {
1167 return status;
1170 /* Return variables */
1172 /* Return result */
1173 return NT_STATUS_OK;