testexecmgmt/ucc/Source/pppcontroller/pppcontroller.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  *
       
    25  * Constants
       
    26  *
       
    27  ******************************************************************************/
       
    28 const MAXADDRLEN				= 64;
       
    29 const MAXPORTLEN				= 16;
       
    30 const MAXCONFIGURATIONLENGTH	= 1024;
       
    31 const MAXSESSIONNAMELEN			= 16;
       
    32 const INVALID_SESSION_ID		= 0xFFFFFFFF;
       
    33 
       
    34 
       
    35 /*******************************************************************************
       
    36  *
       
    37  * Error codes
       
    38  *
       
    39  ******************************************************************************/
       
    40 const ERR_WAIT_PROCESS_ERROR					= -103;
       
    41 const ERR_START_PROCESS_ERROR					= -105;
       
    42 const ERR_STOP_PROCESS_ERROR					= -106;
       
    43 const ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE		= -111;
       
    44 const ERR_SET_SIGNAL_ERROR						= -120;
       
    45 const ERR_LOG_FILE_ERROR						= -121;
       
    46 const ERR_MULTIPLE_MATCHES_IN_LOG_FILE			= -122;
       
    47 
       
    48 
       
    49 /*******************************************************************************
       
    50  *
       
    51  * Types
       
    52  *
       
    53  ******************************************************************************/
       
    54 enum TPppSessionStatus {
       
    55 	SS_NOT_STARTED,
       
    56 	SS_CONNECTING,
       
    57 	SS_CONNECTED,
       
    58 	SS_DISCONNECTING,
       
    59 	SS_DISCONNECTED
       
    60 };
       
    61 
       
    62 struct TStartupInfo {
       
    63 	int iEmpty;
       
    64 };
       
    65 
       
    66 struct TPppSessionConfig {
       
    67 	char	iMobsterAddress[MAXADDRLEN];
       
    68 	char	iMobsterPort[MAXPORTLEN];
       
    69 	char	iSessionConfiguration[MAXCONFIGURATIONLENGTH];
       
    70 	int		iMTID;
       
    71 };
       
    72 
       
    73 struct TPppSessionDesc {
       
    74 	int iErrorCode;
       
    75 	int iErrorDetail;
       
    76 	TPppSessionConfig iConfig;
       
    77 	TPppSessionStatus iSessionStatus;
       
    78 	char iInterfaceName[MAXSESSIONNAMELEN];
       
    79 	int iLocalIPAddress;
       
    80 	int iRemoteIPAddress;
       
    81 	int iProcessStatus;
       
    82 	int	iProcessExitReason;
       
    83 	int	iProcessExitCode;
       
    84 };
       
    85 
       
    86 struct TResult {
       
    87 	int iStandardResult;
       
    88 	int iExtendedCode;
       
    89 	int iSystemError;
       
    90 };
       
    91 
       
    92 typedef opaque TVarData<>;
       
    93 
       
    94 
       
    95 /*******************************************************************************
       
    96  *
       
    97  * PPPCONTROLLER Interface
       
    98  *
       
    99  ******************************************************************************/
       
   100 program PPPCONTROLLER {
       
   101 	version PPPCONTROLLER_VERSION {
       
   102 
       
   103 		/* Initialise the service */
       
   104 		int SS_STARTUPRPCSERVICE( TStartupInfo )		= 1;
       
   105 		int SC_SHUTDOWNRPCSERVICE( int )				= 2;
       
   106 		TComponentList LIST_DEVICES( void )				= 30;
       
   107 
       
   108 		/* Create Instances */
       
   109 		TResult CSTR_STARTPPPSESSION( TPppSessionConfig )	= 31;
       
   110 		TResult DSTR_REMOVEPPPSESSION( int )				= 32;
       
   111 
       
   112 		/* Operate on the instance */
       
   113 		TResult KILLSESSION( int )						= 5;
       
   114 		TResult STOPSESSION( int )						= 6;
       
   115 		TPppSessionDesc GETSESSIONINFO( int )			= 7;
       
   116 		TVarData GETPPPLOG( int )						= 8;
       
   117 	} = 4;
       
   118 } = 0x34630204;