?? recorderadapter.h
字號:
/* Copyright (c) 2004, Nokia. All rights reserved */
#ifndef __CRECORDERADAPTER_H__
#define __CRECORDERADAPTER_H__
// INCLUDES
#include <e32std.h>
#include <MdaAudioSampleEditor.h>
#include <mda\\client\\utility.h> // for MMdaObjectStateChangeObserver
#include "audioadapter.h"
// CONSTANTS
// The sound file produced in record mode
_LIT( KRecorderFile, "record.wav" );
// FORWARD DECLARATIONS
class CSoundAppUi;
// CLASS DECLARATION
/**
* CRecorderAdapter
* An instance of class CRecorderAdapter is an adapter
* object for the CMdaAudioRecorderUtility class.
*/
class CRecorderAdapter : public CBase,
public MAudioAdapter,
public MMdaObjectStateChangeObserver
{
public:
/**
* NewL
* Two-phased constructor.
* Create a CRecorderAdapter object using two phase construction,
* and return a pointer to the created object
* @param aAppUi the User Interface
* @return pointer to new object
*/
static CRecorderAdapter* NewL( CSoundAppUi& aAppUi );
/**
* NewLC
* Two-phased constructor.
* Create a CRecorderAdapter object using two phase construction,
* and return a pointer to the created object
* @param aAppUi the User Interface
* @return pointer to new object
*/
static CRecorderAdapter* NewLC( CSoundAppUi& aAppUi );
/**
* ~CRecorderAdapter.
* Virtual Destructor.
*/
virtual ~CRecorderAdapter();
public: // from MAudioAdapter
/**
* PlayL
* Begin playback of the audio sample.
*/
void PlayL();
/**
* StopL
* Stop playback or recording of the audio sample
* Note that this implementation of the virtual function does not leave.
*/
void StopL();
/**
* RecordL
* Record using the audio utility.
*/
void RecordL();
/**
* UpdateMenuL
* Update the menu aMenuPane to reflect the current state of the
* audio player utility. Note that this implementation of the
* virtual function does not leave.
* @param aMenuPane the menu pane to update
*/
void UpdateMenuL( CEikMenuPane* aMenuPane );
/**
* Identify
* Return an identifying string
* @return An identification string
*/
const TDesC& Identify();
public: // from MMdaObjectStateChangeObserver
/**
* MoscoStateChangeEvent
* Handle the change of state of an audio recorder utility.
* @param aObject The audio sample object that has changed state
* @param aPreviousState The state before the change
* @param aCurrentState The current state
* @param aErrorCode If not KErrNone, then the error that
* caused the state change
*/
void MoscoStateChangeEvent( CBase* aObject,
TInt aPreviousState,
TInt aCurrentState,
TInt aErrorCode );
private: // Constructors
/**
* CRecorderAdapter.
* C++ default constructor.
* Perform the first phase of two phase construction
* @param aAppUi the Ui to use
*/
CRecorderAdapter( CSoundAppUi& aAppUi );
/**
* ConstructL
* 2nd phase constructor.
*/
void ConstructL();
private: //Data
/**
* iMdaAudioRecorderUtility. The audio recorder utility object
* owned by CRecorderAdapter object.
*/
CMdaAudioRecorderUtility* iMdaAudioRecorderUtility;
/** Reference to the application's UI object. **/
CSoundAppUi& iAppUi;
/**
* itextResourceIdentifier. Textresource for identifier
* owned by CRecorderAdapter object.
*/
HBufC* itextResourceIdentifier;
};
#endif // __CRECORDERADAPTER_H__
// End of File
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -