1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/bsp/sound/inc/t_currentsoundformatdata.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,99 @@
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_CurrentSoundFormatData
1.26 +*/
1.27 +
1.28 +#ifndef T_CURRENTSOUNDFORMATDATA_H_
1.29 +#define T_CURRENTSOUNDFORMATDATA_H_
1.30 +
1.31 +// User Includes
1.32 +#include "t_mdadevsounddata.h"
1.33 +
1.34 +/**
1.35 + * Class to wrap RMdaDevSound::TCurrentSoundFormat
1.36 + *
1.37 + */
1.38 +class CT_CurrentSoundFormatData : public CDataWrapperBase
1.39 + {
1.40 +private:
1.41 + /** constant for max descriptor length */
1.42 + const static TInt KDesMaxLength = 128;
1.43 +
1.44 +public:
1.45 +
1.46 + /**
1.47 + * Two phase constructor
1.48 + *
1.49 + * @leave system wide error
1.50 + */
1.51 + static CT_CurrentSoundFormatData* NewL();
1.52 +
1.53 + /**
1.54 + * Public destructor
1.55 + */
1.56 + ~CT_CurrentSoundFormatData();
1.57 +
1.58 + virtual TAny* GetObject();
1.59 + virtual void SetObjectL(TAny* aAny);
1.60 + virtual void DisownObjectL();
1.61 + inline virtual TCleanupOperation CleanupOperation();
1.62 +
1.63 + virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
1.64 +
1.65 +private:
1.66 + /**
1.67 + * Private constructor. First phase construction
1.68 + */
1.69 + CT_CurrentSoundFormatData();
1.70 + /**
1.71 + * Second phase construction
1.72 + */
1.73 + void ConstructL();
1.74 +
1.75 + static void CleanupOperation( TAny* aAny );
1.76 +
1.77 + /**
1.78 + * Helpers
1.79 + */
1.80 + void DoCleanup();
1.81 + void DoInitiateSupportedFormatsL(const TDesC& aSection);
1.82 +
1.83 + /**
1.84 + * Commands
1.85 + */
1.86 + void DoCmdNewL(const TDesC& aSection);
1.87 + void DoCmdDestructor();
1.88 + void DoCmd_iRate_get(const TDesC& aSection);
1.89 + void DoCmd_iEncoding_getL(const TDesC& aSection);
1.90 + void DoCmd_iChannels_get(const TDesC& aSection);
1.91 + void DoCmd_iBufferSize_get(const TDesC& aSection);
1.92 + void DoCmd_iRate_set(const TDesC& aSection);
1.93 + void DoCmd_iEncoding_set(const TDesC& aSection);
1.94 + void DoCmd_iChannels_set(const TDesC& aSection);
1.95 + void DoCmd_iBufferSize_set(const TDesC& aSection);
1.96 +
1.97 +private:
1.98 + /** Instance for manipulating current sound format */
1.99 + RMdaDevSound::TCurrentSoundFormat* iCurrentFormat;
1.100 + };
1.101 +
1.102 +#endif /*T_CURRENTSOUNDFORMATDATA_H_*/