#ifndef __HTTPPLUGIN_HPP_ #define __HTTPPLUGIN_HPP_ #include #include "UtilBase.hpp" #include "Util/logger.h" #include "config.hpp" #include "HttpClient.hpp" #include "HttpServer.hpp" #include "requests.hpp" #include "ExpelDevice.h" #include "InfineFilter.hpp" #include "PluginSubscriber.hpp" using namespace std; using namespace toolkit; namespace gsd { class HttpPlugin: public PluginSubscriber, public PluginBase { private: HttpPlugin(){ } public: using Ptr = std::shared_ptr; /** * @description: getPtr * @return {*} */ static std::shared_ptr getPtr(); /** * @description: 初始化 * @return {*} */ bool Init(); /** * @description: 启动任务 * @return {*} */ bool StartTask(); /** * @description: 释放 * @return {*} */ void Destroy(); /** * @description: 获取数据 * @return {*} */ void getHttpInfo(); /** * @description: Alive * @return {*} */ bool Alive(); /** * @description: 纠察器 * @param {string&} ImageBase64 * @param {string&} datas * @return {*} */ std::pair getCheck(std::string& ImageBase64, std::string& datas); /** * @description: RestPlugin * @return {*} */ virtual bool RestPlugin(); ~HttpPlugin(){} protected: std::shared_ptr m_httpClient = nullptr; std::shared_ptr m_HttpServer = nullptr; // timer Timer::Ptr timer0; }; } // namespace gsd #endif