Add libnetapi generated files.
[ira/wip.git] / source3 / librpc / gen_ndr / ndr_libnetapi.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_libnetapi.h"
5
6 _PUBLIC_ enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r)
7 {
8         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
9         return NDR_ERR_SUCCESS;
10 }
11
12 _PUBLIC_ enum ndr_err_code ndr_pull_NET_API_STATUS(struct ndr_pull *ndr, int ndr_flags, enum NET_API_STATUS *r)
13 {
14         uint32_t v;
15         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16         *r = v;
17         return NDR_ERR_SUCCESS;
18 }
19
20 _PUBLIC_ void ndr_print_NET_API_STATUS(struct ndr_print *ndr, const char *name, enum NET_API_STATUS r)
21 {
22         const char *val = NULL;
23
24         switch (r) {
25                 case NERR_Success: val = "NERR_Success"; break;
26         }
27         ndr_print_enum(ndr, name, "ENUM", val, r);
28 }
29
30 _PUBLIC_ void ndr_print_NetJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetJoinDomain *r)
31 {
32         ndr_print_struct(ndr, name, "NetJoinDomain");
33         ndr->depth++;
34         if (flags & NDR_SET_VALUES) {
35                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
36         }
37         if (flags & NDR_IN) {
38                 ndr_print_struct(ndr, "in", "NetJoinDomain");
39                 ndr->depth++;
40                 ndr_print_ptr(ndr, "server", r->in.server);
41                 ndr->depth++;
42                 if (r->in.server) {
43                         ndr_print_string(ndr, "server", r->in.server);
44                 }
45                 ndr->depth--;
46                 ndr_print_ptr(ndr, "domain", r->in.domain);
47                 ndr->depth++;
48                 ndr_print_string(ndr, "domain", r->in.domain);
49                 ndr->depth--;
50                 ndr_print_ptr(ndr, "account_ou", r->in.account_ou);
51                 ndr->depth++;
52                 if (r->in.account_ou) {
53                         ndr_print_string(ndr, "account_ou", r->in.account_ou);
54                 }
55                 ndr->depth--;
56                 ndr_print_ptr(ndr, "account", r->in.account);
57                 ndr->depth++;
58                 if (r->in.account) {
59                         ndr_print_string(ndr, "account", r->in.account);
60                 }
61                 ndr->depth--;
62                 ndr_print_ptr(ndr, "password", r->in.password);
63                 ndr->depth++;
64                 if (r->in.password) {
65                         ndr_print_string(ndr, "password", r->in.password);
66                 }
67                 ndr->depth--;
68                 ndr_print_uint32(ndr, "join_flags", r->in.join_flags);
69                 ndr->depth--;
70         }
71         if (flags & NDR_OUT) {
72                 ndr_print_struct(ndr, "out", "NetJoinDomain");
73                 ndr->depth++;
74                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
75                 ndr->depth--;
76         }
77         ndr->depth--;
78 }
79
80 _PUBLIC_ void ndr_print_NetUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetUnjoinDomain *r)
81 {
82         ndr_print_struct(ndr, name, "NetUnjoinDomain");
83         ndr->depth++;
84         if (flags & NDR_SET_VALUES) {
85                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
86         }
87         if (flags & NDR_IN) {
88                 ndr_print_struct(ndr, "in", "NetUnjoinDomain");
89                 ndr->depth++;
90                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
91                 ndr->depth++;
92                 if (r->in.server_name) {
93                         ndr_print_string(ndr, "server_name", r->in.server_name);
94                 }
95                 ndr->depth--;
96                 ndr_print_ptr(ndr, "account", r->in.account);
97                 ndr->depth++;
98                 if (r->in.account) {
99                         ndr_print_string(ndr, "account", r->in.account);
100                 }
101                 ndr->depth--;
102                 ndr_print_ptr(ndr, "password", r->in.password);
103                 ndr->depth++;
104                 if (r->in.password) {
105                         ndr_print_string(ndr, "password", r->in.password);
106                 }
107                 ndr->depth--;
108                 ndr_print_uint32(ndr, "unjoin_flags", r->in.unjoin_flags);
109                 ndr->depth--;
110         }
111         if (flags & NDR_OUT) {
112                 ndr_print_struct(ndr, "out", "NetUnjoinDomain");
113                 ndr->depth++;
114                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
115                 ndr->depth--;
116         }
117         ndr->depth--;
118 }
119
120 _PUBLIC_ void ndr_print_NetGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinInformation *r)
121 {
122         ndr_print_struct(ndr, name, "NetGetJoinInformation");
123         ndr->depth++;
124         if (flags & NDR_SET_VALUES) {
125                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
126         }
127         if (flags & NDR_IN) {
128                 ndr_print_struct(ndr, "in", "NetGetJoinInformation");
129                 ndr->depth++;
130                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
131                 ndr->depth++;
132                 if (r->in.server_name) {
133                         ndr_print_string(ndr, "server_name", r->in.server_name);
134                 }
135                 ndr->depth--;
136                 ndr->depth--;
137         }
138         if (flags & NDR_OUT) {
139                 ndr_print_struct(ndr, "out", "NetGetJoinInformation");
140                 ndr->depth++;
141                 ndr_print_ptr(ndr, "name_buffer", r->out.name_buffer);
142                 ndr->depth++;
143                 ndr_print_ptr(ndr, "name_buffer", *r->out.name_buffer);
144                 ndr->depth++;
145                 if (*r->out.name_buffer) {
146                         ndr_print_string(ndr, "name_buffer", *r->out.name_buffer);
147                 }
148                 ndr->depth--;
149                 ndr->depth--;
150                 ndr_print_ptr(ndr, "name_type", r->out.name_type);
151                 ndr->depth++;
152                 ndr_print_uint16(ndr, "name_type", *r->out.name_type);
153                 ndr->depth--;
154                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
155                 ndr->depth--;
156         }
157         ndr->depth--;
158 }
159
160 _PUBLIC_ void ndr_print_NetGetJoinableOUs(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinableOUs *r)
161 {
162         ndr_print_struct(ndr, name, "NetGetJoinableOUs");
163         ndr->depth++;
164         if (flags & NDR_SET_VALUES) {
165                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
166         }
167         if (flags & NDR_IN) {
168                 ndr_print_struct(ndr, "in", "NetGetJoinableOUs");
169                 ndr->depth++;
170                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
171                 ndr->depth++;
172                 if (r->in.server_name) {
173                         ndr_print_string(ndr, "server_name", r->in.server_name);
174                 }
175                 ndr->depth--;
176                 ndr_print_ptr(ndr, "domain", r->in.domain);
177                 ndr->depth++;
178                 ndr_print_string(ndr, "domain", r->in.domain);
179                 ndr->depth--;
180                 ndr_print_ptr(ndr, "account", r->in.account);
181                 ndr->depth++;
182                 if (r->in.account) {
183                         ndr_print_string(ndr, "account", r->in.account);
184                 }
185                 ndr->depth--;
186                 ndr_print_ptr(ndr, "password", r->in.password);
187                 ndr->depth++;
188                 if (r->in.password) {
189                         ndr_print_string(ndr, "password", r->in.password);
190                 }
191                 ndr->depth--;
192                 ndr->depth--;
193         }
194         if (flags & NDR_OUT) {
195                 ndr_print_struct(ndr, "out", "NetGetJoinableOUs");
196                 ndr->depth++;
197                 ndr_print_ptr(ndr, "ou_count", r->out.ou_count);
198                 ndr->depth++;
199                 ndr_print_uint32(ndr, "ou_count", *r->out.ou_count);
200                 ndr->depth--;
201                 ndr_print_ptr(ndr, "ous", r->out.ous);
202                 ndr->depth++;
203                 ndr_print_ptr(ndr, "ous", *r->out.ous);
204                 ndr->depth++;
205                 if (*r->out.ous) {
206                         ndr_print_ptr(ndr, "ous", **r->out.ous);
207                         ndr->depth++;
208                         if (**r->out.ous) {
209                                 ndr_print_string(ndr, "ous", **r->out.ous);
210                         }
211                         ndr->depth--;
212                 }
213                 ndr->depth--;
214                 ndr->depth--;
215                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
216                 ndr->depth--;
217         }
218         ndr->depth--;
219 }
220
221 _PUBLIC_ void ndr_print_NetServerGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerGetInfo *r)
222 {
223         ndr_print_struct(ndr, name, "NetServerGetInfo");
224         ndr->depth++;
225         if (flags & NDR_SET_VALUES) {
226                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
227         }
228         if (flags & NDR_IN) {
229                 ndr_print_struct(ndr, "in", "NetServerGetInfo");
230                 ndr->depth++;
231                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
232                 ndr->depth++;
233                 if (r->in.server_name) {
234                         ndr_print_string(ndr, "server_name", r->in.server_name);
235                 }
236                 ndr->depth--;
237                 ndr_print_uint32(ndr, "level", r->in.level);
238                 ndr->depth--;
239         }
240         if (flags & NDR_OUT) {
241                 ndr_print_struct(ndr, "out", "NetServerGetInfo");
242                 ndr->depth++;
243                 ndr_print_ptr(ndr, "buffer", r->out.buffer);
244                 ndr->depth++;
245                 ndr_print_ptr(ndr, "buffer", *r->out.buffer);
246                 ndr->depth++;
247                 if (*r->out.buffer) {
248                         ndr_print_uint8(ndr, "buffer", **r->out.buffer);
249                 }
250                 ndr->depth--;
251                 ndr->depth--;
252                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
253                 ndr->depth--;
254         }
255         ndr->depth--;
256 }
257
258 _PUBLIC_ void ndr_print_NetServerSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerSetInfo *r)
259 {
260         ndr_print_struct(ndr, name, "NetServerSetInfo");
261         ndr->depth++;
262         if (flags & NDR_SET_VALUES) {
263                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
264         }
265         if (flags & NDR_IN) {
266                 ndr_print_struct(ndr, "in", "NetServerSetInfo");
267                 ndr->depth++;
268                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
269                 ndr->depth++;
270                 if (r->in.server_name) {
271                         ndr_print_string(ndr, "server_name", r->in.server_name);
272                 }
273                 ndr->depth--;
274                 ndr_print_uint32(ndr, "level", r->in.level);
275                 ndr_print_ptr(ndr, "buffer", r->in.buffer);
276                 ndr->depth++;
277                 ndr_print_uint8(ndr, "buffer", *r->in.buffer);
278                 ndr->depth--;
279                 ndr->depth--;
280         }
281         if (flags & NDR_OUT) {
282                 ndr_print_struct(ndr, "out", "NetServerSetInfo");
283                 ndr->depth++;
284                 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
285                 ndr->depth++;
286                 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
287                 ndr->depth--;
288                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
289                 ndr->depth--;
290         }
291         ndr->depth--;
292 }
293
294 _PUBLIC_ void ndr_print_NetGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetDCName *r)
295 {
296         ndr_print_struct(ndr, name, "NetGetDCName");
297         ndr->depth++;
298         if (flags & NDR_SET_VALUES) {
299                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
300         }
301         if (flags & NDR_IN) {
302                 ndr_print_struct(ndr, "in", "NetGetDCName");
303                 ndr->depth++;
304                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
305                 ndr->depth++;
306                 if (r->in.server_name) {
307                         ndr_print_string(ndr, "server_name", r->in.server_name);
308                 }
309                 ndr->depth--;
310                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
311                 ndr->depth++;
312                 if (r->in.domain_name) {
313                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
314                 }
315                 ndr->depth--;
316                 ndr->depth--;
317         }
318         if (flags & NDR_OUT) {
319                 ndr_print_struct(ndr, "out", "NetGetDCName");
320                 ndr->depth++;
321                 ndr_print_ptr(ndr, "buffer", r->out.buffer);
322                 ndr->depth++;
323                 ndr_print_ptr(ndr, "buffer", *r->out.buffer);
324                 ndr->depth++;
325                 if (*r->out.buffer) {
326                         ndr_print_uint8(ndr, "buffer", **r->out.buffer);
327                 }
328                 ndr->depth--;
329                 ndr->depth--;
330                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
331                 ndr->depth--;
332         }
333         ndr->depth--;
334 }
335
336 _PUBLIC_ void ndr_print_NetGetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetAnyDCName *r)
337 {
338         ndr_print_struct(ndr, name, "NetGetAnyDCName");
339         ndr->depth++;
340         if (flags & NDR_SET_VALUES) {
341                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
342         }
343         if (flags & NDR_IN) {
344                 ndr_print_struct(ndr, "in", "NetGetAnyDCName");
345                 ndr->depth++;
346                 ndr_print_ptr(ndr, "server_name", r->in.server_name);
347                 ndr->depth++;
348                 if (r->in.server_name) {
349                         ndr_print_string(ndr, "server_name", r->in.server_name);
350                 }
351                 ndr->depth--;
352                 ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
353                 ndr->depth++;
354                 if (r->in.domain_name) {
355                         ndr_print_string(ndr, "domain_name", r->in.domain_name);
356                 }
357                 ndr->depth--;
358                 ndr->depth--;
359         }
360         if (flags & NDR_OUT) {
361                 ndr_print_struct(ndr, "out", "NetGetAnyDCName");
362                 ndr->depth++;
363                 ndr_print_ptr(ndr, "buffer", r->out.buffer);
364                 ndr->depth++;
365                 ndr_print_ptr(ndr, "buffer", *r->out.buffer);
366                 ndr->depth++;
367                 if (*r->out.buffer) {
368                         ndr_print_uint8(ndr, "buffer", **r->out.buffer);
369                 }
370                 ndr->depth--;
371                 ndr->depth--;
372                 ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
373                 ndr->depth--;
374         }
375         ndr->depth--;
376 }
377