Fix warnings on FreeBSD-based platforms
[ira/wip.git] / source3 / librpc / gen_ndr / cli_initshutdown.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_initshutdown.h"
8
9 NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
10                                   TALLOC_CTX *mem_ctx,
11                                   uint16_t *hostname /* [in] [unique] */,
12                                   struct initshutdown_String *message /* [in] [unique] */,
13                                   uint32_t timeout /* [in]  */,
14                                   uint8_t force_apps /* [in]  */,
15                                   uint8_t do_reboot /* [in]  */,
16                                   WERROR *werror)
17 {
18         struct initshutdown_Init r;
19         NTSTATUS status;
20
21         /* In parameters */
22         r.in.hostname = hostname;
23         r.in.message = message;
24         r.in.timeout = timeout;
25         r.in.force_apps = force_apps;
26         r.in.do_reboot = do_reboot;
27
28         if (DEBUGLEVEL >= 10) {
29                 NDR_PRINT_IN_DEBUG(initshutdown_Init, &r);
30         }
31
32         status = cli_do_rpc_ndr(cli,
33                                 mem_ctx,
34                                 &ndr_table_initshutdown,
35                                 NDR_INITSHUTDOWN_INIT,
36                                 &r);
37
38         if (!NT_STATUS_IS_OK(status)) {
39                 return status;
40         }
41
42         if (DEBUGLEVEL >= 10) {
43                 NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r);
44         }
45
46         if (NT_STATUS_IS_ERR(status)) {
47                 return status;
48         }
49
50         /* Return variables */
51
52         /* Return result */
53         if (werror) {
54                 *werror = r.out.result;
55         }
56
57         return werror_to_ntstatus(r.out.result);
58 }
59
60 NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
61                                    TALLOC_CTX *mem_ctx,
62                                    uint16_t *server /* [in] [unique] */,
63                                    WERROR *werror)
64 {
65         struct initshutdown_Abort r;
66         NTSTATUS status;
67
68         /* In parameters */
69         r.in.server = server;
70
71         if (DEBUGLEVEL >= 10) {
72                 NDR_PRINT_IN_DEBUG(initshutdown_Abort, &r);
73         }
74
75         status = cli_do_rpc_ndr(cli,
76                                 mem_ctx,
77                                 &ndr_table_initshutdown,
78                                 NDR_INITSHUTDOWN_ABORT,
79                                 &r);
80
81         if (!NT_STATUS_IS_OK(status)) {
82                 return status;
83         }
84
85         if (DEBUGLEVEL >= 10) {
86                 NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r);
87         }
88
89         if (NT_STATUS_IS_ERR(status)) {
90                 return status;
91         }
92
93         /* Return variables */
94
95         /* Return result */
96         if (werror) {
97                 *werror = r.out.result;
98         }
99
100         return werror_to_ntstatus(r.out.result);
101 }
102
103 NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
104                                     TALLOC_CTX *mem_ctx,
105                                     uint16_t *hostname /* [in] [unique] */,
106                                     struct initshutdown_String *message /* [in] [unique] */,
107                                     uint32_t timeout /* [in]  */,
108                                     uint8_t force_apps /* [in]  */,
109                                     uint8_t do_reboot /* [in]  */,
110                                     uint32_t reason /* [in]  */,
111                                     WERROR *werror)
112 {
113         struct initshutdown_InitEx r;
114         NTSTATUS status;
115
116         /* In parameters */
117         r.in.hostname = hostname;
118         r.in.message = message;
119         r.in.timeout = timeout;
120         r.in.force_apps = force_apps;
121         r.in.do_reboot = do_reboot;
122         r.in.reason = reason;
123
124         if (DEBUGLEVEL >= 10) {
125                 NDR_PRINT_IN_DEBUG(initshutdown_InitEx, &r);
126         }
127
128         status = cli_do_rpc_ndr(cli,
129                                 mem_ctx,
130                                 &ndr_table_initshutdown,
131                                 NDR_INITSHUTDOWN_INITEX,
132                                 &r);
133
134         if (!NT_STATUS_IS_OK(status)) {
135                 return status;
136         }
137
138         if (DEBUGLEVEL >= 10) {
139                 NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r);
140         }
141
142         if (NT_STATUS_IS_ERR(status)) {
143                 return status;
144         }
145
146         /* Return variables */
147
148         /* Return result */
149         if (werror) {
150                 *werror = r.out.result;
151         }
152
153         return werror_to_ntstatus(r.out.result);
154 }
155