Author: jra Date: 2005-08-28 22:20:06 +0000 (Sun, 28 Aug 2005) New Revision: 9719
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9719 Log: One more -> boilerplate. Jeremy. Modified: branches/tmp/RPCREWRITE/source/rpc_client/cli_svcctl.c Changeset: Modified: branches/tmp/RPCREWRITE/source/rpc_client/cli_svcctl.c =================================================================== --- branches/tmp/RPCREWRITE/source/rpc_client/cli_svcctl.c 2005-08-28 22:17:07 UTC (rev 9718) +++ branches/tmp/RPCREWRITE/source/rpc_client/cli_svcctl.c 2005-08-28 22:20:06 UTC (rev 9719) @@ -61,7 +61,7 @@ /******************************************************************** ********************************************************************/ -WERROR cli_svcctl_open_scm( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_open_scm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hSCM, uint32 access_desired ) { SVCCTL_Q_OPEN_SCMANAGER in; @@ -80,12 +80,12 @@ if ( !(in.servername = TALLOC_P( mem_ctx, UNISTR2 )) ) return WERR_NOMEM; - fstr_sprintf( server, "\\\\%s", cli->desthost ); + fstr_sprintf( server, "\\\\%s", cli->cli->desthost ); init_unistr2( in.servername, server, UNI_STR_TERMINATE ); in.access = access_desired; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_OPEN_SCMANAGER_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_OPEN_SCMANAGER_W, in, out, qbuf, rbuf, svcctl_io_q_open_scmanager, @@ -103,7 +103,7 @@ /******************************************************************** ********************************************************************/ -WERROR cli_svcctl_open_service( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_open_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hSCM, POLICY_HND *hService, const char *servicename, uint32 access_desired ) { @@ -118,7 +118,7 @@ init_unistr2( &in.servicename, servicename, UNI_STR_TERMINATE ); in.access = access_desired; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_OPEN_SERVICE_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_OPEN_SERVICE_W, in, out, qbuf, rbuf, svcctl_io_q_open_service, @@ -136,7 +136,7 @@ /******************************************************************** ********************************************************************/ -WERROR cli_svcctl_close_service( struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService ) +WERROR rpccli_svcctl_close_service(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService ) { SVCCTL_Q_CLOSE_SERVICE in; SVCCTL_R_CLOSE_SERVICE out; @@ -147,7 +147,7 @@ memcpy( &in.handle, hService, sizeof(POLICY_HND) ); - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_CLOSE_SERVICE, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_CLOSE_SERVICE, in, out, qbuf, rbuf, svcctl_io_q_close_service, @@ -160,7 +160,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_enumerate_services( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hSCM, uint32 type, uint32 state, uint32 *returned, ENUM_SERVICES_STATUS **service_array ) { @@ -185,7 +185,7 @@ /* first time is to get the buffer size */ in.buffer_size = 0; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_ENUM_SERVICES_STATUS_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_ENUM_SERVICES_STATUS_W, in, out, qbuf, rbuf, svcctl_io_q_enum_services_status, @@ -197,7 +197,7 @@ if ( W_ERROR_EQUAL( out.status, WERR_MORE_DATA ) ) { in.buffer_size = out.needed; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_ENUM_SERVICES_STATUS_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_ENUM_SERVICES_STATUS_W, in, out, qbuf, rbuf, svcctl_io_q_enum_services_status, @@ -225,7 +225,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_query_status( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_query_status( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService, SERVICE_STATUS *status ) { SVCCTL_Q_QUERY_STATUS in; @@ -237,7 +237,7 @@ memcpy( &in.handle, hService, sizeof(POLICY_HND) ); - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_STATUS, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_STATUS, in, out, qbuf, rbuf, svcctl_io_q_query_status, @@ -255,7 +255,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_query_config(struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService, SERVICE_CONFIG *config ) { SVCCTL_Q_QUERY_SERVICE_CONFIG in; @@ -269,7 +269,7 @@ in.buffer_size = 0; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_SERVICE_CONFIG_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_SERVICE_CONFIG_W, in, out, qbuf, rbuf, svcctl_io_q_query_service_config, @@ -279,7 +279,7 @@ if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) { in.buffer_size = out.needed; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_SERVICE_CONFIG_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_QUERY_SERVICE_CONFIG_W, in, out, qbuf, rbuf, svcctl_io_q_query_service_config, @@ -310,7 +310,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_start_service( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_start_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService, const char **parm_array, uint32 parmcount ) { @@ -326,7 +326,7 @@ in.parmcount = 0; in.parameters = NULL; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_START_SERVICE_W, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_START_SERVICE_W, in, out, qbuf, rbuf, svcctl_io_q_start_service, @@ -339,7 +339,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_control_service( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_control_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService, uint32 control, SERVICE_STATUS *status ) { @@ -353,7 +353,7 @@ memcpy( &in.handle, hService, sizeof(POLICY_HND) ); in.control = control; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_CONTROL_SERVICE, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_CONTROL_SERVICE, in, out, qbuf, rbuf, svcctl_io_q_control_service, @@ -372,7 +372,7 @@ /******************************************************************* *******************************************************************/ -WERROR cli_svcctl_get_dispname( struct cli_state *cli, TALLOC_CTX *mem_ctx, +WERROR rpccli_svcctl_get_dispname( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService, fstring displayname ) { SVCCTL_Q_GET_DISPLAY_NAME in; @@ -385,7 +385,7 @@ memcpy( &in.handle, hService, sizeof(POLICY_HND) ); in.display_name_len = 0; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME, in, out, qbuf, rbuf, svcctl_io_q_get_display_name, @@ -397,7 +397,7 @@ if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) { in.display_name_len = out.display_name_len; - CLI_DO_RPC( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME, + CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME, in, out, qbuf, rbuf, svcctl_io_q_get_display_name,
