examples/sfexamples/AudioTone/inc/AudioTonePlayer.h

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:  CAudioTonePlayer declaration
00015 // 
00016 // 
00017 
00018 
00019 #ifndef AUDIOTONEPLAYER_H
00020 #define AUDIOTONEPLAYER_H
00021 
00022 // INCLUDE FILES
00023 #include <e32std.h>
00024 #include <e32base.h>
00025 #include <MdaAudioTonePlayer.h>
00026 
00027 // CLASS DECLARATION
00028 
00029 class CAudioTonePlayer : public CBase, public MMdaAudioToneObserver
00030         {
00031 public: // Constructors and destructor
00032         static CAudioTonePlayer* NewL();
00033         static CAudioTonePlayer* NewLC();
00034         ~CAudioTonePlayer();
00035 
00036 public: // Public methods
00037         void PlayTone(TInt aFrequency, TTimeIntervalMicroSeconds aDuration);
00038         void PlayDualTone(TInt aFrequency1, TInt aFrequency2,
00039                         TTimeIntervalMicroSeconds aDuration);
00040         void Stop();
00041         
00042 private: // Constructors
00043         CAudioTonePlayer();
00044         void ConstructL();
00045         
00046 private: // From MMdaAudioToneObserver
00047         void MatoPrepareComplete(TInt aError);
00048         void MatoPlayComplete(TInt aError);
00049 
00050 private: // Private methods
00051         void DisplayErrorMessage(TInt aError);
00052         
00053 private:
00054         CMdaAudioToneUtility* iTonePlayer;
00055         };
00056 
00057 #endif // AUDIOTONEPLAYER_H
00058 
00059 // End of File

Generated by  doxygen 1.6.2