#pragma once #include #include "IMessage.h" enum class ACTIVESTATE { NOT_CONNECTED = 0, NOT_SELECTED = 1, SELECTED = 2 }; typedef std::function ONACTIVESTATECHANGED; typedef std::function ONRECVRAWDATA; typedef std::function ONRECVDATAMSG; typedef std::function ONRECVSYSMSG; typedef std::function ONDATAERROR; typedef struct _ActiveListener { ONACTIVESTATECHANGED funStateChanged; ONRECVRAWDATA funRecvRawData; ONRECVDATAMSG funRecvDataMessage; ONRECVSYSMSG funRecvSysMessage; ONDATAERROR funError; } ActiveListener; class IActive { public: virtual void setListener(ActiveListener listener) = 0; virtual void setTimeout3(int timeout) = 0; virtual void setTimeout5(int timeout) = 0; virtual void setTimeout6(int timeout) = 0; virtual void setTimeout7(int timeout) = 0; virtual void setTimeout8(int timeout) = 0; virtual int sendMessage(IMessage* pMessage) = 0; virtual ACTIVESTATE getState() = 0; virtual int connect() = 0; virtual int disconnect() = 0; };