telephonyserver/etelmultimode/TETEL/te_EtelMM/TE_EtelMMTestStepBase.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2005-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Te_EtelMMSuiteStepBase.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "TE_EtelMMTestStepBase.h"
       
    19 #include "testdef.h"
       
    20 
       
    21 TVerdict CEtelMMTestStepBase::doTestStepPreambleL()
       
    22 	{
       
    23 	__UHEAP_MARK;
       
    24 
       
    25 	iTestScheduler=new (ELeave) CActiveScheduler;
       
    26 	CActiveScheduler::Install(iTestScheduler);	
       
    27 
       
    28 	TInt ret = iTelServer.Connect();
       
    29 
       
    30 	if (ret != KErrNone)
       
    31 		{
       
    32 		INFO_PRINTF1(_L("Failed connect phone"));
       
    33 		User::Leave(ret);
       
    34 		}
       
    35 
       
    36 	ret = iTelServer.LoadPhoneModule(DMMTSY_MODULE_NAME);
       
    37 
       
    38 	if (ret != KErrNone)
       
    39 		{
       
    40 		INFO_PRINTF1(_L("Failed load phone module"));
       
    41 		iTelServer.Close();
       
    42 		User::Leave(ret);
       
    43 		}
       
    44 
       
    45 	return TestStepResult();
       
    46 	}
       
    47 
       
    48 TVerdict CEtelMMTestStepBase::doTestStepPostambleL()
       
    49 	{
       
    50 	delete iTestScheduler;
       
    51 	iTestScheduler = NULL;
       
    52 	
       
    53 	iTelServer.UnloadPhoneModule(DMMTSY_MODULE_NAME);
       
    54 	iTelServer.Close();
       
    55 
       
    56 	__UHEAP_MARKEND;
       
    57 	return TestStepResult();
       
    58 	}
       
    59 
       
    60 void CEtelMMTestStepBase::ValidateDataCallParams(const RMobileCall::TMobileDataCallParamsV1 &aDataParams, TInt aCount)
       
    61 	{
       
    62 	TEST(aCount == 0 || aCount == 1);
       
    63 
       
    64 	switch (aCount)
       
    65 		{
       
    66 	case 0:
       
    67 		{
       
    68 		TEST(aDataParams.iService==DMMTSY_DATA_CALL_SERVICE);
       
    69 		TEST(aDataParams.iSpeed==DMMTSY_DATA_CALL_SPEED);
       
    70 		TEST(aDataParams.iProtocol==DMMTSY_DATA_CALL_PROTOCOL);
       
    71 		TEST(aDataParams.iQoS==DMMTSY_DATA_CALL_QOS);
       
    72 		TEST(aDataParams.iRLPVersion==DMMTSY_DATA_CALL_RLP);
       
    73 		TEST(aDataParams.iV42bisReq==DMMTSY_DATA_CALL_V42BIS);
       
    74 		TEST(aDataParams.iUseEdge==DMMTSY_DATA_CALL_EGPRS_REQUIRED);
       
    75 		break;
       
    76 		}
       
    77 	case 1:
       
    78 		{
       
    79 		TEST(aDataParams.iService==DMMTSY_DATA_CALL_SERVICE1);
       
    80 		TEST(aDataParams.iSpeed==DMMTSY_DATA_CALL_SPEED1);
       
    81 		TEST(aDataParams.iProtocol==DMMTSY_DATA_CALL_PROTOCOL1);
       
    82 		TEST(aDataParams.iQoS==DMMTSY_DATA_CALL_QOS1);
       
    83 		TEST(aDataParams.iRLPVersion==DMMTSY_DATA_CALL_RLP1);
       
    84 		TEST(aDataParams.iV42bisReq==DMMTSY_DATA_CALL_V42BIS1);
       
    85 		TEST(aDataParams.iUseEdge==DMMTSY_DATA_CALL_EGPRS_NOTREQUIRED);
       
    86 		break;
       
    87 		}
       
    88 	default:
       
    89 		break;
       
    90 		}
       
    91 	}
       
    92