examples/SFExamples/Quick_Recipes_on_Symbian_OS_Multimedia_Example_Code/MidiPlaying/inc/MidiPlayer.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 MIDIPLAYER_H
00018 #define MIDIPLAYER_H
00019 
00020 // INCLUDE FILES
00021 #include <e32std.h>
00022 #include <e32base.h>
00023 #include <midiclientutility.h>
00024 
00025 // CLASS DECLARATION
00026 
00027 class CMidiPlayer : public CBase, public MMidiClientUtilityObserver
00028         {
00029 public: // Constructors and destructor
00030         static CMidiPlayer* NewL();
00031         static CMidiPlayer* NewLC();
00032         ~CMidiPlayer();
00033 
00034 public: // New methods
00035         void Play(const TDesC& aFileName);
00036         void Stop();
00037         
00038 private:
00039         CMidiPlayer();
00040         void ConstructL();
00041 
00042 private:// From MMidiClientUtilityObserver
00043         void MmcuoStateChanged(TMidiState aOldState, TMidiState aNewState,
00044                         const TTimeIntervalMicroSeconds &aTime, TInt aError);
00045         void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
00046         void MmcuoVolumeChanged(TInt aChannel, TReal32 aVolumeInDecibels);
00047         void MmcuoMuteChanged(TInt aChannel, TBool aMuted);
00048         void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds &aMicroSeconds,
00049                         TInt64 aMicroBeats);
00050         void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,
00051                         const TTimeIntervalMicroSeconds &aPosition);
00052         void MmcuoMipMessageReceived(const RArray< TMipMessageEntry > &aMessage);
00053         void MmcuoPolyphonyChanged(TInt aNewPolyphony);
00054         void MmcuoInstrumentChanged(TInt aChannel, TInt aBankId,
00055                         TInt aInstrumentId);
00056 
00057 private: // Public methods
00058         void DisplayErrorMessage(TInt aError);
00059         
00060 private: // Member variables
00061         CMidiClientUtility* iMidiUtility;
00062         };
00063 
00064 #endif // MIDIPLAYER_H
00065 
00066 // End of File

Generated by  doxygen 1.6.2