158 ENTRY( "Handle GetAppStatus Command For Non-Existent AppID", CTmServerTest::HandleNonExistentGetAppStatusActionL ), |
158 ENTRY( "Handle GetAppStatus Command For Non-Existent AppID", CTmServerTest::HandleNonExistentGetAppStatusActionL ), |
159 ENTRY( "Handle GetAppList Command with Filter1", CTmServerTest:: HandleGetAppListActionFilter1L ), |
159 ENTRY( "Handle GetAppList Command with Filter1", CTmServerTest:: HandleGetAppListActionFilter1L ), |
160 ENTRY( "Handle GetAppList Command with Filter2", CTmServerTest:: HandleGetAppListActionFilter2L ), |
160 ENTRY( "Handle GetAppList Command with Filter2", CTmServerTest:: HandleGetAppListActionFilter2L ), |
161 ENTRY( "Handle GetAppList Command with Filter3", CTmServerTest:: HandleGetAppListActionFilter3L ), |
161 ENTRY( "Handle GetAppList Command with Filter3", CTmServerTest:: HandleGetAppListActionFilter3L ), |
162 ENTRY( "Handle GetAppList Command with Filter4", CTmServerTest:: HandleGetAppListActionFilter4L ), |
162 ENTRY( "Handle GetAppList Command with Filter4", CTmServerTest:: HandleGetAppListActionFilter4L ), |
|
163 ENTRY( "Handle GetAppList Command with WildCard Filter", CTmServerTest:: HandleGetAppListActionWildCardFilterL ), |
163 ENTRY( "Handle GetAppList Command with No Filter", CTmServerTest:: HandleGetAppListActionNoFilterL ), |
164 ENTRY( "Handle GetAppList Command with No Filter", CTmServerTest:: HandleGetAppListActionNoFilterL ), |
164 ENTRY( "Handle GetAppList Command with Invalid Arg1", CTmServerTest:: HandleGetAppListActionInvalidArg1L ), |
165 ENTRY( "Handle GetAppList Command with Invalid Arg1", CTmServerTest:: HandleGetAppListActionInvalidArg1L ), |
165 ENTRY( "Handle GetAppList Command with Invalid Arg2", CTmServerTest:: HandleGetAppListActionInvalidArg2L ), |
166 ENTRY( "Handle GetAppList Command with Invalid Arg2", CTmServerTest:: HandleGetAppListActionInvalidArg2L ), |
166 ENTRY( "Handle GetAppList Command with Invalid Arg3", CTmServerTest:: HandleGetAppListActionInvalidArg3L ), |
167 ENTRY( "Handle GetAppList Command with Invalid Arg3", CTmServerTest:: HandleGetAppListActionInvalidArg3L ), |
167 ENTRY( "Handle GetAppList Command with Invalid Arg4", CTmServerTest:: HandleGetAppListActionInvalidArg4L ), |
168 ENTRY( "Handle GetAppList Command with Invalid Arg4", CTmServerTest:: HandleGetAppListActionInvalidArg4L ), |
189 ENTRY( "Handle Event For ProfileIdList Status Update", CTmServerTest::HandleEventProfileIdListStatusUpdateL), |
190 ENTRY( "Handle Event For ProfileIdList Status Update", CTmServerTest::HandleEventProfileIdListStatusUpdateL), |
190 |
191 |
191 // OOM Testcases |
192 // OOM Testcases |
192 OOM_ENTRY( "[OOM_StartTmServerDevice]", CTmServerTest::StartTmServerDeviceL,ETrue,1,5 ), |
193 OOM_ENTRY( "[OOM_StartTmServerDevice]", CTmServerTest::StartTmServerDeviceL,ETrue,1,5 ), |
193 OOM_ENTRY( "[OOM_HandleGetAppListWithFilter]", CTmServerTest:: HandleGetAppListActionFilter1L,ETrue,1,5 ), |
194 OOM_ENTRY( "[OOM_HandleGetAppListWithFilter]", CTmServerTest:: HandleGetAppListActionFilter1L,ETrue,1,5 ), |
194 OOM_ENTRY( "[OOM_HandleGetAppListWithoutFilter]", CTmServerTest:: HandleGetAppListActionNoFilterL,ETrue,1,5 ), |
195 OOM_ENTRY( "[OOM_HandleGetAppListWildCardFilter]", CTmServerTest:: HandleGetAppListActionWildCardFilterL,ETrue,1,5 ), |
195 OOM_ENTRY( "[OOM_HandleSetClientProfileCommand]", CTmServerTest:: HandleSetClientProfileActionL,ETrue,1,5 ), |
196 OOM_ENTRY( "[OOM_HandleSetClientProfileCommand]", CTmServerTest:: HandleSetClientProfileActionL,ETrue,1,5 ), |
196 OOM_ENTRY( "[OOM_HandleGetAppStatusCommand]", CTmServerTest:: HandleGetAppStatusActionL,ETrue,1,5 ), |
197 OOM_ENTRY( "[OOM_HandleGetAppStatusCommand]", CTmServerTest:: HandleGetAppStatusActionL,ETrue,1,5 ), |
197 OOM_ENTRY( "[OOM_HandleGetAppStatusForAllApplications]", CTmServerTest::HandleWildcardGetAppStatusActionL,ETrue,1,5 ), |
198 OOM_ENTRY( "[OOM_HandleGetAppStatusForAllApplications]", CTmServerTest::HandleWildcardGetAppStatusActionL,ETrue,1,5 ), |
198 OOM_ENTRY( "[OOM_HandleAppStatusUpdateEvent]", CTmServerTest::HandleEventAppStatusUpdateL,ETrue,1,5 ), |
199 OOM_ENTRY( "[OOM_HandleAppStatusUpdateEvent]", CTmServerTest::HandleEventAppStatusUpdateL,ETrue,1,5 ), |
199 OOM_ENTRY( "[OOM_HandleDuplicateAppStatusUpdateEvent]", CTmServerTest::HandleEventDuplicateAppStatusUpdateL,ETrue,1,5 ), |
200 OOM_ENTRY( "[OOM_HandleDuplicateAppStatusUpdateEvent]", CTmServerTest::HandleEventDuplicateAppStatusUpdateL,ETrue,1,5 ), |
2234 iTestTimer = NULL; |
2235 iTestTimer = NULL; |
2235 REComSession::FinalClose(); |
2236 REComSession::FinalClose(); |
2236 return KErrNone; |
2237 return KErrNone; |
2237 } |
2238 } |
2238 |
2239 |
2239 TInt CTmServerTest::HandleGetAppListActionNoFilterL ( TTestResult& aResult ) |
2240 TInt CTmServerTest::HandleGetAppListActionWildCardFilterL ( TTestResult& aResult ) |
2240 { |
2241 { |
2241 _LIT( KLogInfo, "Handle GetAppList Command With No Filter" ); |
2242 _LIT( KLogInfo, "Handle GetAppList Command With WildCard Filter" ); |
2242 iLog->Log( KLogInfo ); |
2243 iLog->Log( KLogInfo ); |
2243 |
2244 |
2244 iTmServerDeviceType = ETrue; |
2245 iTmServerDeviceType = ETrue; |
2245 |
2246 |
2246 //Sets the information associated with the terminal mode server device |
2247 //Sets the information associated with the terminal mode server device |
2268 iTestTimer = CTestTimer::NewL(*this); |
2269 iTestTimer = CTestTimer::NewL(*this); |
2269 iTestTimer->After(15); |
2270 iTestTimer->After(15); |
2270 CActiveScheduler::Start(); |
2271 CActiveScheduler::Start(); |
2271 if (iGetAppList) |
2272 if (iGetAppList) |
2272 { |
2273 { |
|
2274 _LIT( KDescription , "GetAppList Command With WildCard Filter handled successfully"); |
|
2275 aResult.SetResult( KErrNone, KDescription ); |
|
2276 iLog->Log( KDescription ); |
|
2277 } |
|
2278 else |
|
2279 { |
|
2280 aResult.iResult = KErrGeneral; |
|
2281 _LIT( KDescription , "GetAppList Command With WildCard Filter handling Failed"); |
|
2282 aResult.SetResult( KErrNone, KDescription ); |
|
2283 iLog->Log( KDescription ); |
|
2284 } |
|
2285 delete iDiscoveryTestTimer; |
|
2286 iDiscoveryTestTimer = NULL; |
|
2287 delete iTestTimer; |
|
2288 iTestTimer = NULL; |
|
2289 REComSession::FinalClose(); |
|
2290 return KErrNone; |
|
2291 } |
|
2292 |
|
2293 TInt CTmServerTest::HandleGetAppListActionNoFilterL ( TTestResult& aResult ) |
|
2294 { |
|
2295 _LIT( KLogInfo, "Handle GetAppList Command With No Filter" ); |
|
2296 iLog->Log( KLogInfo ); |
|
2297 |
|
2298 iTmServerDeviceType = ETrue; |
|
2299 |
|
2300 //Sets the information associated with the terminal mode server device |
|
2301 SetTmServerSettingsL(); |
|
2302 iTmServer = CUpnpTmServer::NewL( *iTmServerDeviceInfo, *this ); |
|
2303 |
|
2304 //Register all the desired applications |
|
2305 RegisterApplicationsL(*iTmServer); |
|
2306 |
|
2307 //Start the tmserver device and its services |
|
2308 iTmServer->StartL(); |
|
2309 |
|
2310 //Start the control point and search for device |
|
2311 iSearchDevice = CDiscoverDevice::NewL(*this); |
|
2312 iDiscoveryTestTimer = CDiscoveryTestTimer::NewL(*this); |
|
2313 iDiscoveryTestTimer->AfterDiscovery(15); |
|
2314 CActiveScheduler::Start(); |
|
2315 |
|
2316 if ( iDeviceVerified ) |
|
2317 { |
|
2318 _LIT8(KNoFilter, " "); |
|
2319 //Retrieve the list of applications |
|
2320 iSearchDevice->GetAppListActionL( KNoFilter(),KProfileIdValue); |
|
2321 } |
|
2322 |
|
2323 iTestTimer = CTestTimer::NewL(*this); |
|
2324 iTestTimer->After(15); |
|
2325 CActiveScheduler::Start(); |
|
2326 if (iGetAppList) |
|
2327 { |
2273 _LIT( KDescription , "GetAppList Command With No Filter handled successfully"); |
2328 _LIT( KDescription , "GetAppList Command With No Filter handled successfully"); |
2274 aResult.SetResult( KErrNone, KDescription ); |
2329 aResult.SetResult( KErrNone, KDescription ); |
2275 iLog->Log( KDescription ); |
2330 iLog->Log( KDescription ); |
2276 } |
2331 } |
2277 else |
2332 else |