LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_atsvc_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 402 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 32 0.0 %

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/librpc/gen_ndr/ndr_atsvc.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_atsvc_c.h"
       8             : 
       9             : /* atsvc - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_atsvc_JobAdd_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_atsvc_JobAdd_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_atsvc_JobAdd_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct atsvc_JobAdd *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_atsvc_JobAdd_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_atsvc_JobAdd_r_state);
      28           0 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           0 :         state->out_mem_ctx = talloc_new(state);
      33           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_atsvc,
      39           0 :                         NDR_ATSVC_JOBADD, state->out_mem_ctx, r);
      40           0 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobAdd_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_atsvc_JobAdd_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53           0 :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_atsvc_JobAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_atsvc_JobAdd_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_atsvc_JobAdd_r_state);
      69           0 :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82           0 : NTSTATUS dcerpc_atsvc_JobAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct atsvc_JobAdd *r)
      83             : {
      84           0 :         NTSTATUS status;
      85             : 
      86           0 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_atsvc,
      88             :                         NDR_ATSVC_JOBADD, mem_ctx, r);
      89             : 
      90           0 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_atsvc_JobAdd_state {
      94             :         struct atsvc_JobAdd orig;
      95             :         struct atsvc_JobAdd tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_atsvc_JobAdd_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_atsvc_JobAdd_send(TALLOC_CTX *mem_ctx,
     102             :                                             struct tevent_context *ev,
     103             :                                             struct dcerpc_binding_handle *h,
     104             :                                             const char *_servername /* [in] [charset(UTF16),unique] */,
     105             :                                             struct atsvc_JobInfo *_job_info /* [in] [ref] */,
     106             :                                             uint32_t *_job_id /* [out] [ref] */)
     107             : {
     108           0 :         struct tevent_req *req;
     109           0 :         struct dcerpc_atsvc_JobAdd_state *state;
     110           0 :         struct tevent_req *subreq;
     111             : 
     112           0 :         req = tevent_req_create(mem_ctx, &state,
     113             :                                 struct dcerpc_atsvc_JobAdd_state);
     114           0 :         if (req == NULL) {
     115           0 :                 return NULL;
     116             :         }
     117           0 :         state->out_mem_ctx = NULL;
     118             : 
     119             :         /* In parameters */
     120           0 :         state->orig.in.servername = _servername;
     121           0 :         state->orig.in.job_info = _job_info;
     122             : 
     123             :         /* Out parameters */
     124           0 :         state->orig.out.job_id = _job_id;
     125             : 
     126             :         /* Result */
     127           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     128             : 
     129           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     130             :                              "dcerpc_atsvc_JobAdd_out_memory");
     131           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     132           0 :                 return tevent_req_post(req, ev);
     133             :         }
     134             : 
     135             :         /* make a temporary copy, that we pass to the dispatch function */
     136           0 :         state->tmp = state->orig;
     137             : 
     138           0 :         subreq = dcerpc_atsvc_JobAdd_r_send(state, ev, h, &state->tmp);
     139           0 :         if (tevent_req_nomem(subreq, req)) {
     140           0 :                 return tevent_req_post(req, ev);
     141             :         }
     142           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobAdd_done, req);
     143           0 :         return req;
     144             : }
     145             : 
     146           0 : static void dcerpc_atsvc_JobAdd_done(struct tevent_req *subreq)
     147             : {
     148           0 :         struct tevent_req *req = tevent_req_callback_data(
     149             :                 subreq, struct tevent_req);
     150           0 :         struct dcerpc_atsvc_JobAdd_state *state = tevent_req_data(
     151             :                 req, struct dcerpc_atsvc_JobAdd_state);
     152           0 :         NTSTATUS status;
     153           0 :         TALLOC_CTX *mem_ctx;
     154             : 
     155           0 :         if (state->out_mem_ctx) {
     156           0 :                 mem_ctx = state->out_mem_ctx;
     157             :         } else {
     158           0 :                 mem_ctx = state;
     159             :         }
     160             : 
     161           0 :         status = dcerpc_atsvc_JobAdd_r_recv(subreq, mem_ctx);
     162           0 :         TALLOC_FREE(subreq);
     163           0 :         if (tevent_req_nterror(req, status)) {
     164           0 :                 return;
     165             :         }
     166             : 
     167             :         /* Copy out parameters */
     168           0 :         *state->orig.out.job_id = *state->tmp.out.job_id;
     169             : 
     170             :         /* Copy result */
     171           0 :         state->orig.out.result = state->tmp.out.result;
     172             : 
     173             :         /* Reset temporary structure */
     174           0 :         NDR_ZERO_STRUCT(state->tmp);
     175             : 
     176           0 :         tevent_req_done(req);
     177             : }
     178             : 
     179           0 : NTSTATUS dcerpc_atsvc_JobAdd_recv(struct tevent_req *req,
     180             :                                   TALLOC_CTX *mem_ctx,
     181             :                                   NTSTATUS *result)
     182             : {
     183           0 :         struct dcerpc_atsvc_JobAdd_state *state = tevent_req_data(
     184             :                 req, struct dcerpc_atsvc_JobAdd_state);
     185           0 :         NTSTATUS status;
     186             : 
     187           0 :         if (tevent_req_is_nterror(req, &status)) {
     188           0 :                 tevent_req_received(req);
     189           0 :                 return status;
     190             :         }
     191             : 
     192             :         /* Steal possible out parameters to the callers context */
     193           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     194             : 
     195             :         /* Return result */
     196           0 :         *result = state->orig.out.result;
     197             : 
     198           0 :         tevent_req_received(req);
     199           0 :         return NT_STATUS_OK;
     200             : }
     201             : 
     202           0 : NTSTATUS dcerpc_atsvc_JobAdd(struct dcerpc_binding_handle *h,
     203             :                              TALLOC_CTX *mem_ctx,
     204             :                              const char *_servername /* [in] [charset(UTF16),unique] */,
     205             :                              struct atsvc_JobInfo *_job_info /* [in] [ref] */,
     206             :                              uint32_t *_job_id /* [out] [ref] */,
     207             :                              NTSTATUS *result)
     208             : {
     209           0 :         struct atsvc_JobAdd r;
     210           0 :         NTSTATUS status;
     211             : 
     212             :         /* In parameters */
     213           0 :         r.in.servername = _servername;
     214           0 :         r.in.job_info = _job_info;
     215             : 
     216             :         /* Out parameters */
     217           0 :         r.out.job_id = _job_id;
     218             : 
     219             :         /* Result */
     220           0 :         NDR_ZERO_STRUCT(r.out.result);
     221             : 
     222           0 :         status = dcerpc_atsvc_JobAdd_r(h, mem_ctx, &r);
     223           0 :         if (!NT_STATUS_IS_OK(status)) {
     224           0 :                 return status;
     225             :         }
     226             : 
     227             :         /* Return variables */
     228           0 :         *_job_id = *r.out.job_id;
     229             : 
     230             :         /* Return result */
     231           0 :         *result = r.out.result;
     232             : 
     233           0 :         return NT_STATUS_OK;
     234             : }
     235             : 
     236             : struct dcerpc_atsvc_JobDel_r_state {
     237             :         TALLOC_CTX *out_mem_ctx;
     238             : };
     239             : 
     240             : static void dcerpc_atsvc_JobDel_r_done(struct tevent_req *subreq);
     241             : 
     242           0 : struct tevent_req *dcerpc_atsvc_JobDel_r_send(TALLOC_CTX *mem_ctx,
     243             :         struct tevent_context *ev,
     244             :         struct dcerpc_binding_handle *h,
     245             :         struct atsvc_JobDel *r)
     246             : {
     247           0 :         struct tevent_req *req;
     248           0 :         struct dcerpc_atsvc_JobDel_r_state *state;
     249           0 :         struct tevent_req *subreq;
     250             : 
     251           0 :         req = tevent_req_create(mem_ctx, &state,
     252             :                                 struct dcerpc_atsvc_JobDel_r_state);
     253           0 :         if (req == NULL) {
     254           0 :                 return NULL;
     255             :         }
     256             : 
     257           0 :         state->out_mem_ctx = NULL;
     258             : 
     259           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     260             :                         NULL, &ndr_table_atsvc,
     261             :                         NDR_ATSVC_JOBDEL, state, r);
     262           0 :         if (tevent_req_nomem(subreq, req)) {
     263           0 :                 return tevent_req_post(req, ev);
     264             :         }
     265           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobDel_r_done, req);
     266             : 
     267           0 :         return req;
     268             : }
     269             : 
     270           0 : static void dcerpc_atsvc_JobDel_r_done(struct tevent_req *subreq)
     271             : {
     272           0 :         struct tevent_req *req =
     273           0 :                 tevent_req_callback_data(subreq,
     274             :                 struct tevent_req);
     275           0 :         NTSTATUS status;
     276             : 
     277           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     278           0 :         TALLOC_FREE(subreq);
     279           0 :         if (tevent_req_nterror(req, status)) {
     280           0 :                 return;
     281             :         }
     282             : 
     283           0 :         tevent_req_done(req);
     284             : }
     285             : 
     286           0 : NTSTATUS dcerpc_atsvc_JobDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     287             : {
     288           0 :         struct dcerpc_atsvc_JobDel_r_state *state =
     289           0 :                 tevent_req_data(req,
     290             :                 struct dcerpc_atsvc_JobDel_r_state);
     291           0 :         NTSTATUS status;
     292             : 
     293           0 :         if (tevent_req_is_nterror(req, &status)) {
     294           0 :                 tevent_req_received(req);
     295           0 :                 return status;
     296             :         }
     297             : 
     298           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     299             : 
     300           0 :         tevent_req_received(req);
     301           0 :         return NT_STATUS_OK;
     302             : }
     303             : 
     304           0 : NTSTATUS dcerpc_atsvc_JobDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct atsvc_JobDel *r)
     305             : {
     306           0 :         NTSTATUS status;
     307             : 
     308           0 :         status = dcerpc_binding_handle_call(h,
     309             :                         NULL, &ndr_table_atsvc,
     310             :                         NDR_ATSVC_JOBDEL, mem_ctx, r);
     311             : 
     312           0 :         return status;
     313             : }
     314             : 
     315             : struct dcerpc_atsvc_JobDel_state {
     316             :         struct atsvc_JobDel orig;
     317             :         struct atsvc_JobDel tmp;
     318             :         TALLOC_CTX *out_mem_ctx;
     319             : };
     320             : 
     321             : static void dcerpc_atsvc_JobDel_done(struct tevent_req *subreq);
     322             : 
     323           0 : struct tevent_req *dcerpc_atsvc_JobDel_send(TALLOC_CTX *mem_ctx,
     324             :                                             struct tevent_context *ev,
     325             :                                             struct dcerpc_binding_handle *h,
     326             :                                             const char *_servername /* [in] [charset(UTF16),unique] */,
     327             :                                             uint32_t _min_job_id /* [in]  */,
     328             :                                             uint32_t _max_job_id /* [in]  */)
     329             : {
     330           0 :         struct tevent_req *req;
     331           0 :         struct dcerpc_atsvc_JobDel_state *state;
     332           0 :         struct tevent_req *subreq;
     333             : 
     334           0 :         req = tevent_req_create(mem_ctx, &state,
     335             :                                 struct dcerpc_atsvc_JobDel_state);
     336           0 :         if (req == NULL) {
     337           0 :                 return NULL;
     338             :         }
     339           0 :         state->out_mem_ctx = NULL;
     340             : 
     341             :         /* In parameters */
     342           0 :         state->orig.in.servername = _servername;
     343           0 :         state->orig.in.min_job_id = _min_job_id;
     344           0 :         state->orig.in.max_job_id = _max_job_id;
     345             : 
     346             :         /* Out parameters */
     347             : 
     348             :         /* Result */
     349           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     350             : 
     351             :         /* make a temporary copy, that we pass to the dispatch function */
     352           0 :         state->tmp = state->orig;
     353             : 
     354           0 :         subreq = dcerpc_atsvc_JobDel_r_send(state, ev, h, &state->tmp);
     355           0 :         if (tevent_req_nomem(subreq, req)) {
     356           0 :                 return tevent_req_post(req, ev);
     357             :         }
     358           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobDel_done, req);
     359           0 :         return req;
     360             : }
     361             : 
     362           0 : static void dcerpc_atsvc_JobDel_done(struct tevent_req *subreq)
     363             : {
     364           0 :         struct tevent_req *req = tevent_req_callback_data(
     365             :                 subreq, struct tevent_req);
     366           0 :         struct dcerpc_atsvc_JobDel_state *state = tevent_req_data(
     367             :                 req, struct dcerpc_atsvc_JobDel_state);
     368           0 :         NTSTATUS status;
     369           0 :         TALLOC_CTX *mem_ctx;
     370             : 
     371           0 :         if (state->out_mem_ctx) {
     372           0 :                 mem_ctx = state->out_mem_ctx;
     373             :         } else {
     374           0 :                 mem_ctx = state;
     375             :         }
     376             : 
     377           0 :         status = dcerpc_atsvc_JobDel_r_recv(subreq, mem_ctx);
     378           0 :         TALLOC_FREE(subreq);
     379           0 :         if (tevent_req_nterror(req, status)) {
     380           0 :                 return;
     381             :         }
     382             : 
     383             :         /* Copy out parameters */
     384             : 
     385             :         /* Copy result */
     386           0 :         state->orig.out.result = state->tmp.out.result;
     387             : 
     388             :         /* Reset temporary structure */
     389           0 :         NDR_ZERO_STRUCT(state->tmp);
     390             : 
     391           0 :         tevent_req_done(req);
     392             : }
     393             : 
     394           0 : NTSTATUS dcerpc_atsvc_JobDel_recv(struct tevent_req *req,
     395             :                                   TALLOC_CTX *mem_ctx,
     396             :                                   NTSTATUS *result)
     397             : {
     398           0 :         struct dcerpc_atsvc_JobDel_state *state = tevent_req_data(
     399             :                 req, struct dcerpc_atsvc_JobDel_state);
     400           0 :         NTSTATUS status;
     401             : 
     402           0 :         if (tevent_req_is_nterror(req, &status)) {
     403           0 :                 tevent_req_received(req);
     404           0 :                 return status;
     405             :         }
     406             : 
     407             :         /* Steal possible out parameters to the callers context */
     408           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     409             : 
     410             :         /* Return result */
     411           0 :         *result = state->orig.out.result;
     412             : 
     413           0 :         tevent_req_received(req);
     414           0 :         return NT_STATUS_OK;
     415             : }
     416             : 
     417           0 : NTSTATUS dcerpc_atsvc_JobDel(struct dcerpc_binding_handle *h,
     418             :                              TALLOC_CTX *mem_ctx,
     419             :                              const char *_servername /* [in] [charset(UTF16),unique] */,
     420             :                              uint32_t _min_job_id /* [in]  */,
     421             :                              uint32_t _max_job_id /* [in]  */,
     422             :                              NTSTATUS *result)
     423             : {
     424           0 :         struct atsvc_JobDel r;
     425           0 :         NTSTATUS status;
     426             : 
     427             :         /* In parameters */
     428           0 :         r.in.servername = _servername;
     429           0 :         r.in.min_job_id = _min_job_id;
     430           0 :         r.in.max_job_id = _max_job_id;
     431             : 
     432             :         /* Out parameters */
     433             : 
     434             :         /* Result */
     435           0 :         NDR_ZERO_STRUCT(r.out.result);
     436             : 
     437           0 :         status = dcerpc_atsvc_JobDel_r(h, mem_ctx, &r);
     438           0 :         if (!NT_STATUS_IS_OK(status)) {
     439           0 :                 return status;
     440             :         }
     441             : 
     442             :         /* Return variables */
     443             : 
     444             :         /* Return result */
     445           0 :         *result = r.out.result;
     446             : 
     447           0 :         return NT_STATUS_OK;
     448             : }
     449             : 
     450             : struct dcerpc_atsvc_JobEnum_r_state {
     451             :         TALLOC_CTX *out_mem_ctx;
     452             : };
     453             : 
     454             : static void dcerpc_atsvc_JobEnum_r_done(struct tevent_req *subreq);
     455             : 
     456           0 : struct tevent_req *dcerpc_atsvc_JobEnum_r_send(TALLOC_CTX *mem_ctx,
     457             :         struct tevent_context *ev,
     458             :         struct dcerpc_binding_handle *h,
     459             :         struct atsvc_JobEnum *r)
     460             : {
     461           0 :         struct tevent_req *req;
     462           0 :         struct dcerpc_atsvc_JobEnum_r_state *state;
     463           0 :         struct tevent_req *subreq;
     464             : 
     465           0 :         req = tevent_req_create(mem_ctx, &state,
     466             :                                 struct dcerpc_atsvc_JobEnum_r_state);
     467           0 :         if (req == NULL) {
     468           0 :                 return NULL;
     469             :         }
     470             : 
     471           0 :         state->out_mem_ctx = talloc_new(state);
     472           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     473           0 :                 return tevent_req_post(req, ev);
     474             :         }
     475             : 
     476           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     477             :                         NULL, &ndr_table_atsvc,
     478           0 :                         NDR_ATSVC_JOBENUM, state->out_mem_ctx, r);
     479           0 :         if (tevent_req_nomem(subreq, req)) {
     480           0 :                 return tevent_req_post(req, ev);
     481             :         }
     482           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobEnum_r_done, req);
     483             : 
     484           0 :         return req;
     485             : }
     486             : 
     487           0 : static void dcerpc_atsvc_JobEnum_r_done(struct tevent_req *subreq)
     488             : {
     489           0 :         struct tevent_req *req =
     490           0 :                 tevent_req_callback_data(subreq,
     491             :                 struct tevent_req);
     492           0 :         NTSTATUS status;
     493             : 
     494           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     495           0 :         TALLOC_FREE(subreq);
     496           0 :         if (tevent_req_nterror(req, status)) {
     497           0 :                 return;
     498             :         }
     499             : 
     500           0 :         tevent_req_done(req);
     501             : }
     502             : 
     503           0 : NTSTATUS dcerpc_atsvc_JobEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     504             : {
     505           0 :         struct dcerpc_atsvc_JobEnum_r_state *state =
     506           0 :                 tevent_req_data(req,
     507             :                 struct dcerpc_atsvc_JobEnum_r_state);
     508           0 :         NTSTATUS status;
     509             : 
     510           0 :         if (tevent_req_is_nterror(req, &status)) {
     511           0 :                 tevent_req_received(req);
     512           0 :                 return status;
     513             :         }
     514             : 
     515           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     516             : 
     517           0 :         tevent_req_received(req);
     518           0 :         return NT_STATUS_OK;
     519             : }
     520             : 
     521           0 : NTSTATUS dcerpc_atsvc_JobEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct atsvc_JobEnum *r)
     522             : {
     523           0 :         NTSTATUS status;
     524             : 
     525           0 :         status = dcerpc_binding_handle_call(h,
     526             :                         NULL, &ndr_table_atsvc,
     527             :                         NDR_ATSVC_JOBENUM, mem_ctx, r);
     528             : 
     529           0 :         return status;
     530             : }
     531             : 
     532             : struct dcerpc_atsvc_JobEnum_state {
     533             :         struct atsvc_JobEnum orig;
     534             :         struct atsvc_JobEnum tmp;
     535             :         TALLOC_CTX *out_mem_ctx;
     536             : };
     537             : 
     538             : static void dcerpc_atsvc_JobEnum_done(struct tevent_req *subreq);
     539             : 
     540           0 : struct tevent_req *dcerpc_atsvc_JobEnum_send(TALLOC_CTX *mem_ctx,
     541             :                                              struct tevent_context *ev,
     542             :                                              struct dcerpc_binding_handle *h,
     543             :                                              const char *_servername /* [in] [charset(UTF16),unique] */,
     544             :                                              struct atsvc_enum_ctr *_ctr /* [in,out] [ref] */,
     545             :                                              uint32_t _preferred_max_len /* [in]  */,
     546             :                                              uint32_t *_total_entries /* [out] [ref] */,
     547             :                                              uint32_t *_resume_handle /* [in,out] [unique] */)
     548             : {
     549           0 :         struct tevent_req *req;
     550           0 :         struct dcerpc_atsvc_JobEnum_state *state;
     551           0 :         struct tevent_req *subreq;
     552             : 
     553           0 :         req = tevent_req_create(mem_ctx, &state,
     554             :                                 struct dcerpc_atsvc_JobEnum_state);
     555           0 :         if (req == NULL) {
     556           0 :                 return NULL;
     557             :         }
     558           0 :         state->out_mem_ctx = NULL;
     559             : 
     560             :         /* In parameters */
     561           0 :         state->orig.in.servername = _servername;
     562           0 :         state->orig.in.ctr = _ctr;
     563           0 :         state->orig.in.preferred_max_len = _preferred_max_len;
     564           0 :         state->orig.in.resume_handle = _resume_handle;
     565             : 
     566             :         /* Out parameters */
     567           0 :         state->orig.out.ctr = _ctr;
     568           0 :         state->orig.out.total_entries = _total_entries;
     569           0 :         state->orig.out.resume_handle = _resume_handle;
     570             : 
     571             :         /* Result */
     572           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     573             : 
     574           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     575             :                              "dcerpc_atsvc_JobEnum_out_memory");
     576           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     577           0 :                 return tevent_req_post(req, ev);
     578             :         }
     579             : 
     580             :         /* make a temporary copy, that we pass to the dispatch function */
     581           0 :         state->tmp = state->orig;
     582             : 
     583           0 :         subreq = dcerpc_atsvc_JobEnum_r_send(state, ev, h, &state->tmp);
     584           0 :         if (tevent_req_nomem(subreq, req)) {
     585           0 :                 return tevent_req_post(req, ev);
     586             :         }
     587           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobEnum_done, req);
     588           0 :         return req;
     589             : }
     590             : 
     591           0 : static void dcerpc_atsvc_JobEnum_done(struct tevent_req *subreq)
     592             : {
     593           0 :         struct tevent_req *req = tevent_req_callback_data(
     594             :                 subreq, struct tevent_req);
     595           0 :         struct dcerpc_atsvc_JobEnum_state *state = tevent_req_data(
     596             :                 req, struct dcerpc_atsvc_JobEnum_state);
     597           0 :         NTSTATUS status;
     598           0 :         TALLOC_CTX *mem_ctx;
     599             : 
     600           0 :         if (state->out_mem_ctx) {
     601           0 :                 mem_ctx = state->out_mem_ctx;
     602             :         } else {
     603           0 :                 mem_ctx = state;
     604             :         }
     605             : 
     606           0 :         status = dcerpc_atsvc_JobEnum_r_recv(subreq, mem_ctx);
     607           0 :         TALLOC_FREE(subreq);
     608           0 :         if (tevent_req_nterror(req, status)) {
     609           0 :                 return;
     610             :         }
     611             : 
     612             :         /* Copy out parameters */
     613           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
     614           0 :         *state->orig.out.total_entries = *state->tmp.out.total_entries;
     615           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
     616           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
     617             :         }
     618             : 
     619             :         /* Copy result */
     620           0 :         state->orig.out.result = state->tmp.out.result;
     621             : 
     622             :         /* Reset temporary structure */
     623           0 :         NDR_ZERO_STRUCT(state->tmp);
     624             : 
     625           0 :         tevent_req_done(req);
     626             : }
     627             : 
     628           0 : NTSTATUS dcerpc_atsvc_JobEnum_recv(struct tevent_req *req,
     629             :                                    TALLOC_CTX *mem_ctx,
     630             :                                    NTSTATUS *result)
     631             : {
     632           0 :         struct dcerpc_atsvc_JobEnum_state *state = tevent_req_data(
     633             :                 req, struct dcerpc_atsvc_JobEnum_state);
     634           0 :         NTSTATUS status;
     635             : 
     636           0 :         if (tevent_req_is_nterror(req, &status)) {
     637           0 :                 tevent_req_received(req);
     638           0 :                 return status;
     639             :         }
     640             : 
     641             :         /* Steal possible out parameters to the callers context */
     642           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     643             : 
     644             :         /* Return result */
     645           0 :         *result = state->orig.out.result;
     646             : 
     647           0 :         tevent_req_received(req);
     648           0 :         return NT_STATUS_OK;
     649             : }
     650             : 
     651           0 : NTSTATUS dcerpc_atsvc_JobEnum(struct dcerpc_binding_handle *h,
     652             :                               TALLOC_CTX *mem_ctx,
     653             :                               const char *_servername /* [in] [charset(UTF16),unique] */,
     654             :                               struct atsvc_enum_ctr *_ctr /* [in,out] [ref] */,
     655             :                               uint32_t _preferred_max_len /* [in]  */,
     656             :                               uint32_t *_total_entries /* [out] [ref] */,
     657             :                               uint32_t *_resume_handle /* [in,out] [unique] */,
     658             :                               NTSTATUS *result)
     659             : {
     660           0 :         struct atsvc_JobEnum r;
     661           0 :         NTSTATUS status;
     662             : 
     663             :         /* In parameters */
     664           0 :         r.in.servername = _servername;
     665           0 :         r.in.ctr = _ctr;
     666           0 :         r.in.preferred_max_len = _preferred_max_len;
     667           0 :         r.in.resume_handle = _resume_handle;
     668             : 
     669             :         /* Out parameters */
     670           0 :         r.out.ctr = _ctr;
     671           0 :         r.out.total_entries = _total_entries;
     672           0 :         r.out.resume_handle = _resume_handle;
     673             : 
     674             :         /* Result */
     675           0 :         NDR_ZERO_STRUCT(r.out.result);
     676             : 
     677           0 :         status = dcerpc_atsvc_JobEnum_r(h, mem_ctx, &r);
     678           0 :         if (!NT_STATUS_IS_OK(status)) {
     679           0 :                 return status;
     680             :         }
     681             : 
     682             :         /* Return variables */
     683           0 :         *_ctr = *r.out.ctr;
     684           0 :         *_total_entries = *r.out.total_entries;
     685           0 :         if (_resume_handle && r.out.resume_handle) {
     686           0 :                 *_resume_handle = *r.out.resume_handle;
     687             :         }
     688             : 
     689             :         /* Return result */
     690           0 :         *result = r.out.result;
     691             : 
     692           0 :         return NT_STATUS_OK;
     693             : }
     694             : 
     695             : struct dcerpc_atsvc_JobGetInfo_r_state {
     696             :         TALLOC_CTX *out_mem_ctx;
     697             : };
     698             : 
     699             : static void dcerpc_atsvc_JobGetInfo_r_done(struct tevent_req *subreq);
     700             : 
     701           0 : struct tevent_req *dcerpc_atsvc_JobGetInfo_r_send(TALLOC_CTX *mem_ctx,
     702             :         struct tevent_context *ev,
     703             :         struct dcerpc_binding_handle *h,
     704             :         struct atsvc_JobGetInfo *r)
     705             : {
     706           0 :         struct tevent_req *req;
     707           0 :         struct dcerpc_atsvc_JobGetInfo_r_state *state;
     708           0 :         struct tevent_req *subreq;
     709             : 
     710           0 :         req = tevent_req_create(mem_ctx, &state,
     711             :                                 struct dcerpc_atsvc_JobGetInfo_r_state);
     712           0 :         if (req == NULL) {
     713           0 :                 return NULL;
     714             :         }
     715             : 
     716           0 :         state->out_mem_ctx = talloc_new(state);
     717           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     718           0 :                 return tevent_req_post(req, ev);
     719             :         }
     720             : 
     721           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     722             :                         NULL, &ndr_table_atsvc,
     723           0 :                         NDR_ATSVC_JOBGETINFO, state->out_mem_ctx, r);
     724           0 :         if (tevent_req_nomem(subreq, req)) {
     725           0 :                 return tevent_req_post(req, ev);
     726             :         }
     727           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobGetInfo_r_done, req);
     728             : 
     729           0 :         return req;
     730             : }
     731             : 
     732           0 : static void dcerpc_atsvc_JobGetInfo_r_done(struct tevent_req *subreq)
     733             : {
     734           0 :         struct tevent_req *req =
     735           0 :                 tevent_req_callback_data(subreq,
     736             :                 struct tevent_req);
     737           0 :         NTSTATUS status;
     738             : 
     739           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     740           0 :         TALLOC_FREE(subreq);
     741           0 :         if (tevent_req_nterror(req, status)) {
     742           0 :                 return;
     743             :         }
     744             : 
     745           0 :         tevent_req_done(req);
     746             : }
     747             : 
     748           0 : NTSTATUS dcerpc_atsvc_JobGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     749             : {
     750           0 :         struct dcerpc_atsvc_JobGetInfo_r_state *state =
     751           0 :                 tevent_req_data(req,
     752             :                 struct dcerpc_atsvc_JobGetInfo_r_state);
     753           0 :         NTSTATUS status;
     754             : 
     755           0 :         if (tevent_req_is_nterror(req, &status)) {
     756           0 :                 tevent_req_received(req);
     757           0 :                 return status;
     758             :         }
     759             : 
     760           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     761             : 
     762           0 :         tevent_req_received(req);
     763           0 :         return NT_STATUS_OK;
     764             : }
     765             : 
     766           0 : NTSTATUS dcerpc_atsvc_JobGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct atsvc_JobGetInfo *r)
     767             : {
     768           0 :         NTSTATUS status;
     769             : 
     770           0 :         status = dcerpc_binding_handle_call(h,
     771             :                         NULL, &ndr_table_atsvc,
     772             :                         NDR_ATSVC_JOBGETINFO, mem_ctx, r);
     773             : 
     774           0 :         return status;
     775             : }
     776             : 
     777             : struct dcerpc_atsvc_JobGetInfo_state {
     778             :         struct atsvc_JobGetInfo orig;
     779             :         struct atsvc_JobGetInfo tmp;
     780             :         TALLOC_CTX *out_mem_ctx;
     781             : };
     782             : 
     783             : static void dcerpc_atsvc_JobGetInfo_done(struct tevent_req *subreq);
     784             : 
     785           0 : struct tevent_req *dcerpc_atsvc_JobGetInfo_send(TALLOC_CTX *mem_ctx,
     786             :                                                 struct tevent_context *ev,
     787             :                                                 struct dcerpc_binding_handle *h,
     788             :                                                 const char *_servername /* [in] [charset(UTF16),unique] */,
     789             :                                                 uint32_t _job_id /* [in]  */,
     790             :                                                 struct atsvc_JobInfo **_job_info /* [out] [ref] */)
     791             : {
     792           0 :         struct tevent_req *req;
     793           0 :         struct dcerpc_atsvc_JobGetInfo_state *state;
     794           0 :         struct tevent_req *subreq;
     795             : 
     796           0 :         req = tevent_req_create(mem_ctx, &state,
     797             :                                 struct dcerpc_atsvc_JobGetInfo_state);
     798           0 :         if (req == NULL) {
     799           0 :                 return NULL;
     800             :         }
     801           0 :         state->out_mem_ctx = NULL;
     802             : 
     803             :         /* In parameters */
     804           0 :         state->orig.in.servername = _servername;
     805           0 :         state->orig.in.job_id = _job_id;
     806             : 
     807             :         /* Out parameters */
     808           0 :         state->orig.out.job_info = _job_info;
     809             : 
     810             :         /* Result */
     811           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     812             : 
     813           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     814             :                              "dcerpc_atsvc_JobGetInfo_out_memory");
     815           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     816           0 :                 return tevent_req_post(req, ev);
     817             :         }
     818             : 
     819             :         /* make a temporary copy, that we pass to the dispatch function */
     820           0 :         state->tmp = state->orig;
     821             : 
     822           0 :         subreq = dcerpc_atsvc_JobGetInfo_r_send(state, ev, h, &state->tmp);
     823           0 :         if (tevent_req_nomem(subreq, req)) {
     824           0 :                 return tevent_req_post(req, ev);
     825             :         }
     826           0 :         tevent_req_set_callback(subreq, dcerpc_atsvc_JobGetInfo_done, req);
     827           0 :         return req;
     828             : }
     829             : 
     830           0 : static void dcerpc_atsvc_JobGetInfo_done(struct tevent_req *subreq)
     831             : {
     832           0 :         struct tevent_req *req = tevent_req_callback_data(
     833             :                 subreq, struct tevent_req);
     834           0 :         struct dcerpc_atsvc_JobGetInfo_state *state = tevent_req_data(
     835             :                 req, struct dcerpc_atsvc_JobGetInfo_state);
     836           0 :         NTSTATUS status;
     837           0 :         TALLOC_CTX *mem_ctx;
     838             : 
     839           0 :         if (state->out_mem_ctx) {
     840           0 :                 mem_ctx = state->out_mem_ctx;
     841             :         } else {
     842           0 :                 mem_ctx = state;
     843             :         }
     844             : 
     845           0 :         status = dcerpc_atsvc_JobGetInfo_r_recv(subreq, mem_ctx);
     846           0 :         TALLOC_FREE(subreq);
     847           0 :         if (tevent_req_nterror(req, status)) {
     848           0 :                 return;
     849             :         }
     850             : 
     851             :         /* Copy out parameters */
     852           0 :         *state->orig.out.job_info = *state->tmp.out.job_info;
     853             : 
     854             :         /* Copy result */
     855           0 :         state->orig.out.result = state->tmp.out.result;
     856             : 
     857             :         /* Reset temporary structure */
     858           0 :         NDR_ZERO_STRUCT(state->tmp);
     859             : 
     860           0 :         tevent_req_done(req);
     861             : }
     862             : 
     863           0 : NTSTATUS dcerpc_atsvc_JobGetInfo_recv(struct tevent_req *req,
     864             :                                       TALLOC_CTX *mem_ctx,
     865             :                                       NTSTATUS *result)
     866             : {
     867           0 :         struct dcerpc_atsvc_JobGetInfo_state *state = tevent_req_data(
     868             :                 req, struct dcerpc_atsvc_JobGetInfo_state);
     869           0 :         NTSTATUS status;
     870             : 
     871           0 :         if (tevent_req_is_nterror(req, &status)) {
     872           0 :                 tevent_req_received(req);
     873           0 :                 return status;
     874             :         }
     875             : 
     876             :         /* Steal possible out parameters to the callers context */
     877           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     878             : 
     879             :         /* Return result */
     880           0 :         *result = state->orig.out.result;
     881             : 
     882           0 :         tevent_req_received(req);
     883           0 :         return NT_STATUS_OK;
     884             : }
     885             : 
     886           0 : NTSTATUS dcerpc_atsvc_JobGetInfo(struct dcerpc_binding_handle *h,
     887             :                                  TALLOC_CTX *mem_ctx,
     888             :                                  const char *_servername /* [in] [charset(UTF16),unique] */,
     889             :                                  uint32_t _job_id /* [in]  */,
     890             :                                  struct atsvc_JobInfo **_job_info /* [out] [ref] */,
     891             :                                  NTSTATUS *result)
     892             : {
     893           0 :         struct atsvc_JobGetInfo r;
     894           0 :         NTSTATUS status;
     895             : 
     896             :         /* In parameters */
     897           0 :         r.in.servername = _servername;
     898           0 :         r.in.job_id = _job_id;
     899             : 
     900             :         /* Out parameters */
     901           0 :         r.out.job_info = _job_info;
     902             : 
     903             :         /* Result */
     904           0 :         NDR_ZERO_STRUCT(r.out.result);
     905             : 
     906           0 :         status = dcerpc_atsvc_JobGetInfo_r(h, mem_ctx, &r);
     907           0 :         if (!NT_STATUS_IS_OK(status)) {
     908           0 :                 return status;
     909             :         }
     910             : 
     911             :         /* Return variables */
     912           0 :         *_job_info = *r.out.job_info;
     913             : 
     914             :         /* Return result */
     915           0 :         *result = r.out.result;
     916             : 
     917           0 :         return NT_STATUS_OK;
     918             : }
     919             : 

Generated by: LCOV version 1.14