testexecmgmt/ucc/Source/Uccs.v2/ServiceStubs/Ppp/pppcontroller.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 __PPPCONTROLLER_H__
       
    22 #define __PPPCONTROLLER_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_pppcontroller_TComponentList(...);
       
    56 }
       
    57 #else
       
    58 bool_t xdr_pppcontroller_TComponentList();
       
    59 #endif
       
    60 
       
    61 #define MAXADDRLEN 64
       
    62 #define MAXPORTLEN 16
       
    63 #define MAXCONFIGURATIONLENGTH 1024
       
    64 #define MAXSESSIONNAMELEN 16
       
    65 #define INVALID_SESSION_ID 0xFFFFFFFF
       
    66 #define ERR_WAIT_PROCESS_ERROR -103
       
    67 #define ERR_START_PROCESS_ERROR -105
       
    68 #define ERR_STOP_PROCESS_ERROR -106
       
    69 #define ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE -111
       
    70 #define ERR_SET_SIGNAL_ERROR -120
       
    71 #define ERR_LOG_FILE_ERROR -121
       
    72 #define ERR_MULTIPLE_MATCHES_IN_LOG_FILE -122
       
    73 
       
    74 enum TPppSessionStatus {
       
    75 	SS_NOT_STARTED = 0,
       
    76 	SS_CONNECTING = 1,
       
    77 	SS_CONNECTED = 2,
       
    78 	SS_DISCONNECTING = 3,
       
    79 	SS_DISCONNECTED = 4,
       
    80 };
       
    81 typedef enum TPppSessionStatus TPppSessionStatus;
       
    82 #ifdef __cplusplus
       
    83 extern "C" {
       
    84 bool_t xdr_pppcontroller_TPppSessionStatus(...);
       
    85 }
       
    86 #else
       
    87 bool_t xdr_pppcontroller_TPppSessionStatus();
       
    88 #endif
       
    89 
       
    90 
       
    91 struct TStartupInfo {
       
    92 	int iEmpty;
       
    93 };
       
    94 typedef struct TStartupInfo TStartupInfo;
       
    95 #ifdef __cplusplus
       
    96 extern "C" {
       
    97 bool_t xdr_pppcontroller_TStartupInfo(...);
       
    98 }
       
    99 #else
       
   100 bool_t xdr_pppcontroller_TStartupInfo();
       
   101 #endif
       
   102 
       
   103 
       
   104 struct TPppSessionConfig {
       
   105 	char iMobsterAddress[MAXADDRLEN];
       
   106 	char iMobsterPort[MAXPORTLEN];
       
   107 	char iSessionConfiguration[MAXCONFIGURATIONLENGTH];
       
   108 	int iMTID;
       
   109 };
       
   110 typedef struct TPppSessionConfig TPppSessionConfig;
       
   111 #ifdef __cplusplus
       
   112 extern "C" {
       
   113 bool_t xdr_pppcontroller_TPppSessionConfig(...);
       
   114 }
       
   115 #else
       
   116 bool_t xdr_pppcontroller_TPppSessionConfig();
       
   117 #endif
       
   118 
       
   119 
       
   120 struct TPppSessionDesc {
       
   121 	int iErrorCode;
       
   122 	int iErrorDetail;
       
   123 	TPppSessionConfig iConfig;
       
   124 	TPppSessionStatus iSessionStatus;
       
   125 	char iInterfaceName[MAXSESSIONNAMELEN];
       
   126 	int iLocalIPAddress;
       
   127 	int iRemoteIPAddress;
       
   128 	int iProcessStatus;
       
   129 	int iProcessExitReason;
       
   130 	int iProcessExitCode;
       
   131 };
       
   132 typedef struct TPppSessionDesc TPppSessionDesc;
       
   133 #ifdef __cplusplus
       
   134 extern "C" {
       
   135 bool_t xdr_pppcontroller_TPppSessionDesc(...);
       
   136 }
       
   137 #else
       
   138 bool_t xdr_pppcontroller_TPppSessionDesc();
       
   139 #endif
       
   140 
       
   141 
       
   142 struct TResult {
       
   143 	int iStandardResult;
       
   144 	int iExtendedCode;
       
   145 	int iSystemError;
       
   146 };
       
   147 typedef struct TResult TResult;
       
   148 #ifdef __cplusplus
       
   149 extern "C" {
       
   150 bool_t xdr_pppcontroller_TResult(...);
       
   151 }
       
   152 #else
       
   153 bool_t xdr_pppcontroller_TResult();
       
   154 #endif
       
   155 
       
   156 
       
   157 typedef struct {
       
   158 	u_int TVarData_len;
       
   159 	char *TVarData_val;
       
   160 } TVarData;
       
   161 #ifdef __cplusplus
       
   162 extern "C" {
       
   163 bool_t xdr_pppcontroller_TVarData(...);
       
   164 }
       
   165 #else
       
   166 bool_t xdr_pppcontroller_TVarData();
       
   167 #endif
       
   168 
       
   169 
       
   170 #define PPPCONTROLLER ((u_long)0x34630204)
       
   171 #define PPPCONTROLLER_VERSION ((u_long)4)
       
   172 #define SS_STARTUPRPCSERVICE ((u_long)1)
       
   173 #ifdef __cplusplus
       
   174 extern "C" {
       
   175 extern int *ss_startuprpcservice_4( TStartupInfo * arg, CLIENT *cl );
       
   176 }
       
   177 #else
       
   178 extern int *ss_startuprpcservice_4();
       
   179 #endif /* __cplusplus */
       
   180 #define SC_SHUTDOWNRPCSERVICE ((u_long)2)
       
   181 #ifdef __cplusplus
       
   182 extern "C" {
       
   183 extern int *sc_shutdownrpcservice_4( int * arg, CLIENT *cl );
       
   184 }
       
   185 #else
       
   186 extern int *sc_shutdownrpcservice_4();
       
   187 #endif /* __cplusplus */
       
   188 #define LIST_DEVICES ((u_long)30)
       
   189 #ifdef __cplusplus
       
   190 extern "C" {
       
   191 extern TComponentList *list_devices_4( void * arg, CLIENT *cl );
       
   192 }
       
   193 #else
       
   194 extern TComponentList *list_devices_4();
       
   195 #endif /* __cplusplus */
       
   196 #define CSTR_STARTPPPSESSION ((u_long)31)
       
   197 #ifdef __cplusplus
       
   198 extern "C" {
       
   199 extern TResult *cstr_startpppsession_4( TPppSessionConfig * arg, CLIENT *cl );
       
   200 }
       
   201 #else
       
   202 extern TResult *cstr_startpppsession_4();
       
   203 #endif /* __cplusplus */
       
   204 #define DSTR_REMOVEPPPSESSION ((u_long)32)
       
   205 #ifdef __cplusplus
       
   206 extern "C" {
       
   207 extern TResult *dstr_removepppsession_4( int * arg, CLIENT *cl );
       
   208 }
       
   209 #else
       
   210 extern TResult *dstr_removepppsession_4();
       
   211 #endif /* __cplusplus */
       
   212 #define KILLSESSION ((u_long)5)
       
   213 #ifdef __cplusplus
       
   214 extern "C" {
       
   215 extern TResult *killsession_4( int * arg, CLIENT *cl );
       
   216 }
       
   217 #else
       
   218 extern TResult *killsession_4();
       
   219 #endif /* __cplusplus */
       
   220 #define STOPSESSION ((u_long)6)
       
   221 #ifdef __cplusplus
       
   222 extern "C" {
       
   223 extern TResult *stopsession_4( int * arg, CLIENT *cl );
       
   224 }
       
   225 #else
       
   226 extern TResult *stopsession_4();
       
   227 #endif /* __cplusplus */
       
   228 #define GETSESSIONINFO ((u_long)7)
       
   229 #ifdef __cplusplus
       
   230 extern "C" {
       
   231 extern TPppSessionDesc *getsessioninfo_4( int * arg, CLIENT *cl );
       
   232 }
       
   233 #else
       
   234 extern TPppSessionDesc *getsessioninfo_4();
       
   235 #endif /* __cplusplus */
       
   236 #define GETPPPLOG ((u_long)8)
       
   237 #ifdef __cplusplus
       
   238 extern "C" {
       
   239 extern TVarData *getppplog_4( int * arg, CLIENT *cl );
       
   240 }
       
   241 #else
       
   242 extern TVarData *getppplog_4();
       
   243 #endif /* __cplusplus */
       
   244 
       
   245 #endif /* __PPPCONTROLLER_H__ */