lbs/common/src/ctlbsstepverifymodstatus.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file ctlbsstepverifymodinfo.cpp
       
    15 // This is the class implementation for the Verify Module Status test step
       
    16 // 
       
    17 //
       
    18  
       
    19 #include "ctlbsstepverifymodstatus.h"
       
    20 #include "tlbsutils.h"
       
    21 
       
    22 
       
    23 /**
       
    24  * Constructor
       
    25  */
       
    26 CT_LbsStep_VerifyModStatus::CT_LbsStep_VerifyModStatus(CT_LbsServer& aParent) : CT_LbsStep(aParent)
       
    27 	{
       
    28 	SetTestStepName(KLbsStep_VerifyModuleStatus);
       
    29 	}
       
    30 
       
    31 
       
    32 /**
       
    33 Static Constructor
       
    34 */
       
    35 CT_LbsStep_VerifyModStatus* CT_LbsStep_VerifyModStatus::New(CT_LbsServer& aParent)
       
    36 	{
       
    37 	return new CT_LbsStep_VerifyModStatus(aParent);
       
    38 	// Note the lack of ELeave.
       
    39 	// This means that having insufficient memory will return NULL;
       
    40 	}
       
    41 
       
    42 
       
    43 /**
       
    44  * @return - TVerdict code
       
    45  * Override of base class pure virtual
       
    46  * Our implementation only gets called if the base class doTestStepPreambleL() did
       
    47  * not leave. That being the case, the current test result value will be EPass.
       
    48  */
       
    49 TVerdict CT_LbsStep_VerifyModStatus::doTestStepL()
       
    50 	{
       
    51 	// Helper test step used to verify module information.
       
    52 	INFO_PRINTF1(_L(">>CT_LbsStep_VerifyModStatus::doTestStepL()"));
       
    53 
       
    54 	if (TestStepResult() == EPass)
       
    55 		{
       
    56 		// Access the module infos to be compared.
       
    57 		TPositionModuleStatus&	verifyModStatus = iParent.iSharedData->iVerifyModuleStatus;
       
    58 		TPositionModuleStatus&	currentModStatus = iParent.iSharedData->iCurrentModuleStatus;
       
    59 		T_LbsUtils utils;
       
    60 		
       
    61 		// Verify module informations are equal.
       
    62 		TBool res;
       
    63 		
       
    64 		res = utils.Compare_ModuleStatus(verifyModStatus, currentModStatus);
       
    65 		
       
    66 		// Fail test if they do not match.
       
    67 		if (!res)
       
    68 			{
       
    69 			SetTestStepResult(EFail);
       
    70 			}
       
    71 		}
       
    72 
       
    73 	INFO_PRINTF1(_L("<<CT_LbsStep_VerifyModStatus::doTestStepL()"));
       
    74 
       
    75 	return TestStepResult();
       
    76 	}