cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestCSP.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002 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: Implementation of CPhoneSettingsTestCSP class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <StifTestModule.h>
       
    22 #include <nwdefs.h>             
       
    23 #include <etelmm.h> 
       
    24 #include <PsetConstants.h>
       
    25 #include <PsetCSP.h>
       
    26 #include "PhoneSettingsTest.hrh"
       
    27 #include "PhoneSettingsTest.h"
       
    28 #include "MPhoneSettingsTestMessageHandler.h"
       
    29 #include "PhoneSettingsTestUtilities.h" 
       
    30 #include "PhoneSettingsTestDefs.h"
       
    31 #include "PhoneSettingsTestCSP.h"
       
    32 
       
    33 // ============================ MEMBER FUNCTIONS ===============================
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 // CPhoneSettingsTestCSP::CPhoneSettingsTestCSP
       
    37 // C++ default constructor can NOT contain any code, that
       
    38 // might leave.
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 CPhoneSettingsTestCSP::CPhoneSettingsTestCSP(
       
    42     CPhoneSettingsTestParser& aPhoneSettingsTestParser,
       
    43     MPhoneSettingsTestMessageHandler& aPhoneSettingsTestMessageHandler ):
       
    44     iTestParser(aPhoneSettingsTestParser),
       
    45     iTestMessageHandler(aPhoneSettingsTestMessageHandler)
       
    46     {	
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CPhoneSettingsTestCSP::ConstructL
       
    51 // Symbian 2nd phase constructor can leave.
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 void CPhoneSettingsTestCSP::ConstructL()
       
    55     {    	
       
    56     } 
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // CPhoneSettingsTestCSP::NewL
       
    60 // Two-phased constructor.
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 CPhoneSettingsTestCSP* CPhoneSettingsTestCSP::NewL(
       
    64     CPhoneSettingsTestParser& aPhoneSettingsTestParser,
       
    65     MPhoneSettingsTestMessageHandler& aPhoneSettingsTestMessageHandler )
       
    66     {
       
    67     CPhoneSettingsTestCSP* self = new (ELeave) CPhoneSettingsTestCSP(
       
    68         aPhoneSettingsTestParser, aPhoneSettingsTestMessageHandler );     
       
    69     CleanupStack::PushL( self );
       
    70     self->ConstructL();
       
    71     CleanupStack::Pop();
       
    72     return self;
       
    73     }
       
    74 
       
    75 // Destructor
       
    76 CPhoneSettingsTestCSP::~CPhoneSettingsTestCSP()
       
    77     {          		
       
    78     delete iPsetCustomerServiceProfile;     
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------------------------------
       
    82 // CPhoneSettingsTestCSP::WaitTimer
       
    83 // ----------------------------------------------------------------------------
       
    84 //
       
    85 void CPhoneSettingsTestCSP::WaitTimer(TInt aWaitTime)
       
    86     {
       
    87     CPeriodic* timer = CPeriodic::NewL( CActive::EPriorityStandard );
       
    88     timer->Start( aWaitTime, aWaitTime, TCallBack( DoCallBackL, this ) );
       
    89     iWaitTimer.Start();
       
    90     delete timer;
       
    91     }
       
    92 
       
    93 // ----------------------------------------------------------------------------
       
    94 // CPhoneSettingsTestCSP::DoCallBackL
       
    95 // ----------------------------------------------------------------------------
       
    96 //
       
    97 TInt CPhoneSettingsTestCSP::DoCallBackL(TAny* aAny)
       
    98     {
       
    99     // Can't call iWaitAny.AsyncStop() in static function
       
   100     REINTERPRET_CAST( CPhoneSettingsTestCSP*, aAny )->Stop();
       
   101     return KErrNone;
       
   102     }
       
   103 
       
   104 // ----------------------------------------------------------------------------
       
   105 // CPhoneSettingsTestCSP::Stop
       
   106 // ----------------------------------------------------------------------------
       
   107 //
       
   108 void CPhoneSettingsTestCSP::Stop()
       
   109     {
       
   110     iWaitTimer.AsyncStop();  
       
   111     }
       
   112 
       
   113 // ----------------------------------------------------------------------------
       
   114 // CPhoneSettingsTestCSP::SetupL
       
   115 // ----------------------------------------------------------------------------
       
   116 //
       
   117 void CPhoneSettingsTestCSP::SetupL()
       
   118     {
       
   119 	iPsetCustomerServiceProfile = CPsetCustomerServiceProfile::NewL();
       
   120     iPsetCustomerServiceProfile->OpenCSProfileL(); 
       
   121     }
       
   122 
       
   123 // ----------------------------------------------------------------------------
       
   124 // CPhoneSettingsTestCSP::TearDownL
       
   125 // ----------------------------------------------------------------------------
       
   126 //
       
   127 void CPhoneSettingsTestCSP::TearDownL()
       
   128     {
       
   129     delete iPsetCustomerServiceProfile;
       
   130     iPsetCustomerServiceProfile = NULL; 
       
   131     }
       
   132 
       
   133 // -----------------------------------------------------------------------------
       
   134 // CPhoneSettingsTestCSP::TestCPsetCustomerServiceProfileConstructAndDestructL
       
   135 // 
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 TInt CPhoneSettingsTestCSP::TestCPsetCustomerServiceProfileConstructAndDestructL(
       
   139     TTestResult& aResult)
       
   140 	{
       
   141 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   142 	iTestMessageHandler.PrintMessage( KCSPConstructAndDestruct() );
       
   143 	
       
   144 	// Do tests here 
       
   145 	CPsetCustomerServiceProfile * psetCustomerServiceProfile = 
       
   146 	    CPsetCustomerServiceProfile::NewL();
       
   147 	CleanupStack::PushL( psetCustomerServiceProfile ); 
       
   148 	
       
   149 	ASSERT( psetCustomerServiceProfile != NULL ); 
       
   150 		
       
   151     // Uninitialize test             
       
   152     CleanupStack::PopAndDestroy( psetCustomerServiceProfile  ); 
       
   153         
       
   154 	// Set result for STIF framework
       
   155 	aResult.SetResult( KErrNone, KCSPConstructAndDestruct );	
       
   156     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   157     
       
   158 	return KErrNone; 
       
   159 	}
       
   160 
       
   161 // -----------------------------------------------------------------------------
       
   162 // CPhoneSettingsTestCSP::TestIsALSSupported
       
   163 // 
       
   164 // -----------------------------------------------------------------------------
       
   165 //
       
   166 TInt CPhoneSettingsTestCSP::TestIsALSSupported(TTestResult& aResult)
       
   167     {
       
   168 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   169 	iTestMessageHandler.PrintMessage( KCSPIsALSSupported() );
       
   170 	
       
   171 	// Initialize test 	
       
   172 	SetupL(); 
       
   173     
       
   174     TBool alsSupport; 
       
   175     	
       
   176 	// Do tests here 
       
   177     iPsetCustomerServiceProfile->IsALSSupported( alsSupport ); 
       
   178     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   179     
       
   180     // Parse result data     
       
   181     iTestParser.ParseTBool( alsSupport ); 
       
   182 
       
   183     // Uninitialize test             
       
   184 	TearDownL(); 
       
   185         
       
   186 	// Set result for STIF framework
       
   187 	aResult.SetResult( KErrNone, KCSPIsALSSupported );
       
   188     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   189     
       
   190 	return KErrNone;     
       
   191     }
       
   192 
       
   193 // -----------------------------------------------------------------------------
       
   194 // CPhoneSettingsTestCSP::TestIsCBSupported
       
   195 // 
       
   196 // -----------------------------------------------------------------------------
       
   197 //
       
   198 TInt CPhoneSettingsTestCSP::TestIsCBSupported(TTestResult& aResult)
       
   199     {
       
   200 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   201 	iTestMessageHandler.PrintMessage( KCSPIsCBSupported() );
       
   202 	
       
   203 	// Initialize test 	
       
   204 	SetupL(); 
       
   205 
       
   206     TBool cbsSupport; 
       
   207     	
       
   208 	// Do tests here 
       
   209     iPsetCustomerServiceProfile->IsCBSupported( cbsSupport ); 
       
   210     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   211         
       
   212     // Parse result data     
       
   213     iTestParser.ParseTBool( cbsSupport ); 
       
   214     
       
   215     // Uninitialize test             
       
   216 	TearDownL(); 
       
   217             
       
   218 	// Set result for STIF framework
       
   219 	aResult.SetResult( KErrNone, KCSPIsCBSupported );	
       
   220     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   221     
       
   222 	return KErrNone;     
       
   223     }
       
   224 
       
   225 // -----------------------------------------------------------------------------
       
   226 // CPhoneSettingsTestCSP::TestIsCFSupported
       
   227 // 
       
   228 // -----------------------------------------------------------------------------
       
   229 //
       
   230 TInt CPhoneSettingsTestCSP::TestIsCFSupported(TTestResult& aResult)
       
   231     {
       
   232 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   233 	iTestMessageHandler.PrintMessage( KCSPIsCFSupported() );
       
   234 	
       
   235 	// Initialize test 	
       
   236 	SetupL(); 
       
   237 
       
   238     TBool cfSupport; 
       
   239     	
       
   240 	// Do tests here 
       
   241     iPsetCustomerServiceProfile->IsCFSupported( cfSupport ); 
       
   242 
       
   243     // Parse result data     
       
   244     iTestParser.ParseTBool( cfSupport );
       
   245     
       
   246     // Uninitialize test             
       
   247 	TearDownL(); 
       
   248         
       
   249 	// Set result for STIF framework
       
   250 	aResult.SetResult( KErrNone, KCSPIsCFSupported );	
       
   251     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   252     
       
   253 	return KErrNone;     
       
   254     }
       
   255 
       
   256 // -----------------------------------------------------------------------------
       
   257 // CPhoneSettingsTestCSP::TestIsCWSupported
       
   258 // 
       
   259 // -----------------------------------------------------------------------------
       
   260 //
       
   261 TInt CPhoneSettingsTestCSP::TestIsCWSupported(TTestResult& aResult)
       
   262     {
       
   263 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   264 	iTestMessageHandler.PrintMessage( KCSPIsCWSupported() );
       
   265 	
       
   266 	// Initialize test 	
       
   267 	SetupL(); 
       
   268 
       
   269     TBool cwSupport; 
       
   270     	
       
   271 	// Do tests here 
       
   272     iPsetCustomerServiceProfile->IsCWSupported( cwSupport );  
       
   273     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   274     
       
   275     // Parse result data     
       
   276     iTestParser.ParseTBool( cwSupport );
       
   277 
       
   278     // Uninitialize test             
       
   279 	TearDownL(); 
       
   280         
       
   281 	// Set result for STIF framework
       
   282 	aResult.SetResult( KErrNone, KCSPIsCWSupported );	
       
   283     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   284     
       
   285 	return KErrNone;     
       
   286     }
       
   287 
       
   288 // -----------------------------------------------------------------------------
       
   289 // CPhoneSettingsTestCSP::TestIsNetworkSelectionSupported
       
   290 // 
       
   291 // -----------------------------------------------------------------------------
       
   292 //
       
   293 TInt CPhoneSettingsTestCSP::TestIsNetworkSelectionSupported(TTestResult& aResult)
       
   294     {
       
   295 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   296 	iTestMessageHandler.PrintMessage( KCSPIsNetworkSelectionSupported() );
       
   297 	
       
   298 	// Initialize test 	
       
   299 	SetupL(); 
       
   300 
       
   301     TBool networkSelectionSupport; 
       
   302 
       
   303 	// Do tests here 
       
   304     iPsetCustomerServiceProfile->IsNetworkSelectionSupported( networkSelectionSupport ); 
       
   305 
       
   306     // Parse result data     
       
   307     iTestParser.ParseTBool( networkSelectionSupport );
       
   308 
       
   309     // Uninitialize test             
       
   310 	TearDownL(); 
       
   311         
       
   312 	// Set result for STIF framework
       
   313 	aResult.SetResult( KErrNone, KCSPIsNetworkSelectionSupported );
       
   314     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   315     
       
   316 	return KErrNone;     
       
   317     }
       
   318 
       
   319 // -----------------------------------------------------------------------------
       
   320 // CPhoneSettingsTestCSP::TestOpenCSProfileL
       
   321 // 
       
   322 // -----------------------------------------------------------------------------
       
   323 //
       
   324 TInt CPhoneSettingsTestCSP::TestOpenCSProfileL(TTestResult& aResult)
       
   325     {
       
   326 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   327 	iTestMessageHandler.PrintMessage( KCSPOpenCSProfileL() );
       
   328 	
       
   329 	// Initialize test 	
       
   330 	SetupL(); 
       
   331     	
       
   332 	// Do tests here 
       
   333     TInt err = iPsetCustomerServiceProfile->OpenCSProfileL(); 
       
   334     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   335 
       
   336     // Uninitialize test             
       
   337 	TearDownL(); 
       
   338         
       
   339 	// Set result for STIF framework
       
   340 	aResult.SetResult( err, KCSPOpenCSProfileL );	
       
   341     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   342     
       
   343 	return KErrNone;     
       
   344     }
       
   345 
       
   346 // -----------------------------------------------------------------------------
       
   347 // CPhoneSettingsTestCSP::TestCheckIfCWSupported
       
   348 // 
       
   349 // -----------------------------------------------------------------------------
       
   350 //
       
   351 TInt CPhoneSettingsTestCSP::TestCheckIfCWSupported(TTestResult& aResult)
       
   352     {
       
   353 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   354 	iTestMessageHandler.PrintMessage( KCSPCheckIfCWSupported() );
       
   355 	
       
   356 #ifndef PHONESETTINGSTEST_LIBRARY_ONLY
       
   357 	
       
   358 	// Initialize test 	
       
   359 	SetupL(); 
       
   360 
       
   361     RMobilePhone::TCspCallCompletion cspCallCompletion; 
       
   362     TBool isCspCWSupported; 	
       
   363     TBool isCspCCBSSupported; 	
       
   364     TBool isCspHoldSupported; 	
       
   365     	
       
   366 	// Do tests here 
       
   367 	cspCallCompletion = RMobilePhone::KCspCCBS; 	 
       
   368     isCspCCBSSupported = iPsetCustomerServiceProfile->CheckIfCWSupported( cspCallCompletion ); 
       
   369     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   370 	    
       
   371 	cspCallCompletion = RMobilePhone::KCspCW; 	 
       
   372     isCspCWSupported = iPsetCustomerServiceProfile->CheckIfCWSupported( cspCallCompletion ); 
       
   373     WaitTimer( KPhoneSettingsTestAsyncTimeout );  
       
   374     
       
   375 	cspCallCompletion = RMobilePhone::KCspHOLD; 	 
       
   376     isCspHoldSupported = iPsetCustomerServiceProfile->CheckIfCWSupported( cspCallCompletion ); 
       
   377     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   378     
       
   379     // Parse result data 
       
   380     iTestMessageHandler.PrintMessage( KKCspCCBS() );
       
   381     iTestParser.ParseTBool( isCspCCBSSupported );     
       
   382     iTestMessageHandler.PrintMessage( KKCspCW() );
       
   383     iTestParser.ParseTBool( isCspCWSupported );     
       
   384     iTestMessageHandler.PrintMessage( KKCspHOLD() );
       
   385     iTestParser.ParseTBool( isCspHoldSupported ); 
       
   386     
       
   387     // Uninitialize test             
       
   388 	TearDownL(); 
       
   389         
       
   390 	// Set result for STIF framework
       
   391 	aResult.SetResult( KErrNone, KCSPCheckIfCWSupported );	
       
   392 
       
   393 #else // PHONESETTINGSTEST_LIBRARY_ONLY
       
   394 
       
   395 	aResult.SetResult( KErrNotSupported, KCSPCheckIfCWSupported );	
       
   396 
       
   397 #endif // PHONESETTINGSTEST_LIBRARY_ONLY	
       
   398 
       
   399     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   400     
       
   401 	return KErrNone;     
       
   402     }
       
   403 
       
   404 // -----------------------------------------------------------------------------
       
   405 // CPhoneSettingsTestCSP::TestCheckIfCBSupported
       
   406 // 
       
   407 // -----------------------------------------------------------------------------
       
   408 //
       
   409 TInt CPhoneSettingsTestCSP::TestCheckIfCBSupported(TTestResult& aResult)
       
   410     {
       
   411 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   412 	iTestMessageHandler.PrintMessage( KCSPCheckIfCBSupported() );
       
   413 
       
   414 #ifndef PHONESETTINGSTEST_LIBRARY_ONLY
       
   415 	
       
   416 	// Initialize test 	
       
   417 	SetupL(); 
       
   418 	
       
   419     RMobilePhone::TCspCallRestriction callRestriction; 
       
   420     TBool isSupportedBICRoam; 
       
   421     TBool isSupportedBAIC; 
       
   422     TBool isSupportedBOICexHC; 
       
   423     TBool isSupportedBOIC; 
       
   424     TBool isSupportedBOAC; 
       
   425     	
       
   426 	// Do tests here 
       
   427 	callRestriction = RMobilePhone::KCspBICRoam; 
       
   428     isSupportedBICRoam = iPsetCustomerServiceProfile->CheckIfCBSupported( callRestriction ); 
       
   429     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   430 
       
   431 	callRestriction = RMobilePhone::KCspBAIC; 
       
   432     isSupportedBAIC = iPsetCustomerServiceProfile->CheckIfCBSupported( callRestriction ); 
       
   433     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   434 
       
   435 	callRestriction = RMobilePhone::KCspBOICexHC; 
       
   436     isSupportedBOICexHC = iPsetCustomerServiceProfile->CheckIfCBSupported( callRestriction ); 
       
   437     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   438 
       
   439 	callRestriction = RMobilePhone::KCspBOIC; 
       
   440     isSupportedBOIC = iPsetCustomerServiceProfile->CheckIfCBSupported( callRestriction ); 
       
   441     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   442 
       
   443 	callRestriction = RMobilePhone::KCspBOAC; 
       
   444     isSupportedBOAC = iPsetCustomerServiceProfile->CheckIfCBSupported( callRestriction ); 
       
   445     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   446 
       
   447     // Parse result data
       
   448     iTestMessageHandler.PrintMessage( KKCspBICRoam() );
       
   449     iTestParser.ParseTBool( isSupportedBICRoam ); 
       
   450     iTestMessageHandler.PrintMessage( KKCspBAIC() );
       
   451     iTestParser.ParseTBool( isSupportedBAIC ); 
       
   452     iTestMessageHandler.PrintMessage( KKCspBOICexHC() );
       
   453     iTestParser.ParseTBool( isSupportedBOICexHC ); 
       
   454     iTestMessageHandler.PrintMessage( KKCspBOIC() );
       
   455     iTestParser.ParseTBool( isSupportedBOIC ); 
       
   456     iTestMessageHandler.PrintMessage( KKCspBOAC() );
       
   457     iTestParser.ParseTBool( isSupportedBOAC ); 
       
   458 
       
   459     // Uninitialize test             
       
   460 	TearDownL(); 
       
   461         
       
   462 	// Set result for STIF framework
       
   463 	aResult.SetResult( KErrNone, KCSPCheckIfCBSupported );		    
       
   464 	
       
   465 #else // PHONESETTINGSTEST_LIBRARY_ONLY	
       
   466 
       
   467 	aResult.SetResult( KErrNotSupported, KCSPCheckIfCBSupported );		    
       
   468 
       
   469 #endif // PHONESETTINGSTEST_LIBRARY_ONLY
       
   470 
       
   471     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   472     
       
   473 	return KErrNone;     
       
   474     }
       
   475 
       
   476 
       
   477 // -----------------------------------------------------------------------------
       
   478 // CPhoneSettingsTestCSP::TestCheckIfCFSupported
       
   479 // 
       
   480 // -----------------------------------------------------------------------------
       
   481 //
       
   482 TInt CPhoneSettingsTestCSP::TestCheckIfCFSupported(TTestResult& aResult)
       
   483     {
       
   484 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   485 	iTestMessageHandler.PrintMessage( KCSPCheckIfCFSupported() );
       
   486 
       
   487 #ifndef PHONESETTINGSTEST_LIBRARY_ONLY
       
   488 	
       
   489 	// Initialize test 	
       
   490 	SetupL(); 
       
   491 
       
   492     RMobilePhone::TCspCallOffering callOffering; 
       
   493     TBool isSupportedCFU; 
       
   494     TBool isSupportedCFB; 
       
   495     TBool isSupportedCFNRc; 
       
   496     TBool isSupportedCFNRy; 
       
   497         	
       
   498 	// Do tests here 
       
   499 	callOffering = RMobilePhone::KCspCFU; 
       
   500     isSupportedCFU = iPsetCustomerServiceProfile->CheckIfCFSupported( callOffering ); 
       
   501     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   502 
       
   503 	callOffering = RMobilePhone::KCspCFB; 
       
   504     isSupportedCFB = iPsetCustomerServiceProfile->CheckIfCFSupported( callOffering ); 
       
   505     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   506 
       
   507 	callOffering = RMobilePhone::KCspCFNRc; 
       
   508     isSupportedCFNRc = iPsetCustomerServiceProfile->CheckIfCFSupported( callOffering ); 
       
   509     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   510 
       
   511 	callOffering = RMobilePhone::KCspCFNRy; 
       
   512     isSupportedCFNRy = iPsetCustomerServiceProfile->CheckIfCFSupported( callOffering ); 
       
   513     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   514 
       
   515     // Parse result data
       
   516     iTestMessageHandler.PrintMessage( KKCspCFU() );
       
   517     iTestParser.ParseTBool( isSupportedCFU ); 
       
   518     iTestMessageHandler.PrintMessage( KKCspCFB() );
       
   519     iTestParser.ParseTBool( isSupportedCFB ); 
       
   520     iTestMessageHandler.PrintMessage( KKCspCFNRc() );
       
   521     iTestParser.ParseTBool( isSupportedCFNRc ); 
       
   522     iTestMessageHandler.PrintMessage( KKCspCFNRy() );
       
   523     iTestParser.ParseTBool( isSupportedCFNRy ); 
       
   524 
       
   525     // Uninitialize test             
       
   526 	TearDownL(); 
       
   527         
       
   528 	// Set result for STIF framework
       
   529 	aResult.SetResult( KErrNone, KCSPCheckIfCFSupported );		    
       
   530 
       
   531 #else // PHONESETTINGSTEST_LIBRARY_ONLY
       
   532 
       
   533     aResult.SetResult( KErrNotSupported, KCSPCheckIfCFSupported );		    
       
   534 
       
   535 #endif // PHONESETTINGSTEST_LIBRARY_ONLY
       
   536 
       
   537     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   538     
       
   539 	return KErrNone;     
       
   540     }
       
   541 
       
   542 // -----------------------------------------------------------------------------
       
   543 // CPhoneSettingsTestCSP::TestCheckIfAlsSupported
       
   544 // 
       
   545 // -----------------------------------------------------------------------------
       
   546 //
       
   547 TInt CPhoneSettingsTestCSP::TestCheckIfAlsSupported(TTestResult& aResult)
       
   548     {
       
   549 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   550 	iTestMessageHandler.PrintMessage( KCSPCheckIfAlsSupported() );
       
   551 	
       
   552 #ifndef PHONESETTINGSTEST_LIBRARY_ONLY	
       
   553 
       
   554 	// Initialize test 	
       
   555 	SetupL(); 
       
   556 
       
   557     RMobilePhone::TCspCPHSTeleservices cPHSTeleservices = RMobilePhone::KCspALS; 
       
   558     TBool alsSupported; 	
       
   559     	
       
   560 	// Do tests here 
       
   561     alsSupported = iPsetCustomerServiceProfile->CheckIfAlsSupported( cPHSTeleservices ); 
       
   562     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   563 
       
   564     // Parse result data
       
   565     iTestMessageHandler.PrintMessage( KKCspALS() );
       
   566     iTestParser.ParseTBool( cPHSTeleservices ); 
       
   567 
       
   568     // Uninitialize test             
       
   569 	TearDownL(); 
       
   570         
       
   571 	// Set result for STIF framework
       
   572 	aResult.SetResult( KErrNone, KCSPCheckIfAlsSupported );	
       
   573 
       
   574 #else // PHONESETTINGSTEST_LIBRARY_ONLY
       
   575 
       
   576     aResult.SetResult( KErrNotSupported, KCSPCheckIfAlsSupported );	
       
   577     
       
   578 #endif // PHONESETTINGSTEST_LIBRARY_ONLY
       
   579 
       
   580     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   581     
       
   582 	return KErrNone;     
       
   583     }
       
   584 
       
   585 // -----------------------------------------------------------------------------
       
   586 // CPhoneSettingsTestCSP::TestCheckIfNetworkSelectionSupported
       
   587 // 
       
   588 // -----------------------------------------------------------------------------
       
   589 //
       
   590 TInt CPhoneSettingsTestCSP::TestCheckIfNetworkSelectionSupported(TTestResult& aResult)
       
   591     {
       
   592 	iTestMessageHandler.PrintMessage( KStartingTestCase() );
       
   593 	iTestMessageHandler.PrintMessage( KCSPCheckIfNetworkSelectionSupported() );
       
   594 	
       
   595 #ifndef PHONESETTINGSTEST_LIBRARY_ONLY
       
   596 	
       
   597 	// Initialize test 	
       
   598 	SetupL(); 
       
   599 
       
   600     RMobilePhone::TCspValueAdded valueAdded = RMobilePhone::KCspPLMNMode; 
       
   601     TBool pLMNModeSupported; 
       
   602     	
       
   603 	// Do tests here 
       
   604     pLMNModeSupported = iPsetCustomerServiceProfile->CheckIfNetworkSelectionSupported(
       
   605         valueAdded ); 
       
   606     WaitTimer( KPhoneSettingsTestAsyncTimeout );   
       
   607 
       
   608     // Parse result data
       
   609     iTestMessageHandler.PrintMessage( KKCspPLMNMode() );
       
   610     iTestParser.ParseTBool( pLMNModeSupported ); 
       
   611     
       
   612     // Uninitialize test             
       
   613 	TearDownL(); 
       
   614         
       
   615 	// Set result for STIF framework
       
   616 	aResult.SetResult( KErrNone, KCSPCheckIfNetworkSelectionSupported );		    
       
   617 
       
   618 #else // PHONESETTINGSTEST_LIBRARY_ONLY
       
   619 
       
   620     aResult.SetResult( KErrNotSupported, KCSPCheckIfNetworkSelectionSupported );		    
       
   621 
       
   622 #endif // PHONESETTINGSTEST_LIBRARY_ONLY
       
   623 
       
   624     iTestMessageHandler.PrintMessage( KExitingTestCase() );    
       
   625     
       
   626 	return KErrNone;     
       
   627     }
       
   628 
       
   629 		    					
       
   630 //  End of File