1 /* client functions auto-generated by pidl */
5 #include "lib/util/tevent_ntstatus.h"
6 #include "bin/default/librpc/gen_ndr/ndr_fsrvp.h"
7 #include "bin/default/librpc/gen_ndr/ndr_fsrvp_c.h"
9 /* FileServerVssAgent - client functions generated by pidl */
11 struct dcerpc_fss_GetSupportedVersion_r_state {
12 TALLOC_CTX *out_mem_ctx;
15 static void dcerpc_fss_GetSupportedVersion_r_done(struct tevent_req *subreq);
17 struct tevent_req *dcerpc_fss_GetSupportedVersion_r_send(TALLOC_CTX *mem_ctx,
18 struct tevent_context *ev,
19 struct dcerpc_binding_handle *h,
20 struct fss_GetSupportedVersion *r)
22 struct tevent_req *req;
23 struct dcerpc_fss_GetSupportedVersion_r_state *state;
24 struct tevent_req *subreq;
26 req = tevent_req_create(mem_ctx, &state,
27 struct dcerpc_fss_GetSupportedVersion_r_state);
32 state->out_mem_ctx = talloc_new(state);
33 if (tevent_req_nomem(state->out_mem_ctx, req)) {
34 return tevent_req_post(req, ev);
37 subreq = dcerpc_binding_handle_call_send(state, ev, h,
38 NULL, &ndr_table_FileServerVssAgent,
39 NDR_FSS_GETSUPPORTEDVERSION, state->out_mem_ctx, r);
40 if (tevent_req_nomem(subreq, req)) {
41 return tevent_req_post(req, ev);
43 tevent_req_set_callback(subreq, dcerpc_fss_GetSupportedVersion_r_done, req);
48 static void dcerpc_fss_GetSupportedVersion_r_done(struct tevent_req *subreq)
50 struct tevent_req *req =
51 tevent_req_callback_data(subreq,
55 status = dcerpc_binding_handle_call_recv(subreq);
57 if (tevent_req_nterror(req, status)) {
64 NTSTATUS dcerpc_fss_GetSupportedVersion_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
66 struct dcerpc_fss_GetSupportedVersion_r_state *state =
68 struct dcerpc_fss_GetSupportedVersion_r_state);
71 if (tevent_req_is_nterror(req, &status)) {
72 tevent_req_received(req);
76 talloc_steal(mem_ctx, state->out_mem_ctx);
78 tevent_req_received(req);
82 NTSTATUS dcerpc_fss_GetSupportedVersion_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_GetSupportedVersion *r)
86 status = dcerpc_binding_handle_call(h,
87 NULL, &ndr_table_FileServerVssAgent,
88 NDR_FSS_GETSUPPORTEDVERSION, mem_ctx, r);
93 struct dcerpc_fss_GetSupportedVersion_state {
94 struct fss_GetSupportedVersion orig;
95 struct fss_GetSupportedVersion tmp;
96 TALLOC_CTX *out_mem_ctx;
99 static void dcerpc_fss_GetSupportedVersion_done(struct tevent_req *subreq);
101 struct tevent_req *dcerpc_fss_GetSupportedVersion_send(TALLOC_CTX *mem_ctx,
102 struct tevent_context *ev,
103 struct dcerpc_binding_handle *h,
104 uint8_t _magic[52] /* [in] */,
105 uint32_t *_MinVersion /* [out] [ref] */,
106 uint32_t *_MaxVersion /* [out] [ref] */)
108 struct tevent_req *req;
109 struct dcerpc_fss_GetSupportedVersion_state *state;
110 struct tevent_req *subreq;
112 req = tevent_req_create(mem_ctx, &state,
113 struct dcerpc_fss_GetSupportedVersion_state);
117 state->out_mem_ctx = NULL;
120 memcpy(state->orig.in.magic, _magic, sizeof(state->orig.in.magic));
123 state->orig.out.MinVersion = _MinVersion;
124 state->orig.out.MaxVersion = _MaxVersion;
127 ZERO_STRUCT(state->orig.out.result);
129 state->out_mem_ctx = talloc_named_const(state, 0,
130 "dcerpc_fss_GetSupportedVersion_out_memory");
131 if (tevent_req_nomem(state->out_mem_ctx, req)) {
132 return tevent_req_post(req, ev);
135 /* make a temporary copy, that we pass to the dispatch function */
136 state->tmp = state->orig;
138 subreq = dcerpc_fss_GetSupportedVersion_r_send(state, ev, h, &state->tmp);
139 if (tevent_req_nomem(subreq, req)) {
140 return tevent_req_post(req, ev);
142 tevent_req_set_callback(subreq, dcerpc_fss_GetSupportedVersion_done, req);
146 static void dcerpc_fss_GetSupportedVersion_done(struct tevent_req *subreq)
148 struct tevent_req *req = tevent_req_callback_data(
149 subreq, struct tevent_req);
150 struct dcerpc_fss_GetSupportedVersion_state *state = tevent_req_data(
151 req, struct dcerpc_fss_GetSupportedVersion_state);
155 if (state->out_mem_ctx) {
156 mem_ctx = state->out_mem_ctx;
161 status = dcerpc_fss_GetSupportedVersion_r_recv(subreq, mem_ctx);
163 if (tevent_req_nterror(req, status)) {
167 /* Copy out parameters */
168 *state->orig.out.MinVersion = *state->tmp.out.MinVersion;
169 *state->orig.out.MaxVersion = *state->tmp.out.MaxVersion;
172 state->orig.out.result = state->tmp.out.result;
174 /* Reset temporary structure */
175 ZERO_STRUCT(state->tmp);
177 tevent_req_done(req);
180 NTSTATUS dcerpc_fss_GetSupportedVersion_recv(struct tevent_req *req,
184 struct dcerpc_fss_GetSupportedVersion_state *state = tevent_req_data(
185 req, struct dcerpc_fss_GetSupportedVersion_state);
188 if (tevent_req_is_nterror(req, &status)) {
189 tevent_req_received(req);
193 /* Steal possible out parameters to the callers context */
194 talloc_steal(mem_ctx, state->out_mem_ctx);
197 *result = state->orig.out.result;
199 tevent_req_received(req);
203 NTSTATUS dcerpc_fss_GetSupportedVersion(struct dcerpc_binding_handle *h,
205 uint8_t _magic[52] /* [in] */,
206 uint32_t *_MinVersion /* [out] [ref] */,
207 uint32_t *_MaxVersion /* [out] [ref] */,
210 struct fss_GetSupportedVersion r;
214 memcpy(r.in.magic, _magic, sizeof(r.in.magic));
216 status = dcerpc_fss_GetSupportedVersion_r(h, mem_ctx, &r);
217 if (!NT_STATUS_IS_OK(status)) {
221 /* Return variables */
222 *_MinVersion = *r.out.MinVersion;
223 *_MaxVersion = *r.out.MaxVersion;
226 *result = r.out.result;
231 struct dcerpc_fss_SetContext_r_state {
232 TALLOC_CTX *out_mem_ctx;
235 static void dcerpc_fss_SetContext_r_done(struct tevent_req *subreq);
237 struct tevent_req *dcerpc_fss_SetContext_r_send(TALLOC_CTX *mem_ctx,
238 struct tevent_context *ev,
239 struct dcerpc_binding_handle *h,
240 struct fss_SetContext *r)
242 struct tevent_req *req;
243 struct dcerpc_fss_SetContext_r_state *state;
244 struct tevent_req *subreq;
246 req = tevent_req_create(mem_ctx, &state,
247 struct dcerpc_fss_SetContext_r_state);
252 state->out_mem_ctx = NULL;
254 subreq = dcerpc_binding_handle_call_send(state, ev, h,
255 NULL, &ndr_table_FileServerVssAgent,
256 NDR_FSS_SETCONTEXT, state, r);
257 if (tevent_req_nomem(subreq, req)) {
258 return tevent_req_post(req, ev);
260 tevent_req_set_callback(subreq, dcerpc_fss_SetContext_r_done, req);
265 static void dcerpc_fss_SetContext_r_done(struct tevent_req *subreq)
267 struct tevent_req *req =
268 tevent_req_callback_data(subreq,
272 status = dcerpc_binding_handle_call_recv(subreq);
274 if (tevent_req_nterror(req, status)) {
278 tevent_req_done(req);
281 NTSTATUS dcerpc_fss_SetContext_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
283 struct dcerpc_fss_SetContext_r_state *state =
285 struct dcerpc_fss_SetContext_r_state);
288 if (tevent_req_is_nterror(req, &status)) {
289 tevent_req_received(req);
293 talloc_steal(mem_ctx, state->out_mem_ctx);
295 tevent_req_received(req);
299 NTSTATUS dcerpc_fss_SetContext_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_SetContext *r)
303 status = dcerpc_binding_handle_call(h,
304 NULL, &ndr_table_FileServerVssAgent,
305 NDR_FSS_SETCONTEXT, mem_ctx, r);
310 struct dcerpc_fss_SetContext_state {
311 struct fss_SetContext orig;
312 struct fss_SetContext tmp;
313 TALLOC_CTX *out_mem_ctx;
316 static void dcerpc_fss_SetContext_done(struct tevent_req *subreq);
318 struct tevent_req *dcerpc_fss_SetContext_send(TALLOC_CTX *mem_ctx,
319 struct tevent_context *ev,
320 struct dcerpc_binding_handle *h,
321 uint32_t _Context /* [in] */)
323 struct tevent_req *req;
324 struct dcerpc_fss_SetContext_state *state;
325 struct tevent_req *subreq;
327 req = tevent_req_create(mem_ctx, &state,
328 struct dcerpc_fss_SetContext_state);
332 state->out_mem_ctx = NULL;
335 state->orig.in.Context = _Context;
340 ZERO_STRUCT(state->orig.out.result);
342 /* make a temporary copy, that we pass to the dispatch function */
343 state->tmp = state->orig;
345 subreq = dcerpc_fss_SetContext_r_send(state, ev, h, &state->tmp);
346 if (tevent_req_nomem(subreq, req)) {
347 return tevent_req_post(req, ev);
349 tevent_req_set_callback(subreq, dcerpc_fss_SetContext_done, req);
353 static void dcerpc_fss_SetContext_done(struct tevent_req *subreq)
355 struct tevent_req *req = tevent_req_callback_data(
356 subreq, struct tevent_req);
357 struct dcerpc_fss_SetContext_state *state = tevent_req_data(
358 req, struct dcerpc_fss_SetContext_state);
362 if (state->out_mem_ctx) {
363 mem_ctx = state->out_mem_ctx;
368 status = dcerpc_fss_SetContext_r_recv(subreq, mem_ctx);
370 if (tevent_req_nterror(req, status)) {
374 /* Copy out parameters */
377 state->orig.out.result = state->tmp.out.result;
379 /* Reset temporary structure */
380 ZERO_STRUCT(state->tmp);
382 tevent_req_done(req);
385 NTSTATUS dcerpc_fss_SetContext_recv(struct tevent_req *req,
389 struct dcerpc_fss_SetContext_state *state = tevent_req_data(
390 req, struct dcerpc_fss_SetContext_state);
393 if (tevent_req_is_nterror(req, &status)) {
394 tevent_req_received(req);
398 /* Steal possible out parameters to the callers context */
399 talloc_steal(mem_ctx, state->out_mem_ctx);
402 *result = state->orig.out.result;
404 tevent_req_received(req);
408 NTSTATUS dcerpc_fss_SetContext(struct dcerpc_binding_handle *h,
410 uint32_t _Context /* [in] */,
413 struct fss_SetContext r;
417 r.in.Context = _Context;
419 status = dcerpc_fss_SetContext_r(h, mem_ctx, &r);
420 if (!NT_STATUS_IS_OK(status)) {
424 /* Return variables */
427 *result = r.out.result;
432 struct dcerpc_fss_StartShadowCopySet_r_state {
433 TALLOC_CTX *out_mem_ctx;
436 static void dcerpc_fss_StartShadowCopySet_r_done(struct tevent_req *subreq);
438 struct tevent_req *dcerpc_fss_StartShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
439 struct tevent_context *ev,
440 struct dcerpc_binding_handle *h,
441 struct fss_StartShadowCopySet *r)
443 struct tevent_req *req;
444 struct dcerpc_fss_StartShadowCopySet_r_state *state;
445 struct tevent_req *subreq;
447 req = tevent_req_create(mem_ctx, &state,
448 struct dcerpc_fss_StartShadowCopySet_r_state);
453 state->out_mem_ctx = talloc_new(state);
454 if (tevent_req_nomem(state->out_mem_ctx, req)) {
455 return tevent_req_post(req, ev);
458 subreq = dcerpc_binding_handle_call_send(state, ev, h,
459 NULL, &ndr_table_FileServerVssAgent,
460 NDR_FSS_STARTSHADOWCOPYSET, state->out_mem_ctx, r);
461 if (tevent_req_nomem(subreq, req)) {
462 return tevent_req_post(req, ev);
464 tevent_req_set_callback(subreq, dcerpc_fss_StartShadowCopySet_r_done, req);
469 static void dcerpc_fss_StartShadowCopySet_r_done(struct tevent_req *subreq)
471 struct tevent_req *req =
472 tevent_req_callback_data(subreq,
476 status = dcerpc_binding_handle_call_recv(subreq);
478 if (tevent_req_nterror(req, status)) {
482 tevent_req_done(req);
485 NTSTATUS dcerpc_fss_StartShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
487 struct dcerpc_fss_StartShadowCopySet_r_state *state =
489 struct dcerpc_fss_StartShadowCopySet_r_state);
492 if (tevent_req_is_nterror(req, &status)) {
493 tevent_req_received(req);
497 talloc_steal(mem_ctx, state->out_mem_ctx);
499 tevent_req_received(req);
503 NTSTATUS dcerpc_fss_StartShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_StartShadowCopySet *r)
507 status = dcerpc_binding_handle_call(h,
508 NULL, &ndr_table_FileServerVssAgent,
509 NDR_FSS_STARTSHADOWCOPYSET, mem_ctx, r);
514 struct dcerpc_fss_StartShadowCopySet_state {
515 struct fss_StartShadowCopySet orig;
516 struct fss_StartShadowCopySet tmp;
517 TALLOC_CTX *out_mem_ctx;
520 static void dcerpc_fss_StartShadowCopySet_done(struct tevent_req *subreq);
522 struct tevent_req *dcerpc_fss_StartShadowCopySet_send(TALLOC_CTX *mem_ctx,
523 struct tevent_context *ev,
524 struct dcerpc_binding_handle *h,
525 struct GUID _ClientShadowCopySetId /* [in] */,
526 struct GUID *_pShadowCopySetId /* [out] [ref] */)
528 struct tevent_req *req;
529 struct dcerpc_fss_StartShadowCopySet_state *state;
530 struct tevent_req *subreq;
532 req = tevent_req_create(mem_ctx, &state,
533 struct dcerpc_fss_StartShadowCopySet_state);
537 state->out_mem_ctx = NULL;
540 state->orig.in.ClientShadowCopySetId = _ClientShadowCopySetId;
543 state->orig.out.pShadowCopySetId = _pShadowCopySetId;
546 ZERO_STRUCT(state->orig.out.result);
548 state->out_mem_ctx = talloc_named_const(state, 0,
549 "dcerpc_fss_StartShadowCopySet_out_memory");
550 if (tevent_req_nomem(state->out_mem_ctx, req)) {
551 return tevent_req_post(req, ev);
554 /* make a temporary copy, that we pass to the dispatch function */
555 state->tmp = state->orig;
557 subreq = dcerpc_fss_StartShadowCopySet_r_send(state, ev, h, &state->tmp);
558 if (tevent_req_nomem(subreq, req)) {
559 return tevent_req_post(req, ev);
561 tevent_req_set_callback(subreq, dcerpc_fss_StartShadowCopySet_done, req);
565 static void dcerpc_fss_StartShadowCopySet_done(struct tevent_req *subreq)
567 struct tevent_req *req = tevent_req_callback_data(
568 subreq, struct tevent_req);
569 struct dcerpc_fss_StartShadowCopySet_state *state = tevent_req_data(
570 req, struct dcerpc_fss_StartShadowCopySet_state);
574 if (state->out_mem_ctx) {
575 mem_ctx = state->out_mem_ctx;
580 status = dcerpc_fss_StartShadowCopySet_r_recv(subreq, mem_ctx);
582 if (tevent_req_nterror(req, status)) {
586 /* Copy out parameters */
587 *state->orig.out.pShadowCopySetId = *state->tmp.out.pShadowCopySetId;
590 state->orig.out.result = state->tmp.out.result;
592 /* Reset temporary structure */
593 ZERO_STRUCT(state->tmp);
595 tevent_req_done(req);
598 NTSTATUS dcerpc_fss_StartShadowCopySet_recv(struct tevent_req *req,
602 struct dcerpc_fss_StartShadowCopySet_state *state = tevent_req_data(
603 req, struct dcerpc_fss_StartShadowCopySet_state);
606 if (tevent_req_is_nterror(req, &status)) {
607 tevent_req_received(req);
611 /* Steal possible out parameters to the callers context */
612 talloc_steal(mem_ctx, state->out_mem_ctx);
615 *result = state->orig.out.result;
617 tevent_req_received(req);
621 NTSTATUS dcerpc_fss_StartShadowCopySet(struct dcerpc_binding_handle *h,
623 struct GUID _ClientShadowCopySetId /* [in] */,
624 struct GUID *_pShadowCopySetId /* [out] [ref] */,
627 struct fss_StartShadowCopySet r;
631 r.in.ClientShadowCopySetId = _ClientShadowCopySetId;
633 status = dcerpc_fss_StartShadowCopySet_r(h, mem_ctx, &r);
634 if (!NT_STATUS_IS_OK(status)) {
638 /* Return variables */
639 *_pShadowCopySetId = *r.out.pShadowCopySetId;
642 *result = r.out.result;
647 struct dcerpc_fss_AddToShadowCopySet_r_state {
648 TALLOC_CTX *out_mem_ctx;
651 static void dcerpc_fss_AddToShadowCopySet_r_done(struct tevent_req *subreq);
653 struct tevent_req *dcerpc_fss_AddToShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
654 struct tevent_context *ev,
655 struct dcerpc_binding_handle *h,
656 struct fss_AddToShadowCopySet *r)
658 struct tevent_req *req;
659 struct dcerpc_fss_AddToShadowCopySet_r_state *state;
660 struct tevent_req *subreq;
662 req = tevent_req_create(mem_ctx, &state,
663 struct dcerpc_fss_AddToShadowCopySet_r_state);
668 state->out_mem_ctx = talloc_new(state);
669 if (tevent_req_nomem(state->out_mem_ctx, req)) {
670 return tevent_req_post(req, ev);
673 subreq = dcerpc_binding_handle_call_send(state, ev, h,
674 NULL, &ndr_table_FileServerVssAgent,
675 NDR_FSS_ADDTOSHADOWCOPYSET, state->out_mem_ctx, r);
676 if (tevent_req_nomem(subreq, req)) {
677 return tevent_req_post(req, ev);
679 tevent_req_set_callback(subreq, dcerpc_fss_AddToShadowCopySet_r_done, req);
684 static void dcerpc_fss_AddToShadowCopySet_r_done(struct tevent_req *subreq)
686 struct tevent_req *req =
687 tevent_req_callback_data(subreq,
691 status = dcerpc_binding_handle_call_recv(subreq);
693 if (tevent_req_nterror(req, status)) {
697 tevent_req_done(req);
700 NTSTATUS dcerpc_fss_AddToShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
702 struct dcerpc_fss_AddToShadowCopySet_r_state *state =
704 struct dcerpc_fss_AddToShadowCopySet_r_state);
707 if (tevent_req_is_nterror(req, &status)) {
708 tevent_req_received(req);
712 talloc_steal(mem_ctx, state->out_mem_ctx);
714 tevent_req_received(req);
718 NTSTATUS dcerpc_fss_AddToShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_AddToShadowCopySet *r)
722 status = dcerpc_binding_handle_call(h,
723 NULL, &ndr_table_FileServerVssAgent,
724 NDR_FSS_ADDTOSHADOWCOPYSET, mem_ctx, r);
729 struct dcerpc_fss_AddToShadowCopySet_state {
730 struct fss_AddToShadowCopySet orig;
731 struct fss_AddToShadowCopySet tmp;
732 TALLOC_CTX *out_mem_ctx;
735 static void dcerpc_fss_AddToShadowCopySet_done(struct tevent_req *subreq);
737 struct tevent_req *dcerpc_fss_AddToShadowCopySet_send(TALLOC_CTX *mem_ctx,
738 struct tevent_context *ev,
739 struct dcerpc_binding_handle *h,
740 struct GUID _ClientShadowCopyId /* [in] */,
741 struct GUID _ShadowCopySetId /* [in] */,
742 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
743 struct GUID *_pShadowCopyId /* [out] [ref] */)
745 struct tevent_req *req;
746 struct dcerpc_fss_AddToShadowCopySet_state *state;
747 struct tevent_req *subreq;
749 req = tevent_req_create(mem_ctx, &state,
750 struct dcerpc_fss_AddToShadowCopySet_state);
754 state->out_mem_ctx = NULL;
757 state->orig.in.ClientShadowCopyId = _ClientShadowCopyId;
758 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
759 state->orig.in.ShareName = _ShareName;
762 state->orig.out.pShadowCopyId = _pShadowCopyId;
765 ZERO_STRUCT(state->orig.out.result);
767 state->out_mem_ctx = talloc_named_const(state, 0,
768 "dcerpc_fss_AddToShadowCopySet_out_memory");
769 if (tevent_req_nomem(state->out_mem_ctx, req)) {
770 return tevent_req_post(req, ev);
773 /* make a temporary copy, that we pass to the dispatch function */
774 state->tmp = state->orig;
776 subreq = dcerpc_fss_AddToShadowCopySet_r_send(state, ev, h, &state->tmp);
777 if (tevent_req_nomem(subreq, req)) {
778 return tevent_req_post(req, ev);
780 tevent_req_set_callback(subreq, dcerpc_fss_AddToShadowCopySet_done, req);
784 static void dcerpc_fss_AddToShadowCopySet_done(struct tevent_req *subreq)
786 struct tevent_req *req = tevent_req_callback_data(
787 subreq, struct tevent_req);
788 struct dcerpc_fss_AddToShadowCopySet_state *state = tevent_req_data(
789 req, struct dcerpc_fss_AddToShadowCopySet_state);
793 if (state->out_mem_ctx) {
794 mem_ctx = state->out_mem_ctx;
799 status = dcerpc_fss_AddToShadowCopySet_r_recv(subreq, mem_ctx);
801 if (tevent_req_nterror(req, status)) {
805 /* Copy out parameters */
806 *state->orig.out.pShadowCopyId = *state->tmp.out.pShadowCopyId;
809 state->orig.out.result = state->tmp.out.result;
811 /* Reset temporary structure */
812 ZERO_STRUCT(state->tmp);
814 tevent_req_done(req);
817 NTSTATUS dcerpc_fss_AddToShadowCopySet_recv(struct tevent_req *req,
821 struct dcerpc_fss_AddToShadowCopySet_state *state = tevent_req_data(
822 req, struct dcerpc_fss_AddToShadowCopySet_state);
825 if (tevent_req_is_nterror(req, &status)) {
826 tevent_req_received(req);
830 /* Steal possible out parameters to the callers context */
831 talloc_steal(mem_ctx, state->out_mem_ctx);
834 *result = state->orig.out.result;
836 tevent_req_received(req);
840 NTSTATUS dcerpc_fss_AddToShadowCopySet(struct dcerpc_binding_handle *h,
842 struct GUID _ClientShadowCopyId /* [in] */,
843 struct GUID _ShadowCopySetId /* [in] */,
844 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
845 struct GUID *_pShadowCopyId /* [out] [ref] */,
848 struct fss_AddToShadowCopySet r;
852 r.in.ClientShadowCopyId = _ClientShadowCopyId;
853 r.in.ShadowCopySetId = _ShadowCopySetId;
854 r.in.ShareName = _ShareName;
856 status = dcerpc_fss_AddToShadowCopySet_r(h, mem_ctx, &r);
857 if (!NT_STATUS_IS_OK(status)) {
861 /* Return variables */
862 *_pShadowCopyId = *r.out.pShadowCopyId;
865 *result = r.out.result;
870 struct dcerpc_fss_CommitShadowCopySet_r_state {
871 TALLOC_CTX *out_mem_ctx;
874 static void dcerpc_fss_CommitShadowCopySet_r_done(struct tevent_req *subreq);
876 struct tevent_req *dcerpc_fss_CommitShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
877 struct tevent_context *ev,
878 struct dcerpc_binding_handle *h,
879 struct fss_CommitShadowCopySet *r)
881 struct tevent_req *req;
882 struct dcerpc_fss_CommitShadowCopySet_r_state *state;
883 struct tevent_req *subreq;
885 req = tevent_req_create(mem_ctx, &state,
886 struct dcerpc_fss_CommitShadowCopySet_r_state);
891 state->out_mem_ctx = NULL;
893 subreq = dcerpc_binding_handle_call_send(state, ev, h,
894 NULL, &ndr_table_FileServerVssAgent,
895 NDR_FSS_COMMITSHADOWCOPYSET, state, r);
896 if (tevent_req_nomem(subreq, req)) {
897 return tevent_req_post(req, ev);
899 tevent_req_set_callback(subreq, dcerpc_fss_CommitShadowCopySet_r_done, req);
904 static void dcerpc_fss_CommitShadowCopySet_r_done(struct tevent_req *subreq)
906 struct tevent_req *req =
907 tevent_req_callback_data(subreq,
911 status = dcerpc_binding_handle_call_recv(subreq);
913 if (tevent_req_nterror(req, status)) {
917 tevent_req_done(req);
920 NTSTATUS dcerpc_fss_CommitShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
922 struct dcerpc_fss_CommitShadowCopySet_r_state *state =
924 struct dcerpc_fss_CommitShadowCopySet_r_state);
927 if (tevent_req_is_nterror(req, &status)) {
928 tevent_req_received(req);
932 talloc_steal(mem_ctx, state->out_mem_ctx);
934 tevent_req_received(req);
938 NTSTATUS dcerpc_fss_CommitShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_CommitShadowCopySet *r)
942 status = dcerpc_binding_handle_call(h,
943 NULL, &ndr_table_FileServerVssAgent,
944 NDR_FSS_COMMITSHADOWCOPYSET, mem_ctx, r);
949 struct dcerpc_fss_CommitShadowCopySet_state {
950 struct fss_CommitShadowCopySet orig;
951 struct fss_CommitShadowCopySet tmp;
952 TALLOC_CTX *out_mem_ctx;
955 static void dcerpc_fss_CommitShadowCopySet_done(struct tevent_req *subreq);
957 struct tevent_req *dcerpc_fss_CommitShadowCopySet_send(TALLOC_CTX *mem_ctx,
958 struct tevent_context *ev,
959 struct dcerpc_binding_handle *h,
960 struct GUID _ShadowCopySetId /* [in] */,
961 uint32_t _TimeOutInMilliseconds /* [in] */)
963 struct tevent_req *req;
964 struct dcerpc_fss_CommitShadowCopySet_state *state;
965 struct tevent_req *subreq;
967 req = tevent_req_create(mem_ctx, &state,
968 struct dcerpc_fss_CommitShadowCopySet_state);
972 state->out_mem_ctx = NULL;
975 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
976 state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
981 ZERO_STRUCT(state->orig.out.result);
983 /* make a temporary copy, that we pass to the dispatch function */
984 state->tmp = state->orig;
986 subreq = dcerpc_fss_CommitShadowCopySet_r_send(state, ev, h, &state->tmp);
987 if (tevent_req_nomem(subreq, req)) {
988 return tevent_req_post(req, ev);
990 tevent_req_set_callback(subreq, dcerpc_fss_CommitShadowCopySet_done, req);
994 static void dcerpc_fss_CommitShadowCopySet_done(struct tevent_req *subreq)
996 struct tevent_req *req = tevent_req_callback_data(
997 subreq, struct tevent_req);
998 struct dcerpc_fss_CommitShadowCopySet_state *state = tevent_req_data(
999 req, struct dcerpc_fss_CommitShadowCopySet_state);
1001 TALLOC_CTX *mem_ctx;
1003 if (state->out_mem_ctx) {
1004 mem_ctx = state->out_mem_ctx;
1009 status = dcerpc_fss_CommitShadowCopySet_r_recv(subreq, mem_ctx);
1010 TALLOC_FREE(subreq);
1011 if (tevent_req_nterror(req, status)) {
1015 /* Copy out parameters */
1018 state->orig.out.result = state->tmp.out.result;
1020 /* Reset temporary structure */
1021 ZERO_STRUCT(state->tmp);
1023 tevent_req_done(req);
1026 NTSTATUS dcerpc_fss_CommitShadowCopySet_recv(struct tevent_req *req,
1027 TALLOC_CTX *mem_ctx,
1030 struct dcerpc_fss_CommitShadowCopySet_state *state = tevent_req_data(
1031 req, struct dcerpc_fss_CommitShadowCopySet_state);
1034 if (tevent_req_is_nterror(req, &status)) {
1035 tevent_req_received(req);
1039 /* Steal possible out parameters to the callers context */
1040 talloc_steal(mem_ctx, state->out_mem_ctx);
1043 *result = state->orig.out.result;
1045 tevent_req_received(req);
1046 return NT_STATUS_OK;
1049 NTSTATUS dcerpc_fss_CommitShadowCopySet(struct dcerpc_binding_handle *h,
1050 TALLOC_CTX *mem_ctx,
1051 struct GUID _ShadowCopySetId /* [in] */,
1052 uint32_t _TimeOutInMilliseconds /* [in] */,
1055 struct fss_CommitShadowCopySet r;
1059 r.in.ShadowCopySetId = _ShadowCopySetId;
1060 r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
1062 status = dcerpc_fss_CommitShadowCopySet_r(h, mem_ctx, &r);
1063 if (!NT_STATUS_IS_OK(status)) {
1067 /* Return variables */
1070 *result = r.out.result;
1072 return NT_STATUS_OK;
1075 struct dcerpc_fss_ExposeShadowCopySet_r_state {
1076 TALLOC_CTX *out_mem_ctx;
1079 static void dcerpc_fss_ExposeShadowCopySet_r_done(struct tevent_req *subreq);
1081 struct tevent_req *dcerpc_fss_ExposeShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
1082 struct tevent_context *ev,
1083 struct dcerpc_binding_handle *h,
1084 struct fss_ExposeShadowCopySet *r)
1086 struct tevent_req *req;
1087 struct dcerpc_fss_ExposeShadowCopySet_r_state *state;
1088 struct tevent_req *subreq;
1090 req = tevent_req_create(mem_ctx, &state,
1091 struct dcerpc_fss_ExposeShadowCopySet_r_state);
1096 state->out_mem_ctx = NULL;
1098 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1099 NULL, &ndr_table_FileServerVssAgent,
1100 NDR_FSS_EXPOSESHADOWCOPYSET, state, r);
1101 if (tevent_req_nomem(subreq, req)) {
1102 return tevent_req_post(req, ev);
1104 tevent_req_set_callback(subreq, dcerpc_fss_ExposeShadowCopySet_r_done, req);
1109 static void dcerpc_fss_ExposeShadowCopySet_r_done(struct tevent_req *subreq)
1111 struct tevent_req *req =
1112 tevent_req_callback_data(subreq,
1116 status = dcerpc_binding_handle_call_recv(subreq);
1117 TALLOC_FREE(subreq);
1118 if (tevent_req_nterror(req, status)) {
1122 tevent_req_done(req);
1125 NTSTATUS dcerpc_fss_ExposeShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1127 struct dcerpc_fss_ExposeShadowCopySet_r_state *state =
1128 tevent_req_data(req,
1129 struct dcerpc_fss_ExposeShadowCopySet_r_state);
1132 if (tevent_req_is_nterror(req, &status)) {
1133 tevent_req_received(req);
1137 talloc_steal(mem_ctx, state->out_mem_ctx);
1139 tevent_req_received(req);
1140 return NT_STATUS_OK;
1143 NTSTATUS dcerpc_fss_ExposeShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_ExposeShadowCopySet *r)
1147 status = dcerpc_binding_handle_call(h,
1148 NULL, &ndr_table_FileServerVssAgent,
1149 NDR_FSS_EXPOSESHADOWCOPYSET, mem_ctx, r);
1154 struct dcerpc_fss_ExposeShadowCopySet_state {
1155 struct fss_ExposeShadowCopySet orig;
1156 struct fss_ExposeShadowCopySet tmp;
1157 TALLOC_CTX *out_mem_ctx;
1160 static void dcerpc_fss_ExposeShadowCopySet_done(struct tevent_req *subreq);
1162 struct tevent_req *dcerpc_fss_ExposeShadowCopySet_send(TALLOC_CTX *mem_ctx,
1163 struct tevent_context *ev,
1164 struct dcerpc_binding_handle *h,
1165 struct GUID _ShadowCopySetId /* [in] */,
1166 uint32_t _TimeOutInMilliseconds /* [in] */)
1168 struct tevent_req *req;
1169 struct dcerpc_fss_ExposeShadowCopySet_state *state;
1170 struct tevent_req *subreq;
1172 req = tevent_req_create(mem_ctx, &state,
1173 struct dcerpc_fss_ExposeShadowCopySet_state);
1177 state->out_mem_ctx = NULL;
1180 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
1181 state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
1183 /* Out parameters */
1186 ZERO_STRUCT(state->orig.out.result);
1188 /* make a temporary copy, that we pass to the dispatch function */
1189 state->tmp = state->orig;
1191 subreq = dcerpc_fss_ExposeShadowCopySet_r_send(state, ev, h, &state->tmp);
1192 if (tevent_req_nomem(subreq, req)) {
1193 return tevent_req_post(req, ev);
1195 tevent_req_set_callback(subreq, dcerpc_fss_ExposeShadowCopySet_done, req);
1199 static void dcerpc_fss_ExposeShadowCopySet_done(struct tevent_req *subreq)
1201 struct tevent_req *req = tevent_req_callback_data(
1202 subreq, struct tevent_req);
1203 struct dcerpc_fss_ExposeShadowCopySet_state *state = tevent_req_data(
1204 req, struct dcerpc_fss_ExposeShadowCopySet_state);
1206 TALLOC_CTX *mem_ctx;
1208 if (state->out_mem_ctx) {
1209 mem_ctx = state->out_mem_ctx;
1214 status = dcerpc_fss_ExposeShadowCopySet_r_recv(subreq, mem_ctx);
1215 TALLOC_FREE(subreq);
1216 if (tevent_req_nterror(req, status)) {
1220 /* Copy out parameters */
1223 state->orig.out.result = state->tmp.out.result;
1225 /* Reset temporary structure */
1226 ZERO_STRUCT(state->tmp);
1228 tevent_req_done(req);
1231 NTSTATUS dcerpc_fss_ExposeShadowCopySet_recv(struct tevent_req *req,
1232 TALLOC_CTX *mem_ctx,
1235 struct dcerpc_fss_ExposeShadowCopySet_state *state = tevent_req_data(
1236 req, struct dcerpc_fss_ExposeShadowCopySet_state);
1239 if (tevent_req_is_nterror(req, &status)) {
1240 tevent_req_received(req);
1244 /* Steal possible out parameters to the callers context */
1245 talloc_steal(mem_ctx, state->out_mem_ctx);
1248 *result = state->orig.out.result;
1250 tevent_req_received(req);
1251 return NT_STATUS_OK;
1254 NTSTATUS dcerpc_fss_ExposeShadowCopySet(struct dcerpc_binding_handle *h,
1255 TALLOC_CTX *mem_ctx,
1256 struct GUID _ShadowCopySetId /* [in] */,
1257 uint32_t _TimeOutInMilliseconds /* [in] */,
1260 struct fss_ExposeShadowCopySet r;
1264 r.in.ShadowCopySetId = _ShadowCopySetId;
1265 r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
1267 status = dcerpc_fss_ExposeShadowCopySet_r(h, mem_ctx, &r);
1268 if (!NT_STATUS_IS_OK(status)) {
1272 /* Return variables */
1275 *result = r.out.result;
1277 return NT_STATUS_OK;
1280 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state {
1281 TALLOC_CTX *out_mem_ctx;
1284 static void dcerpc_fss_RecoveryCompleteShadowCopySet_r_done(struct tevent_req *subreq);
1286 struct tevent_req *dcerpc_fss_RecoveryCompleteShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
1287 struct tevent_context *ev,
1288 struct dcerpc_binding_handle *h,
1289 struct fss_RecoveryCompleteShadowCopySet *r)
1291 struct tevent_req *req;
1292 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state *state;
1293 struct tevent_req *subreq;
1295 req = tevent_req_create(mem_ctx, &state,
1296 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state);
1301 state->out_mem_ctx = NULL;
1303 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1304 NULL, &ndr_table_FileServerVssAgent,
1305 NDR_FSS_RECOVERYCOMPLETESHADOWCOPYSET, state, r);
1306 if (tevent_req_nomem(subreq, req)) {
1307 return tevent_req_post(req, ev);
1309 tevent_req_set_callback(subreq, dcerpc_fss_RecoveryCompleteShadowCopySet_r_done, req);
1314 static void dcerpc_fss_RecoveryCompleteShadowCopySet_r_done(struct tevent_req *subreq)
1316 struct tevent_req *req =
1317 tevent_req_callback_data(subreq,
1321 status = dcerpc_binding_handle_call_recv(subreq);
1322 TALLOC_FREE(subreq);
1323 if (tevent_req_nterror(req, status)) {
1327 tevent_req_done(req);
1330 NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1332 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state *state =
1333 tevent_req_data(req,
1334 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state);
1337 if (tevent_req_is_nterror(req, &status)) {
1338 tevent_req_received(req);
1342 talloc_steal(mem_ctx, state->out_mem_ctx);
1344 tevent_req_received(req);
1345 return NT_STATUS_OK;
1348 NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_RecoveryCompleteShadowCopySet *r)
1352 status = dcerpc_binding_handle_call(h,
1353 NULL, &ndr_table_FileServerVssAgent,
1354 NDR_FSS_RECOVERYCOMPLETESHADOWCOPYSET, mem_ctx, r);
1359 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state {
1360 struct fss_RecoveryCompleteShadowCopySet orig;
1361 struct fss_RecoveryCompleteShadowCopySet tmp;
1362 TALLOC_CTX *out_mem_ctx;
1365 static void dcerpc_fss_RecoveryCompleteShadowCopySet_done(struct tevent_req *subreq);
1367 struct tevent_req *dcerpc_fss_RecoveryCompleteShadowCopySet_send(TALLOC_CTX *mem_ctx,
1368 struct tevent_context *ev,
1369 struct dcerpc_binding_handle *h,
1370 struct GUID _ShadowCopySetId /* [in] */)
1372 struct tevent_req *req;
1373 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state;
1374 struct tevent_req *subreq;
1376 req = tevent_req_create(mem_ctx, &state,
1377 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
1381 state->out_mem_ctx = NULL;
1384 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
1386 /* Out parameters */
1389 ZERO_STRUCT(state->orig.out.result);
1391 /* make a temporary copy, that we pass to the dispatch function */
1392 state->tmp = state->orig;
1394 subreq = dcerpc_fss_RecoveryCompleteShadowCopySet_r_send(state, ev, h, &state->tmp);
1395 if (tevent_req_nomem(subreq, req)) {
1396 return tevent_req_post(req, ev);
1398 tevent_req_set_callback(subreq, dcerpc_fss_RecoveryCompleteShadowCopySet_done, req);
1402 static void dcerpc_fss_RecoveryCompleteShadowCopySet_done(struct tevent_req *subreq)
1404 struct tevent_req *req = tevent_req_callback_data(
1405 subreq, struct tevent_req);
1406 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state = tevent_req_data(
1407 req, struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
1409 TALLOC_CTX *mem_ctx;
1411 if (state->out_mem_ctx) {
1412 mem_ctx = state->out_mem_ctx;
1417 status = dcerpc_fss_RecoveryCompleteShadowCopySet_r_recv(subreq, mem_ctx);
1418 TALLOC_FREE(subreq);
1419 if (tevent_req_nterror(req, status)) {
1423 /* Copy out parameters */
1426 state->orig.out.result = state->tmp.out.result;
1428 /* Reset temporary structure */
1429 ZERO_STRUCT(state->tmp);
1431 tevent_req_done(req);
1434 NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_recv(struct tevent_req *req,
1435 TALLOC_CTX *mem_ctx,
1438 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state = tevent_req_data(
1439 req, struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
1442 if (tevent_req_is_nterror(req, &status)) {
1443 tevent_req_received(req);
1447 /* Steal possible out parameters to the callers context */
1448 talloc_steal(mem_ctx, state->out_mem_ctx);
1451 *result = state->orig.out.result;
1453 tevent_req_received(req);
1454 return NT_STATUS_OK;
1457 NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet(struct dcerpc_binding_handle *h,
1458 TALLOC_CTX *mem_ctx,
1459 struct GUID _ShadowCopySetId /* [in] */,
1462 struct fss_RecoveryCompleteShadowCopySet r;
1466 r.in.ShadowCopySetId = _ShadowCopySetId;
1468 status = dcerpc_fss_RecoveryCompleteShadowCopySet_r(h, mem_ctx, &r);
1469 if (!NT_STATUS_IS_OK(status)) {
1473 /* Return variables */
1476 *result = r.out.result;
1478 return NT_STATUS_OK;
1481 struct dcerpc_fss_AbortShadowCopySet_r_state {
1482 TALLOC_CTX *out_mem_ctx;
1485 static void dcerpc_fss_AbortShadowCopySet_r_done(struct tevent_req *subreq);
1487 struct tevent_req *dcerpc_fss_AbortShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
1488 struct tevent_context *ev,
1489 struct dcerpc_binding_handle *h,
1490 struct fss_AbortShadowCopySet *r)
1492 struct tevent_req *req;
1493 struct dcerpc_fss_AbortShadowCopySet_r_state *state;
1494 struct tevent_req *subreq;
1496 req = tevent_req_create(mem_ctx, &state,
1497 struct dcerpc_fss_AbortShadowCopySet_r_state);
1502 state->out_mem_ctx = NULL;
1504 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1505 NULL, &ndr_table_FileServerVssAgent,
1506 NDR_FSS_ABORTSHADOWCOPYSET, state, r);
1507 if (tevent_req_nomem(subreq, req)) {
1508 return tevent_req_post(req, ev);
1510 tevent_req_set_callback(subreq, dcerpc_fss_AbortShadowCopySet_r_done, req);
1515 static void dcerpc_fss_AbortShadowCopySet_r_done(struct tevent_req *subreq)
1517 struct tevent_req *req =
1518 tevent_req_callback_data(subreq,
1522 status = dcerpc_binding_handle_call_recv(subreq);
1523 TALLOC_FREE(subreq);
1524 if (tevent_req_nterror(req, status)) {
1528 tevent_req_done(req);
1531 NTSTATUS dcerpc_fss_AbortShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1533 struct dcerpc_fss_AbortShadowCopySet_r_state *state =
1534 tevent_req_data(req,
1535 struct dcerpc_fss_AbortShadowCopySet_r_state);
1538 if (tevent_req_is_nterror(req, &status)) {
1539 tevent_req_received(req);
1543 talloc_steal(mem_ctx, state->out_mem_ctx);
1545 tevent_req_received(req);
1546 return NT_STATUS_OK;
1549 NTSTATUS dcerpc_fss_AbortShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_AbortShadowCopySet *r)
1553 status = dcerpc_binding_handle_call(h,
1554 NULL, &ndr_table_FileServerVssAgent,
1555 NDR_FSS_ABORTSHADOWCOPYSET, mem_ctx, r);
1560 struct dcerpc_fss_AbortShadowCopySet_state {
1561 struct fss_AbortShadowCopySet orig;
1562 struct fss_AbortShadowCopySet tmp;
1563 TALLOC_CTX *out_mem_ctx;
1566 static void dcerpc_fss_AbortShadowCopySet_done(struct tevent_req *subreq);
1568 struct tevent_req *dcerpc_fss_AbortShadowCopySet_send(TALLOC_CTX *mem_ctx,
1569 struct tevent_context *ev,
1570 struct dcerpc_binding_handle *h,
1571 struct GUID _ShadowCopySetId /* [in] */)
1573 struct tevent_req *req;
1574 struct dcerpc_fss_AbortShadowCopySet_state *state;
1575 struct tevent_req *subreq;
1577 req = tevent_req_create(mem_ctx, &state,
1578 struct dcerpc_fss_AbortShadowCopySet_state);
1582 state->out_mem_ctx = NULL;
1585 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
1587 /* Out parameters */
1590 ZERO_STRUCT(state->orig.out.result);
1592 /* make a temporary copy, that we pass to the dispatch function */
1593 state->tmp = state->orig;
1595 subreq = dcerpc_fss_AbortShadowCopySet_r_send(state, ev, h, &state->tmp);
1596 if (tevent_req_nomem(subreq, req)) {
1597 return tevent_req_post(req, ev);
1599 tevent_req_set_callback(subreq, dcerpc_fss_AbortShadowCopySet_done, req);
1603 static void dcerpc_fss_AbortShadowCopySet_done(struct tevent_req *subreq)
1605 struct tevent_req *req = tevent_req_callback_data(
1606 subreq, struct tevent_req);
1607 struct dcerpc_fss_AbortShadowCopySet_state *state = tevent_req_data(
1608 req, struct dcerpc_fss_AbortShadowCopySet_state);
1610 TALLOC_CTX *mem_ctx;
1612 if (state->out_mem_ctx) {
1613 mem_ctx = state->out_mem_ctx;
1618 status = dcerpc_fss_AbortShadowCopySet_r_recv(subreq, mem_ctx);
1619 TALLOC_FREE(subreq);
1620 if (tevent_req_nterror(req, status)) {
1624 /* Copy out parameters */
1627 state->orig.out.result = state->tmp.out.result;
1629 /* Reset temporary structure */
1630 ZERO_STRUCT(state->tmp);
1632 tevent_req_done(req);
1635 NTSTATUS dcerpc_fss_AbortShadowCopySet_recv(struct tevent_req *req,
1636 TALLOC_CTX *mem_ctx,
1639 struct dcerpc_fss_AbortShadowCopySet_state *state = tevent_req_data(
1640 req, struct dcerpc_fss_AbortShadowCopySet_state);
1643 if (tevent_req_is_nterror(req, &status)) {
1644 tevent_req_received(req);
1648 /* Steal possible out parameters to the callers context */
1649 talloc_steal(mem_ctx, state->out_mem_ctx);
1652 *result = state->orig.out.result;
1654 tevent_req_received(req);
1655 return NT_STATUS_OK;
1658 NTSTATUS dcerpc_fss_AbortShadowCopySet(struct dcerpc_binding_handle *h,
1659 TALLOC_CTX *mem_ctx,
1660 struct GUID _ShadowCopySetId /* [in] */,
1663 struct fss_AbortShadowCopySet r;
1667 r.in.ShadowCopySetId = _ShadowCopySetId;
1669 status = dcerpc_fss_AbortShadowCopySet_r(h, mem_ctx, &r);
1670 if (!NT_STATUS_IS_OK(status)) {
1674 /* Return variables */
1677 *result = r.out.result;
1679 return NT_STATUS_OK;
1682 struct dcerpc_fss_IsPathSupported_r_state {
1683 TALLOC_CTX *out_mem_ctx;
1686 static void dcerpc_fss_IsPathSupported_r_done(struct tevent_req *subreq);
1688 struct tevent_req *dcerpc_fss_IsPathSupported_r_send(TALLOC_CTX *mem_ctx,
1689 struct tevent_context *ev,
1690 struct dcerpc_binding_handle *h,
1691 struct fss_IsPathSupported *r)
1693 struct tevent_req *req;
1694 struct dcerpc_fss_IsPathSupported_r_state *state;
1695 struct tevent_req *subreq;
1697 req = tevent_req_create(mem_ctx, &state,
1698 struct dcerpc_fss_IsPathSupported_r_state);
1703 state->out_mem_ctx = talloc_new(state);
1704 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1705 return tevent_req_post(req, ev);
1708 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1709 NULL, &ndr_table_FileServerVssAgent,
1710 NDR_FSS_ISPATHSUPPORTED, state->out_mem_ctx, r);
1711 if (tevent_req_nomem(subreq, req)) {
1712 return tevent_req_post(req, ev);
1714 tevent_req_set_callback(subreq, dcerpc_fss_IsPathSupported_r_done, req);
1719 static void dcerpc_fss_IsPathSupported_r_done(struct tevent_req *subreq)
1721 struct tevent_req *req =
1722 tevent_req_callback_data(subreq,
1726 status = dcerpc_binding_handle_call_recv(subreq);
1727 TALLOC_FREE(subreq);
1728 if (tevent_req_nterror(req, status)) {
1732 tevent_req_done(req);
1735 NTSTATUS dcerpc_fss_IsPathSupported_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1737 struct dcerpc_fss_IsPathSupported_r_state *state =
1738 tevent_req_data(req,
1739 struct dcerpc_fss_IsPathSupported_r_state);
1742 if (tevent_req_is_nterror(req, &status)) {
1743 tevent_req_received(req);
1747 talloc_steal(mem_ctx, state->out_mem_ctx);
1749 tevent_req_received(req);
1750 return NT_STATUS_OK;
1753 NTSTATUS dcerpc_fss_IsPathSupported_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_IsPathSupported *r)
1757 status = dcerpc_binding_handle_call(h,
1758 NULL, &ndr_table_FileServerVssAgent,
1759 NDR_FSS_ISPATHSUPPORTED, mem_ctx, r);
1764 struct dcerpc_fss_IsPathSupported_state {
1765 struct fss_IsPathSupported orig;
1766 struct fss_IsPathSupported tmp;
1767 TALLOC_CTX *out_mem_ctx;
1770 static void dcerpc_fss_IsPathSupported_done(struct tevent_req *subreq);
1772 struct tevent_req *dcerpc_fss_IsPathSupported_send(TALLOC_CTX *mem_ctx,
1773 struct tevent_context *ev,
1774 struct dcerpc_binding_handle *h,
1775 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
1776 uint8_t _magic[52] /* [in] */,
1777 uint32_t *_SupportedByThisProvider /* [out] [ref] */,
1778 const char **_OwnerMachineName /* [out] [ref,charset(UTF16)] */)
1780 struct tevent_req *req;
1781 struct dcerpc_fss_IsPathSupported_state *state;
1782 struct tevent_req *subreq;
1784 req = tevent_req_create(mem_ctx, &state,
1785 struct dcerpc_fss_IsPathSupported_state);
1789 state->out_mem_ctx = NULL;
1792 state->orig.in.ShareName = _ShareName;
1793 memcpy(state->orig.in.magic, _magic, sizeof(state->orig.in.magic));
1795 /* Out parameters */
1796 state->orig.out.SupportedByThisProvider = _SupportedByThisProvider;
1797 state->orig.out.OwnerMachineName = _OwnerMachineName;
1800 ZERO_STRUCT(state->orig.out.result);
1802 state->out_mem_ctx = talloc_named_const(state, 0,
1803 "dcerpc_fss_IsPathSupported_out_memory");
1804 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1805 return tevent_req_post(req, ev);
1808 /* make a temporary copy, that we pass to the dispatch function */
1809 state->tmp = state->orig;
1811 subreq = dcerpc_fss_IsPathSupported_r_send(state, ev, h, &state->tmp);
1812 if (tevent_req_nomem(subreq, req)) {
1813 return tevent_req_post(req, ev);
1815 tevent_req_set_callback(subreq, dcerpc_fss_IsPathSupported_done, req);
1819 static void dcerpc_fss_IsPathSupported_done(struct tevent_req *subreq)
1821 struct tevent_req *req = tevent_req_callback_data(
1822 subreq, struct tevent_req);
1823 struct dcerpc_fss_IsPathSupported_state *state = tevent_req_data(
1824 req, struct dcerpc_fss_IsPathSupported_state);
1826 TALLOC_CTX *mem_ctx;
1828 if (state->out_mem_ctx) {
1829 mem_ctx = state->out_mem_ctx;
1834 status = dcerpc_fss_IsPathSupported_r_recv(subreq, mem_ctx);
1835 TALLOC_FREE(subreq);
1836 if (tevent_req_nterror(req, status)) {
1840 /* Copy out parameters */
1841 *state->orig.out.SupportedByThisProvider = *state->tmp.out.SupportedByThisProvider;
1842 *state->orig.out.OwnerMachineName = *state->tmp.out.OwnerMachineName;
1845 state->orig.out.result = state->tmp.out.result;
1847 /* Reset temporary structure */
1848 ZERO_STRUCT(state->tmp);
1850 tevent_req_done(req);
1853 NTSTATUS dcerpc_fss_IsPathSupported_recv(struct tevent_req *req,
1854 TALLOC_CTX *mem_ctx,
1857 struct dcerpc_fss_IsPathSupported_state *state = tevent_req_data(
1858 req, struct dcerpc_fss_IsPathSupported_state);
1861 if (tevent_req_is_nterror(req, &status)) {
1862 tevent_req_received(req);
1866 /* Steal possible out parameters to the callers context */
1867 talloc_steal(mem_ctx, state->out_mem_ctx);
1870 *result = state->orig.out.result;
1872 tevent_req_received(req);
1873 return NT_STATUS_OK;
1876 NTSTATUS dcerpc_fss_IsPathSupported(struct dcerpc_binding_handle *h,
1877 TALLOC_CTX *mem_ctx,
1878 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
1879 uint8_t _magic[52] /* [in] */,
1880 uint32_t *_SupportedByThisProvider /* [out] [ref] */,
1881 const char **_OwnerMachineName /* [out] [ref,charset(UTF16)] */,
1884 struct fss_IsPathSupported r;
1888 r.in.ShareName = _ShareName;
1889 memcpy(r.in.magic, _magic, sizeof(r.in.magic));
1891 status = dcerpc_fss_IsPathSupported_r(h, mem_ctx, &r);
1892 if (!NT_STATUS_IS_OK(status)) {
1896 /* Return variables */
1897 *_SupportedByThisProvider = *r.out.SupportedByThisProvider;
1898 *_OwnerMachineName = *r.out.OwnerMachineName;
1901 *result = r.out.result;
1903 return NT_STATUS_OK;
1906 struct dcerpc_fss_IsPathShadowCopied_r_state {
1907 TALLOC_CTX *out_mem_ctx;
1910 static void dcerpc_fss_IsPathShadowCopied_r_done(struct tevent_req *subreq);
1912 struct tevent_req *dcerpc_fss_IsPathShadowCopied_r_send(TALLOC_CTX *mem_ctx,
1913 struct tevent_context *ev,
1914 struct dcerpc_binding_handle *h,
1915 struct fss_IsPathShadowCopied *r)
1917 struct tevent_req *req;
1918 struct dcerpc_fss_IsPathShadowCopied_r_state *state;
1919 struct tevent_req *subreq;
1921 req = tevent_req_create(mem_ctx, &state,
1922 struct dcerpc_fss_IsPathShadowCopied_r_state);
1927 state->out_mem_ctx = talloc_new(state);
1928 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1929 return tevent_req_post(req, ev);
1932 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1933 NULL, &ndr_table_FileServerVssAgent,
1934 NDR_FSS_ISPATHSHADOWCOPIED, state->out_mem_ctx, r);
1935 if (tevent_req_nomem(subreq, req)) {
1936 return tevent_req_post(req, ev);
1938 tevent_req_set_callback(subreq, dcerpc_fss_IsPathShadowCopied_r_done, req);
1943 static void dcerpc_fss_IsPathShadowCopied_r_done(struct tevent_req *subreq)
1945 struct tevent_req *req =
1946 tevent_req_callback_data(subreq,
1950 status = dcerpc_binding_handle_call_recv(subreq);
1951 TALLOC_FREE(subreq);
1952 if (tevent_req_nterror(req, status)) {
1956 tevent_req_done(req);
1959 NTSTATUS dcerpc_fss_IsPathShadowCopied_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1961 struct dcerpc_fss_IsPathShadowCopied_r_state *state =
1962 tevent_req_data(req,
1963 struct dcerpc_fss_IsPathShadowCopied_r_state);
1966 if (tevent_req_is_nterror(req, &status)) {
1967 tevent_req_received(req);
1971 talloc_steal(mem_ctx, state->out_mem_ctx);
1973 tevent_req_received(req);
1974 return NT_STATUS_OK;
1977 NTSTATUS dcerpc_fss_IsPathShadowCopied_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_IsPathShadowCopied *r)
1981 status = dcerpc_binding_handle_call(h,
1982 NULL, &ndr_table_FileServerVssAgent,
1983 NDR_FSS_ISPATHSHADOWCOPIED, mem_ctx, r);
1988 struct dcerpc_fss_IsPathShadowCopied_state {
1989 struct fss_IsPathShadowCopied orig;
1990 struct fss_IsPathShadowCopied tmp;
1991 TALLOC_CTX *out_mem_ctx;
1994 static void dcerpc_fss_IsPathShadowCopied_done(struct tevent_req *subreq);
1996 struct tevent_req *dcerpc_fss_IsPathShadowCopied_send(TALLOC_CTX *mem_ctx,
1997 struct tevent_context *ev,
1998 struct dcerpc_binding_handle *h,
1999 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
2000 uint32_t *_ShadowCopyPresent /* [out] [ref] */,
2001 int32_t *_ShadowCopyCompatibility /* [out] [ref] */)
2003 struct tevent_req *req;
2004 struct dcerpc_fss_IsPathShadowCopied_state *state;
2005 struct tevent_req *subreq;
2007 req = tevent_req_create(mem_ctx, &state,
2008 struct dcerpc_fss_IsPathShadowCopied_state);
2012 state->out_mem_ctx = NULL;
2015 state->orig.in.ShareName = _ShareName;
2017 /* Out parameters */
2018 state->orig.out.ShadowCopyPresent = _ShadowCopyPresent;
2019 state->orig.out.ShadowCopyCompatibility = _ShadowCopyCompatibility;
2022 ZERO_STRUCT(state->orig.out.result);
2024 state->out_mem_ctx = talloc_named_const(state, 0,
2025 "dcerpc_fss_IsPathShadowCopied_out_memory");
2026 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2027 return tevent_req_post(req, ev);
2030 /* make a temporary copy, that we pass to the dispatch function */
2031 state->tmp = state->orig;
2033 subreq = dcerpc_fss_IsPathShadowCopied_r_send(state, ev, h, &state->tmp);
2034 if (tevent_req_nomem(subreq, req)) {
2035 return tevent_req_post(req, ev);
2037 tevent_req_set_callback(subreq, dcerpc_fss_IsPathShadowCopied_done, req);
2041 static void dcerpc_fss_IsPathShadowCopied_done(struct tevent_req *subreq)
2043 struct tevent_req *req = tevent_req_callback_data(
2044 subreq, struct tevent_req);
2045 struct dcerpc_fss_IsPathShadowCopied_state *state = tevent_req_data(
2046 req, struct dcerpc_fss_IsPathShadowCopied_state);
2048 TALLOC_CTX *mem_ctx;
2050 if (state->out_mem_ctx) {
2051 mem_ctx = state->out_mem_ctx;
2056 status = dcerpc_fss_IsPathShadowCopied_r_recv(subreq, mem_ctx);
2057 TALLOC_FREE(subreq);
2058 if (tevent_req_nterror(req, status)) {
2062 /* Copy out parameters */
2063 *state->orig.out.ShadowCopyPresent = *state->tmp.out.ShadowCopyPresent;
2064 *state->orig.out.ShadowCopyCompatibility = *state->tmp.out.ShadowCopyCompatibility;
2067 state->orig.out.result = state->tmp.out.result;
2069 /* Reset temporary structure */
2070 ZERO_STRUCT(state->tmp);
2072 tevent_req_done(req);
2075 NTSTATUS dcerpc_fss_IsPathShadowCopied_recv(struct tevent_req *req,
2076 TALLOC_CTX *mem_ctx,
2079 struct dcerpc_fss_IsPathShadowCopied_state *state = tevent_req_data(
2080 req, struct dcerpc_fss_IsPathShadowCopied_state);
2083 if (tevent_req_is_nterror(req, &status)) {
2084 tevent_req_received(req);
2088 /* Steal possible out parameters to the callers context */
2089 talloc_steal(mem_ctx, state->out_mem_ctx);
2092 *result = state->orig.out.result;
2094 tevent_req_received(req);
2095 return NT_STATUS_OK;
2098 NTSTATUS dcerpc_fss_IsPathShadowCopied(struct dcerpc_binding_handle *h,
2099 TALLOC_CTX *mem_ctx,
2100 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
2101 uint32_t *_ShadowCopyPresent /* [out] [ref] */,
2102 int32_t *_ShadowCopyCompatibility /* [out] [ref] */,
2105 struct fss_IsPathShadowCopied r;
2109 r.in.ShareName = _ShareName;
2111 status = dcerpc_fss_IsPathShadowCopied_r(h, mem_ctx, &r);
2112 if (!NT_STATUS_IS_OK(status)) {
2116 /* Return variables */
2117 *_ShadowCopyPresent = *r.out.ShadowCopyPresent;
2118 *_ShadowCopyCompatibility = *r.out.ShadowCopyCompatibility;
2121 *result = r.out.result;
2123 return NT_STATUS_OK;
2126 struct dcerpc_fss_GetShareMapping_r_state {
2127 TALLOC_CTX *out_mem_ctx;
2130 static void dcerpc_fss_GetShareMapping_r_done(struct tevent_req *subreq);
2132 struct tevent_req *dcerpc_fss_GetShareMapping_r_send(TALLOC_CTX *mem_ctx,
2133 struct tevent_context *ev,
2134 struct dcerpc_binding_handle *h,
2135 struct fss_GetShareMapping *r)
2137 struct tevent_req *req;
2138 struct dcerpc_fss_GetShareMapping_r_state *state;
2139 struct tevent_req *subreq;
2141 req = tevent_req_create(mem_ctx, &state,
2142 struct dcerpc_fss_GetShareMapping_r_state);
2147 state->out_mem_ctx = talloc_new(state);
2148 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2149 return tevent_req_post(req, ev);
2152 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2153 NULL, &ndr_table_FileServerVssAgent,
2154 NDR_FSS_GETSHAREMAPPING, state->out_mem_ctx, r);
2155 if (tevent_req_nomem(subreq, req)) {
2156 return tevent_req_post(req, ev);
2158 tevent_req_set_callback(subreq, dcerpc_fss_GetShareMapping_r_done, req);
2163 static void dcerpc_fss_GetShareMapping_r_done(struct tevent_req *subreq)
2165 struct tevent_req *req =
2166 tevent_req_callback_data(subreq,
2170 status = dcerpc_binding_handle_call_recv(subreq);
2171 TALLOC_FREE(subreq);
2172 if (tevent_req_nterror(req, status)) {
2176 tevent_req_done(req);
2179 NTSTATUS dcerpc_fss_GetShareMapping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2181 struct dcerpc_fss_GetShareMapping_r_state *state =
2182 tevent_req_data(req,
2183 struct dcerpc_fss_GetShareMapping_r_state);
2186 if (tevent_req_is_nterror(req, &status)) {
2187 tevent_req_received(req);
2191 talloc_steal(mem_ctx, state->out_mem_ctx);
2193 tevent_req_received(req);
2194 return NT_STATUS_OK;
2197 NTSTATUS dcerpc_fss_GetShareMapping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_GetShareMapping *r)
2201 status = dcerpc_binding_handle_call(h,
2202 NULL, &ndr_table_FileServerVssAgent,
2203 NDR_FSS_GETSHAREMAPPING, mem_ctx, r);
2208 struct dcerpc_fss_GetShareMapping_state {
2209 struct fss_GetShareMapping orig;
2210 struct fss_GetShareMapping tmp;
2211 TALLOC_CTX *out_mem_ctx;
2214 static void dcerpc_fss_GetShareMapping_done(struct tevent_req *subreq);
2216 struct tevent_req *dcerpc_fss_GetShareMapping_send(TALLOC_CTX *mem_ctx,
2217 struct tevent_context *ev,
2218 struct dcerpc_binding_handle *h,
2219 struct GUID _ShadowCopyId /* [in] */,
2220 struct GUID _ShadowCopySetId /* [in] */,
2221 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
2222 uint32_t _Level /* [in] */,
2223 union fssagent_share_mapping *_ShareMapping /* [out] [ref,switch_is(Level)] */)
2225 struct tevent_req *req;
2226 struct dcerpc_fss_GetShareMapping_state *state;
2227 struct tevent_req *subreq;
2229 req = tevent_req_create(mem_ctx, &state,
2230 struct dcerpc_fss_GetShareMapping_state);
2234 state->out_mem_ctx = NULL;
2237 state->orig.in.ShadowCopyId = _ShadowCopyId;
2238 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
2239 state->orig.in.ShareName = _ShareName;
2240 state->orig.in.Level = _Level;
2242 /* Out parameters */
2243 state->orig.out.ShareMapping = _ShareMapping;
2246 ZERO_STRUCT(state->orig.out.result);
2248 state->out_mem_ctx = talloc_named_const(state, 0,
2249 "dcerpc_fss_GetShareMapping_out_memory");
2250 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2251 return tevent_req_post(req, ev);
2254 /* make a temporary copy, that we pass to the dispatch function */
2255 state->tmp = state->orig;
2257 subreq = dcerpc_fss_GetShareMapping_r_send(state, ev, h, &state->tmp);
2258 if (tevent_req_nomem(subreq, req)) {
2259 return tevent_req_post(req, ev);
2261 tevent_req_set_callback(subreq, dcerpc_fss_GetShareMapping_done, req);
2265 static void dcerpc_fss_GetShareMapping_done(struct tevent_req *subreq)
2267 struct tevent_req *req = tevent_req_callback_data(
2268 subreq, struct tevent_req);
2269 struct dcerpc_fss_GetShareMapping_state *state = tevent_req_data(
2270 req, struct dcerpc_fss_GetShareMapping_state);
2272 TALLOC_CTX *mem_ctx;
2274 if (state->out_mem_ctx) {
2275 mem_ctx = state->out_mem_ctx;
2280 status = dcerpc_fss_GetShareMapping_r_recv(subreq, mem_ctx);
2281 TALLOC_FREE(subreq);
2282 if (tevent_req_nterror(req, status)) {
2286 /* Copy out parameters */
2287 *state->orig.out.ShareMapping = *state->tmp.out.ShareMapping;
2290 state->orig.out.result = state->tmp.out.result;
2292 /* Reset temporary structure */
2293 ZERO_STRUCT(state->tmp);
2295 tevent_req_done(req);
2298 NTSTATUS dcerpc_fss_GetShareMapping_recv(struct tevent_req *req,
2299 TALLOC_CTX *mem_ctx,
2302 struct dcerpc_fss_GetShareMapping_state *state = tevent_req_data(
2303 req, struct dcerpc_fss_GetShareMapping_state);
2306 if (tevent_req_is_nterror(req, &status)) {
2307 tevent_req_received(req);
2311 /* Steal possible out parameters to the callers context */
2312 talloc_steal(mem_ctx, state->out_mem_ctx);
2315 *result = state->orig.out.result;
2317 tevent_req_received(req);
2318 return NT_STATUS_OK;
2321 NTSTATUS dcerpc_fss_GetShareMapping(struct dcerpc_binding_handle *h,
2322 TALLOC_CTX *mem_ctx,
2323 struct GUID _ShadowCopyId /* [in] */,
2324 struct GUID _ShadowCopySetId /* [in] */,
2325 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
2326 uint32_t _Level /* [in] */,
2327 union fssagent_share_mapping *_ShareMapping /* [out] [ref,switch_is(Level)] */,
2330 struct fss_GetShareMapping r;
2334 r.in.ShadowCopyId = _ShadowCopyId;
2335 r.in.ShadowCopySetId = _ShadowCopySetId;
2336 r.in.ShareName = _ShareName;
2337 r.in.Level = _Level;
2339 status = dcerpc_fss_GetShareMapping_r(h, mem_ctx, &r);
2340 if (!NT_STATUS_IS_OK(status)) {
2344 /* Return variables */
2345 *_ShareMapping = *r.out.ShareMapping;
2348 *result = r.out.result;
2350 return NT_STATUS_OK;
2353 struct dcerpc_fss_DeleteShareMapping_r_state {
2354 TALLOC_CTX *out_mem_ctx;
2357 static void dcerpc_fss_DeleteShareMapping_r_done(struct tevent_req *subreq);
2359 struct tevent_req *dcerpc_fss_DeleteShareMapping_r_send(TALLOC_CTX *mem_ctx,
2360 struct tevent_context *ev,
2361 struct dcerpc_binding_handle *h,
2362 struct fss_DeleteShareMapping *r)
2364 struct tevent_req *req;
2365 struct dcerpc_fss_DeleteShareMapping_r_state *state;
2366 struct tevent_req *subreq;
2368 req = tevent_req_create(mem_ctx, &state,
2369 struct dcerpc_fss_DeleteShareMapping_r_state);
2374 state->out_mem_ctx = NULL;
2376 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2377 NULL, &ndr_table_FileServerVssAgent,
2378 NDR_FSS_DELETESHAREMAPPING, state, r);
2379 if (tevent_req_nomem(subreq, req)) {
2380 return tevent_req_post(req, ev);
2382 tevent_req_set_callback(subreq, dcerpc_fss_DeleteShareMapping_r_done, req);
2387 static void dcerpc_fss_DeleteShareMapping_r_done(struct tevent_req *subreq)
2389 struct tevent_req *req =
2390 tevent_req_callback_data(subreq,
2394 status = dcerpc_binding_handle_call_recv(subreq);
2395 TALLOC_FREE(subreq);
2396 if (tevent_req_nterror(req, status)) {
2400 tevent_req_done(req);
2403 NTSTATUS dcerpc_fss_DeleteShareMapping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2405 struct dcerpc_fss_DeleteShareMapping_r_state *state =
2406 tevent_req_data(req,
2407 struct dcerpc_fss_DeleteShareMapping_r_state);
2410 if (tevent_req_is_nterror(req, &status)) {
2411 tevent_req_received(req);
2415 talloc_steal(mem_ctx, state->out_mem_ctx);
2417 tevent_req_received(req);
2418 return NT_STATUS_OK;
2421 NTSTATUS dcerpc_fss_DeleteShareMapping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_DeleteShareMapping *r)
2425 status = dcerpc_binding_handle_call(h,
2426 NULL, &ndr_table_FileServerVssAgent,
2427 NDR_FSS_DELETESHAREMAPPING, mem_ctx, r);
2432 struct dcerpc_fss_DeleteShareMapping_state {
2433 struct fss_DeleteShareMapping orig;
2434 struct fss_DeleteShareMapping tmp;
2435 TALLOC_CTX *out_mem_ctx;
2438 static void dcerpc_fss_DeleteShareMapping_done(struct tevent_req *subreq);
2440 struct tevent_req *dcerpc_fss_DeleteShareMapping_send(TALLOC_CTX *mem_ctx,
2441 struct tevent_context *ev,
2442 struct dcerpc_binding_handle *h,
2443 struct GUID _ShadowCopySetId /* [in] */,
2444 struct GUID _ShadowCopyId /* [in] */,
2445 const char *_ShareName /* [in] [ref,charset(UTF16)] */)
2447 struct tevent_req *req;
2448 struct dcerpc_fss_DeleteShareMapping_state *state;
2449 struct tevent_req *subreq;
2451 req = tevent_req_create(mem_ctx, &state,
2452 struct dcerpc_fss_DeleteShareMapping_state);
2456 state->out_mem_ctx = NULL;
2459 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
2460 state->orig.in.ShadowCopyId = _ShadowCopyId;
2461 state->orig.in.ShareName = _ShareName;
2463 /* Out parameters */
2466 ZERO_STRUCT(state->orig.out.result);
2468 /* make a temporary copy, that we pass to the dispatch function */
2469 state->tmp = state->orig;
2471 subreq = dcerpc_fss_DeleteShareMapping_r_send(state, ev, h, &state->tmp);
2472 if (tevent_req_nomem(subreq, req)) {
2473 return tevent_req_post(req, ev);
2475 tevent_req_set_callback(subreq, dcerpc_fss_DeleteShareMapping_done, req);
2479 static void dcerpc_fss_DeleteShareMapping_done(struct tevent_req *subreq)
2481 struct tevent_req *req = tevent_req_callback_data(
2482 subreq, struct tevent_req);
2483 struct dcerpc_fss_DeleteShareMapping_state *state = tevent_req_data(
2484 req, struct dcerpc_fss_DeleteShareMapping_state);
2486 TALLOC_CTX *mem_ctx;
2488 if (state->out_mem_ctx) {
2489 mem_ctx = state->out_mem_ctx;
2494 status = dcerpc_fss_DeleteShareMapping_r_recv(subreq, mem_ctx);
2495 TALLOC_FREE(subreq);
2496 if (tevent_req_nterror(req, status)) {
2500 /* Copy out parameters */
2503 state->orig.out.result = state->tmp.out.result;
2505 /* Reset temporary structure */
2506 ZERO_STRUCT(state->tmp);
2508 tevent_req_done(req);
2511 NTSTATUS dcerpc_fss_DeleteShareMapping_recv(struct tevent_req *req,
2512 TALLOC_CTX *mem_ctx,
2515 struct dcerpc_fss_DeleteShareMapping_state *state = tevent_req_data(
2516 req, struct dcerpc_fss_DeleteShareMapping_state);
2519 if (tevent_req_is_nterror(req, &status)) {
2520 tevent_req_received(req);
2524 /* Steal possible out parameters to the callers context */
2525 talloc_steal(mem_ctx, state->out_mem_ctx);
2528 *result = state->orig.out.result;
2530 tevent_req_received(req);
2531 return NT_STATUS_OK;
2534 NTSTATUS dcerpc_fss_DeleteShareMapping(struct dcerpc_binding_handle *h,
2535 TALLOC_CTX *mem_ctx,
2536 struct GUID _ShadowCopySetId /* [in] */,
2537 struct GUID _ShadowCopyId /* [in] */,
2538 const char *_ShareName /* [in] [ref,charset(UTF16)] */,
2541 struct fss_DeleteShareMapping r;
2545 r.in.ShadowCopySetId = _ShadowCopySetId;
2546 r.in.ShadowCopyId = _ShadowCopyId;
2547 r.in.ShareName = _ShareName;
2549 status = dcerpc_fss_DeleteShareMapping_r(h, mem_ctx, &r);
2550 if (!NT_STATUS_IS_OK(status)) {
2554 /* Return variables */
2557 *result = r.out.result;
2559 return NT_STATUS_OK;
2562 struct dcerpc_fss_PrepareShadowCopySet_r_state {
2563 TALLOC_CTX *out_mem_ctx;
2566 static void dcerpc_fss_PrepareShadowCopySet_r_done(struct tevent_req *subreq);
2568 struct tevent_req *dcerpc_fss_PrepareShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
2569 struct tevent_context *ev,
2570 struct dcerpc_binding_handle *h,
2571 struct fss_PrepareShadowCopySet *r)
2573 struct tevent_req *req;
2574 struct dcerpc_fss_PrepareShadowCopySet_r_state *state;
2575 struct tevent_req *subreq;
2577 req = tevent_req_create(mem_ctx, &state,
2578 struct dcerpc_fss_PrepareShadowCopySet_r_state);
2583 state->out_mem_ctx = NULL;
2585 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2586 NULL, &ndr_table_FileServerVssAgent,
2587 NDR_FSS_PREPARESHADOWCOPYSET, state, r);
2588 if (tevent_req_nomem(subreq, req)) {
2589 return tevent_req_post(req, ev);
2591 tevent_req_set_callback(subreq, dcerpc_fss_PrepareShadowCopySet_r_done, req);
2596 static void dcerpc_fss_PrepareShadowCopySet_r_done(struct tevent_req *subreq)
2598 struct tevent_req *req =
2599 tevent_req_callback_data(subreq,
2603 status = dcerpc_binding_handle_call_recv(subreq);
2604 TALLOC_FREE(subreq);
2605 if (tevent_req_nterror(req, status)) {
2609 tevent_req_done(req);
2612 NTSTATUS dcerpc_fss_PrepareShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2614 struct dcerpc_fss_PrepareShadowCopySet_r_state *state =
2615 tevent_req_data(req,
2616 struct dcerpc_fss_PrepareShadowCopySet_r_state);
2619 if (tevent_req_is_nterror(req, &status)) {
2620 tevent_req_received(req);
2624 talloc_steal(mem_ctx, state->out_mem_ctx);
2626 tevent_req_received(req);
2627 return NT_STATUS_OK;
2630 NTSTATUS dcerpc_fss_PrepareShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_PrepareShadowCopySet *r)
2634 status = dcerpc_binding_handle_call(h,
2635 NULL, &ndr_table_FileServerVssAgent,
2636 NDR_FSS_PREPARESHADOWCOPYSET, mem_ctx, r);
2641 struct dcerpc_fss_PrepareShadowCopySet_state {
2642 struct fss_PrepareShadowCopySet orig;
2643 struct fss_PrepareShadowCopySet tmp;
2644 TALLOC_CTX *out_mem_ctx;
2647 static void dcerpc_fss_PrepareShadowCopySet_done(struct tevent_req *subreq);
2649 struct tevent_req *dcerpc_fss_PrepareShadowCopySet_send(TALLOC_CTX *mem_ctx,
2650 struct tevent_context *ev,
2651 struct dcerpc_binding_handle *h,
2652 struct GUID _ShadowCopySetId /* [in] */,
2653 uint32_t _TimeOutInMilliseconds /* [in] */)
2655 struct tevent_req *req;
2656 struct dcerpc_fss_PrepareShadowCopySet_state *state;
2657 struct tevent_req *subreq;
2659 req = tevent_req_create(mem_ctx, &state,
2660 struct dcerpc_fss_PrepareShadowCopySet_state);
2664 state->out_mem_ctx = NULL;
2667 state->orig.in.ShadowCopySetId = _ShadowCopySetId;
2668 state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
2670 /* Out parameters */
2673 ZERO_STRUCT(state->orig.out.result);
2675 /* make a temporary copy, that we pass to the dispatch function */
2676 state->tmp = state->orig;
2678 subreq = dcerpc_fss_PrepareShadowCopySet_r_send(state, ev, h, &state->tmp);
2679 if (tevent_req_nomem(subreq, req)) {
2680 return tevent_req_post(req, ev);
2682 tevent_req_set_callback(subreq, dcerpc_fss_PrepareShadowCopySet_done, req);
2686 static void dcerpc_fss_PrepareShadowCopySet_done(struct tevent_req *subreq)
2688 struct tevent_req *req = tevent_req_callback_data(
2689 subreq, struct tevent_req);
2690 struct dcerpc_fss_PrepareShadowCopySet_state *state = tevent_req_data(
2691 req, struct dcerpc_fss_PrepareShadowCopySet_state);
2693 TALLOC_CTX *mem_ctx;
2695 if (state->out_mem_ctx) {
2696 mem_ctx = state->out_mem_ctx;
2701 status = dcerpc_fss_PrepareShadowCopySet_r_recv(subreq, mem_ctx);
2702 TALLOC_FREE(subreq);
2703 if (tevent_req_nterror(req, status)) {
2707 /* Copy out parameters */
2710 state->orig.out.result = state->tmp.out.result;
2712 /* Reset temporary structure */
2713 ZERO_STRUCT(state->tmp);
2715 tevent_req_done(req);
2718 NTSTATUS dcerpc_fss_PrepareShadowCopySet_recv(struct tevent_req *req,
2719 TALLOC_CTX *mem_ctx,
2722 struct dcerpc_fss_PrepareShadowCopySet_state *state = tevent_req_data(
2723 req, struct dcerpc_fss_PrepareShadowCopySet_state);
2726 if (tevent_req_is_nterror(req, &status)) {
2727 tevent_req_received(req);
2731 /* Steal possible out parameters to the callers context */
2732 talloc_steal(mem_ctx, state->out_mem_ctx);
2735 *result = state->orig.out.result;
2737 tevent_req_received(req);
2738 return NT_STATUS_OK;
2741 NTSTATUS dcerpc_fss_PrepareShadowCopySet(struct dcerpc_binding_handle *h,
2742 TALLOC_CTX *mem_ctx,
2743 struct GUID _ShadowCopySetId /* [in] */,
2744 uint32_t _TimeOutInMilliseconds /* [in] */,
2747 struct fss_PrepareShadowCopySet r;
2751 r.in.ShadowCopySetId = _ShadowCopySetId;
2752 r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
2754 status = dcerpc_fss_PrepareShadowCopySet_r(h, mem_ctx, &r);
2755 if (!NT_STATUS_IS_OK(status)) {
2759 /* Return variables */
2762 *result = r.out.result;
2764 return NT_STATUS_OK;