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