testexecmgmt/ucc/Source/MobsterRPCService/mobster.x
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 * Standard Interface Values
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "../include/penstd.x"
       
    21 
       
    22 /*******************************************************************************
       
    23  *
       
    24  * Mobster Specific Definitions
       
    25  *
       
    26  ******************************************************************************/
       
    27 const MAXADDRLEN			= 64;
       
    28 const MAXPORTLEN			= 16;
       
    29 const INVALID_DEVICE_ID		= 0xFFFFFFFF;
       
    30 
       
    31 /*******************************************************************************
       
    32  *
       
    33  * Error codes
       
    34  *
       
    35  ******************************************************************************/
       
    36 const ERR_DEVICETHREADCREATIONFAILED	= -100;
       
    37 const ERR_DEVICENOTRUNNING				= -101;
       
    38 const ERR_STOPFAILED					= -102;
       
    39 const ERR_STARTUPFAILED					= -103;
       
    40 const ERR_CREATE_SOCKET_FAILED			= -104;
       
    41 const ERR_BIND_FAILED					= -105;
       
    42 const ERR_LISTEN_FAILED					= -106;
       
    43 const ERR_CREATE_SERVER_THREAD_FAILED	= -117;
       
    44 const ERR_ACCEPT_FAILED					= -107;
       
    45 const ERR_CSPROTOCOLFAILED				= -108;
       
    46 const ERR_CREATELOGFAILED				= -109;
       
    47 const ERR_STARTPHONEFAILED				= -110;
       
    48 const ERR_CONNECTSOCKETFAILED			= -111;
       
    49 const ERR_OPENSERIALPORTFAILED			= -112;
       
    50 const ERR_DEVICEINITIALISING					= -113;
       
    51 const ERR_STOPREQUESTED							= -114;
       
    52 const ERR_FAILEDTORESOLVEOUTGOINGAIRADDRESS		= -115;
       
    53 const ERR_FAILEDTORESETSTATE					= -116;
       
    54 const ERR_CHANNEL_SOCKET_ALREADY_SET			= -118;
       
    55 
       
    56 /*******************************************************************************
       
    57  *
       
    58  * Values passed as parameters
       
    59  *
       
    60  ******************************************************************************/
       
    61 const FILTER_NONE						= 0;
       
    62 const FILTER_PPP						= 1;
       
    63 
       
    64 /*******************************************************************************
       
    65  *
       
    66  * Types
       
    67  *
       
    68  ******************************************************************************/
       
    69 enum TDatalinkLayer {
       
    70 	DL_INVALID,
       
    71 	DL_NULL,
       
    72 	DL_PACKETISE
       
    73 };
       
    74 
       
    75 enum TChannelStatus {
       
    76 	CS_INACTIVE,
       
    77 	CS_ACTIVE,
       
    78 	CS_CLOSED
       
    79 };
       
    80 
       
    81 enum TDeviceExitReason {
       
    82 	DER_INVALID,
       
    83 	DER_USER_REQUEST,
       
    84 	DER_START_PHONE_FAILED,
       
    85 	DER_UNKNOWN
       
    86 };
       
    87 
       
    88 struct TChannelAddress {
       
    89 	int iPort;
       
    90 };
       
    91 
       
    92 struct TUUAddress {
       
    93 	int iDeviceID;
       
    94 	int iRemoteAddress;
       
    95 	int iRemotePort;
       
    96 };
       
    97 
       
    98 struct TDeviceDesc {
       
    99 
       
   100 	/* Input Values */
       
   101 	TDatalinkLayer	iDatalinkConfig;
       
   102 	int				iFilterConfig;
       
   103 
       
   104 	/* Public State */
       
   105 	int					iMTID;
       
   106 	int					iTEID;
       
   107 	char				iLocalAirInterfacePort[MAXPORTLEN];
       
   108 	char				iRemoteAirInterfaceAddress[MAXADDRLEN];
       
   109 	char				iRemoteAirInterfacePort[MAXPORTLEN];
       
   110 	TChannelStatus		iDeviceStatus;
       
   111 	TDeviceExitReason	iDeviceExitReason;
       
   112 	int					iDeviceExitSubReason;
       
   113 	int					iDeviceExitDetail;
       
   114 };
       
   115 
       
   116 typedef opaque TVarData<>;
       
   117 
       
   118 /*******************************************************************************
       
   119  *
       
   120  * MOBSTER Interface
       
   121  *
       
   122  ******************************************************************************/
       
   123 program MOBSTER { 
       
   124 	version MOBSTER_VERSION {
       
   125 
       
   126 		int SS_STARTUPRPCSERVICE( struct TChannelAddress )				= 1;
       
   127 		int SC_SHUTDOWNRPCSERVICE( int )								= 2;
       
   128 		TComponentList LIST_DEVICES( void )								= 9;
       
   129 
       
   130 		int CSTR_STARTDEVICE( TDeviceDesc )								= 3;
       
   131 		int DSTR_REMOVEDEVICE( int )									= 7;
       
   132 
       
   133 		TDeviceDesc GETDEVICEINFO( int )								= 4;
       
   134 		TVarData GETDEVICELOG( int )									= 5;
       
   135 		int STOPDEVICE( int )											= 6;
       
   136 		int SETREMOTEUUADDRESS( struct TUUAddress )						= 10;
       
   137 	} = 1; 
       
   138 } = 0x34630201;
       
   139