sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef CHAR_A3F_DEVSOUND_TONECLIENT_H sl@0: #define CHAR_A3F_DEVSOUND_TONECLIENT_H sl@0: sl@0: #include sl@0: #include "char_a3f_devsound_compliancesuiteconstants.h" sl@0: #include sl@0: /* sl@0: An interface to a set of DevSound callback functions. sl@0: */ sl@0: class MA3FDevsoundToneClientObserver sl@0: { sl@0: public: sl@0: virtual void ClientInitializeCompleteCallback(TInt aError) = 0; sl@0: virtual void ClientToneFinishedCallback(TInt aError) = 0; sl@0: }; sl@0: sl@0: class CA3FDevSoundToneClient : public CBase, public MDevSoundObserver sl@0: { sl@0: public: sl@0: static CA3FDevSoundToneClient* NewL(MA3FDevsoundToneClientObserver &aObserver); sl@0: ~CA3FDevSoundToneClient(); sl@0: sl@0: void SetPriority(TInt priority); sl@0: TInt InitTonePlay(TInt aFrequency,TInt aDuration); sl@0: TInt InitDualTonePlay(TInt aFrequency, TInt aFrequencyTwo, TInt aDuration); sl@0: TInt InitDTMFStringPlay(const TDesC &aDTMFString); sl@0: TInt InitToneSequencePlay(); sl@0: TInt PlayTone(); sl@0: TInt PlayDualTone(); sl@0: TInt PlayDTMFString(); sl@0: TInt PlayToneSequence(); sl@0: sl@0: private: sl@0: CA3FDevSoundToneClient(MA3FDevsoundToneClientObserver &aObserver); sl@0: void ConstructL(); sl@0: // from MDevSoundObserver sl@0: void BufferToBeFilled(CMMFBuffer *aBuffer); sl@0: void BufferToBeEmptied(CMMFBuffer *aBuffer); sl@0: void DeviceMessage(TUid aMessageType, const TDesC8& aMsg); sl@0: void ConvertError(TInt aError); sl@0: void PlayError(TInt aError); sl@0: void RecordError(TInt aError); sl@0: sl@0: void InitializeComplete(TInt aError); sl@0: void ToneFinished(TInt aError); sl@0: private: sl@0: CMMFDevSound* iDevSound; sl@0: MA3FDevsoundToneClientObserver& iObserver; sl@0: TInt iDuration; sl@0: TInt iFrequency; sl@0: TInt iFrequencyTwo; sl@0: TBuf16 iDTMFString; sl@0: }; sl@0: sl@0: #endif //CHAR_A3F_DEVSOUND_TONECLIENT_H sl@0: sl@0: