testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/GPSSimulator/APICommandHandler.h
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 #ifndef __APICOMMANDHANDLER_H__
       
    22 #define __APICOMMANDHANDLER_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_APICommandHandler_TComponentList(...);
       
    56 }
       
    57 #else
       
    58 bool_t xdr_APICommandHandler_TComponentList();
       
    59 #endif
       
    60 
       
    61 #define MAXFIELDLENGTH 128
       
    62 #define MAXSTRINGLENGTH 1024
       
    63 
       
    64 typedef int FIELD_ID;
       
    65 #ifdef __cplusplus
       
    66 extern "C" {
       
    67 bool_t xdr_FIELD_ID(...);
       
    68 }
       
    69 #else
       
    70 bool_t xdr_FIELD_ID();
       
    71 #endif
       
    72 
       
    73 #define F_NUMBER_OF_FIELDS 56
       
    74 #define F_NULL_ID 0
       
    75 #define F_TIME 1
       
    76 #define F_STATUS 2
       
    77 #define F_DATE 3
       
    78 #define F_LATITUDE 4
       
    79 #define F_LAT_NORTH_SOUTH 5
       
    80 #define F_LONGITUDE 6
       
    81 #define F_LON_EAST_WEST 7
       
    82 #define F_SPEED_OVER_GROUND 8
       
    83 #define F_COURSE_OVER_GROUND 9
       
    84 #define F_MAGNETIC_VARIATION 10
       
    85 #define F_MAG_EAST_WEST 11
       
    86 #define F_MODE_INDICATOR 12
       
    87 #define F_OPERATION_MODE 13
       
    88 #define F_FIX_MODE 14
       
    89 #define F_SATELLITE_ONE 15
       
    90 #define F_SATELLITE_TWO 16
       
    91 #define F_SATELLITE_THREE 17
       
    92 #define F_SATELLITE_FOUR 18
       
    93 #define F_SATELLITE_FIVE 19
       
    94 #define F_SATELLITE_SIX 20
       
    95 #define F_SATELLITE_SEVEN 21
       
    96 #define F_SATELLITE_EIGHT 22
       
    97 #define F_SATELLITE_NINE 23
       
    98 #define F_SATELLITE_TEN 24
       
    99 #define F_SATELLITE_ELEVEN 25
       
   100 #define F_SATELLITE_TWELVE 26
       
   101 #define F_PDOP 27
       
   102 #define F_HDOP 28
       
   103 #define F_VDOP 29
       
   104 #define F_SATELLITES_IN_USE 30
       
   105 #define F_ANTENNA_ALTITUDE 31
       
   106 #define F_ANTENNA_METERS 32
       
   107 #define F_GEOIDAL_SEPARATION 33
       
   108 #define F_GEOIDAL_METERS 34
       
   109 #define F_DIFFERENTIAL_AGE 35
       
   110 #define F_DIFFERENTIAL_REF_ID 36
       
   111 #define F_GPS_QUALITY 37
       
   112 #define F_NUMBER_OF_SENTENCES 38
       
   113 #define F_SENTENCE_NUMBER 39
       
   114 #define F_SATELLITE_ID_NUMBER_ONE 40
       
   115 #define F_SATELLITE_ID_NUMBER_TWO 41
       
   116 #define F_SATELLITE_ID_NUMBER_THREE 42
       
   117 #define F_SATELLITE_ID_NUMBER_FOUR 43
       
   118 #define F_SATELLITE_ELEVATION_ONE 44
       
   119 #define F_SATELLITE_ELEVATION_TWO 45
       
   120 #define F_SATELLITE_ELEVATION_THREE 46
       
   121 #define F_SATELLITE_ELEVATION_FOUR 47
       
   122 #define F_SATELLITE_AZIMUTH_ONE 48
       
   123 #define F_SATELLITE_AZIMUTH_TWO 49
       
   124 #define F_SATELLITE_AZIMUTH_THREE 50
       
   125 #define F_SATELLITE_AZIMUTH_FOUR 51
       
   126 #define F_SATELLITE_SNR_ONE 52
       
   127 #define F_SATELLITE_SNR_TWO 53
       
   128 #define F_SATELLITE_SNR_THREE 54
       
   129 #define F_SATELLITE_SNR_FOUR 55
       
   130 #define F_CHECKSUM 56
       
   131 
       
   132 typedef int STATE;
       
   133 #ifdef __cplusplus
       
   134 extern "C" {
       
   135 bool_t xdr_STATE(...);
       
   136 }
       
   137 #else
       
   138 bool_t xdr_STATE();
       
   139 #endif
       
   140 
       
   141 #define S_NULL 0
       
   142 #define S_VALUE 1
       
   143 #define S_OMIT 2
       
   144 #define S_CALCULATE 3
       
   145 
       
   146 typedef int NORTH_SOUTH;
       
   147 #ifdef __cplusplus
       
   148 extern "C" {
       
   149 bool_t xdr_NORTH_SOUTH(...);
       
   150 }
       
   151 #else
       
   152 bool_t xdr_NORTH_SOUTH();
       
   153 #endif
       
   154 
       
   155 #define NORTH 0
       
   156 #define SOUTH 1
       
   157 
       
   158 typedef int EAST_WEST;
       
   159 #ifdef __cplusplus
       
   160 extern "C" {
       
   161 bool_t xdr_EAST_WEST(...);
       
   162 }
       
   163 #else
       
   164 bool_t xdr_EAST_WEST();
       
   165 #endif
       
   166 
       
   167 #define EAST 0
       
   168 #define WEST 1
       
   169 
       
   170 typedef int SENTENCE_ID;
       
   171 #ifdef __cplusplus
       
   172 extern "C" {
       
   173 bool_t xdr_SENTENCE_ID(...);
       
   174 }
       
   175 #else
       
   176 bool_t xdr_SENTENCE_ID();
       
   177 #endif
       
   178 
       
   179 #define RMC 1
       
   180 #define GGA 2
       
   181 #define GSA 3
       
   182 #define GNS 4
       
   183 #define GSV 5
       
   184 
       
   185 typedef int SATELLITE_ID;
       
   186 #ifdef __cplusplus
       
   187 extern "C" {
       
   188 bool_t xdr_SATELLITE_ID(...);
       
   189 }
       
   190 #else
       
   191 bool_t xdr_SATELLITE_ID();
       
   192 #endif
       
   193 
       
   194 #define SAT_UNKNOWN -1
       
   195 #define SAT_FIRST 1
       
   196 #define SAT_TWO 2
       
   197 #define SAT_THREE 3
       
   198 #define SAT_FOUR 4
       
   199 #define SAT_FIVE 5
       
   200 #define SAT_SIX 6
       
   201 #define SAT_SEVEN 7
       
   202 #define SAT_EIGHT 8
       
   203 #define SAT_NINE 9
       
   204 #define SAT_TEN 10
       
   205 #define SAT_ELEVEN 11
       
   206 #define SAT_LAST 12
       
   207 
       
   208 typedef int ErrorCode;
       
   209 #ifdef __cplusplus
       
   210 extern "C" {
       
   211 bool_t xdr_ErrorCode(...);
       
   212 }
       
   213 #else
       
   214 bool_t xdr_ErrorCode();
       
   215 #endif
       
   216 
       
   217 #define ERR_OK 0
       
   218 #define ERR_INVALID_FIELD -100
       
   219 #define ERR_NO_SUCH_FIELD -101
       
   220 #define ERR_INVALID_ID -102
       
   221 #define ERR_INVALID_INDEX -103
       
   222 #define ERR_DEFAULT_NOT_SET -104
       
   223 #define ERR_INVALID_DELAY -105
       
   224 #define ERR_BAD_SENTENCE -106
       
   225 #define ERR_RESET_FAILED -107
       
   226 #define ERR_CLEAR_FAILED -108
       
   227 #define ERR_SATELLITE_INVALID -109
       
   228 #define ERR_ADD_FAILED -110
       
   229 #define ERR_CONSTRUCT_FAILED -111
       
   230 #define ERR_INVALID_VALUE -112
       
   231 #define ERR_TOO_MANY_SATELLITES -113
       
   232 #define ERR_INVALID_PORT -114
       
   233 #define ERR_STOP_FAILED -115
       
   234 #define ERR_START_FAILED -116
       
   235 #define ERR_SERIAL_ERROR -117
       
   236 #define ERR_NOT_CONFIGURED -118
       
   237 #define ERR_INVALID_COURSE -119
       
   238 #define ERR_INVALID_CHUNK_SIZE -120
       
   239 #define ERR_UNKNOWN -121
       
   240 
       
   241 struct TStartupInfo {
       
   242 	int iEmpty;
       
   243 };
       
   244 typedef struct TStartupInfo TStartupInfo;
       
   245 #ifdef __cplusplus
       
   246 extern "C" {
       
   247 bool_t xdr_APICommandHandler_TStartupInfo(...);
       
   248 }
       
   249 #else
       
   250 bool_t xdr_APICommandHandler_TStartupInfo();
       
   251 #endif
       
   252 
       
   253 
       
   254 struct TPositionInfo {
       
   255 	double iLatitude;
       
   256 	bool_t iNS;
       
   257 	double iLongitude;
       
   258 	bool_t iEW;
       
   259 };
       
   260 typedef struct TPositionInfo TPositionInfo;
       
   261 #ifdef __cplusplus
       
   262 extern "C" {
       
   263 bool_t xdr_APICommandHandler_TPositionInfo(...);
       
   264 }
       
   265 #else
       
   266 bool_t xdr_APICommandHandler_TPositionInfo();
       
   267 #endif
       
   268 
       
   269 
       
   270 struct TSatellite {
       
   271 	int iElevation;
       
   272 	int iAzimuth;
       
   273 	int iSNR;
       
   274 	int iId;
       
   275 };
       
   276 typedef struct TSatellite TSatellite;
       
   277 #ifdef __cplusplus
       
   278 extern "C" {
       
   279 bool_t xdr_APICommandHandler_TSatellite(...);
       
   280 }
       
   281 #else
       
   282 bool_t xdr_APICommandHandler_TSatellite();
       
   283 #endif
       
   284 
       
   285 
       
   286 struct TField {
       
   287 	int iFieldId;
       
   288 	int iState;
       
   289 	char iValue[MAXFIELDLENGTH];
       
   290 };
       
   291 typedef struct TField TField;
       
   292 #ifdef __cplusplus
       
   293 extern "C" {
       
   294 bool_t xdr_APICommandHandler_TField(...);
       
   295 }
       
   296 #else
       
   297 bool_t xdr_APICommandHandler_TField();
       
   298 #endif
       
   299 
       
   300 
       
   301 struct TAppendSentence {
       
   302 	int iSentenceId;
       
   303 	int iFrequency;
       
   304 };
       
   305 typedef struct TAppendSentence TAppendSentence;
       
   306 #ifdef __cplusplus
       
   307 extern "C" {
       
   308 bool_t xdr_APICommandHandler_TAppendSentence(...);
       
   309 }
       
   310 #else
       
   311 bool_t xdr_APICommandHandler_TAppendSentence();
       
   312 #endif
       
   313 
       
   314 
       
   315 struct TAppendString {
       
   316 	char iUserString[MAXSTRINGLENGTH];
       
   317 	int iFrequency;
       
   318 };
       
   319 typedef struct TAppendString TAppendString;
       
   320 #ifdef __cplusplus
       
   321 extern "C" {
       
   322 bool_t xdr_APICommandHandler_TAppendString(...);
       
   323 }
       
   324 #else
       
   325 bool_t xdr_APICommandHandler_TAppendString();
       
   326 #endif
       
   327 
       
   328 
       
   329 struct TAppendUserSentence {
       
   330 	TAppendSentence iAppendSentence;
       
   331 	struct {
       
   332 		u_int iUserFields_len;
       
   333 		TField *iUserFields_val;
       
   334 	} iUserFields;
       
   335 };
       
   336 typedef struct TAppendUserSentence TAppendUserSentence;
       
   337 #ifdef __cplusplus
       
   338 extern "C" {
       
   339 bool_t xdr_APICommandHandler_TAppendUserSentence(...);
       
   340 }
       
   341 #else
       
   342 bool_t xdr_APICommandHandler_TAppendUserSentence();
       
   343 #endif
       
   344 
       
   345 
       
   346 struct TCourse {
       
   347 	double iSpeed;
       
   348 	double iDirection;
       
   349 };
       
   350 typedef struct TCourse TCourse;
       
   351 #ifdef __cplusplus
       
   352 extern "C" {
       
   353 bool_t xdr_APICommandHandler_TCourse(...);
       
   354 }
       
   355 #else
       
   356 bool_t xdr_APICommandHandler_TCourse();
       
   357 #endif
       
   358 
       
   359 
       
   360 struct TAccuracy {
       
   361 	double iAccuracy;
       
   362 	double iHWConstant;
       
   363 };
       
   364 typedef struct TAccuracy TAccuracy;
       
   365 #ifdef __cplusplus
       
   366 extern "C" {
       
   367 bool_t xdr_APICommandHandler_TAccuracy(...);
       
   368 }
       
   369 #else
       
   370 bool_t xdr_APICommandHandler_TAccuracy();
       
   371 #endif
       
   372 
       
   373 
       
   374 #define GPSSIMULATOR ((u_long)0x34630666)
       
   375 #define GPSSIMULATOR_VERSION ((u_long)1)
       
   376 #define SS_STARTUPRPCSERVICE ((u_long)1)
       
   377 #ifdef __cplusplus
       
   378 extern "C" {
       
   379 extern int *ss_startuprpcservice_10( TStartupInfo * arg, CLIENT *cl );
       
   380 }
       
   381 #else
       
   382 extern int *ss_startuprpcservice_10();
       
   383 #endif /* __cplusplus */
       
   384 #define SC_SHUTDOWNRPCSERVICE ((u_long)2)
       
   385 #ifdef __cplusplus
       
   386 extern "C" {
       
   387 extern int *sc_shutdownrpcservice_10( int * arg, CLIENT *cl );
       
   388 }
       
   389 #else
       
   390 extern int *sc_shutdownrpcservice_10();
       
   391 #endif /* __cplusplus */
       
   392 #define LIST_CONNECTIONS ((u_long)30)
       
   393 #ifdef __cplusplus
       
   394 extern "C" {
       
   395 extern TComponentList *list_connections_1( void * arg, CLIENT *cl );
       
   396 }
       
   397 #else
       
   398 extern TComponentList *list_connections_1();
       
   399 #endif /* __cplusplus */
       
   400 #define CSTR_STARTPROCESS ((u_long)31)
       
   401 #ifdef __cplusplus
       
   402 extern "C" {
       
   403 extern int *cstr_startprocess_1( char ** arg, CLIENT *cl );
       
   404 }
       
   405 #else
       
   406 extern int *cstr_startprocess_1();
       
   407 #endif /* __cplusplus */
       
   408 #define DSTR_REMOVEPROCESS ((u_long)32)
       
   409 #ifdef __cplusplus
       
   410 extern "C" {
       
   411 extern int *dstr_removeprocess_1( int * arg, CLIENT *cl );
       
   412 }
       
   413 #else
       
   414 extern int *dstr_removeprocess_1();
       
   415 #endif /* __cplusplus */
       
   416 #define STARTSIMULATOR ((u_long)10)
       
   417 #ifdef __cplusplus
       
   418 extern "C" {
       
   419 extern int *startsimulator_1( void * arg, CLIENT *cl );
       
   420 }
       
   421 #else
       
   422 extern int *startsimulator_1();
       
   423 #endif /* __cplusplus */
       
   424 #define STOPSIMULATOR ((u_long)11)
       
   425 #ifdef __cplusplus
       
   426 extern "C" {
       
   427 extern int *stopsimulator_1( void * arg, CLIENT *cl );
       
   428 }
       
   429 #else
       
   430 extern int *stopsimulator_1();
       
   431 #endif /* __cplusplus */
       
   432 #define SETFIELDDEFAULT ((u_long)12)
       
   433 #ifdef __cplusplus
       
   434 extern "C" {
       
   435 extern int *setfielddefault_1( TField * arg, CLIENT *cl );
       
   436 }
       
   437 #else
       
   438 extern int *setfielddefault_1();
       
   439 #endif /* __cplusplus */
       
   440 #define SETSATELLITEDEFAULT ((u_long)13)
       
   441 #ifdef __cplusplus
       
   442 extern "C" {
       
   443 extern int *setsatellitedefault_1( TSatellite * arg, CLIENT *cl );
       
   444 }
       
   445 #else
       
   446 extern int *setsatellitedefault_1();
       
   447 #endif /* __cplusplus */
       
   448 #define POSITIONSET ((u_long)14)
       
   449 #ifdef __cplusplus
       
   450 extern "C" {
       
   451 extern int *positionset_1( TPositionInfo * arg, CLIENT *cl );
       
   452 }
       
   453 #else
       
   454 extern int *positionset_1();
       
   455 #endif /* __cplusplus */
       
   456 #define COURSESET ((u_long)15)
       
   457 #ifdef __cplusplus
       
   458 extern "C" {
       
   459 extern int *courseset_1( TCourse * arg, CLIENT *cl );
       
   460 }
       
   461 #else
       
   462 extern int *courseset_1();
       
   463 #endif /* __cplusplus */
       
   464 #define ACCURACYSET ((u_long)16)
       
   465 #ifdef __cplusplus
       
   466 extern "C" {
       
   467 extern int *accuracyset_1( TAccuracy * arg, CLIENT *cl );
       
   468 }
       
   469 #else
       
   470 extern int *accuracyset_1();
       
   471 #endif /* __cplusplus */
       
   472 #define SATELLITESET ((u_long)17)
       
   473 #ifdef __cplusplus
       
   474 extern "C" {
       
   475 extern int *satelliteset_1( TSatellite * arg, CLIENT *cl );
       
   476 }
       
   477 #else
       
   478 extern int *satelliteset_1();
       
   479 #endif /* __cplusplus */
       
   480 #define BATCHAPPENDSENTENCE ((u_long)18)
       
   481 #ifdef __cplusplus
       
   482 extern "C" {
       
   483 extern int *batchappendsentence_1( TAppendSentence * arg, CLIENT *cl );
       
   484 }
       
   485 #else
       
   486 extern int *batchappendsentence_1();
       
   487 #endif /* __cplusplus */
       
   488 #define BATCHAPPENDUSERSENTENCE ((u_long)19)
       
   489 #ifdef __cplusplus
       
   490 extern "C" {
       
   491 extern int *batchappendusersentence_1( TAppendUserSentence * arg, CLIENT *cl );
       
   492 }
       
   493 #else
       
   494 extern int *batchappendusersentence_1();
       
   495 #endif /* __cplusplus */
       
   496 #define BATCHSETDELAY ((u_long)20)
       
   497 #ifdef __cplusplus
       
   498 extern "C" {
       
   499 extern int *batchsetdelay_1( int * arg, CLIENT *cl );
       
   500 }
       
   501 #else
       
   502 extern int *batchsetdelay_1();
       
   503 #endif /* __cplusplus */
       
   504 #define BATCHRESET ((u_long)21)
       
   505 #ifdef __cplusplus
       
   506 extern "C" {
       
   507 extern int *batchreset_1( void * arg, CLIENT *cl );
       
   508 }
       
   509 #else
       
   510 extern int *batchreset_1();
       
   511 #endif /* __cplusplus */
       
   512 #define SETCOMPORT ((u_long)22)
       
   513 #ifdef __cplusplus
       
   514 extern "C" {
       
   515 extern int *setcomport_1( char ** arg, CLIENT *cl );
       
   516 }
       
   517 #else
       
   518 extern int *setcomport_1();
       
   519 #endif /* __cplusplus */
       
   520 #define SETCHUNKMODE ((u_long)23)
       
   521 #ifdef __cplusplus
       
   522 extern "C" {
       
   523 extern int *setchunkmode_1( bool_t * arg, CLIENT *cl );
       
   524 }
       
   525 #else
       
   526 extern int *setchunkmode_1();
       
   527 #endif /* __cplusplus */
       
   528 #define SETCHUNKSIZE ((u_long)24)
       
   529 #ifdef __cplusplus
       
   530 extern "C" {
       
   531 extern int *setchunksize_1( int * arg, CLIENT *cl );
       
   532 }
       
   533 #else
       
   534 extern int *setchunksize_1();
       
   535 #endif /* __cplusplus */
       
   536 #define SETCHUNKDELAY ((u_long)25)
       
   537 #ifdef __cplusplus
       
   538 extern "C" {
       
   539 extern int *setchunkdelay_1( int * arg, CLIENT *cl );
       
   540 }
       
   541 #else
       
   542 extern int *setchunkdelay_1();
       
   543 #endif /* __cplusplus */
       
   544 #define STARTCOMMS ((u_long)26)
       
   545 #ifdef __cplusplus
       
   546 extern "C" {
       
   547 extern int *startcomms_1( void * arg, CLIENT *cl );
       
   548 }
       
   549 #else
       
   550 extern int *startcomms_1();
       
   551 #endif /* __cplusplus */
       
   552 #define STOPCOMMS ((u_long)27)
       
   553 #ifdef __cplusplus
       
   554 extern "C" {
       
   555 extern int *stopcomms_1( void * arg, CLIENT *cl );
       
   556 }
       
   557 #else
       
   558 extern int *stopcomms_1();
       
   559 #endif /* __cplusplus */
       
   560 #define BATCHAPPENDUSERSTRING ((u_long)28)
       
   561 #ifdef __cplusplus
       
   562 extern "C" {
       
   563 extern int *batchappenduserstring_1( TAppendString * arg, CLIENT *cl );
       
   564 }
       
   565 #else
       
   566 extern int *batchappenduserstring_1();
       
   567 #endif /* __cplusplus */
       
   568 
       
   569 #endif /* __APICOMMANDHANDLER_H__ */