os/boardsupport/haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 /**
    19 @test
    20 @internalComponent
    21 
    22 This contains CT_SoundDriverServer inline functions
    23 */
    24 
    25 CT_SoundDriverServer::CT_SoundDriverBlock::CT_SoundDriverBlock()
    26 :	CTestBlockController()
    27 	{
    28 	}
    29 
    30 void CT_SoundDriverServer::CT_SoundDriverBlock::ConstructL()
    31 	{
    32 	iServerStore->Close();
    33 	iServerStore->SetHandle(KNullHandle);
    34 	}
    35 
    36 CT_SoundDriverServer::CT_SoundDriverBlock::~CT_SoundDriverBlock()
    37 	{
    38 	}
    39 
    40 /**
    41  * Method to create wrapper according to param aData
    42  * @param aData contains wrapper class name
    43  */
    44 CDataWrapper* CT_SoundDriverServer::CT_SoundDriverBlock::CreateDataL(const TDesC& aData)
    45 	{
    46 	CDataWrapper*	wrapper = NULL;
    47 
    48 	if( KRMdaDevSound() == aData )
    49 		{
    50 		wrapper = CT_MdaDevSoundData::NewL(iServerStore);
    51 		}
    52 	else if( KTCurrentSoundFormat() == aData )
    53 		{
    54 		wrapper = CT_CurrentSoundFormatData::NewL();
    55 		}
    56 	else if( KTSoundFormatsSupported() == aData )
    57 		{
    58 		wrapper = CT_SoundFormatsSupportedData::NewL();
    59 		}
    60 	return wrapper;
    61 	}
    62 
    63 CT_SoundDriverServer::CT_SoundDriverServer()
    64 	{
    65 	}
    66 
    67 CT_SoundDriverServer::~CT_SoundDriverServer()
    68 	{
    69 	iServerStore.Close();
    70 	iServerStore.SetHandle(KNullHandle);
    71 	}
    72 
    73 CTestBlockController* CT_SoundDriverServer::CreateTestBlock()
    74 	{
    75 	CT_SoundDriverServer::CT_SoundDriverBlock* result = new 
    76 	CT_SoundDriverServer::CT_SoundDriverBlock();
    77 	result->iServerStore = &iServerStore;
    78 	result->ConstructL();
    79 	return result;
    80 	}