1 /* |
|
2 * Copyright (c) 2007 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: Test Class which has the list of test cases for CLcService |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CTESTLCSERVICE_H |
|
20 #define CTESTLCSERVICE_H |
|
21 |
|
22 // System Includes |
|
23 #include <StifLogger.h> |
|
24 #include <StifTestModule.h> |
|
25 #include <e32base.h> |
|
26 #include <e32std.h> |
|
27 #include <lcnotification.h> |
|
28 #include <lcappexitobserver.h> |
|
29 |
|
30 |
|
31 //Forward Declarations |
|
32 class CLcService; |
|
33 |
|
34 // Constants |
|
35 |
|
36 // CLASS DECLARATION |
|
37 /** |
|
38 * Test Class to invoke the CLcService methods |
|
39 * |
|
40 * This class is a helper class. The status variable of this active obect is |
|
41 * used to provide the asynchronous method Calls. |
|
42 * |
|
43 * @lib testlc.lib |
|
44 * @since S60 v5.0 |
|
45 */ |
|
46 |
|
47 class CTestLcService :public CActive, public MLcNotification, public MLcAppExitObserver |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * C++ default constructor. |
|
53 */ |
|
54 CTestLcService(CStifLogger* aLog); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CTestLcService(); |
|
60 |
|
61 public: |
|
62 |
|
63 //From CActive |
|
64 void RunL(); |
|
65 void DoCancel(); |
|
66 TInt RunError(TInt aError); |
|
67 |
|
68 // From MLcNotification |
|
69 void LcStatusChangedL( TInt aErrorCode ); |
|
70 |
|
71 // From MLcAppExitObserver |
|
72 void HandleChainedLocationAppExitL( TInt aReason ); |
|
73 |
|
74 /** |
|
75 * Test Case for Creating the new instance of CLcService |
|
76 * This will test for Successful Creation on NewL |
|
77 * |
|
78 * @since S60 v5.0 |
|
79 * Returns KErrNone if successful. |
|
80 * |
|
81 */ |
|
82 TInt CheckServiceNewL(); |
|
83 |
|
84 /** |
|
85 * Test Case for Creating the new instance of CLcService |
|
86 * This will test for Successful Creation on NewLC |
|
87 * |
|
88 * @since S60 v5.0 |
|
89 * Returns KErrNone if successful. |
|
90 * |
|
91 */ |
|
92 TInt CheckServiceNewLC(); |
|
93 |
|
94 /** |
|
95 * Test Case for Getting all the Location Applications |
|
96 * This will test for Successful Get. |
|
97 * |
|
98 * @since S60 v5.0 |
|
99 * Returns KErrNone if successful. |
|
100 * |
|
101 */ |
|
102 TInt TestGetLocationApplicationsL(); |
|
103 |
|
104 /** |
|
105 * Test Case for Getting all the Location Applications Asynchronously. |
|
106 * This will test for Successful Get. |
|
107 * |
|
108 * @since S60 v5.0 |
|
109 * Returns KErrNone if successful. |
|
110 * |
|
111 */ |
|
112 TInt TestGetLocationApplicationsAsynL(); |
|
113 |
|
114 /** |
|
115 * Test Case for Getting all the Location Applications using Filter. |
|
116 * This will test for Successful Get |
|
117 * |
|
118 * @since S60 v5.0 |
|
119 * Returns KErrNone if successful. |
|
120 * |
|
121 */ |
|
122 TInt TestGetLocationApplicationsFilterL(); |
|
123 |
|
124 /** |
|
125 * Test Case for Getting all the Location Applications using Filter. |
|
126 * This will test for Successful Get |
|
127 * |
|
128 * @since S60 v5.0 |
|
129 * Returns KErrNone if successful. |
|
130 * |
|
131 */ |
|
132 TInt TestGetLocationApplicationsFilterAsynL(); |
|
133 |
|
134 /** |
|
135 * Test Case for Setting and Removing the Observer. |
|
136 * This will test for Successful Set and Remove. |
|
137 * |
|
138 * @since S60 v5.0 |
|
139 * Returns KErrNone if successful. |
|
140 * |
|
141 */ |
|
142 TInt TestSetRemoveObserverL(TInt aObserverState); |
|
143 |
|
144 /** |
|
145 * Test Case for Cancelling the GetLocationApplications request. |
|
146 * This will test for Successful Cancel |
|
147 * |
|
148 * @since S60 v5.0 |
|
149 * Returns KErrNone if successful. |
|
150 * |
|
151 */ |
|
152 TInt TestCancelGetLocationApplications(); |
|
153 |
|
154 /** |
|
155 * Test Case for Creating new instance of CLcLaunchParam |
|
156 * This will test for Successful Create. |
|
157 * |
|
158 * @since S60 v5.0 |
|
159 * Returns KErrNone if successful. |
|
160 * |
|
161 */ |
|
162 TInt TestCLcLaunchParamNewL(); |
|
163 |
|
164 /** |
|
165 * Test Case for Creating new instance of CLcLaunchParam |
|
166 * This will test for Successful Create. |
|
167 * |
|
168 * @since S60 v5.0 |
|
169 * Returns KErrNone if successful. |
|
170 * |
|
171 */ |
|
172 TInt TestCLcLaunchParamNewLC(); |
|
173 |
|
174 |
|
175 private: //data |
|
176 /** |
|
177 * CLcService Instance |
|
178 */ |
|
179 CLcService* iLcService; |
|
180 |
|
181 /** |
|
182 * Pointer to Stif Logger - Does not Own |
|
183 */ |
|
184 CStifLogger* iLog; |
|
185 |
|
186 }; |
|
187 |
|
188 #endif // CTESTLCSERVICE_H |
|
189 |
|
190 // End of File |
|