examples/sfexamples/AudioPlaying/inc/SimpleAudioPlayer.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:
00015 // 
00016 
00017 #ifndef SIMPLEAUDIOPLAYER_H
00018 #define SIMPLEAUDIOPLAYER_H
00019 
00020 // INCLUDES
00021 #include <e32std.h>
00022 #include <e32base.h>
00023 #include <MdaAudioSamplePlayer.h>
00024 
00025 // CLASS DECLARATION
00026 
00027 class CSimpleAudioPlayer : public CBase, public MMdaAudioPlayerCallback
00028         {
00029 public: // Constructors and destructor
00030         static CSimpleAudioPlayer* NewL();
00031         static CSimpleAudioPlayer* NewLC();
00032         ~CSimpleAudioPlayer();
00033 
00034 public: // New methods
00035         void PlayL(const TDesC& aFileName);
00036         void Resume();
00037         void Pause();
00038         void Stop();
00039         void Rewind(TInt aIntervalInSeconds);
00040         void FastForward(TInt aIntervalInSeconds);
00041         
00042 private:
00043         CSimpleAudioPlayer();
00044         void ConstructL();
00045 
00046 private:// From MMdaAudioPlayerCallback
00047         void MapcInitComplete(TInt aError,
00048                         const TTimeIntervalMicroSeconds& /*aDuration*/);
00049         void MapcPlayComplete(TInt aError);
00050 
00051 private: // Public methods
00052         void DisplayErrorMessage(TInt aError);
00053         
00054 private: // Member variables
00055         CMdaAudioPlayerUtility* iPlayerUtility;
00056         };
00057 
00058 #endif // SIMPLEAUDIOPLAYER_H
00059 
00060 // End of File

Generated by  doxygen 1.6.2