s4-idl: added the IDL for the DsReplica* calls
[Samba/aatanasov.git] / librpc / gen_ndr / cli_epmapper.c
bloba271516fb017bdcd0f76a969f8a19726d301af88
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 if (DEBUGLEVEL >= 10) {
48 NDR_PRINT_IN_DEBUG(epm_Insert, &state->orig);
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_table_epmapper,
56 NDR_EPM_INSERT,
57 &state->tmp);
58 if (tevent_req_nomem(subreq, req)) {
59 return tevent_req_post(req, ev);
61 tevent_req_set_callback(subreq, rpccli_epm_Insert_done, req);
62 return req;
65 static void rpccli_epm_Insert_done(struct tevent_req *subreq)
67 struct tevent_req *req = tevent_req_callback_data(
68 subreq, struct tevent_req);
69 struct rpccli_epm_Insert_state *state = tevent_req_data(
70 req, struct rpccli_epm_Insert_state);
71 NTSTATUS status;
72 TALLOC_CTX *mem_ctx;
74 if (state->out_mem_ctx) {
75 mem_ctx = state->out_mem_ctx;
76 } else {
77 mem_ctx = state;
80 status = state->dispatch_recv(subreq, mem_ctx);
81 TALLOC_FREE(subreq);
82 if (!NT_STATUS_IS_OK(status)) {
83 tevent_req_nterror(req, status);
84 return;
87 /* Copy out parameters */
89 /* Copy result */
90 state->orig.out.result = state->tmp.out.result;
92 /* Reset temporary structure */
93 ZERO_STRUCT(state->tmp);
95 if (DEBUGLEVEL >= 10) {
96 NDR_PRINT_OUT_DEBUG(epm_Insert, &state->orig);
99 tevent_req_done(req);
102 NTSTATUS rpccli_epm_Insert_recv(struct tevent_req *req,
103 TALLOC_CTX *mem_ctx,
104 uint32 *result)
106 struct rpccli_epm_Insert_state *state = tevent_req_data(
107 req, struct rpccli_epm_Insert_state);
108 NTSTATUS status;
110 if (tevent_req_is_nterror(req, &status)) {
111 tevent_req_received(req);
112 return status;
115 /* Steal possbile out parameters to the callers context */
116 talloc_steal(mem_ctx, state->out_mem_ctx);
118 /* Return result */
119 *result = state->orig.out.result;
121 tevent_req_received(req);
122 return NT_STATUS_OK;
125 NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli,
126 TALLOC_CTX *mem_ctx,
127 uint32_t num_ents /* [in] */,
128 struct epm_entry_t *entries /* [in] [size_is(num_ents)] */,
129 uint32_t replace /* [in] */)
131 struct epm_Insert r;
132 NTSTATUS status;
134 /* In parameters */
135 r.in.num_ents = num_ents;
136 r.in.entries = entries;
137 r.in.replace = replace;
139 if (DEBUGLEVEL >= 10) {
140 NDR_PRINT_IN_DEBUG(epm_Insert, &r);
143 status = cli->dispatch(cli,
144 mem_ctx,
145 &ndr_table_epmapper,
146 NDR_EPM_INSERT,
147 &r);
149 if (!NT_STATUS_IS_OK(status)) {
150 return status;
153 if (DEBUGLEVEL >= 10) {
154 NDR_PRINT_OUT_DEBUG(epm_Insert, &r);
157 if (NT_STATUS_IS_ERR(status)) {
158 return status;
161 /* Return variables */
163 /* Return result */
164 return NT_STATUS_OK;
167 struct rpccli_epm_Delete_state {
168 struct epm_Delete orig;
169 struct epm_Delete tmp;
170 TALLOC_CTX *out_mem_ctx;
171 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
174 static void rpccli_epm_Delete_done(struct tevent_req *subreq);
176 struct tevent_req *rpccli_epm_Delete_send(TALLOC_CTX *mem_ctx,
177 struct tevent_context *ev,
178 struct rpc_pipe_client *cli,
179 uint32_t _num_ents /* [in] */,
180 struct epm_entry_t *_entries /* [in] [size_is(num_ents)] */)
182 struct tevent_req *req;
183 struct rpccli_epm_Delete_state *state;
184 struct tevent_req *subreq;
186 req = tevent_req_create(mem_ctx, &state,
187 struct rpccli_epm_Delete_state);
188 if (req == NULL) {
189 return NULL;
191 state->out_mem_ctx = NULL;
192 state->dispatch_recv = cli->dispatch_recv;
194 /* In parameters */
195 state->orig.in.num_ents = _num_ents;
196 state->orig.in.entries = _entries;
198 /* Out parameters */
200 /* Result */
201 ZERO_STRUCT(state->orig.out.result);
203 if (DEBUGLEVEL >= 10) {
204 NDR_PRINT_IN_DEBUG(epm_Delete, &state->orig);
207 /* make a temporary copy, that we pass to the dispatch function */
208 state->tmp = state->orig;
210 subreq = cli->dispatch_send(state, ev, cli,
211 &ndr_table_epmapper,
212 NDR_EPM_DELETE,
213 &state->tmp);
214 if (tevent_req_nomem(subreq, req)) {
215 return tevent_req_post(req, ev);
217 tevent_req_set_callback(subreq, rpccli_epm_Delete_done, req);
218 return req;
221 static void rpccli_epm_Delete_done(struct tevent_req *subreq)
223 struct tevent_req *req = tevent_req_callback_data(
224 subreq, struct tevent_req);
225 struct rpccli_epm_Delete_state *state = tevent_req_data(
226 req, struct rpccli_epm_Delete_state);
227 NTSTATUS status;
228 TALLOC_CTX *mem_ctx;
230 if (state->out_mem_ctx) {
231 mem_ctx = state->out_mem_ctx;
232 } else {
233 mem_ctx = state;
236 status = state->dispatch_recv(subreq, mem_ctx);
237 TALLOC_FREE(subreq);
238 if (!NT_STATUS_IS_OK(status)) {
239 tevent_req_nterror(req, status);
240 return;
243 /* Copy out parameters */
245 /* Copy result */
246 state->orig.out.result = state->tmp.out.result;
248 /* Reset temporary structure */
249 ZERO_STRUCT(state->tmp);
251 if (DEBUGLEVEL >= 10) {
252 NDR_PRINT_OUT_DEBUG(epm_Delete, &state->orig);
255 tevent_req_done(req);
258 NTSTATUS rpccli_epm_Delete_recv(struct tevent_req *req,
259 TALLOC_CTX *mem_ctx,
260 uint32 *result)
262 struct rpccli_epm_Delete_state *state = tevent_req_data(
263 req, struct rpccli_epm_Delete_state);
264 NTSTATUS status;
266 if (tevent_req_is_nterror(req, &status)) {
267 tevent_req_received(req);
268 return status;
271 /* Steal possbile out parameters to the callers context */
272 talloc_steal(mem_ctx, state->out_mem_ctx);
274 /* Return result */
275 *result = state->orig.out.result;
277 tevent_req_received(req);
278 return NT_STATUS_OK;
281 NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli,
282 TALLOC_CTX *mem_ctx,
283 uint32_t num_ents /* [in] */,
284 struct epm_entry_t *entries /* [in] [size_is(num_ents)] */)
286 struct epm_Delete r;
287 NTSTATUS status;
289 /* In parameters */
290 r.in.num_ents = num_ents;
291 r.in.entries = entries;
293 if (DEBUGLEVEL >= 10) {
294 NDR_PRINT_IN_DEBUG(epm_Delete, &r);
297 status = cli->dispatch(cli,
298 mem_ctx,
299 &ndr_table_epmapper,
300 NDR_EPM_DELETE,
301 &r);
303 if (!NT_STATUS_IS_OK(status)) {
304 return status;
307 if (DEBUGLEVEL >= 10) {
308 NDR_PRINT_OUT_DEBUG(epm_Delete, &r);
311 if (NT_STATUS_IS_ERR(status)) {
312 return status;
315 /* Return variables */
317 /* Return result */
318 return NT_STATUS_OK;
321 struct rpccli_epm_Lookup_state {
322 struct epm_Lookup orig;
323 struct epm_Lookup tmp;
324 TALLOC_CTX *out_mem_ctx;
325 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
328 static void rpccli_epm_Lookup_done(struct tevent_req *subreq);
330 struct tevent_req *rpccli_epm_Lookup_send(TALLOC_CTX *mem_ctx,
331 struct tevent_context *ev,
332 struct rpc_pipe_client *cli,
333 uint32_t _inquiry_type /* [in] */,
334 struct GUID *_object /* [in] [ptr] */,
335 struct rpc_if_id_t *_interface_id /* [in] [ptr] */,
336 uint32_t _vers_option /* [in] */,
337 struct policy_handle *_entry_handle /* [in,out] [ref] */,
338 uint32_t _max_ents /* [in] */,
339 uint32_t *_num_ents /* [out] [ref] */,
340 struct epm_entry_t *_entries /* [out] [length_is(*num_ents),size_is(max_ents)] */)
342 struct tevent_req *req;
343 struct rpccli_epm_Lookup_state *state;
344 struct tevent_req *subreq;
346 req = tevent_req_create(mem_ctx, &state,
347 struct rpccli_epm_Lookup_state);
348 if (req == NULL) {
349 return NULL;
351 state->out_mem_ctx = NULL;
352 state->dispatch_recv = cli->dispatch_recv;
354 /* In parameters */
355 state->orig.in.inquiry_type = _inquiry_type;
356 state->orig.in.object = _object;
357 state->orig.in.interface_id = _interface_id;
358 state->orig.in.vers_option = _vers_option;
359 state->orig.in.entry_handle = _entry_handle;
360 state->orig.in.max_ents = _max_ents;
362 /* Out parameters */
363 state->orig.out.entry_handle = _entry_handle;
364 state->orig.out.num_ents = _num_ents;
365 state->orig.out.entries = _entries;
367 /* Result */
368 ZERO_STRUCT(state->orig.out.result);
370 if (DEBUGLEVEL >= 10) {
371 NDR_PRINT_IN_DEBUG(epm_Lookup, &state->orig);
374 state->out_mem_ctx = talloc_named_const(state, 0,
375 "rpccli_epm_Lookup_out_memory");
376 if (tevent_req_nomem(state->out_mem_ctx, req)) {
377 return tevent_req_post(req, ev);
380 /* make a temporary copy, that we pass to the dispatch function */
381 state->tmp = state->orig;
383 subreq = cli->dispatch_send(state, ev, cli,
384 &ndr_table_epmapper,
385 NDR_EPM_LOOKUP,
386 &state->tmp);
387 if (tevent_req_nomem(subreq, req)) {
388 return tevent_req_post(req, ev);
390 tevent_req_set_callback(subreq, rpccli_epm_Lookup_done, req);
391 return req;
394 static void rpccli_epm_Lookup_done(struct tevent_req *subreq)
396 struct tevent_req *req = tevent_req_callback_data(
397 subreq, struct tevent_req);
398 struct rpccli_epm_Lookup_state *state = tevent_req_data(
399 req, struct rpccli_epm_Lookup_state);
400 NTSTATUS status;
401 TALLOC_CTX *mem_ctx;
403 if (state->out_mem_ctx) {
404 mem_ctx = state->out_mem_ctx;
405 } else {
406 mem_ctx = state;
409 status = state->dispatch_recv(subreq, mem_ctx);
410 TALLOC_FREE(subreq);
411 if (!NT_STATUS_IS_OK(status)) {
412 tevent_req_nterror(req, status);
413 return;
416 /* Copy out parameters */
417 *state->orig.out.entry_handle = *state->tmp.out.entry_handle;
418 *state->orig.out.num_ents = *state->tmp.out.num_ents;
419 memcpy(state->orig.out.entries, state->tmp.out.entries, state->tmp.in.max_ents * sizeof(*state->orig.out.entries));
421 /* Copy result */
422 state->orig.out.result = state->tmp.out.result;
424 /* Reset temporary structure */
425 ZERO_STRUCT(state->tmp);
427 if (DEBUGLEVEL >= 10) {
428 NDR_PRINT_OUT_DEBUG(epm_Lookup, &state->orig);
431 tevent_req_done(req);
434 NTSTATUS rpccli_epm_Lookup_recv(struct tevent_req *req,
435 TALLOC_CTX *mem_ctx,
436 uint32 *result)
438 struct rpccli_epm_Lookup_state *state = tevent_req_data(
439 req, struct rpccli_epm_Lookup_state);
440 NTSTATUS status;
442 if (tevent_req_is_nterror(req, &status)) {
443 tevent_req_received(req);
444 return status;
447 /* Steal possbile out parameters to the callers context */
448 talloc_steal(mem_ctx, state->out_mem_ctx);
450 /* Return result */
451 *result = state->orig.out.result;
453 tevent_req_received(req);
454 return NT_STATUS_OK;
457 NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli,
458 TALLOC_CTX *mem_ctx,
459 uint32_t inquiry_type /* [in] */,
460 struct GUID *object /* [in] [ptr] */,
461 struct rpc_if_id_t *interface_id /* [in] [ptr] */,
462 uint32_t vers_option /* [in] */,
463 struct policy_handle *entry_handle /* [in,out] [ref] */,
464 uint32_t max_ents /* [in] */,
465 uint32_t *num_ents /* [out] [ref] */,
466 struct epm_entry_t *entries /* [out] [length_is(*num_ents),size_is(max_ents)] */)
468 struct epm_Lookup r;
469 NTSTATUS status;
471 /* In parameters */
472 r.in.inquiry_type = inquiry_type;
473 r.in.object = object;
474 r.in.interface_id = interface_id;
475 r.in.vers_option = vers_option;
476 r.in.entry_handle = entry_handle;
477 r.in.max_ents = max_ents;
479 if (DEBUGLEVEL >= 10) {
480 NDR_PRINT_IN_DEBUG(epm_Lookup, &r);
483 status = cli->dispatch(cli,
484 mem_ctx,
485 &ndr_table_epmapper,
486 NDR_EPM_LOOKUP,
487 &r);
489 if (!NT_STATUS_IS_OK(status)) {
490 return status;
493 if (DEBUGLEVEL >= 10) {
494 NDR_PRINT_OUT_DEBUG(epm_Lookup, &r);
497 if (NT_STATUS_IS_ERR(status)) {
498 return status;
501 /* Return variables */
502 *entry_handle = *r.out.entry_handle;
503 *num_ents = *r.out.num_ents;
504 memcpy(entries, r.out.entries, r.in.max_ents * sizeof(*entries));
506 /* Return result */
507 return NT_STATUS_OK;
510 struct rpccli_epm_Map_state {
511 struct epm_Map orig;
512 struct epm_Map tmp;
513 TALLOC_CTX *out_mem_ctx;
514 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
517 static void rpccli_epm_Map_done(struct tevent_req *subreq);
519 struct tevent_req *rpccli_epm_Map_send(TALLOC_CTX *mem_ctx,
520 struct tevent_context *ev,
521 struct rpc_pipe_client *cli,
522 struct GUID *_object /* [in] [ptr] */,
523 struct epm_twr_t *_map_tower /* [in] [ptr] */,
524 struct policy_handle *_entry_handle /* [in,out] [ref] */,
525 uint32_t _max_towers /* [in] */,
526 uint32_t *_num_towers /* [out] [ref] */,
527 struct epm_twr_p_t *_towers /* [out] [length_is(*num_towers),size_is(max_towers)] */)
529 struct tevent_req *req;
530 struct rpccli_epm_Map_state *state;
531 struct tevent_req *subreq;
533 req = tevent_req_create(mem_ctx, &state,
534 struct rpccli_epm_Map_state);
535 if (req == NULL) {
536 return NULL;
538 state->out_mem_ctx = NULL;
539 state->dispatch_recv = cli->dispatch_recv;
541 /* In parameters */
542 state->orig.in.object = _object;
543 state->orig.in.map_tower = _map_tower;
544 state->orig.in.entry_handle = _entry_handle;
545 state->orig.in.max_towers = _max_towers;
547 /* Out parameters */
548 state->orig.out.entry_handle = _entry_handle;
549 state->orig.out.num_towers = _num_towers;
550 state->orig.out.towers = _towers;
552 /* Result */
553 ZERO_STRUCT(state->orig.out.result);
555 if (DEBUGLEVEL >= 10) {
556 NDR_PRINT_IN_DEBUG(epm_Map, &state->orig);
559 state->out_mem_ctx = talloc_named_const(state, 0,
560 "rpccli_epm_Map_out_memory");
561 if (tevent_req_nomem(state->out_mem_ctx, req)) {
562 return tevent_req_post(req, ev);
565 /* make a temporary copy, that we pass to the dispatch function */
566 state->tmp = state->orig;
568 subreq = cli->dispatch_send(state, ev, cli,
569 &ndr_table_epmapper,
570 NDR_EPM_MAP,
571 &state->tmp);
572 if (tevent_req_nomem(subreq, req)) {
573 return tevent_req_post(req, ev);
575 tevent_req_set_callback(subreq, rpccli_epm_Map_done, req);
576 return req;
579 static void rpccli_epm_Map_done(struct tevent_req *subreq)
581 struct tevent_req *req = tevent_req_callback_data(
582 subreq, struct tevent_req);
583 struct rpccli_epm_Map_state *state = tevent_req_data(
584 req, struct rpccli_epm_Map_state);
585 NTSTATUS status;
586 TALLOC_CTX *mem_ctx;
588 if (state->out_mem_ctx) {
589 mem_ctx = state->out_mem_ctx;
590 } else {
591 mem_ctx = state;
594 status = state->dispatch_recv(subreq, mem_ctx);
595 TALLOC_FREE(subreq);
596 if (!NT_STATUS_IS_OK(status)) {
597 tevent_req_nterror(req, status);
598 return;
601 /* Copy out parameters */
602 *state->orig.out.entry_handle = *state->tmp.out.entry_handle;
603 *state->orig.out.num_towers = *state->tmp.out.num_towers;
604 memcpy(state->orig.out.towers, state->tmp.out.towers, state->tmp.in.max_towers * sizeof(*state->orig.out.towers));
606 /* Copy result */
607 state->orig.out.result = state->tmp.out.result;
609 /* Reset temporary structure */
610 ZERO_STRUCT(state->tmp);
612 if (DEBUGLEVEL >= 10) {
613 NDR_PRINT_OUT_DEBUG(epm_Map, &state->orig);
616 tevent_req_done(req);
619 NTSTATUS rpccli_epm_Map_recv(struct tevent_req *req,
620 TALLOC_CTX *mem_ctx,
621 uint32 *result)
623 struct rpccli_epm_Map_state *state = tevent_req_data(
624 req, struct rpccli_epm_Map_state);
625 NTSTATUS status;
627 if (tevent_req_is_nterror(req, &status)) {
628 tevent_req_received(req);
629 return status;
632 /* Steal possbile out parameters to the callers context */
633 talloc_steal(mem_ctx, state->out_mem_ctx);
635 /* Return result */
636 *result = state->orig.out.result;
638 tevent_req_received(req);
639 return NT_STATUS_OK;
642 NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli,
643 TALLOC_CTX *mem_ctx,
644 struct GUID *object /* [in] [ptr] */,
645 struct epm_twr_t *map_tower /* [in] [ptr] */,
646 struct policy_handle *entry_handle /* [in,out] [ref] */,
647 uint32_t max_towers /* [in] */,
648 uint32_t *num_towers /* [out] [ref] */,
649 struct epm_twr_p_t *towers /* [out] [length_is(*num_towers),size_is(max_towers)] */)
651 struct epm_Map r;
652 NTSTATUS status;
654 /* In parameters */
655 r.in.object = object;
656 r.in.map_tower = map_tower;
657 r.in.entry_handle = entry_handle;
658 r.in.max_towers = max_towers;
660 if (DEBUGLEVEL >= 10) {
661 NDR_PRINT_IN_DEBUG(epm_Map, &r);
664 status = cli->dispatch(cli,
665 mem_ctx,
666 &ndr_table_epmapper,
667 NDR_EPM_MAP,
668 &r);
670 if (!NT_STATUS_IS_OK(status)) {
671 return status;
674 if (DEBUGLEVEL >= 10) {
675 NDR_PRINT_OUT_DEBUG(epm_Map, &r);
678 if (NT_STATUS_IS_ERR(status)) {
679 return status;
682 /* Return variables */
683 *entry_handle = *r.out.entry_handle;
684 *num_towers = *r.out.num_towers;
685 memcpy(towers, r.out.towers, r.in.max_towers * sizeof(*towers));
687 /* Return result */
688 return NT_STATUS_OK;
691 struct rpccli_epm_LookupHandleFree_state {
692 struct epm_LookupHandleFree orig;
693 struct epm_LookupHandleFree tmp;
694 TALLOC_CTX *out_mem_ctx;
695 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
698 static void rpccli_epm_LookupHandleFree_done(struct tevent_req *subreq);
700 struct tevent_req *rpccli_epm_LookupHandleFree_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 struct rpc_pipe_client *cli,
703 struct policy_handle *_entry_handle /* [in,out] [ref] */)
705 struct tevent_req *req;
706 struct rpccli_epm_LookupHandleFree_state *state;
707 struct tevent_req *subreq;
709 req = tevent_req_create(mem_ctx, &state,
710 struct rpccli_epm_LookupHandleFree_state);
711 if (req == NULL) {
712 return NULL;
714 state->out_mem_ctx = NULL;
715 state->dispatch_recv = cli->dispatch_recv;
717 /* In parameters */
718 state->orig.in.entry_handle = _entry_handle;
720 /* Out parameters */
721 state->orig.out.entry_handle = _entry_handle;
723 /* Result */
724 ZERO_STRUCT(state->orig.out.result);
726 if (DEBUGLEVEL >= 10) {
727 NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, &state->orig);
730 state->out_mem_ctx = talloc_named_const(state, 0,
731 "rpccli_epm_LookupHandleFree_out_memory");
732 if (tevent_req_nomem(state->out_mem_ctx, req)) {
733 return tevent_req_post(req, ev);
736 /* make a temporary copy, that we pass to the dispatch function */
737 state->tmp = state->orig;
739 subreq = cli->dispatch_send(state, ev, cli,
740 &ndr_table_epmapper,
741 NDR_EPM_LOOKUPHANDLEFREE,
742 &state->tmp);
743 if (tevent_req_nomem(subreq, req)) {
744 return tevent_req_post(req, ev);
746 tevent_req_set_callback(subreq, rpccli_epm_LookupHandleFree_done, req);
747 return req;
750 static void rpccli_epm_LookupHandleFree_done(struct tevent_req *subreq)
752 struct tevent_req *req = tevent_req_callback_data(
753 subreq, struct tevent_req);
754 struct rpccli_epm_LookupHandleFree_state *state = tevent_req_data(
755 req, struct rpccli_epm_LookupHandleFree_state);
756 NTSTATUS status;
757 TALLOC_CTX *mem_ctx;
759 if (state->out_mem_ctx) {
760 mem_ctx = state->out_mem_ctx;
761 } else {
762 mem_ctx = state;
765 status = state->dispatch_recv(subreq, mem_ctx);
766 TALLOC_FREE(subreq);
767 if (!NT_STATUS_IS_OK(status)) {
768 tevent_req_nterror(req, status);
769 return;
772 /* Copy out parameters */
773 *state->orig.out.entry_handle = *state->tmp.out.entry_handle;
775 /* Copy result */
776 state->orig.out.result = state->tmp.out.result;
778 /* Reset temporary structure */
779 ZERO_STRUCT(state->tmp);
781 if (DEBUGLEVEL >= 10) {
782 NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, &state->orig);
785 tevent_req_done(req);
788 NTSTATUS rpccli_epm_LookupHandleFree_recv(struct tevent_req *req,
789 TALLOC_CTX *mem_ctx,
790 uint32 *result)
792 struct rpccli_epm_LookupHandleFree_state *state = tevent_req_data(
793 req, struct rpccli_epm_LookupHandleFree_state);
794 NTSTATUS status;
796 if (tevent_req_is_nterror(req, &status)) {
797 tevent_req_received(req);
798 return status;
801 /* Steal possbile out parameters to the callers context */
802 talloc_steal(mem_ctx, state->out_mem_ctx);
804 /* Return result */
805 *result = state->orig.out.result;
807 tevent_req_received(req);
808 return NT_STATUS_OK;
811 NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli,
812 TALLOC_CTX *mem_ctx,
813 struct policy_handle *entry_handle /* [in,out] [ref] */)
815 struct epm_LookupHandleFree r;
816 NTSTATUS status;
818 /* In parameters */
819 r.in.entry_handle = entry_handle;
821 if (DEBUGLEVEL >= 10) {
822 NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, &r);
825 status = cli->dispatch(cli,
826 mem_ctx,
827 &ndr_table_epmapper,
828 NDR_EPM_LOOKUPHANDLEFREE,
829 &r);
831 if (!NT_STATUS_IS_OK(status)) {
832 return status;
835 if (DEBUGLEVEL >= 10) {
836 NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, &r);
839 if (NT_STATUS_IS_ERR(status)) {
840 return status;
843 /* Return variables */
844 *entry_handle = *r.out.entry_handle;
846 /* Return result */
847 return NT_STATUS_OK;
850 struct rpccli_epm_InqObject_state {
851 struct epm_InqObject orig;
852 struct epm_InqObject tmp;
853 TALLOC_CTX *out_mem_ctx;
854 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
857 static void rpccli_epm_InqObject_done(struct tevent_req *subreq);
859 struct tevent_req *rpccli_epm_InqObject_send(TALLOC_CTX *mem_ctx,
860 struct tevent_context *ev,
861 struct rpc_pipe_client *cli,
862 struct GUID *_epm_object /* [in] [ref] */)
864 struct tevent_req *req;
865 struct rpccli_epm_InqObject_state *state;
866 struct tevent_req *subreq;
868 req = tevent_req_create(mem_ctx, &state,
869 struct rpccli_epm_InqObject_state);
870 if (req == NULL) {
871 return NULL;
873 state->out_mem_ctx = NULL;
874 state->dispatch_recv = cli->dispatch_recv;
876 /* In parameters */
877 state->orig.in.epm_object = _epm_object;
879 /* Out parameters */
881 /* Result */
882 ZERO_STRUCT(state->orig.out.result);
884 if (DEBUGLEVEL >= 10) {
885 NDR_PRINT_IN_DEBUG(epm_InqObject, &state->orig);
888 /* make a temporary copy, that we pass to the dispatch function */
889 state->tmp = state->orig;
891 subreq = cli->dispatch_send(state, ev, cli,
892 &ndr_table_epmapper,
893 NDR_EPM_INQOBJECT,
894 &state->tmp);
895 if (tevent_req_nomem(subreq, req)) {
896 return tevent_req_post(req, ev);
898 tevent_req_set_callback(subreq, rpccli_epm_InqObject_done, req);
899 return req;
902 static void rpccli_epm_InqObject_done(struct tevent_req *subreq)
904 struct tevent_req *req = tevent_req_callback_data(
905 subreq, struct tevent_req);
906 struct rpccli_epm_InqObject_state *state = tevent_req_data(
907 req, struct rpccli_epm_InqObject_state);
908 NTSTATUS status;
909 TALLOC_CTX *mem_ctx;
911 if (state->out_mem_ctx) {
912 mem_ctx = state->out_mem_ctx;
913 } else {
914 mem_ctx = state;
917 status = state->dispatch_recv(subreq, mem_ctx);
918 TALLOC_FREE(subreq);
919 if (!NT_STATUS_IS_OK(status)) {
920 tevent_req_nterror(req, status);
921 return;
924 /* Copy out parameters */
926 /* Copy result */
927 state->orig.out.result = state->tmp.out.result;
929 /* Reset temporary structure */
930 ZERO_STRUCT(state->tmp);
932 if (DEBUGLEVEL >= 10) {
933 NDR_PRINT_OUT_DEBUG(epm_InqObject, &state->orig);
936 tevent_req_done(req);
939 NTSTATUS rpccli_epm_InqObject_recv(struct tevent_req *req,
940 TALLOC_CTX *mem_ctx,
941 uint32 *result)
943 struct rpccli_epm_InqObject_state *state = tevent_req_data(
944 req, struct rpccli_epm_InqObject_state);
945 NTSTATUS status;
947 if (tevent_req_is_nterror(req, &status)) {
948 tevent_req_received(req);
949 return status;
952 /* Steal possbile out parameters to the callers context */
953 talloc_steal(mem_ctx, state->out_mem_ctx);
955 /* Return result */
956 *result = state->orig.out.result;
958 tevent_req_received(req);
959 return NT_STATUS_OK;
962 NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli,
963 TALLOC_CTX *mem_ctx,
964 struct GUID *epm_object /* [in] [ref] */)
966 struct epm_InqObject r;
967 NTSTATUS status;
969 /* In parameters */
970 r.in.epm_object = epm_object;
972 if (DEBUGLEVEL >= 10) {
973 NDR_PRINT_IN_DEBUG(epm_InqObject, &r);
976 status = cli->dispatch(cli,
977 mem_ctx,
978 &ndr_table_epmapper,
979 NDR_EPM_INQOBJECT,
980 &r);
982 if (!NT_STATUS_IS_OK(status)) {
983 return status;
986 if (DEBUGLEVEL >= 10) {
987 NDR_PRINT_OUT_DEBUG(epm_InqObject, &r);
990 if (NT_STATUS_IS_ERR(status)) {
991 return status;
994 /* Return variables */
996 /* Return result */
997 return NT_STATUS_OK;
1000 struct rpccli_epm_MgmtDelete_state {
1001 struct epm_MgmtDelete orig;
1002 struct epm_MgmtDelete tmp;
1003 TALLOC_CTX *out_mem_ctx;
1004 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1007 static void rpccli_epm_MgmtDelete_done(struct tevent_req *subreq);
1009 struct tevent_req *rpccli_epm_MgmtDelete_send(TALLOC_CTX *mem_ctx,
1010 struct tevent_context *ev,
1011 struct rpc_pipe_client *cli,
1012 uint32_t _object_speced /* [in] */,
1013 struct GUID *_object /* [in] [ptr] */,
1014 struct epm_twr_t *_tower /* [in] [ptr] */)
1016 struct tevent_req *req;
1017 struct rpccli_epm_MgmtDelete_state *state;
1018 struct tevent_req *subreq;
1020 req = tevent_req_create(mem_ctx, &state,
1021 struct rpccli_epm_MgmtDelete_state);
1022 if (req == NULL) {
1023 return NULL;
1025 state->out_mem_ctx = NULL;
1026 state->dispatch_recv = cli->dispatch_recv;
1028 /* In parameters */
1029 state->orig.in.object_speced = _object_speced;
1030 state->orig.in.object = _object;
1031 state->orig.in.tower = _tower;
1033 /* Out parameters */
1035 /* Result */
1036 ZERO_STRUCT(state->orig.out.result);
1038 if (DEBUGLEVEL >= 10) {
1039 NDR_PRINT_IN_DEBUG(epm_MgmtDelete, &state->orig);
1042 /* make a temporary copy, that we pass to the dispatch function */
1043 state->tmp = state->orig;
1045 subreq = cli->dispatch_send(state, ev, cli,
1046 &ndr_table_epmapper,
1047 NDR_EPM_MGMTDELETE,
1048 &state->tmp);
1049 if (tevent_req_nomem(subreq, req)) {
1050 return tevent_req_post(req, ev);
1052 tevent_req_set_callback(subreq, rpccli_epm_MgmtDelete_done, req);
1053 return req;
1056 static void rpccli_epm_MgmtDelete_done(struct tevent_req *subreq)
1058 struct tevent_req *req = tevent_req_callback_data(
1059 subreq, struct tevent_req);
1060 struct rpccli_epm_MgmtDelete_state *state = tevent_req_data(
1061 req, struct rpccli_epm_MgmtDelete_state);
1062 NTSTATUS status;
1063 TALLOC_CTX *mem_ctx;
1065 if (state->out_mem_ctx) {
1066 mem_ctx = state->out_mem_ctx;
1067 } else {
1068 mem_ctx = state;
1071 status = state->dispatch_recv(subreq, mem_ctx);
1072 TALLOC_FREE(subreq);
1073 if (!NT_STATUS_IS_OK(status)) {
1074 tevent_req_nterror(req, status);
1075 return;
1078 /* Copy out parameters */
1080 /* Copy result */
1081 state->orig.out.result = state->tmp.out.result;
1083 /* Reset temporary structure */
1084 ZERO_STRUCT(state->tmp);
1086 if (DEBUGLEVEL >= 10) {
1087 NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, &state->orig);
1090 tevent_req_done(req);
1093 NTSTATUS rpccli_epm_MgmtDelete_recv(struct tevent_req *req,
1094 TALLOC_CTX *mem_ctx,
1095 uint32 *result)
1097 struct rpccli_epm_MgmtDelete_state *state = tevent_req_data(
1098 req, struct rpccli_epm_MgmtDelete_state);
1099 NTSTATUS status;
1101 if (tevent_req_is_nterror(req, &status)) {
1102 tevent_req_received(req);
1103 return status;
1106 /* Steal possbile out parameters to the callers context */
1107 talloc_steal(mem_ctx, state->out_mem_ctx);
1109 /* Return result */
1110 *result = state->orig.out.result;
1112 tevent_req_received(req);
1113 return NT_STATUS_OK;
1116 NTSTATUS rpccli_epm_MgmtDelete(struct rpc_pipe_client *cli,
1117 TALLOC_CTX *mem_ctx,
1118 uint32_t object_speced /* [in] */,
1119 struct GUID *object /* [in] [ptr] */,
1120 struct epm_twr_t *tower /* [in] [ptr] */)
1122 struct epm_MgmtDelete r;
1123 NTSTATUS status;
1125 /* In parameters */
1126 r.in.object_speced = object_speced;
1127 r.in.object = object;
1128 r.in.tower = tower;
1130 if (DEBUGLEVEL >= 10) {
1131 NDR_PRINT_IN_DEBUG(epm_MgmtDelete, &r);
1134 status = cli->dispatch(cli,
1135 mem_ctx,
1136 &ndr_table_epmapper,
1137 NDR_EPM_MGMTDELETE,
1138 &r);
1140 if (!NT_STATUS_IS_OK(status)) {
1141 return status;
1144 if (DEBUGLEVEL >= 10) {
1145 NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, &r);
1148 if (NT_STATUS_IS_ERR(status)) {
1149 return status;
1152 /* Return variables */
1154 /* Return result */
1155 return NT_STATUS_OK;
1158 struct rpccli_epm_MapAuth_state {
1159 struct epm_MapAuth orig;
1160 struct epm_MapAuth tmp;
1161 TALLOC_CTX *out_mem_ctx;
1162 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1165 static void rpccli_epm_MapAuth_done(struct tevent_req *subreq);
1167 struct tevent_req *rpccli_epm_MapAuth_send(TALLOC_CTX *mem_ctx,
1168 struct tevent_context *ev,
1169 struct rpc_pipe_client *cli)
1171 struct tevent_req *req;
1172 struct rpccli_epm_MapAuth_state *state;
1173 struct tevent_req *subreq;
1175 req = tevent_req_create(mem_ctx, &state,
1176 struct rpccli_epm_MapAuth_state);
1177 if (req == NULL) {
1178 return NULL;
1180 state->out_mem_ctx = NULL;
1181 state->dispatch_recv = cli->dispatch_recv;
1183 /* In parameters */
1185 /* Out parameters */
1187 /* Result */
1188 ZERO_STRUCT(state->orig.out.result);
1190 if (DEBUGLEVEL >= 10) {
1191 NDR_PRINT_IN_DEBUG(epm_MapAuth, &state->orig);
1194 /* make a temporary copy, that we pass to the dispatch function */
1195 state->tmp = state->orig;
1197 subreq = cli->dispatch_send(state, ev, cli,
1198 &ndr_table_epmapper,
1199 NDR_EPM_MAPAUTH,
1200 &state->tmp);
1201 if (tevent_req_nomem(subreq, req)) {
1202 return tevent_req_post(req, ev);
1204 tevent_req_set_callback(subreq, rpccli_epm_MapAuth_done, req);
1205 return req;
1208 static void rpccli_epm_MapAuth_done(struct tevent_req *subreq)
1210 struct tevent_req *req = tevent_req_callback_data(
1211 subreq, struct tevent_req);
1212 struct rpccli_epm_MapAuth_state *state = tevent_req_data(
1213 req, struct rpccli_epm_MapAuth_state);
1214 NTSTATUS status;
1215 TALLOC_CTX *mem_ctx;
1217 if (state->out_mem_ctx) {
1218 mem_ctx = state->out_mem_ctx;
1219 } else {
1220 mem_ctx = state;
1223 status = state->dispatch_recv(subreq, mem_ctx);
1224 TALLOC_FREE(subreq);
1225 if (!NT_STATUS_IS_OK(status)) {
1226 tevent_req_nterror(req, status);
1227 return;
1230 /* Copy out parameters */
1232 /* Copy result */
1233 state->orig.out.result = state->tmp.out.result;
1235 /* Reset temporary structure */
1236 ZERO_STRUCT(state->tmp);
1238 if (DEBUGLEVEL >= 10) {
1239 NDR_PRINT_OUT_DEBUG(epm_MapAuth, &state->orig);
1242 tevent_req_done(req);
1245 NTSTATUS rpccli_epm_MapAuth_recv(struct tevent_req *req,
1246 TALLOC_CTX *mem_ctx,
1247 uint32 *result)
1249 struct rpccli_epm_MapAuth_state *state = tevent_req_data(
1250 req, struct rpccli_epm_MapAuth_state);
1251 NTSTATUS status;
1253 if (tevent_req_is_nterror(req, &status)) {
1254 tevent_req_received(req);
1255 return status;
1258 /* Steal possbile out parameters to the callers context */
1259 talloc_steal(mem_ctx, state->out_mem_ctx);
1261 /* Return result */
1262 *result = state->orig.out.result;
1264 tevent_req_received(req);
1265 return NT_STATUS_OK;
1268 NTSTATUS rpccli_epm_MapAuth(struct rpc_pipe_client *cli,
1269 TALLOC_CTX *mem_ctx)
1271 struct epm_MapAuth r;
1272 NTSTATUS status;
1274 /* In parameters */
1276 if (DEBUGLEVEL >= 10) {
1277 NDR_PRINT_IN_DEBUG(epm_MapAuth, &r);
1280 status = cli->dispatch(cli,
1281 mem_ctx,
1282 &ndr_table_epmapper,
1283 NDR_EPM_MAPAUTH,
1284 &r);
1286 if (!NT_STATUS_IS_OK(status)) {
1287 return status;
1290 if (DEBUGLEVEL >= 10) {
1291 NDR_PRINT_OUT_DEBUG(epm_MapAuth, &r);
1294 if (NT_STATUS_IS_ERR(status)) {
1295 return status;
1298 /* Return variables */
1300 /* Return result */
1301 return NT_STATUS_OK;