|
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 "./../MobsterRPCService/mobster.h" |
|
23 |
|
24 /* Default timeout can be changed using clnt_control() */ |
|
25 static struct timeval TIMEOUT = { 25, 0 }; |
|
26 |
|
27 int * |
|
28 ss_startuprpcservice_1(argp, clnt) |
|
29 struct TChannelAddress *argp; |
|
30 CLIENT *clnt; |
|
31 { |
|
32 static int res; |
|
33 |
|
34 bzero((char *)&res, sizeof(res)); |
|
35 clnt_call(clnt, SS_STARTUPRPCSERVICE, xdr_TChannelAddress, argp, xdr_int, &res, TIMEOUT); |
|
36 return (&res); |
|
37 } |
|
38 |
|
39 |
|
40 int * |
|
41 sc_shutdownrpcservice_1(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_1(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_TComponentList, &res, TIMEOUT); |
|
62 return (&res); |
|
63 } |
|
64 |
|
65 |
|
66 int * |
|
67 cstr_startdevice_1(argp, clnt) |
|
68 TDeviceDesc *argp; |
|
69 CLIENT *clnt; |
|
70 { |
|
71 static int res; |
|
72 |
|
73 bzero((char *)&res, sizeof(res)); |
|
74 clnt_call(clnt, CSTR_STARTDEVICE, xdr_TDeviceDesc, argp, xdr_int, &res, TIMEOUT); |
|
75 return (&res); |
|
76 } |
|
77 |
|
78 |
|
79 int * |
|
80 dstr_removedevice_1(argp, clnt) |
|
81 int *argp; |
|
82 CLIENT *clnt; |
|
83 { |
|
84 static int res; |
|
85 |
|
86 bzero((char *)&res, sizeof(res)); |
|
87 clnt_call(clnt, DSTR_REMOVEDEVICE, xdr_int, argp, xdr_int, &res, TIMEOUT); |
|
88 return (&res); |
|
89 } |
|
90 |
|
91 |
|
92 TDeviceDesc * |
|
93 getdeviceinfo_1(argp, clnt) |
|
94 int *argp; |
|
95 CLIENT *clnt; |
|
96 { |
|
97 static TDeviceDesc res; |
|
98 |
|
99 bzero((char *)&res, sizeof(res)); |
|
100 clnt_call(clnt, GETDEVICEINFO, xdr_int, argp, xdr_TDeviceDesc, &res, TIMEOUT); |
|
101 return (&res); |
|
102 } |
|
103 |
|
104 |
|
105 TVarData * |
|
106 getdevicelog_1(argp, clnt) |
|
107 int *argp; |
|
108 CLIENT *clnt; |
|
109 { |
|
110 static TVarData res; |
|
111 |
|
112 bzero((char *)&res, sizeof(res)); |
|
113 clnt_call(clnt, GETDEVICELOG, xdr_int, argp, xdr_TVarData, &res, TIMEOUT); |
|
114 return (&res); |
|
115 } |
|
116 |
|
117 |
|
118 int * |
|
119 stopdevice_1(argp, clnt) |
|
120 int *argp; |
|
121 CLIENT *clnt; |
|
122 { |
|
123 static int res; |
|
124 |
|
125 bzero((char *)&res, sizeof(res)); |
|
126 clnt_call(clnt, STOPDEVICE, xdr_int, argp, xdr_int, &res, TIMEOUT); |
|
127 return (&res); |
|
128 } |
|
129 |
|
130 |
|
131 int * |
|
132 setremoteuuaddress_1(argp, clnt) |
|
133 struct TUUAddress *argp; |
|
134 CLIENT *clnt; |
|
135 { |
|
136 static int res; |
|
137 |
|
138 bzero((char *)&res, sizeof(res)); |
|
139 clnt_call(clnt, SETREMOTEUUADDRESS, xdr_TUUAddress, argp, xdr_int, &res, TIMEOUT); |
|
140 return (&res); |
|
141 } |
|
142 |