1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.inl Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +/**
1.22 +@test
1.23 +@internalComponent
1.24 +
1.25 +This contains CT_SoundDriverServer inline functions
1.26 +*/
1.27 +
1.28 +CT_SoundDriverServer::CT_SoundDriverBlock::CT_SoundDriverBlock()
1.29 +: CTestBlockController()
1.30 + {
1.31 + }
1.32 +
1.33 +void CT_SoundDriverServer::CT_SoundDriverBlock::ConstructL()
1.34 + {
1.35 + iServerStore->Close();
1.36 + iServerStore->SetHandle(KNullHandle);
1.37 + }
1.38 +
1.39 +CT_SoundDriverServer::CT_SoundDriverBlock::~CT_SoundDriverBlock()
1.40 + {
1.41 + }
1.42 +
1.43 +/**
1.44 + * Method to create wrapper according to param aData
1.45 + * @param aData contains wrapper class name
1.46 + */
1.47 +CDataWrapper* CT_SoundDriverServer::CT_SoundDriverBlock::CreateDataL(const TDesC& aData)
1.48 + {
1.49 + CDataWrapper* wrapper = NULL;
1.50 +
1.51 + if( KRMdaDevSound() == aData )
1.52 + {
1.53 + wrapper = CT_MdaDevSoundData::NewL(iServerStore);
1.54 + }
1.55 + else if( KTCurrentSoundFormat() == aData )
1.56 + {
1.57 + wrapper = CT_CurrentSoundFormatData::NewL();
1.58 + }
1.59 + else if( KTSoundFormatsSupported() == aData )
1.60 + {
1.61 + wrapper = CT_SoundFormatsSupportedData::NewL();
1.62 + }
1.63 + return wrapper;
1.64 + }
1.65 +
1.66 +CT_SoundDriverServer::CT_SoundDriverServer()
1.67 + {
1.68 + }
1.69 +
1.70 +CT_SoundDriverServer::~CT_SoundDriverServer()
1.71 + {
1.72 + iServerStore.Close();
1.73 + iServerStore.SetHandle(KNullHandle);
1.74 + }
1.75 +
1.76 +CTestBlockController* CT_SoundDriverServer::CreateTestBlock()
1.77 + {
1.78 + CT_SoundDriverServer::CT_SoundDriverBlock* result = new
1.79 + CT_SoundDriverServer::CT_SoundDriverBlock();
1.80 + result->iServerStore = &iServerStore;
1.81 + result->ConstructL();
1.82 + return result;
1.83 + }