|
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 * @file CSuite.h |
|
16 * for (WINS && !EKA2) versions will be xxxServer.Dll and require a thread to be started |
|
17 * in the process of the client. The client initialises the server by calling the |
|
18 * one and only ordinal. |
|
19 * |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 |
|
25 #if (!defined CAP_PARAM_SVR_SUITENAME_SERVER_H_) |
|
26 #define CAP_PARAM_SVR_SUITENAME_SERVER_H_ |
|
27 |
|
28 |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <e32svr.h> |
|
32 #include "f32file.h" |
|
33 #include "e32test.h" |
|
34 |
|
35 #ifdef SYMBIAN_OLD_EXPORT_LOCATION |
|
36 #include <TestExecuteStepBase.h> |
|
37 #include <TestExecuteServerBase.h> |
|
38 #else |
|
39 #include <test/TestExecuteStepBase.h> |
|
40 #include <test/TestExecuteServerBase.h> |
|
41 #endif |
|
42 |
|
43 //The two ways to get thru |
|
44 #define API_RetValue_ServerPanic 0 |
|
45 #define API_RetValue_NoCapError 0 |
|
46 |
|
47 //The only way to get rejected |
|
48 #define API_RetValue_PermissionDenied 1 |
|
49 #define DEBUG_ONLY 1 |
|
50 #define DYNAMIC_IPC 2 |
|
51 // TS_PARAM_SVR_SUITENAMEServer.h |
|
52 // |
|
53 // This contains CTestPARAM_SVR_SUITENAMESuite |
|
54 |
|
55 const TUint KTestSecureServerMajorVersionNumber = 0; |
|
56 const TUint KTestSecureServerMinorVersionNumber = 1; |
|
57 const TUint KTestSecureServerBuildVersionNumber = 1; |
|
58 |
|
59 |
|
60 class CTestPARAM_SVR_SUITENAMEServer : public CTestServer |
|
61 { |
|
62 public: |
|
63 static CTestPARAM_SVR_SUITENAMEServer* NewL(); |
|
64 // Base class pure virtual override |
|
65 virtual CTestStep* CreateTestStep(const TDesC& aStepName); |
|
66 |
|
67 }; |
|
68 |
|
69 |
|
70 |
|
71 class CCapabilityTestStep : public CTestStep, public RSessionBase |
|
72 { |
|
73 public: |
|
74 virtual TVerdict doTestStepPreambleL( void ); |
|
75 virtual TVerdict doTestStepPostambleL( void ); |
|
76 // void ServerClose(RTelServer& aServer); |
|
77 CActiveScheduler* testScheduler; |
|
78 |
|
79 TInt StartServer() ; |
|
80 // from CStep.h |
|
81 #define SR_MESSAGE_TYPE_CHNGED 2 |
|
82 #define SR_MESSAGE_ID_CHNGED 10 |
|
83 #define SR_ServerName_CHNGED _L("FLogger server") |
|
84 |
|
85 #define SR_CAPTEST_INVERSE 0 |
|
86 |
|
87 //The Server Name (eg: CommServer, EtelServer,FLogger server, etc) |
|
88 TBuf<100> SR_ServerName; |
|
89 TBuf<100> iServer_Panic; |
|
90 |
|
91 //Following flags influence inverse tests |
|
92 TBool iExpect_Rejection; |
|
93 |
|
94 TUint32 iStepCap; |
|
95 |
|
96 |
|
97 //Is it Async or sync? |
|
98 TInt SR_MESSAGE_TYPE; |
|
99 |
|
100 //It holds the IPC number |
|
101 TInt SR_MESSAGE_ID; |
|
102 |
|
103 //Holds the cap mask for the message |
|
104 TInt SR_MESSAGE_MASK; |
|
105 |
|
106 //We name the child thread appended by the IPC_Number it tests |
|
107 TBuf<100> ChildThread_SR; |
|
108 |
|
109 //The flag informs the main thread whether the connection to the server was established |
|
110 volatile TBool iSessionCreated; |
|
111 |
|
112 //To find out if an Async message was completed and if then with what result? |
|
113 TRequestStatus RequestStatus_SR; |
|
114 |
|
115 //For an Sync message, nResult_SR get you the return value |
|
116 TInt iResult_SR; |
|
117 |
|
118 //Hold the retusn value from "CreateSession" API |
|
119 TInt iResult_Server; |
|
120 |
|
121 TInt iResult_C32; |
|
122 |
|
123 enum TDbgFns {MarkHeapStart, MarkHeapEnd, CheckHeap, FailNext, ResetFailNext}; |
|
124 |
|
125 TInt iOptions; |
|
126 |
|
127 |
|
128 //The Child thread object |
|
129 RThread tChildThread; |
|
130 |
|
131 //This is the Function called from "doTestStepL" by the test Suite,and it creates an |
|
132 //child thread which internally calls the corresponding Exec_SendReceive_SERVERNAME fn. |
|
133 TVerdict MainThread(); |
|
134 TVerdict GetVerdict(TInt aAPIretValue); |
|
135 TVerdict GetVerdict(TExitType aExit,TInt aInitRetValue, TInt aApiRetValue); |
|
136 TInt TestDebugHeap(TInt *iDbgIPCNo); |
|
137 |
|
138 |
|
139 //This is for the scheduler test framework |
|
140 virtual enum TVerdict doTestStepL(); |
|
141 |
|
142 // Stuff that derived classes need to implement |
|
143 virtual TVersion Version()=0; |
|
144 virtual TInt Exec_SendReceive()=0; |
|
145 |
|
146 |
|
147 }; |
|
148 |
|
149 |
|
150 #endif /* TS_PARAM_SVR_SUITENAME_SERVER_H_ */ |
|
151 |