realtimenetprots/sipfw/Test/CapTests/ClientResolver/Common/CSuite.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 
       
     2 #if (!defined CAP_PARAM_SVR_SUITENAME_SERVER_H_)
       
     3 #define CAP_PARAM_SVR_SUITENAME_SERVER_H_
       
     4 
       
     5 
       
     6 
       
     7 #include <e32base.h>
       
     8 #include <e32svr.h>
       
     9 #include "f32file.h"
       
    10 #include "e32test.h"
       
    11 #include <TestExecuteStepBase.h>
       
    12 #include <TestExecuteServerBase.h>
       
    13 
       
    14 //The two ways to get thru
       
    15 #define API_RetValue_ServerPanic			0
       
    16 #define API_RetValue_NoCapError				0
       
    17 
       
    18 //The only way to get rejected
       
    19 #define API_RetValue_PermissionDenied		1
       
    20 #define DEBUG_ONLY		1
       
    21 #define DYNAMIC_IPC		2
       
    22 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
    23 // All rights reserved.
       
    24 // This component and the accompanying materials are made available
       
    25 // under the terms of "Eclipse Public License v1.0"
       
    26 // which accompanies this distribution, and is available
       
    27 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    28 //
       
    29 // Initial Contributors:
       
    30 // Nokia Corporation - initial contribution.
       
    31 //
       
    32 // Contributors:
       
    33 //
       
    34 // Description:
       
    35 // TS_PARAM_SVR_SUITENAMEServer.h
       
    36 // This contains CTestPARAM_SVR_SUITENAMESuite
       
    37 // 
       
    38 //
       
    39 
       
    40 const TUint KTestSecureServerMajorVersionNumber = 0;
       
    41 const TUint KTestSecureServerMinorVersionNumber	= 1;
       
    42 const TUint KTestSecureServerBuildVersionNumber = 1;
       
    43 
       
    44 // The server version.
       
    45 // A version must be specifyed when creating a session with the server
       
    46 const TUint KSipCRServerMajorVersionNumber=0;
       
    47 const TUint KSipCRServerMinorVersionNumber=1;
       
    48 const TUint KSipCRServerBuildVersionNumber=1;
       
    49 
       
    50 
       
    51 
       
    52 class  CTestPARAM_SVR_SUITENAMEServer : public CTestServer
       
    53 {
       
    54 public:
       
    55 	static CTestPARAM_SVR_SUITENAMEServer* NewL();
       
    56 	// Base class pure virtual override
       
    57 	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
       
    58 
       
    59 };
       
    60 
       
    61 
       
    62 
       
    63 class CCapabilityTestStep : public CTestStep, public RSessionBase
       
    64 {
       
    65 public:
       
    66  	virtual TVerdict doTestStepPreambleL( void );
       
    67 	virtual TVerdict doTestStepPostambleL( void );
       
    68 //	void ServerClose(RTelServer& aServer);
       
    69 	CActiveScheduler*	testScheduler;
       
    70 
       
    71 	TInt StartServer() ;
       
    72 
       
    73 	TInt CreateServerProcess (RSemaphore& aSemaphore);
       
    74 
       
    75 // from CStep.h
       
    76 	#define SR_MESSAGE_TYPE_CHNGED		2
       
    77 	#define SR_MESSAGE_ID_CHNGED		10
       
    78 	#define SR_ServerName_CHNGED		_L("FLogger server")
       
    79 
       
    80 	#define SR_CAPTEST_INVERSE			0
       
    81 
       
    82 	//The Server Name (eg: CommServer, EtelServer,FLogger server, etc)
       
    83 	TBuf<100>	SR_ServerName;
       
    84 	TBuf<100>	iServer_Panic;
       
    85 
       
    86 	//Following flags influence inverse tests
       
    87 	TBool		iExpect_Rejection;
       
    88 
       
    89 	TUint64  	iStepCap;
       
    90 
       
    91 
       
    92 	//Is it Async or sync?
       
    93 	TInt		SR_MESSAGE_TYPE;
       
    94 
       
    95 	//It holds the IPC number
       
    96 	TInt		SR_MESSAGE_ID;
       
    97 
       
    98 	//Holds the cap mask for the message
       
    99 	TUint64		SR_MESSAGE_MASK;
       
   100 
       
   101 	//We name the child thread appended by the IPC_Number it tests
       
   102 	TBuf<100>	ChildThread_SR;
       
   103 
       
   104 	//The flag informs the main thread whether the connection to the server was established
       
   105 	volatile TBool iSessionCreated;
       
   106 
       
   107 	//To find out if an Async message was completed and if then with what result?
       
   108 	TRequestStatus	RequestStatus_SR;
       
   109 
       
   110 	//For an Sync message, nResult_SR get you the return value
       
   111 	TInt	iResult_SR;
       
   112 
       
   113 	//Hold the retusn value from "CreateSession" API
       
   114 	TInt	iResult_Server;
       
   115 
       
   116 	TInt	iResult_C32;
       
   117 
       
   118 	enum 	TDbgFns  {MarkHeapStart, MarkHeapEnd, CheckHeap, FailNext, ResetFailNext};
       
   119 
       
   120  	TInt	iOptions;
       
   121 
       
   122 
       
   123 	//The Child thread object
       
   124 	RThread tChildThread;
       
   125 
       
   126 	//This is the Function called from "doTestStepL" by the test Suite,and it creates an
       
   127 	//child thread which internally calls the corresponding Exec_SendReceive_SERVERNAME fn.
       
   128 	TVerdict MainThread();
       
   129 	TVerdict GetVerdict(TInt aAPIretValue);
       
   130  	TVerdict GetVerdict(TExitType aExit,TInt aInitRetValue, TInt aApiRetValue);
       
   131  	TInt TestDebugHeap(TInt *iDbgIPCNo);
       
   132 
       
   133 
       
   134 	//This is for the scheduler test framework
       
   135 	virtual enum TVerdict doTestStepL();
       
   136 
       
   137 	// Stuff that derived classes need to implement
       
   138 	virtual TVersion Version()=0;
       
   139 	virtual TInt Exec_SendReceive()=0;
       
   140 
       
   141 
       
   142 };
       
   143 
       
   144 
       
   145 #endif /* TS_PARAM_SVR_SUITENAME_SERVER_H_ */