modulecomm_inter.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef MODULECOMM_INTER_H
  2. #define MODULECOMM_INTER_H
  3. #include <QtCore/qglobal.h>
  4. #include <functional>
  5. #include <QDateTime>
  6. #if defined(MODULECOMM_INTER_LIBRARY)
  7. # define MODULECOMM_INTER_EXPORT Q_DECL_EXPORT
  8. #else
  9. # define MODULECOMM_INTER_EXPORT Q_DECL_IMPORT
  10. #endif
  11. #ifndef IV_MODULE_FUN
  12. typedef std::function<void(const char * ,const unsigned int , const unsigned int , QDateTime * ,const char *)> ModuleFun;
  13. typedef void (* SMCallBack)(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
  14. #define IV_MODULE_FUN
  15. #endif
  16. namespace iv {
  17. namespace modulecomm_inter {
  18. void * MODULECOMM_INTER_EXPORT RegisterSend(const char * strcommname,const unsigned int nBufSize,const unsigned int nMsgBufCount);
  19. void * MODULECOMM_INTER_EXPORT RegisterRecv(const char * strcommname,SMCallBack pCall);
  20. void * MODULECOMM_INTER_EXPORT RegisterRecvPlus(const char * strcommname,ModuleFun xFun);
  21. void MODULECOMM_INTER_EXPORT ModuleSendMsg(void * pHandle,const char * strdata,const unsigned int nDataLen);
  22. void MODULECOMM_INTER_EXPORT Unregister(void * pHandle);
  23. void MODULECOMM_INTER_EXPORT PauseComm(void * pHandle);
  24. void MODULECOMM_INTER_EXPORT ContintuComm(void * pHandle);
  25. }
  26. }
  27. #endif // MODULECOMM_INTER_H