irserialengine.h

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C头文件 代码 · 共 59 行

H
59
字号
#ifndef IRSERIALENGINE_H
#define IRSERIALENGINE_H

// INCLUDES

// System includes
#include <e32base.h>
#include <c32comm.h>
#include <es_sock.h>
#include <f32file.h>

// User includes
#include "IrSerialAppUi.h"
#include "IrSerial.hrh"
// CLASS DECLARATION

/**
*
* @class    CIrSerialEngine EIrSerialEngine.h
* @brief    This is the engine class for sending data to the communications port via Infrared.
*
* It connects to the Serial communications server and initialises the serial port for transmitting
* data via Infrared. Also handles closing of the serial port and session to the serial comms server.
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/

class CIrSerialEngine : public CActive
{
    public: // Constructor and destructor
        static CIrSerialEngine* NewL(TInt aPriority, CIrSerialAppUi* aAppUi);
        ~CIrSerialEngine();

    public:
        void InitialiseL();
        void OpenL();
        void Transmit(const TDesC& aTxData);
        void Close();

    private:
        CIrSerialEngine(TInt aPriority, CIrSerialAppUi* aAppUi);
        void ConstructL();

    private: // from CActive
        void RunL();
        void DoCancel();

    private: // Data
        RCommServ                                   iCommServer;    // serial comms
        RComm                                       iCommPort;      // comm port
        CIrSerialAppUi*                     iAppUi;         // handle to App Ui
        TBuf8<EIrSerialFormEdwinMaxLength>  iDataBuf;       // data to transmit
};

#endif  // #ifndef IRSERIALENGINE_H

// End of File

⌨️ 快捷键说明

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