S60MMFLabUtility.h
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:2k
源码类别:

Symbian

开发平台:

C/C++

  1. // Copyright (c) 2006 Nokia Corporation.
  2. #ifndef S60MMFLABUTILITY_H
  3. #define S60MMFLABUTILITY_H
  4. #include <e32std.h>
  5. #include <eikenv.h>
  6. #include <MdaAudioTonePlayer.h>
  7. #include <MdaAudioSamplePlayer.h>
  8. #include <MdaAudioSampleEditor.h>
  9. // FORWARD DECLARATIONS
  10. class CS60MMFLabAppUi;
  11. // TONE UTILITY
  12. class CS60MMFLabToneUtility : public CBase, public MMdaAudioToneObserver
  13.     {
  14. public:
  15.     static CS60MMFLabToneUtility* NewL();
  16.     static CS60MMFLabToneUtility* NewLC();
  17.     ~CS60MMFLabToneUtility();
  18. private:
  19.     CS60MMFLabToneUtility();
  20.     void ConstructL();
  21. public:
  22.     void Play();
  23.     void CancelPlay();
  24.     const TDesC& GetLabel();
  25. void SetOptionsMenuL(CEikMenuPane* aMenuPane);
  26. public: // from MMdaAudioToneObserver
  27.     void MatoPrepareComplete(TInt aError);
  28.     void MatoPlayComplete(TInt aError);
  29. private:
  30.     CMdaAudioToneUtility* iToneUtility;
  31.     };
  32. // PLAYER UTILITY
  33. class CS60MMFLabPlayerUtility : public CBase,  public MMdaAudioPlayerCallback
  34.     {
  35. public:
  36.     static CS60MMFLabPlayerUtility* NewL();
  37.     static CS60MMFLabPlayerUtility* NewLC();
  38.     ~CS60MMFLabPlayerUtility();
  39. private:
  40.     CS60MMFLabPlayerUtility();
  41.     void ConstructL();
  42. public:
  43.     void Play();
  44.     void Stop();
  45.     const TDesC& GetLabel();
  46. void SetOptionsMenuL(CEikMenuPane *aMenuPane);
  47. public: // from MMdaAudioPlayerCallback
  48.     void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
  49.     void MapcPlayComplete(TInt aError);
  50. private:
  51.     CMdaAudioPlayerUtility* iPlayerUtility;
  52. enum TPlayerState
  53. {
  54.         EPlayerNotReady,
  55.         EPlayerReady,
  56.         EPlayerPlaying
  57.         };
  58. TPlayerState iState;
  59.     };
  60. #endif // S60MMFLABUTILITY_H
  61. // End of file