| | |
| | | #include <dirent.h> |
| | | #include "basic/pipe_element/ffmpeg/basic_struct_for_video_image.h" |
| | | |
| | | #ifdef MYSQLRET |
| | | #include "vss/controller/VssDevTblController.h" |
| | | #include "vss/controller/VssChannelTblController.h" |
| | | #include "vss/controller/VssDomainUnitTblController.h" |
| | | #include "vss/controller/VssLocalSettingTblController.h" |
| | | #include "vss/controller/VssUpperSvrTblController.h" |
| | | #endif |
| | | #include "vss/controller/CamDevController.h" |
| | | |
| | | using namespace std; |
| | | |
| | |
| | | std::placeholders::_1, std::placeholders::_2, |
| | | std::placeholders::_3, std::placeholders::_4)); |
| | | |
| | | #ifdef MYSQLRET |
| | | |
| | | 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); |
| | | #endif |
| | | |
| | | |
| | | _HttpSrvRetRecieve.start(); |
| | | _HttpSrvRetRecieve.waitForShutDown(); |
| | | } |
| | |
| | | if ((!ret) || (serialnumber[0] == 0)) { |
| | | return "{\"ret_status\": \"内容有误,请检查!\"}"; |
| | | } |
| | | |
| | | rec.type = 0; |
| | | rec.str_cam_dev_id = QString::fromLatin1((const char *) serialnumber);//摄像机id cam_mac |
| | | rec.str_name = QString::fromStdString(value["str_name"].asString()); |
| | | rec.str_addr = QString::fromStdString(value["str_addr"].asString()); |
| | |
| | | rec.str_username = QString::fromStdString(value["str_username"].asString()); |
| | | rec.str_password = QString::fromStdString(value["str_password"].asString()); |
| | | rec.str_brand = QString::fromStdString(value["str_brand"].asString()); |
| | | rec.str_reserved = QString::fromStdString(value["str_reserved"].asString()); |
| | | type = value["n_type"].asInt(); |
| | | // rec_sdk_old = db_c.searchCamSdkTableByCamId(rec.str_cam_dev_id); |
| | | |
| | |
| | | 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\": \"传输错误,请检查!\"}"; |