bluetooth/btexample/test/cit/ROMConfig/src/cteststepbtromconfigremcon002.cpp
changeset 0 29b1cd4cb562
child 8 2b6718f05bdb
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     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 //
       
    15 
       
    16 #include "cteststepbtromconfigremcon002.h"
       
    17 #include <remconinterfaceselector.h>
       
    18 #include <remconcoreapitarget.h>
       
    19 
       
    20 CTestStepBtRomConfigRemCon002::~CTestStepBtRomConfigRemCon002()
       
    21 	{
       
    22     }
       
    23 	
       
    24 
       
    25 CTestStepBtRomConfigRemCon002::CTestStepBtRomConfigRemCon002
       
    26 	(CTestServer& aParent) 
       
    27 	: CTestStepBtRomConfigBase(aParent)
       
    28 	{
       
    29 	SetTestStepName(KTestNameRemCon002);
       
    30 	}
       
    31 
       
    32 /**
       
    33 Static Constructor
       
    34 Note the lack of ELeave. This means that having insufficient memory will return NULL;
       
    35 */
       
    36 CTestStepBtRomConfigRemCon002* CTestStepBtRomConfigRemCon002::New
       
    37 	(CTestServer& aParent)
       
    38 	{
       
    39 	return new CTestStepBtRomConfigRemCon002(aParent); 
       
    40 	}
       
    41 
       
    42 
       
    43 /**
       
    44 See BT_ROMCONFIG_REMCON_002.script
       
    45 */
       
    46 TVerdict CTestStepBtRomConfigRemCon002::doTestStepL()
       
    47 	{
       
    48 	INFO_PRINTF1(\
       
    49 		_L("&gt;&gt;CTestStepBtRomConfigRemCon002::doTestStepL()"));
       
    50 	
       
    51 	CActiveScheduler* sched = new (ELeave)CActiveScheduler;
       
    52 	CActiveScheduler::Install(sched);
       
    53 	CleanupStack::PushL(sched);
       
    54 	
       
    55 	CRemConInterfaceSelector* remconSelector = CRemConInterfaceSelector::NewL();
       
    56 	CleanupStack::PushL( remconSelector );
       
    57 	
       
    58 	CRemConCoreApiTarget* target = CRemConCoreApiTarget::NewL(*remconSelector, *this);
       
    59 	// Ownership of target passed to remconSelector
       
    60 	
       
    61 	const TInt expectedError = ( iBtExcluded ? KErrNotFound : KErrNone );
       
    62 	// this is only used for logging readability purposes
       
    63 	const TDesC* expectedErrorDesPtr = ( iBtExcluded ? &KErrNotFoundLit : &KErrNoneLit ); 
       
    64 	
       
    65 	TRAPD(err, remconSelector->OpenTargetL())
       
    66 	if ( err!=expectedError )
       
    67 		{
       
    68 		INFO_PRINTF4(\
       
    69 			_L("Failed: Expected KErrNotFound (%d) and got %d when calling CRemConInterfaceSelector::OpenTargetL"),\
       
    70 			expectedErrorDesPtr, expectedError, err);
       
    71 		SetTestStepResult(EFail);
       
    72 		}
       
    73 
       
    74 	CleanupStack::PopAndDestroy(remconSelector);
       
    75 	CleanupStack::PopAndDestroy(sched);
       
    76 	INFO_PRINTF1(\
       
    77 		_L("&lt;&lt;CTestStepBtRomConfigRemCon002::doTestStepL()"));
       
    78 	CheckAndSetTestResult();
       
    79 	return TestStepResult(); 
       
    80 	}
       
    81 
       
    82 // stubs
       
    83 void CTestStepBtRomConfigRemCon002::MrccatoCommand(TRemConCoreApiOperationId /*aOperationId*/, 
       
    84 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
    85 	{
       
    86 	}
       
    87 	
       
    88 void CTestStepBtRomConfigRemCon002::MrccatoPlay(TRemConCoreApiPlaybackSpeed /*aSpeed*/, 
       
    89 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
    90 	{
       
    91 	}
       
    92 	
       
    93 void CTestStepBtRomConfigRemCon002::MrccatoTuneFunction(TBool /*aTwoPart*/, 
       
    94 	TUint /*aMajorChannel*/, TUint /*aMinorChannel*/,
       
    95 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
    96 	{
       
    97 	}
       
    98 	
       
    99 void CTestStepBtRomConfigRemCon002::MrccatoSelectDiskFunction(TUint /*aDisk*/,
       
   100 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
   101 	{
       
   102 	}
       
   103 	
       
   104 void CTestStepBtRomConfigRemCon002::MrccatoSelectAvInputFunction(TUint8 /*aAvInputSignalNumber*/,
       
   105 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
   106 	{
       
   107 	}
       
   108 	
       
   109 void CTestStepBtRomConfigRemCon002::MrccatoSelectAudioInputFunction(TUint8 /*aAudioInputSignalNumber*/,
       
   110 	TRemConCoreApiButtonAction /*aButtonAct*/)
       
   111 	{
       
   112 	}
       
   113 		
       
   114 // EOF