diff -r 9d4397b300d1 -r b220a9341636 mmaudio_plat/restricted_audio_output_api/tsrc/RestrictedAOTestClass/src/RestrictedAOTestClassBlocks.cpp --- a/mmaudio_plat/restricted_audio_output_api/tsrc/RestrictedAOTestClass/src/RestrictedAOTestClassBlocks.cpp Mon Oct 18 12:47:26 2010 +0100 +++ b/mmaudio_plat/restricted_audio_output_api/tsrc/RestrictedAOTestClass/src/RestrictedAOTestClassBlocks.cpp Tue Nov 02 12:13:59 2010 +0000 @@ -21,7 +21,6 @@ #include #include #include -#include #include "RestrictedAOTestClass.h" #include "debug.h" @@ -104,6 +103,12 @@ delete iDevSound; iDevSound = NULL; } + + if (iFactory) + { + delete iFactory; + iFactory = NULL; + } REComSession::FinalClose(); } @@ -123,15 +128,16 @@ // First string is the function name used in TestScripter script file. // Second is the actual implementation member function. - ENTRY( "CreateFactory", CRestrictedAOTestClass::CreateFactory ), - ENTRY( "CreateRestrictedAO", CRestrictedAOTestClass::CreateRestrictedAO ), + ENTRY( "CreateFactory", CRestrictedAOTestClass::CreateFactory ), + ENTRY( "CreateRestrictedAO", CRestrictedAOTestClass::CreateRestrictedAO ), ENTRY( "AppendAllowedOutput", CRestrictedAOTestClass::AppendAllowedOutput ), ENTRY( "RemoveAllowedOutput", CRestrictedAOTestClass::RemoveAllowedOutput ), ENTRY( "GetAllowedOutputCount", CRestrictedAOTestClass::GetAllowedOutputCount ), ENTRY( "GetAllowedOutput", CRestrictedAOTestClass::GetAllowedOutput ), ENTRY( "Reset", CRestrictedAOTestClass::Reset ), ENTRY( "Commit", CRestrictedAOTestClass::Commit ), - + ENTRY( "GetUid", CRestrictedAOTestClass::GetUid ), + ENTRY( "Example", CRestrictedAOTestClass::ExampleL ), }; @@ -365,6 +371,15 @@ return error; } +TInt CRestrictedAOTestClass::GetUid( CStifItemParser& /*aItem*/ ) + { + TUid AudioHandlerUid = iRestrictedAudioOutputMessageHandler->Uid(); + TUid AudioProxyUid = iRestrictedAudioOutputProxy->Uid(); + + FTRACE(FPrint(_L("CRestrictedAOTestClass::GetUid - AudioHandlerUid=%x, AudioProxyUid=%x "), iRestrictedAudioOutputMessageHandler->Uid(), iRestrictedAudioOutputProxy->Uid())); + iLog->Log(_L("CRestrictedAOTestClass::GetUid")); + return KErrNone; + } // ----------------------------------------------------------------------------- // CRestrictedAOTestClass::SetExpectedEvents() // ----------------------------------------------------------------------------- @@ -764,7 +779,10 @@ iLog->Log(_L("CRestrictedAOTestClass::CreateFactory")); TInt error = KErrNone; - TRAP(error, iDevSound = CMMFDevSound::NewL()) ; + error = CConfigurationComponentsFactory::CreateFactoryL(iFactory); + + if (error == KErrNone) + TRAP(error, iDevSound = CMMFDevSound::NewL()) ; // AddExpectedEvent(EInitializeComplete, KMediumTimeout); return error; @@ -781,9 +799,9 @@ iLog->Log(_L("CRestrictedAOTestClass::CreateRestrictedAO")); TInt error = KErrNone; - if (iDevSound != NULL) + if (iFactory != NULL && iDevSound != NULL) { - TRAP(error, iRestrictedAudioOutput = CRestrictedAudioOutputProxy::NewL(*iDevSound)); + error = iFactory->CreateRestrictedAudioOutput(*iDevSound, iRestrictedAudioOutput); } else {