|
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 * This file was autogenerated by rpcgen, but should be modified by the developer. |
|
16 * Make sure you don't use the -component_mod flag in future or this file will be overwritten. |
|
17 * Wed Nov 05 16:06:20 2003 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef __CSVCUUINTERFACE_H__ |
|
25 #define __CSVCUUINTERFACE_H__ |
|
26 |
|
27 |
|
28 /**************************************************************************************** |
|
29 * |
|
30 * Local Includes |
|
31 * |
|
32 ***************************************************************************************/ |
|
33 #include "uuinterface.h" |
|
34 #include "CSUuinterface.h" |
|
35 #include "CComponentManager.h" |
|
36 |
|
37 /**************************************************************************************** |
|
38 * |
|
39 * Defines |
|
40 * |
|
41 ***************************************************************************************/ |
|
42 #define MAX_COMMANDLINE 256 |
|
43 #define TOTAL_MAX_ADDRESS_LEN 128 |
|
44 #define MAX_PORT_VAL 65535 |
|
45 #define MIN_PORT_VAL 0 |
|
46 |
|
47 /**************************************************************************************** |
|
48 * |
|
49 * Definition: CSvcUuinterface |
|
50 * |
|
51 ***************************************************************************************/ |
|
52 class CSvcUuinterface |
|
53 { |
|
54 public: |
|
55 /* standard methods */ |
|
56 static int GetInstanceKeyFromArgs( int aMethod, void *aArgs ); |
|
57 static int SetError( int aMethod, void *aArgs, int aError ); |
|
58 static int GetError( int aMethod, void *aArgs ); |
|
59 static int StartRPCService( CComponentManager<CSUuinterface> *aComponentManager, TStartupInfo *aArg ); |
|
60 static int StopRPCService(); |
|
61 |
|
62 /* custom methods */ |
|
63 static TResult st_setdelay( TConfigValue aArgs ); |
|
64 static TResult st_setdroppercentage( TConfigValue aArgs ); |
|
65 static TResult st_setduplicatepercentage( TConfigValue aArgs ); |
|
66 static TResult st_setbandwidth( TConfigValue aArgs ); |
|
67 static TResult st_setdrd( TConfigValue aArgs ); |
|
68 static TResult st_clearsettings( TConfigValue aArgs ); |
|
69 static TResult st_stopservice( void ); |
|
70 static TResult st_reset( void ); |
|
71 |
|
72 private: |
|
73 static int execute(const char* aCommandLine, TResult* rv); |
|
74 |
|
75 // Methods to validate args |
|
76 static int CheckDRDs( const int aDRDMinInt, const int aDRDMinFrac, const int aDRDMaxInt, const int aDRDMaxFrac, const int aDRDCongestInt, const int aDRDCongestFrac ); |
|
77 static int CheckPercentage(const int aPercentage); |
|
78 static int CheckCorrelation( int aIntegerPart, int aFractionPart ); |
|
79 static int CheckPositive( int aIntegerPart, int aFractionPart ); |
|
80 static int CheckPorts( int aSrcPort, int DestPort ); |
|
81 static int CheckProt( int aProtocol ); |
|
82 static int GetSrcDstStrings( char* aSrc, char* aDst, |
|
83 int aSrcProt, |
|
84 int aSrcPort,int aDstPort, |
|
85 char* finalSrc, char* finalDst ); |
|
86 static int CheckConfigValue( TConfigValue aConfigValue, char* aFinalSrc, char* aFinalDst); |
|
87 |
|
88 }; |
|
89 |
|
90 #endif |