generated from zhangwei/Matrixai
58 lines
1.1 KiB
C++
58 lines
1.1 KiB
C++
/**
|
|
* API接口 engine
|
|
* */
|
|
|
|
#ifndef INC_APIENGINE_H
|
|
#define INC_APIENGINE_H
|
|
|
|
#include <arpa/inet.h>
|
|
#include "AppCommon.h"
|
|
|
|
#include "EngineBase.h"
|
|
#include "EngineFactory.h"
|
|
|
|
#include "json/json.h"
|
|
#include "httplib.h"
|
|
|
|
class ApiEngine : public ai_matrix::EngineBase
|
|
{
|
|
public:
|
|
ApiEngine();
|
|
~ApiEngine();
|
|
|
|
APP_ERROR Init() override;
|
|
APP_ERROR DeInit() override;
|
|
APP_ERROR Process() override;
|
|
|
|
protected:
|
|
|
|
private:
|
|
std::string strPort0_;
|
|
std::string strPort1_;
|
|
|
|
Json::Value queryBaseSetting();
|
|
Json::Value updateBaseSetting(const std::string &req);
|
|
|
|
Json::Value queryLogSetting();
|
|
Json::Value updateLogSetting(const std::string &req);
|
|
|
|
Json::Value queryDataSource();
|
|
Json::Value updateDataSource(const std::string &req);
|
|
|
|
Json::Value queryIdentifySetting();
|
|
Json::Value updateIdentifySetting(const std::string &req);
|
|
|
|
Json::Value queryHttpSetting();
|
|
Json::Value updateHttpSetting(const std::string &req);
|
|
|
|
Json::Value queryMinioSetting();
|
|
Json::Value updateMinioSetting(const std::string &req);
|
|
|
|
Json::Value identifyStart();
|
|
Json::Value identifyStop();
|
|
};
|
|
|
|
ENGINE_REGIST(ApiEngine)
|
|
|
|
#endif
|