1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/source3/librpc/gen_ndr/cli_initshutdown.c

159 lines
2.9 KiB
C
Raw Normal View History

/*
* Unix SMB/CIFS implementation.
* client auto-generated by pidl. DO NOT MODIFY!
*/
#include "includes.h"
#include "librpc/gen_ndr/cli_initshutdown.h"
NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname,
struct initshutdown_String *message,
uint32_t timeout,
uint8_t force_apps,
uint8_t reboot,
WERROR *werror)
{
struct initshutdown_Init r;
NTSTATUS status;
/* In parameters */
r.in.hostname = hostname;
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
r.in.reboot = reboot;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_Init, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
PI_INITSHUTDOWN,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_INIT,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *server,
WERROR *werror)
{
struct initshutdown_Abort r;
NTSTATUS status;
/* In parameters */
r.in.server = server;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_Abort, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
PI_INITSHUTDOWN,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_ABORT,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname,
struct initshutdown_String *message,
uint32_t timeout,
uint8_t force_apps,
uint8_t reboot,
uint32_t reason,
WERROR *werror)
{
struct initshutdown_InitEx r;
NTSTATUS status;
/* In parameters */
r.in.hostname = hostname;
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
r.in.reboot = reboot;
r.in.reason = reason;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_InitEx, &r);
}
status = cli_do_rpc_ndr(cli,
mem_ctx,
PI_INITSHUTDOWN,
&ndr_table_initshutdown,
NDR_INITSHUTDOWN_INITEX,
&r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r);
}
if (NT_STATUS_IS_ERR(status)) {
return status;
}
/* Return variables */
/* Return result */
if (werror) {
*werror = r.out.result;
}
return werror_to_ntstatus(r.out.result);
}