audioplayerview.h

来自「Symbian S60下的声音播放器的例子,适合初学者」· C头文件 代码 · 共 64 行

H
64
字号
#ifndef __AUDIOPLAYERVIEW_H__
#define __AUDIOPLAYERVIEW_H__

// INCLUDES
// System includes
#include <coecntrl.h> // CCoeControl

// User includes
#include "AudioPlayerEngine.h" // MAudioPlayerEngineObserver

// FORWARD DECLARATIONS
class CEikLabel;

// CLASS DECLARATION

/**
 *
 * @class	CAudioPlayerView AudioPlayerView.h
 * @brief	This class represents the view of AudioPlayer example and informs
 * the user of the current playing status
 *
 * Copyright (c) EMCC Software Ltd 2003
 * @version	1.0
 *
 */
class CAudioPlayerView :	public CCoeControl, public MAudioPlayerEngineObserver
	{
	public:
		static CAudioPlayerView* NewL(const TRect& aRect);
		~CAudioPlayerView();

	public:				// MAudioPlayerEngineObserver
		virtual void HandlePlayingStoppedL();

	public:
		void PlayToneL();
		void PlayWavL();
		void PlayMidiL();
		void PlayStreamL();
		void StopL();

	public:
		inline const CAudioPlayerEngine::TState& State() const;

	private:
		CAudioPlayerView();
		void ConstructL(const TRect& aRect);

	private:			// CCoeControl
		virtual void Draw(const TRect& aRect) const;
		virtual TInt CountComponentControls() const;
		virtual CCoeControl* ComponentControl(TInt aIndex) const;

	private: // member data
		CEikLabel*			iDisplayStatus;

		CAudioPlayerEngine*	iEngine;
	};

// inline functions
const CAudioPlayerEngine::TState& CAudioPlayerView::State() const		{ return iEngine->State(); }

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?