devsound/devsoundpluginsupport/src/sounddevice/SoundDeviceBody.h
changeset 0 79dd3e2336a0
equal deleted inserted replaced
-1:000000000000 0:79dd3e2336a0
       
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef SOUNDDEVICEBODY_H
       
    17 #define SOUNDDEVICEBODY_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <mmf/server/sounddevice.h>
       
    21 
       
    22 class MMMFDevSoundPlugin;
       
    23 
       
    24 /**
       
    25 @internalComponent
       
    26 
       
    27 This is the Body for CMMFDevSound. For descriptions of methods, see 
       
    28 MMFDevSound itself.
       
    29 */
       
    30 NONSHARABLE_CLASS( CMMFDevSound::CBody ) : public CBase
       
    31 	{
       
    32 public:
       
    33 
       
    34 	/**
       
    35 	Factory function - returning instance of class.
       
    36 	Leaves on failure.
       
    37 	*/
       
    38 	static CBody* NewL();
       
    39 
       
    40 	/**
       
    41 	Destructor.
       
    42 
       
    43 	Deletes all objects and releases all resource owned by this
       
    44 	instance.
       
    45 	*/
       
    46 	~CBody();
       
    47 
       
    48 	// public functions forwarded from CMMFDevSound
       
    49     void InitializeL(MDevSoundObserver& aDevSoundObserver, TMMFState aMode);
       
    50 	void InitializeL(MDevSoundObserver& aDevSoundObserver, TUid aHWDev, TMMFState aMode);
       
    51 	void InitializeL(MDevSoundObserver& aDevSoundObserver, TFourCC aDesiredFourCC, TMMFState aMode);
       
    52 	TMMFCapabilities Capabilities();
       
    53 	TMMFCapabilities Config() const;
       
    54 	void SetConfigL(const TMMFCapabilities& aCaps);
       
    55 	TInt MaxVolume();
       
    56 	TInt Volume();
       
    57 	void SetVolume(TInt aVolume);
       
    58 	TInt MaxGain();
       
    59 	TInt Gain();
       
    60 	void SetGain(TInt aGain);
       
    61 	void GetPlayBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
       
    62 	void SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
       
    63 	void GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage);
       
    64 	void SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage);
       
    65 	void PlayInitL();
       
    66 	void RecordInitL();
       
    67 	void PlayData();
       
    68 	void RecordData();
       
    69 	void Stop();
       
    70 	void Pause();
       
    71 	TInt SamplesRecorded();
       
    72 	TInt SamplesPlayed();
       
    73 	void PlayToneL(TInt aFrequency, const TTimeIntervalMicroSeconds& aDuration);
       
    74 	void PlayDualToneL(TInt aFrequencyOne, TInt aFrequencyTwo, const TTimeIntervalMicroSeconds& aDuration);
       
    75 	void PlayDTMFStringL(const TDesC& aDTMFString);
       
    76 	void PlayToneSequenceL(const TDesC8& aData);
       
    77 	void PlayFixedSequenceL(TInt aSequenceNumber);
       
    78 	void SetToneRepeats(TInt aRepeatCount,
       
    79 			const TTimeIntervalMicroSeconds& aRepeatTrailingSilence);
       
    80 	void SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength,
       
    81 							TTimeIntervalMicroSeconds32& aToneOffLength,
       
    82 							TTimeIntervalMicroSeconds32& aPauseLength);
       
    83 	void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
       
    84 	void SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings);
       
    85 	TAny* CustomInterface(TUid aInterfaceId);
       
    86 	TInt FixedSequenceCount();
       
    87 	const TDesC& FixedSequenceName(TInt aSequenceNumber);
       
    88 	void GetSupportedInputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings) const;
       
    89 	void GetSupportedOutputDataTypesL(RArray<TFourCC>& aSupportedDataTypes, const TMMFPrioritySettings& aPrioritySettings) const;
       
    90 protected:
       
    91 
       
    92 	CBody();
       
    93 	void ConstructL();
       
    94 
       
    95 	MMMFDevSoundPlugin* iPlugin;
       
    96 	TUid iDestructorKey;
       
    97 	};
       
    98 	
       
    99 #include "SoundDeviceBody.inl"
       
   100 
       
   101 #endif // SOUNDDEVICEBODY_H