|
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 #ifndef __MOBSTER_H__ |
|
22 #define __MOBSTER_H__ |
|
23 #include <rpc/types.h> |
|
24 #include <rpc/rpc.h> |
|
25 |
|
26 #define ERR_NONE 0 |
|
27 #define ERR_INVALID_ERROR_CODE -16 |
|
28 #define ERR_SERVICE_ALREADY_STARTED -1 |
|
29 #define ERR_SERVICE_NOT_RUNNING -2 |
|
30 #define ERR_ACTIVE_USER_SESSIONS -3 |
|
31 #define ERR_FAILED_TO_REMOVE_ACTIVE_SESSIONS -4 |
|
32 #define ERR_FAILED_TO_CREATE_COMPONENT_MANAGER -5 |
|
33 #define ERR_FAILED_TO_RETRIEVE_KEY -6 |
|
34 #define ERR_INSTANCE_DOES_NOT_EXIST -7 |
|
35 #define ERR_CANNOT_CREATE_NEW_INSTANCE -9 |
|
36 #define ERR_MISSING_PARAMETER -17 |
|
37 #define ERR_INVALID_METHOD -8 |
|
38 #define ERR_STUB_ALREADY_CONNECTED -10 |
|
39 #define ERR_FAILED_TO_CONNECT -11 |
|
40 #define ERR_STUB_NOT_CONNECTED -12 |
|
41 #define ERR_INVALID_RV_POINTER -13 |
|
42 #define ERR_RPC_ERROR -14 |
|
43 #define ERR_INVALID_SERVICE -15 |
|
44 #define ERR_INVALIDARG -50 |
|
45 #define ERR_INVALIDSTATE -51 |
|
46 #define ERR_GENERAL -52 |
|
47 #define INFO_MAXIMUM_OBJECTS 256 |
|
48 |
|
49 typedef struct { |
|
50 u_int TComponentList_len; |
|
51 int *TComponentList_val; |
|
52 } TComponentList; |
|
53 #ifdef __cplusplus |
|
54 extern "C" { |
|
55 bool_t xdr_mobster_TComponentList(...); |
|
56 } |
|
57 #else |
|
58 bool_t xdr_mobster_TComponentList(); |
|
59 #endif |
|
60 |
|
61 #define MAXADDRLEN 64 |
|
62 #define MAXPORTLEN 16 |
|
63 #define INVALID_DEVICE_ID 0xFFFFFFFF |
|
64 #define ERR_DEVICETHREADCREATIONFAILED -100 |
|
65 #define ERR_DEVICENOTRUNNING -101 |
|
66 #define ERR_STOPFAILED -102 |
|
67 #define ERR_STARTUPFAILED -103 |
|
68 #define ERR_CREATE_SOCKET_FAILED -104 |
|
69 #define ERR_BIND_FAILED -105 |
|
70 #define ERR_LISTEN_FAILED -106 |
|
71 #define ERR_CREATE_SERVER_THREAD_FAILED -117 |
|
72 #define ERR_ACCEPT_FAILED -107 |
|
73 #define ERR_CSPROTOCOLFAILED -108 |
|
74 #define ERR_CREATELOGFAILED -109 |
|
75 #define ERR_STARTPHONEFAILED -110 |
|
76 #define ERR_CONNECTSOCKETFAILED -111 |
|
77 #define ERR_OPENSERIALPORTFAILED -112 |
|
78 #define ERR_DEVICEINITIALISING -113 |
|
79 #define ERR_STOPREQUESTED -114 |
|
80 #define ERR_FAILEDTORESOLVEOUTGOINGAIRADDRESS -115 |
|
81 #define ERR_FAILEDTORESETSTATE -116 |
|
82 #define ERR_CHANNEL_SOCKET_ALREADY_SET -118 |
|
83 #define FILTER_NONE 0 |
|
84 #define FILTER_PPP 1 |
|
85 |
|
86 enum TDatalinkLayer { |
|
87 DL_INVALID = 0, |
|
88 DL_NULL = 1, |
|
89 DL_PACKETISE = 2, |
|
90 }; |
|
91 typedef enum TDatalinkLayer TDatalinkLayer; |
|
92 #ifdef __cplusplus |
|
93 extern "C" { |
|
94 bool_t xdr_mobster_TDatalinkLayer(...); |
|
95 } |
|
96 #else |
|
97 bool_t xdr_mobster_TDatalinkLayer(); |
|
98 #endif |
|
99 |
|
100 |
|
101 enum TChannelStatus { |
|
102 CS_INACTIVE = 0, |
|
103 CS_ACTIVE = 1, |
|
104 CS_CLOSED = 2, |
|
105 }; |
|
106 typedef enum TChannelStatus TChannelStatus; |
|
107 #ifdef __cplusplus |
|
108 extern "C" { |
|
109 bool_t xdr_mobster_TChannelStatus(...); |
|
110 } |
|
111 #else |
|
112 bool_t xdr_mobster_TChannelStatus(); |
|
113 #endif |
|
114 |
|
115 |
|
116 enum TDeviceExitReason { |
|
117 DER_INVALID = 0, |
|
118 DER_USER_REQUEST = 1, |
|
119 DER_START_PHONE_FAILED = 2, |
|
120 DER_UNKNOWN = 3, |
|
121 }; |
|
122 typedef enum TDeviceExitReason TDeviceExitReason; |
|
123 #ifdef __cplusplus |
|
124 extern "C" { |
|
125 bool_t xdr_mobster_TDeviceExitReason(...); |
|
126 } |
|
127 #else |
|
128 bool_t xdr_mobster_TDeviceExitReason(); |
|
129 #endif |
|
130 |
|
131 |
|
132 struct TChannelAddress { |
|
133 int iPort; |
|
134 }; |
|
135 typedef struct TChannelAddress TChannelAddress; |
|
136 #ifdef __cplusplus |
|
137 extern "C" { |
|
138 bool_t xdr_mobster_TChannelAddress(...); |
|
139 } |
|
140 #else |
|
141 bool_t xdr_mobster_TChannelAddress(); |
|
142 #endif |
|
143 |
|
144 |
|
145 struct TUUAddress { |
|
146 int iDeviceID; |
|
147 int iRemoteAddress; |
|
148 int iRemotePort; |
|
149 }; |
|
150 typedef struct TUUAddress TUUAddress; |
|
151 #ifdef __cplusplus |
|
152 extern "C" { |
|
153 bool_t xdr_mobster_TUUAddress(...); |
|
154 } |
|
155 #else |
|
156 bool_t xdr_mobster_TUUAddress(); |
|
157 #endif |
|
158 |
|
159 |
|
160 struct TDeviceDesc { |
|
161 TDatalinkLayer iDatalinkConfig; |
|
162 int iFilterConfig; |
|
163 int iMTID; |
|
164 int iTEID; |
|
165 char iLocalAirInterfacePort[MAXPORTLEN]; |
|
166 char iRemoteAirInterfaceAddress[MAXADDRLEN]; |
|
167 char iRemoteAirInterfacePort[MAXPORTLEN]; |
|
168 TChannelStatus iDeviceStatus; |
|
169 TDeviceExitReason iDeviceExitReason; |
|
170 int iDeviceExitSubReason; |
|
171 int iDeviceExitDetail; |
|
172 }; |
|
173 typedef struct TDeviceDesc TDeviceDesc; |
|
174 #ifdef __cplusplus |
|
175 extern "C" { |
|
176 bool_t xdr_mobster_TDeviceDesc(...); |
|
177 } |
|
178 #else |
|
179 bool_t xdr_mobster_TDeviceDesc(); |
|
180 #endif |
|
181 |
|
182 |
|
183 typedef struct { |
|
184 u_int TVarData_len; |
|
185 char *TVarData_val; |
|
186 } TVarData; |
|
187 #ifdef __cplusplus |
|
188 extern "C" { |
|
189 bool_t xdr_mobster_TVarData(...); |
|
190 } |
|
191 #else |
|
192 bool_t xdr_mobster_TVarData(); |
|
193 #endif |
|
194 |
|
195 |
|
196 #define MOBSTER ((u_long)0x34630201) |
|
197 #define MOBSTER_VERSION ((u_long)1) |
|
198 #define SS_STARTUPRPCSERVICE ((u_long)1) |
|
199 #ifdef __cplusplus |
|
200 extern "C" { |
|
201 extern int *ss_startuprpcservice_1( TChannelAddress * arg, CLIENT *cl ); |
|
202 } |
|
203 #else |
|
204 extern int *ss_startuprpcservice_1(); |
|
205 #endif /* __cplusplus */ |
|
206 #define SC_SHUTDOWNRPCSERVICE ((u_long)2) |
|
207 #ifdef __cplusplus |
|
208 extern "C" { |
|
209 extern int *sc_shutdownrpcservice_1( int * arg, CLIENT *cl ); |
|
210 } |
|
211 #else |
|
212 extern int *sc_shutdownrpcservice_1(); |
|
213 #endif /* __cplusplus */ |
|
214 #define LIST_DEVICES ((u_long)9) |
|
215 #ifdef __cplusplus |
|
216 extern "C" { |
|
217 extern TComponentList *list_devices_1( void * arg, CLIENT *cl ); |
|
218 } |
|
219 #else |
|
220 extern TComponentList *list_devices_1(); |
|
221 #endif /* __cplusplus */ |
|
222 #define CSTR_STARTDEVICE ((u_long)3) |
|
223 #ifdef __cplusplus |
|
224 extern "C" { |
|
225 extern int *cstr_startdevice_1( TDeviceDesc * arg, CLIENT *cl ); |
|
226 } |
|
227 #else |
|
228 extern int *cstr_startdevice_1(); |
|
229 #endif /* __cplusplus */ |
|
230 #define DSTR_REMOVEDEVICE ((u_long)7) |
|
231 #ifdef __cplusplus |
|
232 extern "C" { |
|
233 extern int *dstr_removedevice_1( int * arg, CLIENT *cl ); |
|
234 } |
|
235 #else |
|
236 extern int *dstr_removedevice_1(); |
|
237 #endif /* __cplusplus */ |
|
238 #define GETDEVICEINFO ((u_long)4) |
|
239 #ifdef __cplusplus |
|
240 extern "C" { |
|
241 extern TDeviceDesc *getdeviceinfo_1( int * arg, CLIENT *cl ); |
|
242 } |
|
243 #else |
|
244 extern TDeviceDesc *getdeviceinfo_1(); |
|
245 #endif /* __cplusplus */ |
|
246 #define GETDEVICELOG ((u_long)5) |
|
247 #ifdef __cplusplus |
|
248 extern "C" { |
|
249 extern TVarData *getdevicelog_1( int * arg, CLIENT *cl ); |
|
250 } |
|
251 #else |
|
252 extern TVarData *getdevicelog_1(); |
|
253 #endif /* __cplusplus */ |
|
254 #define STOPDEVICE ((u_long)6) |
|
255 #ifdef __cplusplus |
|
256 extern "C" { |
|
257 extern int *stopdevice_1( int * arg, CLIENT *cl ); |
|
258 } |
|
259 #else |
|
260 extern int *stopdevice_1(); |
|
261 #endif /* __cplusplus */ |
|
262 #define SETREMOTEUUADDRESS ((u_long)10) |
|
263 #ifdef __cplusplus |
|
264 extern "C" { |
|
265 extern int *setremoteuuaddress_1( TUUAddress * arg, CLIENT *cl ); |
|
266 } |
|
267 #else |
|
268 extern int *setremoteuuaddress_1(); |
|
269 #endif /* __cplusplus */ |
|
270 |
|
271 #endif /* __MOBSTER_H__ */ |