#include "ResDataObject.h" #include class CDInterface; static CDInterface* g_CDInterface = NULL; typedef CDInterface* (*GetCDInterface)(); class CDInterface { public : CDInterface() {}; virtual ~CDInterface() {}; static CDInterface* GetCDI(const char* szModuleName = "CDIX64.so") { if (!g_CDInterface) { void* hCDI = dlopen(szModuleName, RTLD_LAZY); if (!hCDI) return nullptr; GetCDInterface func = reinterpret_cast(dlsym(hCDI, "GetCDI")); if (!func) { dlclose(hCDI); return nullptr; } g_CDInterface = func(); } return g_CDInterface; } //virtual bool RegistClient(UINT64 Address) = 0; //virtual bool UnRegistClient(UINT64 Address) = 0; //virtual bool ReceivedFromLocalBus(ResDataObject &packet) = 0; //virtual bool ReceivedFromEthBus(ResDataObject &packet) = 0; //virtual bool ReceivedFromClient(ResDataObject &packet) = 0; virtual bool ReceivedFromDevice(ResDataObject &packet) = 0; //virtual bool ReceivedDeviceNotify(ResDataObject &packet) = 0; virtual bool Registhandle(void * Handle) = 0; virtual bool UnRegistHandle(UINT64 CrcCode) = 0; //virtual bool RegistThread(PVOID pDiosThread) = 0; //virtual void UnRegistThread(DWORD Tid) = 0; //virtual bool GetThreadsLogger(DWORD Tid, PVOID& pLogger) = 0; };