|
1 /* |
|
2 * Copyright (c) 2004 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 * ?description_line |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPOSTP77_H |
|
21 #define CPOSTP77_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "FT_CLandmarkTestProcedureBase.h" |
|
25 #include <ss_std.h> |
|
26 |
|
27 // CLASS DECLARATION |
|
28 class CPosLandmarkParser; |
|
29 |
|
30 /** |
|
31 * Test procedure 77 |
|
32 */ |
|
33 class CPosTp77 :public CLandmarkTestProcedureBase |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * C++ default constructor. |
|
39 */ |
|
40 CPosTp77() : CLandmarkTestProcedureBase(77) {}; |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CPosTp77() {}; |
|
46 |
|
47 public: // Functions from base classes |
|
48 |
|
49 /** |
|
50 * From CUtfwTestBase |
|
51 * Retrieves the test module name |
|
52 * @param aName The name of the test module. |
|
53 */ |
|
54 void GetName( |
|
55 TDes& aName |
|
56 ) const; |
|
57 |
|
58 /** |
|
59 * From CUtfwTestBase |
|
60 * Always called before StartL() |
|
61 */ |
|
62 void InitTestL(); |
|
63 |
|
64 /** |
|
65 * From CUtfwTestBase |
|
66 * Always called, even if test leaves |
|
67 */ |
|
68 void CloseTest(); |
|
69 |
|
70 /** |
|
71 * From CLandmarkTestProcedureBase |
|
72 * Runs the test in the module |
|
73 */ |
|
74 void StartL(); |
|
75 |
|
76 public: // New functions |
|
77 |
|
78 /** |
|
79 * Creates, initializes and opens the default landmark database |
|
80 */ |
|
81 CPosLandmarkDatabase* InitDbLC(); |
|
82 |
|
83 /** |
|
84 * Executes the bad client test thread |
|
85 */ |
|
86 static void RunBadClientTestL(TAny* aData); |
|
87 |
|
88 /** |
|
89 * Executes the thread killing thread |
|
90 */ |
|
91 static void RunThreadKillerL(TAny* aData); |
|
92 |
|
93 public: |
|
94 |
|
95 // Use this enum to define which test case to execute |
|
96 enum TTestCase |
|
97 { |
|
98 ETestNotifyDbEvent, |
|
99 ETestNotifyDbEvent2, |
|
100 ETestInitialize, |
|
101 ETestInitialize2, |
|
102 ETestWriteLock, |
|
103 ETestRegisterUri |
|
104 }; |
|
105 |
|
106 private: |
|
107 |
|
108 void ResumeThreadsAndVerifyExitL(); |
|
109 |
|
110 /** |
|
111 * Returns ETrue if any errors are encountered, EFalse otherwise. |
|
112 */ |
|
113 TBool VerifyThreadExitResultsL(TInt aBadThreadExitReason); |
|
114 |
|
115 /** |
|
116 * Returns ETrue if any errors are encountered, EFalse otherwise. |
|
117 */ |
|
118 TBool VerifyLmServerIsAliveL(CPosLandmarkDatabase* aDb); |
|
119 |
|
120 public: |
|
121 |
|
122 RThread iBadThread; |
|
123 TTimeIntervalMicroSeconds32 iTimeToWait; |
|
124 |
|
125 private: |
|
126 |
|
127 TInt iExpectedErrorCode; |
|
128 TTestCase iTestCase; |
|
129 TExitType iBadThreadExitType, iKillerThreadExitType; |
|
130 TExitCategoryName iBadThreadExitCategory, iKillerThreadExitCategory; |
|
131 TInt iBadThreadExitReason, iKillerThreadExitReason; |
|
132 TTimeIntervalMicroSeconds32 iLastTimeToWait; |
|
133 TBuf<100> iBuf; |
|
134 |
|
135 }; |
|
136 |
|
137 #endif // CPOSTP77_H |
|
138 |
|
139 // End of File |