| | |
| | | #include "vss/controller/VssDomainUnitTblController.h" |
| | | #include "vss/controller/VssLocalSettingTblController.h" |
| | | #include "vss/controller/VssUpperSvrTblController.h" |
| | | #include "vss/controller/CamDevController.h" |
| | | |
| | | using namespace std; |
| | | |
| | |
| | | |
| | | |
| | | BaseDao::initConnection(); |
| | | VssLocalSettingTblSqliteDao::instance()->setLDBTool(&db_c); |
| | | BaseSqliteDao::setLDBTool(&db_c); |
| | | VssDevTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | VssChannelTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | VssDomainUnitTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | VssLocalSettingTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | CamDevController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | VssUpperSvrTblController::instance()->registerHttpServices(_HttpSrvRetRecieve); |
| | | |
| | | |
| | | _HttpSrvRetRecieve.start(); |
| | | _HttpSrvRetRecieve.waitForShutDown(); |
| | |
| | | fdfsClient.rwLock.unlock(); |
| | | } |
| | | |
| | | //# http client 127.0.0.1:9999/resetFdfs |
| | | std::string http_cmd = "http://127.0.0.1:9999/resetFdfs"; |
| | | HttpRequestWithCrul httpRequestWithCrul; |
| | | std::string response_bak = ""; |
| | | std::string postParams_bak = ""; |
| | | httpRequestWithCrul.curl_post_req("http://127.0.0.1:9999/resetFdfs", postParams_bak, response_bak); |
| | | // //# http client 127.0.0.1:9999/resetFdfs |
| | | // std::string http_cmd = "http://127.0.0.1:9999/resetFdfs"; |
| | | // HttpRequestWithCrul httpRequestWithCrul; |
| | | // std::string response_bak = ""; |
| | | // std::string postParams_bak = ""; |
| | | // httpRequestWithCrul.curl_post_req("http://127.0.0.1:9999/resetFdfs", postParams_bak, response_bak); |
| | | } |
| | | } else { |
| | | return "{\"ret_status\": \"传输错误,请检查!\"}"; |
| | |
| | | } |
| | | |
| | | std::string devHttpServer_c::createDatabase(std::string ip, unsigned int port, std::string content, |
| | | PResponse &response) { DBG("ip:" << ip << "; port:" << port); |
| | | PResponse &response) { |
| | | DBG("ip:" << ip << "; port:" << port); |
| | | DBG("content: " << content); |
| | | if (erlangDbTool == nullptr) { |
| | | response->write(SimpleWeb::StatusCode::server_error_not_implemented, "{\"error\":\"节点不存在 \"}"); |