os/boardsupport/haitest/bspsvs/suite/bsp/sound/inc/t_currentsoundformatdata.h
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_CurrentSoundFormatData
    23 */
    24 
    25 #ifndef T_CURRENTSOUNDFORMATDATA_H_
    26 #define T_CURRENTSOUNDFORMATDATA_H_
    27 
    28 //	User Includes
    29 #include "t_mdadevsounddata.h"
    30 
    31 /**
    32  * Class to wrap RMdaDevSound::TCurrentSoundFormat
    33  *
    34  */
    35 class CT_CurrentSoundFormatData : public CDataWrapperBase
    36 	{
    37 private:
    38 	/** constant for max descriptor length   */
    39 	const static 	TInt KDesMaxLength = 128;
    40 
    41 public:
    42 
    43 	/**
    44 	* Two phase constructor
    45 	*
    46 	* @leave	system wide error
    47 	*/
    48 	static CT_CurrentSoundFormatData*	NewL();
    49 
    50 	/**
    51 	* Public destructor
    52 	*/
    53 	~CT_CurrentSoundFormatData();
    54 
    55 	virtual TAny*	GetObject();
    56 	virtual void	SetObjectL(TAny* aAny);
    57 	virtual void	DisownObjectL();
    58 	inline virtual 	TCleanupOperation CleanupOperation();
    59 	
    60 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
    61 	
    62 private:
    63 	/**
    64 	* Private constructor. First phase construction
    65 	*/
    66 	CT_CurrentSoundFormatData();
    67 	/**
    68 	* Second phase construction
    69 	*/
    70 	void	ConstructL();
    71 	
    72 	static void CleanupOperation( TAny* aAny );
    73 	
    74 	/**
    75 	* Helpers
    76 	*/
    77 	void	DoCleanup();
    78 	void	DoInitiateSupportedFormatsL(const TDesC& aSection);
    79 	
    80 	/**
    81 	* Commands
    82 	*/
    83 	void	DoCmdNewL(const TDesC& aSection);
    84 	void	DoCmdDestructor();
    85 	void	DoCmd_iRate_get(const TDesC& aSection);
    86 	void	DoCmd_iEncoding_getL(const TDesC& aSection);
    87 	void	DoCmd_iChannels_get(const TDesC& aSection);
    88 	void	DoCmd_iBufferSize_get(const TDesC& aSection);
    89 	void	DoCmd_iRate_set(const TDesC& aSection);
    90 	void	DoCmd_iEncoding_set(const TDesC& aSection);
    91 	void	DoCmd_iChannels_set(const TDesC& aSection);
    92 	void	DoCmd_iBufferSize_set(const TDesC& aSection);
    93 
    94 private:
    95 	/** Instance for manipulating current sound format   */
    96 	RMdaDevSound::TCurrentSoundFormat*	iCurrentFormat;	
    97 	};
    98 
    99 #endif /*T_CURRENTSOUNDFORMATDATA_H_*/