contentmgmt/cafstreamingsupport/test/tscaf/source/startupcommsstep.cpp
branchRCL_3
changeset 43 2f10d260163b
equal deleted inserted replaced
42:eb9b28acd381 43:2f10d260163b
       
     1 // Copyright (c) 2008-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 "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 //
       
    15 
       
    16 #include <c32root.h>
       
    17 #include "startupcommsstep.h"
       
    18 
       
    19 // PDD names for the physical device drivers that are loaded in wins or arm
       
    20 #if defined (__WINS__)
       
    21 #define PDD_NAME		_L("ECDRV")
       
    22 #else
       
    23 #define PDD_NAME		_L("EUART1")
       
    24 #define PDD2_NAME		_L("EUART2")
       
    25 #define PDD3_NAME		_L("EUART3")
       
    26 #define PDD4_NAME		_L("EUART4")
       
    27 #endif
       
    28 
       
    29 #define LDD_NAME		_L("ECOMM")
       
    30 
       
    31 CStartupCommsStep::CStartupCommsStep()
       
    32 	{
       
    33 	SetTestStepName(KStartupCommsStep);
       
    34 	}
       
    35 
       
    36 TVerdict CStartupCommsStep::doTestStepL()
       
    37 	{
       
    38 	SetTestStepResult(EFail);
       
    39 	
       
    40 	TInt ret = User::LoadPhysicalDevice(PDD_NAME);
       
    41 	User::LeaveIfError(ret == KErrAlreadyExists?KErrNone:ret);
       
    42 
       
    43 #ifndef __WINS__
       
    44 	ret = User::LoadPhysicalDevice(PDD2_NAME);
       
    45 	ret = User::LoadPhysicalDevice(PDD3_NAME);
       
    46 	ret = User::LoadPhysicalDevice(PDD4_NAME);
       
    47 #endif
       
    48 
       
    49 	ret = User::LoadLogicalDevice(LDD_NAME);
       
    50 	User::LeaveIfError(ret == KErrAlreadyExists?KErrNone:ret);
       
    51 	ret = StartC32();
       
    52 	User::LeaveIfError(ret == KErrAlreadyExists?KErrNone:ret);
       
    53 	SetTestStepResult(EPass);
       
    54 
       
    55 	return TestStepResult();
       
    56 	}