中间件底层,websocket

IDingDing.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef IDINGDING_H
  2. #define IDINGDING_H
  3. #ifdef DINGDING_EXPORTS
  4. #define DINGDING_API __declspec(dllexport)
  5. #else
  6. #define DINGDING_API __declspec(dllimport)
  7. #endif
  8. #include <string>
  9. #include <json/json.h>
  10. #pragma comment(lib,"jsoncpp_static.lib")
  11. class DINGDING_API IDingDing
  12. {
  13. public:
  14. virtual ~IDingDing() = 0 {};
  15. //static IDingDing* GetInstance();
  16. // 推送信息到钉钉
  17. virtual bool Push(const std::string& strInfo) = 0;
  18. // 推送心跳提醒消息到钉钉
  19. virtual bool PushHeart(const std::string& strDev) = 0;
  20. virtual bool PushHeart(const std::string& strDev, const bool& bIsPush, const bool& bIsRm = false) = 0;
  21. // 推送连接断开消息到钉钉
  22. virtual bool PushDisConn(const std::string& strDev) = 0;
  23. // 推送IVR流程节点超时提醒到钉钉
  24. virtual bool PushIVRCellTimeOut() = 0;
  25. // 推送SQL执行失败语句到钉钉
  26. virtual bool PushFailSQL(const std::string&strSql, const std::string& strErrInfo = "") = 0;
  27. // 推送fslink不能找到对应通道消息到钉钉
  28. virtual bool PushFindFailChan() = 0;
  29. };
  30. extern "C" DINGDING_API IDingDing* GetDingDing();
  31. #endif