0
|
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 "hostexecute.h"
|
|
23 |
|
|
24 |
/* Default timeout can be changed using clnt_control() */
|
|
25 |
static struct timeval TIMEOUT = { 25, 0 };
|
|
26 |
|
|
27 |
int *
|
|
28 |
ss_startuprpcservice_3(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_hostexecute_TStartupInfo, argp, xdr_int, &res, TIMEOUT);
|
|
36 |
return (&res);
|
|
37 |
}
|
|
38 |
|
|
39 |
|
|
40 |
int *
|
|
41 |
sc_shutdownrpcservice_3(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_3(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_hostexecute_TComponentList, &res, TIMEOUT);
|
|
62 |
return (&res);
|
|
63 |
}
|
|
64 |
|
|
65 |
|
|
66 |
TExecuteResult *
|
|
67 |
st_executecommand_3(argp, clnt)
|
|
68 |
TExecuteRequest *argp;
|
|
69 |
CLIENT *clnt;
|
|
70 |
{
|
|
71 |
static TExecuteResult res;
|
|
72 |
|
|
73 |
bzero((char *)&res, sizeof(res));
|
|
74 |
clnt_call(clnt, ST_EXECUTECOMMAND, xdr_hostexecute_TExecuteRequest, argp, xdr_hostexecute_TExecuteResult, &res, TIMEOUT);
|
|
75 |
return (&res);
|
|
76 |
}
|
|
77 |
|