testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/TestService/testservice_clnt.c
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include <rpc/rpc.h>
       
    22 #include "testservice.h"
       
    23 
       
    24 /* Default timeout can be changed using clnt_control() */
       
    25 static struct timeval TIMEOUT = { 25, 0 };
       
    26 
       
    27 int *
       
    28 ss_startuprpcservice_11(argp, clnt)
       
    29 	TStartupInfo *argp;
       
    30 	CLIENT *clnt;
       
    31 {
       
    32 	static int res;
       
    33 
       
    34 	bzero((char *)&res, sizeof(res));
       
    35 	clnt_call(clnt, SS_STARTUPRPCSERVICE, xdr_testservice_TStartupInfo, argp, xdr_int, &res, TIMEOUT);
       
    36 	return (&res);
       
    37 }
       
    38 
       
    39 
       
    40 int *
       
    41 sc_shutdownrpcservice_11(argp, clnt)
       
    42 	int *argp;
       
    43 	CLIENT *clnt;
       
    44 {
       
    45 	static int res;
       
    46 
       
    47 	bzero((char *)&res, sizeof(res));
       
    48 	clnt_call(clnt, SC_SHUTDOWNRPCSERVICE, xdr_int, argp, xdr_int, &res, TIMEOUT);
       
    49 	return (&res);
       
    50 }
       
    51 
       
    52 
       
    53 TComponentList *
       
    54 list_devices_11(argp, clnt)
       
    55 	void *argp;
       
    56 	CLIENT *clnt;
       
    57 {
       
    58 	static TComponentList res;
       
    59 
       
    60 	bzero((char *)&res, sizeof(res));
       
    61 	clnt_call(clnt, LIST_DEVICES, xdr_void, argp, xdr_testservice_TComponentList, &res, TIMEOUT);
       
    62 	return (&res);
       
    63 }
       
    64 
       
    65 
       
    66 TResult *
       
    67 st_discard_11(argp, clnt)
       
    68 	int *argp;
       
    69 	CLIENT *clnt;
       
    70 {
       
    71 	static TResult res;
       
    72 
       
    73 	bzero((char *)&res, sizeof(res));
       
    74 	clnt_call(clnt, ST_DISCARD, xdr_int, argp, xdr_testservice_TResult, &res, TIMEOUT);
       
    75 	return (&res);
       
    76 }
       
    77 
       
    78 
       
    79 TResult *
       
    80 st_block_11(argp, clnt)
       
    81 	int *argp;
       
    82 	CLIENT *clnt;
       
    83 {
       
    84 	static TResult res;
       
    85 
       
    86 	bzero((char *)&res, sizeof(res));
       
    87 	clnt_call(clnt, ST_BLOCK, xdr_int, argp, xdr_testservice_TResult, &res, TIMEOUT);
       
    88 	return (&res);
       
    89 }
       
    90 
       
    91 
       
    92 TResult *
       
    93 st_wait_11(argp, clnt)
       
    94 	int *argp;
       
    95 	CLIENT *clnt;
       
    96 {
       
    97 	static TResult res;
       
    98 
       
    99 	bzero((char *)&res, sizeof(res));
       
   100 	clnt_call(clnt, ST_WAIT, xdr_int, argp, xdr_testservice_TResult, &res, TIMEOUT);
       
   101 	return (&res);
       
   102 }
       
   103