asyncserialengine.h
来自「《基于Symbian OS的手机开发与应用实践》这本书的配套源码。」· C头文件 代码 · 共 82 行
H
82 行
/*
* ============================================================================
* Name : CAsyncSerialEngine from AsyncSerialEngine.h
* Part of : AsyncSerial
* Created : 23.02.2006 by ToBeReplacedByAuthor
* Description:
* Declares engine for application.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
#ifndef ASYNCSERIALENGINE_H
#define ASYNCSERIALENGINE_H
// INCLUDES
#include <e32base.h>
#include <c32comm.h>
// FORWARD DECLARATIONS
// CLASS DECLARATION
/**
* CAsyncSerialEngine class.
*
*/
class CAsyncSerialEngine : public CActive
{
public:
class MObserver
{
public:
virtual void OnCompleteL(TInt aError) = 0;
};
public: // Constructors and destructor
/**
* Two-phased constructor.
*/
static CAsyncSerialEngine* NewL(MObserver& aObserver);
/**
* Destructor.
*/
~CAsyncSerialEngine();
public: // New functions
void Receive(TDes8& aData);
protected: // Functions from CActive
void DoCancel();
void RunL();
private: // Constructors
/**
* Constructor
*/
CAsyncSerialEngine(MObserver& aObserver);
/**
* EPOC default constructor.
*/
void ConstructL();
private: // New functions
void InitializeL();
void OpenL();
void ConfigurateL();
void Close();
private: //data
MObserver& iObserver;
RCommServ iCommServ;
RComm iComm;
};
#endif
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?