diff -r 5a06f39ad45b -r 80975da52420 mmserv/tms/tmscallserver/inc/cpeaudiodtmftoneplayer.h --- a/mmserv/tms/tmscallserver/inc/cpeaudiodtmftoneplayer.h Fri Apr 16 15:29:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Telephony Multimedia Service - * - */ - -#ifndef CPEAUDIODTMFTONEPLAYER_H -#define CPEAUDIODTMFTONEPLAYER_H - -// INCLUDES -#include -#include -#include "dtmftoneplayerobserver.h" - -// FORWARD DECLARATIONS -class CMMFDevSound; - -// CLASS DECLARATION - -/** - * plays DTMF tones using media server - * - * @lib audiohandling.lib - */ - -namespace TMS { - -class TMSAudioDtmfTonePlayer : public MDevSoundObserver - { -public: - // Constructors and destructor - - /** - * Two-phased constructor. - */ - static TMSAudioDtmfTonePlayer* NewL(TMSDTMFTonePlayerObserver& obsrvr, - guint aAudioPreference, guint aAudioPriority); - - /** - * Destructor. - */ - virtual ~TMSAudioDtmfTonePlayer(); - -public: - - /** - * Sets volume. - * @param aVolume volume value or KDtmfSilent. - * @return None. - */ - void SetVolume(gint aVolume); - - /** - * Starts playing given dtmf tone infinitely. - * @param aTone Tone to be played. - * @return None. - */ - //void PlayDtmfTone( TChar aTone ); - void PlayDtmfTone(TDes& tone); - - /** - * Cancels playing. - * @param None. - * @return None. - */ - void Cancel(); - -public: - //From MDevSoundObserver - /** - * See MDevSoundObserver - */ - void InitializeComplete(TInt aError); - - /** - * See MDevSoundObserver - */ - void ToneFinished(TInt aError); - - /** - * See MDevSoundObserver - */ - void BufferToBeFilled(CMMFBuffer* aBuffer); - - /** - * See MDevSoundObserver - */ - void PlayError(TInt aError); - - /** - * See MDevSoundObserver - */ - void BufferToBeEmptied(CMMFBuffer* aBuffer); - - /** - * See MDevSoundObserver - */ - void RecordError(TInt aError); - - /** - * See MDevSoundObserver - */ - void ConvertError(TInt aError); - /** - * See MDevSoundObserver - */ - void DeviceMessage(TUid aMessageType, const TDesC8& aMsg); - -protected: - - /** - * C++ default constructor. - */ - TMSAudioDtmfTonePlayer(TMSDTMFTonePlayerObserver& obsrvr, - guint aAudioPreference, guint aAudioPriority); - - void ConstructL(); - - /** - * Normalize tone. - * @param aTone dtmf tone. - * @return None. - */ - void Normalize(TChar& aTone); - -private: - //new functions - - /** - * Converts the given value to the one that matches tha range used by - * CMMFDevSound. The CMMFDevSound uses valuess that can from 0 to the - * value returned by a call to CMMFDevSound::MaxVolume(). - */ - gint ConvertVolume(gint aVolume); - -protected: - // Data - - // Current volume setting. - gint iVolume; - - // DTMF player instance - CMMFDevSound* iDTMFPlayer; - - TMSDTMFTonePlayerObserver& iObserver; - guint iPref; - guint iPrior; - - }; - -} //namespace TMS - -#endif // CPEAUDIODTMFTONEPLAYER_H - -// End of File