Attempt to fix the build
[Samba.git] / librpc / gen_ndr / ndr_initshutdown.c
blob718f79cf6a647b4f49fba5133d4497489c20fdab
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_initshutdown.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
9 if (flags & NDR_IN) {
10 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
11 if (r->in.hostname) {
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
14 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
15 if (r->in.message) {
16 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
19 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
20 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
22 if (flags & NDR_OUT) {
23 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25 return NDR_ERR_SUCCESS;
28 static enum ndr_err_code ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int flags, struct initshutdown_Init *r)
30 uint32_t _ptr_hostname;
31 uint32_t _ptr_message;
32 TALLOC_CTX *_mem_save_hostname_0;
33 TALLOC_CTX *_mem_save_message_0;
34 if (flags & NDR_IN) {
35 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
36 if (_ptr_hostname) {
37 NDR_PULL_ALLOC(ndr, r->in.hostname);
38 } else {
39 r->in.hostname = NULL;
41 if (r->in.hostname) {
42 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
43 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
44 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
45 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
47 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
48 if (_ptr_message) {
49 NDR_PULL_ALLOC(ndr, r->in.message);
50 } else {
51 r->in.message = NULL;
53 if (r->in.message) {
54 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
55 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
56 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
57 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
59 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
60 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
61 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
63 if (flags & NDR_OUT) {
64 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
66 return NDR_ERR_SUCCESS;
69 _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r)
71 ndr_print_struct(ndr, name, "initshutdown_Init");
72 ndr->depth++;
73 if (flags & NDR_SET_VALUES) {
74 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
76 if (flags & NDR_IN) {
77 ndr_print_struct(ndr, "in", "initshutdown_Init");
78 ndr->depth++;
79 ndr_print_ptr(ndr, "hostname", r->in.hostname);
80 ndr->depth++;
81 if (r->in.hostname) {
82 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
84 ndr->depth--;
85 ndr_print_ptr(ndr, "message", r->in.message);
86 ndr->depth++;
87 if (r->in.message) {
88 ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
90 ndr->depth--;
91 ndr_print_uint32(ndr, "timeout", r->in.timeout);
92 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
93 ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
94 ndr->depth--;
96 if (flags & NDR_OUT) {
97 ndr_print_struct(ndr, "out", "initshutdown_Init");
98 ndr->depth++;
99 ndr_print_WERROR(ndr, "result", r->out.result);
100 ndr->depth--;
102 ndr->depth--;
105 static enum ndr_err_code ndr_push_initshutdown_Abort(struct ndr_push *ndr, int flags, const struct initshutdown_Abort *r)
107 if (flags & NDR_IN) {
108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
109 if (r->in.server) {
110 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.server));
113 if (flags & NDR_OUT) {
114 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
116 return NDR_ERR_SUCCESS;
119 static enum ndr_err_code ndr_pull_initshutdown_Abort(struct ndr_pull *ndr, int flags, struct initshutdown_Abort *r)
121 uint32_t _ptr_server;
122 TALLOC_CTX *_mem_save_server_0;
123 if (flags & NDR_IN) {
124 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
125 if (_ptr_server) {
126 NDR_PULL_ALLOC(ndr, r->in.server);
127 } else {
128 r->in.server = NULL;
130 if (r->in.server) {
131 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
132 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
133 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.server));
134 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
137 if (flags & NDR_OUT) {
138 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r)
145 ndr_print_struct(ndr, name, "initshutdown_Abort");
146 ndr->depth++;
147 if (flags & NDR_SET_VALUES) {
148 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
150 if (flags & NDR_IN) {
151 ndr_print_struct(ndr, "in", "initshutdown_Abort");
152 ndr->depth++;
153 ndr_print_ptr(ndr, "server", r->in.server);
154 ndr->depth++;
155 if (r->in.server) {
156 ndr_print_uint16(ndr, "server", *r->in.server);
158 ndr->depth--;
159 ndr->depth--;
161 if (flags & NDR_OUT) {
162 ndr_print_struct(ndr, "out", "initshutdown_Abort");
163 ndr->depth++;
164 ndr_print_WERROR(ndr, "result", r->out.result);
165 ndr->depth--;
167 ndr->depth--;
170 static enum ndr_err_code ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int flags, const struct initshutdown_InitEx *r)
172 if (flags & NDR_IN) {
173 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
174 if (r->in.hostname) {
175 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
178 if (r->in.message) {
179 NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
182 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
183 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
186 if (flags & NDR_OUT) {
187 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
189 return NDR_ERR_SUCCESS;
192 static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int flags, struct initshutdown_InitEx *r)
194 uint32_t _ptr_hostname;
195 uint32_t _ptr_message;
196 TALLOC_CTX *_mem_save_hostname_0;
197 TALLOC_CTX *_mem_save_message_0;
198 if (flags & NDR_IN) {
199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
200 if (_ptr_hostname) {
201 NDR_PULL_ALLOC(ndr, r->in.hostname);
202 } else {
203 r->in.hostname = NULL;
205 if (r->in.hostname) {
206 _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
207 NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
208 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
211 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
212 if (_ptr_message) {
213 NDR_PULL_ALLOC(ndr, r->in.message);
214 } else {
215 r->in.message = NULL;
217 if (r->in.message) {
218 _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
219 NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
220 NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
224 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
225 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
228 if (flags & NDR_OUT) {
229 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
231 return NDR_ERR_SUCCESS;
234 _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r)
236 ndr_print_struct(ndr, name, "initshutdown_InitEx");
237 ndr->depth++;
238 if (flags & NDR_SET_VALUES) {
239 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
241 if (flags & NDR_IN) {
242 ndr_print_struct(ndr, "in", "initshutdown_InitEx");
243 ndr->depth++;
244 ndr_print_ptr(ndr, "hostname", r->in.hostname);
245 ndr->depth++;
246 if (r->in.hostname) {
247 ndr_print_uint16(ndr, "hostname", *r->in.hostname);
249 ndr->depth--;
250 ndr_print_ptr(ndr, "message", r->in.message);
251 ndr->depth++;
252 if (r->in.message) {
253 ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
255 ndr->depth--;
256 ndr_print_uint32(ndr, "timeout", r->in.timeout);
257 ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
258 ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
259 ndr_print_uint32(ndr, "reason", r->in.reason);
260 ndr->depth--;
262 if (flags & NDR_OUT) {
263 ndr_print_struct(ndr, "out", "initshutdown_InitEx");
264 ndr->depth++;
265 ndr_print_WERROR(ndr, "result", r->out.result);
266 ndr->depth--;
268 ndr->depth--;
271 static const struct ndr_interface_call initshutdown_calls[] = {
273 "initshutdown_Init",
274 sizeof(struct initshutdown_Init),
275 (ndr_push_flags_fn_t) ndr_push_initshutdown_Init,
276 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_Init,
277 (ndr_print_function_t) ndr_print_initshutdown_Init,
278 false,
281 "initshutdown_Abort",
282 sizeof(struct initshutdown_Abort),
283 (ndr_push_flags_fn_t) ndr_push_initshutdown_Abort,
284 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_Abort,
285 (ndr_print_function_t) ndr_print_initshutdown_Abort,
286 false,
289 "initshutdown_InitEx",
290 sizeof(struct initshutdown_InitEx),
291 (ndr_push_flags_fn_t) ndr_push_initshutdown_InitEx,
292 (ndr_pull_flags_fn_t) ndr_pull_initshutdown_InitEx,
293 (ndr_print_function_t) ndr_print_initshutdown_InitEx,
294 false,
296 { NULL, 0, NULL, NULL, NULL, false }
299 static const char * const initshutdown_endpoint_strings[] = {
300 "ncacn_np:[\\pipe\\InitShutdown]",
303 static const struct ndr_interface_string_array initshutdown_endpoints = {
304 .count = 1,
305 .names = initshutdown_endpoint_strings
308 static const char * const initshutdown_authservice_strings[] = {
309 "host",
312 static const struct ndr_interface_string_array initshutdown_authservices = {
313 .count = 1,
314 .names = initshutdown_authservice_strings
318 const struct ndr_interface_table ndr_table_initshutdown = {
319 .name = "initshutdown",
320 .syntax_id = {
321 {0x894de0c0,0x0d55,0x11d3,{0xa3,0x22},{0x00,0xc0,0x4f,0xa3,0x21,0xa1}},
322 NDR_INITSHUTDOWN_VERSION
324 .helpstring = NDR_INITSHUTDOWN_HELPSTRING,
325 .num_calls = 3,
326 .calls = initshutdown_calls,
327 .endpoints = &initshutdown_endpoints,
328 .authservices = &initshutdown_authservices