2006-09-15 22:32:43 +04:00
/*
* Unix SMB / CIFS implementation .
* client auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
2008-12-16 18:32:18 +03:00
# include "../librpc/gen_ndr/cli_initshutdown.h"
2006-09-15 22:32:43 +04:00
2009-07-30 20:56:42 +04:00
struct rpccli_initshutdown_Init_state {
struct initshutdown_Init orig ;
struct initshutdown_Init tmp ;
TALLOC_CTX * out_mem_ctx ;
NTSTATUS ( * dispatch_recv ) ( struct tevent_req * req , TALLOC_CTX * mem_ctx ) ;
} ;
static void rpccli_initshutdown_Init_done ( struct tevent_req * subreq ) ;
struct tevent_req * rpccli_initshutdown_Init_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct rpc_pipe_client * cli ,
uint16_t * _hostname /* [in] [unique] */ ,
struct lsa_StringLarge * _message /* [in] [unique] */ ,
uint32_t _timeout /* [in] */ ,
uint8_t _force_apps /* [in] */ ,
uint8_t _do_reboot /* [in] */ )
{
struct tevent_req * req ;
struct rpccli_initshutdown_Init_state * state ;
struct tevent_req * subreq ;
req = tevent_req_create ( mem_ctx , & state ,
struct rpccli_initshutdown_Init_state ) ;
if ( req = = NULL ) {
return NULL ;
}
state - > out_mem_ctx = NULL ;
state - > dispatch_recv = cli - > dispatch_recv ;
/* In parameters */
state - > orig . in . hostname = _hostname ;
state - > orig . in . message = _message ;
state - > orig . in . timeout = _timeout ;
state - > orig . in . force_apps = _force_apps ;
state - > orig . in . do_reboot = _do_reboot ;
/* Out parameters */
/* Result */
ZERO_STRUCT ( state - > orig . out . result ) ;
/* make a temporary copy, that we pass to the dispatch function */
state - > tmp = state - > orig ;
subreq = cli - > dispatch_send ( state , ev , cli ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2009-07-30 20:56:42 +04:00
NDR_INITSHUTDOWN_INIT ,
& state - > tmp ) ;
if ( tevent_req_nomem ( subreq , req ) ) {
return tevent_req_post ( req , ev ) ;
}
tevent_req_set_callback ( subreq , rpccli_initshutdown_Init_done , req ) ;
return req ;
}
static void rpccli_initshutdown_Init_done ( struct tevent_req * subreq )
{
struct tevent_req * req = tevent_req_callback_data (
subreq , struct tevent_req ) ;
struct rpccli_initshutdown_Init_state * state = tevent_req_data (
req , struct rpccli_initshutdown_Init_state ) ;
NTSTATUS status ;
TALLOC_CTX * mem_ctx ;
if ( state - > out_mem_ctx ) {
mem_ctx = state - > out_mem_ctx ;
} else {
mem_ctx = state ;
}
status = state - > dispatch_recv ( subreq , mem_ctx ) ;
TALLOC_FREE ( subreq ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
tevent_req_nterror ( req , status ) ;
return ;
}
/* Copy out parameters */
/* Copy result */
state - > orig . out . result = state - > tmp . out . result ;
/* Reset temporary structure */
ZERO_STRUCT ( state - > tmp ) ;
tevent_req_done ( req ) ;
}
NTSTATUS rpccli_initshutdown_Init_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
WERROR * result )
{
struct rpccli_initshutdown_Init_state * state = tevent_req_data (
req , struct rpccli_initshutdown_Init_state ) ;
NTSTATUS status ;
if ( tevent_req_is_nterror ( req , & status ) ) {
tevent_req_received ( req ) ;
return status ;
}
/* Steal possbile out parameters to the callers context */
talloc_steal ( mem_ctx , state - > out_mem_ctx ) ;
/* Return result */
* result = state - > orig . out . result ;
tevent_req_received ( req ) ;
return NT_STATUS_OK ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_initshutdown_Init ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
uint16_t * hostname /* [in] [unique] */ ,
2008-10-15 18:13:02 +04:00
struct lsa_StringLarge * message /* [in] [unique] */ ,
2008-03-25 19:52:33 +03:00
uint32_t timeout /* [in] */ ,
uint8_t force_apps /* [in] */ ,
2008-10-15 18:25:06 +04:00
uint8_t do_reboot /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-15 22:32:43 +04:00
{
struct initshutdown_Init r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* In parameters */
r . in . hostname = hostname ;
r . in . message = message ;
r . in . timeout = timeout ;
r . in . force_apps = force_apps ;
2008-10-15 18:25:06 +04:00
r . in . do_reboot = do_reboot ;
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2008-01-09 13:59:11 +03:00
NDR_INITSHUTDOWN_INIT ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2009-07-30 20:56:42 +04:00
struct rpccli_initshutdown_Abort_state {
struct initshutdown_Abort orig ;
struct initshutdown_Abort tmp ;
TALLOC_CTX * out_mem_ctx ;
NTSTATUS ( * dispatch_recv ) ( struct tevent_req * req , TALLOC_CTX * mem_ctx ) ;
} ;
static void rpccli_initshutdown_Abort_done ( struct tevent_req * subreq ) ;
struct tevent_req * rpccli_initshutdown_Abort_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct rpc_pipe_client * cli ,
uint16_t * _server /* [in] [unique] */ )
{
struct tevent_req * req ;
struct rpccli_initshutdown_Abort_state * state ;
struct tevent_req * subreq ;
req = tevent_req_create ( mem_ctx , & state ,
struct rpccli_initshutdown_Abort_state ) ;
if ( req = = NULL ) {
return NULL ;
}
state - > out_mem_ctx = NULL ;
state - > dispatch_recv = cli - > dispatch_recv ;
/* In parameters */
state - > orig . in . server = _server ;
/* Out parameters */
/* Result */
ZERO_STRUCT ( state - > orig . out . result ) ;
/* make a temporary copy, that we pass to the dispatch function */
state - > tmp = state - > orig ;
subreq = cli - > dispatch_send ( state , ev , cli ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2009-07-30 20:56:42 +04:00
NDR_INITSHUTDOWN_ABORT ,
& state - > tmp ) ;
if ( tevent_req_nomem ( subreq , req ) ) {
return tevent_req_post ( req , ev ) ;
}
tevent_req_set_callback ( subreq , rpccli_initshutdown_Abort_done , req ) ;
return req ;
}
static void rpccli_initshutdown_Abort_done ( struct tevent_req * subreq )
{
struct tevent_req * req = tevent_req_callback_data (
subreq , struct tevent_req ) ;
struct rpccli_initshutdown_Abort_state * state = tevent_req_data (
req , struct rpccli_initshutdown_Abort_state ) ;
NTSTATUS status ;
TALLOC_CTX * mem_ctx ;
if ( state - > out_mem_ctx ) {
mem_ctx = state - > out_mem_ctx ;
} else {
mem_ctx = state ;
}
status = state - > dispatch_recv ( subreq , mem_ctx ) ;
TALLOC_FREE ( subreq ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
tevent_req_nterror ( req , status ) ;
return ;
}
/* Copy out parameters */
/* Copy result */
state - > orig . out . result = state - > tmp . out . result ;
/* Reset temporary structure */
ZERO_STRUCT ( state - > tmp ) ;
tevent_req_done ( req ) ;
}
NTSTATUS rpccli_initshutdown_Abort_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
WERROR * result )
{
struct rpccli_initshutdown_Abort_state * state = tevent_req_data (
req , struct rpccli_initshutdown_Abort_state ) ;
NTSTATUS status ;
if ( tevent_req_is_nterror ( req , & status ) ) {
tevent_req_received ( req ) ;
return status ;
}
/* Steal possbile out parameters to the callers context */
talloc_steal ( mem_ctx , state - > out_mem_ctx ) ;
/* Return result */
* result = state - > orig . out . result ;
tevent_req_received ( req ) ;
return NT_STATUS_OK ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_initshutdown_Abort ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
uint16_t * server /* [in] [unique] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-15 22:32:43 +04:00
{
struct initshutdown_Abort r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* In parameters */
r . in . server = server ;
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2008-01-09 13:59:11 +03:00
NDR_INITSHUTDOWN_ABORT ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}
2009-07-30 20:56:42 +04:00
struct rpccli_initshutdown_InitEx_state {
struct initshutdown_InitEx orig ;
struct initshutdown_InitEx tmp ;
TALLOC_CTX * out_mem_ctx ;
NTSTATUS ( * dispatch_recv ) ( struct tevent_req * req , TALLOC_CTX * mem_ctx ) ;
} ;
static void rpccli_initshutdown_InitEx_done ( struct tevent_req * subreq ) ;
struct tevent_req * rpccli_initshutdown_InitEx_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct rpc_pipe_client * cli ,
uint16_t * _hostname /* [in] [unique] */ ,
struct lsa_StringLarge * _message /* [in] [unique] */ ,
uint32_t _timeout /* [in] */ ,
uint8_t _force_apps /* [in] */ ,
uint8_t _do_reboot /* [in] */ ,
uint32_t _reason /* [in] */ )
{
struct tevent_req * req ;
struct rpccli_initshutdown_InitEx_state * state ;
struct tevent_req * subreq ;
req = tevent_req_create ( mem_ctx , & state ,
struct rpccli_initshutdown_InitEx_state ) ;
if ( req = = NULL ) {
return NULL ;
}
state - > out_mem_ctx = NULL ;
state - > dispatch_recv = cli - > dispatch_recv ;
/* In parameters */
state - > orig . in . hostname = _hostname ;
state - > orig . in . message = _message ;
state - > orig . in . timeout = _timeout ;
state - > orig . in . force_apps = _force_apps ;
state - > orig . in . do_reboot = _do_reboot ;
state - > orig . in . reason = _reason ;
/* Out parameters */
/* Result */
ZERO_STRUCT ( state - > orig . out . result ) ;
/* make a temporary copy, that we pass to the dispatch function */
state - > tmp = state - > orig ;
subreq = cli - > dispatch_send ( state , ev , cli ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2009-07-30 20:56:42 +04:00
NDR_INITSHUTDOWN_INITEX ,
& state - > tmp ) ;
if ( tevent_req_nomem ( subreq , req ) ) {
return tevent_req_post ( req , ev ) ;
}
tevent_req_set_callback ( subreq , rpccli_initshutdown_InitEx_done , req ) ;
return req ;
}
static void rpccli_initshutdown_InitEx_done ( struct tevent_req * subreq )
{
struct tevent_req * req = tevent_req_callback_data (
subreq , struct tevent_req ) ;
struct rpccli_initshutdown_InitEx_state * state = tevent_req_data (
req , struct rpccli_initshutdown_InitEx_state ) ;
NTSTATUS status ;
TALLOC_CTX * mem_ctx ;
if ( state - > out_mem_ctx ) {
mem_ctx = state - > out_mem_ctx ;
} else {
mem_ctx = state ;
}
status = state - > dispatch_recv ( subreq , mem_ctx ) ;
TALLOC_FREE ( subreq ) ;
if ( ! NT_STATUS_IS_OK ( status ) ) {
tevent_req_nterror ( req , status ) ;
return ;
}
/* Copy out parameters */
/* Copy result */
state - > orig . out . result = state - > tmp . out . result ;
/* Reset temporary structure */
ZERO_STRUCT ( state - > tmp ) ;
tevent_req_done ( req ) ;
}
NTSTATUS rpccli_initshutdown_InitEx_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
WERROR * result )
{
struct rpccli_initshutdown_InitEx_state * state = tevent_req_data (
req , struct rpccli_initshutdown_InitEx_state ) ;
NTSTATUS status ;
if ( tevent_req_is_nterror ( req , & status ) ) {
tevent_req_received ( req ) ;
return status ;
}
/* Steal possbile out parameters to the callers context */
talloc_steal ( mem_ctx , state - > out_mem_ctx ) ;
/* Return result */
* result = state - > orig . out . result ;
tevent_req_received ( req ) ;
return NT_STATUS_OK ;
}
2008-01-09 13:59:11 +03:00
NTSTATUS rpccli_initshutdown_InitEx ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 19:52:33 +03:00
uint16_t * hostname /* [in] [unique] */ ,
2008-10-15 18:13:02 +04:00
struct lsa_StringLarge * message /* [in] [unique] */ ,
2008-03-25 19:52:33 +03:00
uint32_t timeout /* [in] */ ,
uint8_t force_apps /* [in] */ ,
2008-10-15 18:25:06 +04:00
uint8_t do_reboot /* [in] */ ,
2008-03-25 19:52:33 +03:00
uint32_t reason /* [in] */ ,
2008-01-09 13:59:11 +03:00
WERROR * werror )
2006-09-15 22:32:43 +04:00
{
struct initshutdown_InitEx r ;
NTSTATUS status ;
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* In parameters */
r . in . hostname = hostname ;
r . in . message = message ;
r . in . timeout = timeout ;
r . in . force_apps = force_apps ;
2008-10-15 18:25:06 +04:00
r . in . do_reboot = do_reboot ;
2006-09-15 22:32:43 +04:00
r . in . reason = reason ;
2008-01-08 20:07:55 +03:00
2009-01-21 15:40:18 +03:00
status = cli - > dispatch ( cli ,
2008-01-09 13:59:11 +03:00
mem_ctx ,
2009-11-08 21:38:01 +03:00
& ndr_table_initshutdown ,
2008-01-09 13:59:11 +03:00
NDR_INITSHUTDOWN_INITEX ,
& r ) ;
2008-01-08 20:07:55 +03:00
2007-02-16 17:50:57 +03:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-29 01:19:08 +04:00
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return variables */
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
/* Return result */
2007-12-03 20:19:20 +03:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 20:07:55 +03:00
2006-09-15 22:32:43 +04:00
return werror_to_ntstatus ( r . out . result ) ;
}