00001 #ifndef EDDDATASOURCE_H 00002 #define EDDDATASOURCE_H 00003 00004 #define EDDMSG_ERROR -2 00005 #define EDDMSG_UNHANDLED -1 00006 #define EDDMSG_OK 0 00007 00008 #include <proto/EDDMsgHdr.h> 00009 00010 #ifndef EDD_EXPORT 00011 #define EDD_EXPORT 00012 #endif 00013 00024 class EDD_EXPORT tcEDDDataSource 00025 { 00026 public: 00027 tcEDDDataSource(void); 00028 virtual ~tcEDDDataSource(void); 00029 00030 void RegisterWithMsgLoop(void); 00031 void UnRegisterWithMsgLoop(void); 00032 00033 void SendSourceDescMsg(char** apFields, char** apItems, int NumItems); 00034 00035 void BuildHeader(tsEDDMsgHdr* apMsgHdr, uint16_t MsgID, uint16_t len); 00036 00037 bool IsSubscribed(void); 00038 00047 virtual int HandleMsg(tsEDDMsgHdr* apMsg) = 0; 00048 00049 uint32_t mnBytesSent; 00050 00051 protected: 00052 int mnSourceId; 00053 }; 00054 #endif