s3-samr: in _samr_QueryUserInfo() make sure to not return any info in error case.
[Samba.git] / librpc / gen_ndr / cli_dssetup.c
blob6cf923ff82b9ef28f12777fde656a25aa282a231
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_dssetup.h"
9 NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 enum dssetup_DsRoleInfoLevel level /* [in] */,
12 union dssetup_DsRoleInfo *info /* [out] [unique,switch_is(level)] */,
13 WERROR *werror)
15 struct dssetup_DsRoleGetPrimaryDomainInformation r;
16 NTSTATUS status;
18 /* In parameters */
19 r.in.level = level;
21 if (DEBUGLEVEL >= 10) {
22 NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r);
25 status = cli->dispatch(cli,
26 mem_ctx,
27 &ndr_table_dssetup,
28 NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION,
29 &r);
31 if (!NT_STATUS_IS_OK(status)) {
32 return status;
35 if (DEBUGLEVEL >= 10) {
36 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r);
39 if (NT_STATUS_IS_ERR(status)) {
40 return status;
43 /* Return variables */
44 if (info && r.out.info) {
45 *info = *r.out.info;
48 /* Return result */
49 if (werror) {
50 *werror = r.out.result;
53 return werror_to_ntstatus(r.out.result);
56 NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli,
57 TALLOC_CTX *mem_ctx,
58 WERROR *werror)
60 struct dssetup_DsRoleDnsNameToFlatName r;
61 NTSTATUS status;
63 /* In parameters */
65 if (DEBUGLEVEL >= 10) {
66 NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r);
69 status = cli->dispatch(cli,
70 mem_ctx,
71 &ndr_table_dssetup,
72 NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME,
73 &r);
75 if (!NT_STATUS_IS_OK(status)) {
76 return status;
79 if (DEBUGLEVEL >= 10) {
80 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r);
83 if (NT_STATUS_IS_ERR(status)) {
84 return status;
87 /* Return variables */
89 /* Return result */
90 if (werror) {
91 *werror = r.out.result;
94 return werror_to_ntstatus(r.out.result);
97 NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli,
98 TALLOC_CTX *mem_ctx,
99 WERROR *werror)
101 struct dssetup_DsRoleDcAsDc r;
102 NTSTATUS status;
104 /* In parameters */
106 if (DEBUGLEVEL >= 10) {
107 NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, &r);
110 status = cli->dispatch(cli,
111 mem_ctx,
112 &ndr_table_dssetup,
113 NDR_DSSETUP_DSROLEDCASDC,
114 &r);
116 if (!NT_STATUS_IS_OK(status)) {
117 return status;
120 if (DEBUGLEVEL >= 10) {
121 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, &r);
124 if (NT_STATUS_IS_ERR(status)) {
125 return status;
128 /* Return variables */
130 /* Return result */
131 if (werror) {
132 *werror = r.out.result;
135 return werror_to_ntstatus(r.out.result);
138 NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli,
139 TALLOC_CTX *mem_ctx,
140 WERROR *werror)
142 struct dssetup_DsRoleDcAsReplica r;
143 NTSTATUS status;
145 /* In parameters */
147 if (DEBUGLEVEL >= 10) {
148 NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, &r);
151 status = cli->dispatch(cli,
152 mem_ctx,
153 &ndr_table_dssetup,
154 NDR_DSSETUP_DSROLEDCASREPLICA,
155 &r);
157 if (!NT_STATUS_IS_OK(status)) {
158 return status;
161 if (DEBUGLEVEL >= 10) {
162 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, &r);
165 if (NT_STATUS_IS_ERR(status)) {
166 return status;
169 /* Return variables */
171 /* Return result */
172 if (werror) {
173 *werror = r.out.result;
176 return werror_to_ntstatus(r.out.result);
179 NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli,
180 TALLOC_CTX *mem_ctx,
181 WERROR *werror)
183 struct dssetup_DsRoleDemoteDc r;
184 NTSTATUS status;
186 /* In parameters */
188 if (DEBUGLEVEL >= 10) {
189 NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, &r);
192 status = cli->dispatch(cli,
193 mem_ctx,
194 &ndr_table_dssetup,
195 NDR_DSSETUP_DSROLEDEMOTEDC,
196 &r);
198 if (!NT_STATUS_IS_OK(status)) {
199 return status;
202 if (DEBUGLEVEL >= 10) {
203 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, &r);
206 if (NT_STATUS_IS_ERR(status)) {
207 return status;
210 /* Return variables */
212 /* Return result */
213 if (werror) {
214 *werror = r.out.result;
217 return werror_to_ntstatus(r.out.result);
220 NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli,
221 TALLOC_CTX *mem_ctx,
222 WERROR *werror)
224 struct dssetup_DsRoleGetDcOperationProgress r;
225 NTSTATUS status;
227 /* In parameters */
229 if (DEBUGLEVEL >= 10) {
230 NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r);
233 status = cli->dispatch(cli,
234 mem_ctx,
235 &ndr_table_dssetup,
236 NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS,
237 &r);
239 if (!NT_STATUS_IS_OK(status)) {
240 return status;
243 if (DEBUGLEVEL >= 10) {
244 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r);
247 if (NT_STATUS_IS_ERR(status)) {
248 return status;
251 /* Return variables */
253 /* Return result */
254 if (werror) {
255 *werror = r.out.result;
258 return werror_to_ntstatus(r.out.result);
261 NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli,
262 TALLOC_CTX *mem_ctx,
263 WERROR *werror)
265 struct dssetup_DsRoleGetDcOperationResults r;
266 NTSTATUS status;
268 /* In parameters */
270 if (DEBUGLEVEL >= 10) {
271 NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, &r);
274 status = cli->dispatch(cli,
275 mem_ctx,
276 &ndr_table_dssetup,
277 NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS,
278 &r);
280 if (!NT_STATUS_IS_OK(status)) {
281 return status;
284 if (DEBUGLEVEL >= 10) {
285 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, &r);
288 if (NT_STATUS_IS_ERR(status)) {
289 return status;
292 /* Return variables */
294 /* Return result */
295 if (werror) {
296 *werror = r.out.result;
299 return werror_to_ntstatus(r.out.result);
302 NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli,
303 TALLOC_CTX *mem_ctx,
304 WERROR *werror)
306 struct dssetup_DsRoleCancel r;
307 NTSTATUS status;
309 /* In parameters */
311 if (DEBUGLEVEL >= 10) {
312 NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, &r);
315 status = cli->dispatch(cli,
316 mem_ctx,
317 &ndr_table_dssetup,
318 NDR_DSSETUP_DSROLECANCEL,
319 &r);
321 if (!NT_STATUS_IS_OK(status)) {
322 return status;
325 if (DEBUGLEVEL >= 10) {
326 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, &r);
329 if (NT_STATUS_IS_ERR(status)) {
330 return status;
333 /* Return variables */
335 /* Return result */
336 if (werror) {
337 *werror = r.out.result;
340 return werror_to_ntstatus(r.out.result);
343 NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli,
344 TALLOC_CTX *mem_ctx,
345 WERROR *werror)
347 struct dssetup_DsRoleServerSaveStateForUpgrade r;
348 NTSTATUS status;
350 /* In parameters */
352 if (DEBUGLEVEL >= 10) {
353 NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r);
356 status = cli->dispatch(cli,
357 mem_ctx,
358 &ndr_table_dssetup,
359 NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE,
360 &r);
362 if (!NT_STATUS_IS_OK(status)) {
363 return status;
366 if (DEBUGLEVEL >= 10) {
367 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r);
370 if (NT_STATUS_IS_ERR(status)) {
371 return status;
374 /* Return variables */
376 /* Return result */
377 if (werror) {
378 *werror = r.out.result;
381 return werror_to_ntstatus(r.out.result);
384 NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli,
385 TALLOC_CTX *mem_ctx,
386 WERROR *werror)
388 struct dssetup_DsRoleUpgradeDownlevelServer r;
389 NTSTATUS status;
391 /* In parameters */
393 if (DEBUGLEVEL >= 10) {
394 NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r);
397 status = cli->dispatch(cli,
398 mem_ctx,
399 &ndr_table_dssetup,
400 NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER,
401 &r);
403 if (!NT_STATUS_IS_OK(status)) {
404 return status;
407 if (DEBUGLEVEL >= 10) {
408 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r);
411 if (NT_STATUS_IS_ERR(status)) {
412 return status;
415 /* Return variables */
417 /* Return result */
418 if (werror) {
419 *werror = r.out.result;
422 return werror_to_ntstatus(r.out.result);
425 NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli,
426 TALLOC_CTX *mem_ctx,
427 WERROR *werror)
429 struct dssetup_DsRoleAbortDownlevelServerUpgrade r;
430 NTSTATUS status;
432 /* In parameters */
434 if (DEBUGLEVEL >= 10) {
435 NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r);
438 status = cli->dispatch(cli,
439 mem_ctx,
440 &ndr_table_dssetup,
441 NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE,
442 &r);
444 if (!NT_STATUS_IS_OK(status)) {
445 return status;
448 if (DEBUGLEVEL >= 10) {
449 NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r);
452 if (NT_STATUS_IS_ERR(status)) {
453 return status;
456 /* Return variables */
458 /* Return result */
459 if (werror) {
460 *werror = r.out.result;
463 return werror_to_ntstatus(r.out.result);