From dccc1ca1304dc1fcb86c8e24edd491509269b3e7 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期日, 29 一月 2023 14:44:52 +0800 Subject: [PATCH] 解决编译告警 --- camera.cpp | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/camera.cpp b/camera.cpp index 56e85ce..e02a8db 100644 --- a/camera.cpp +++ b/camera.cpp @@ -56,19 +56,24 @@ using namespace protomsg; // 鍔爂et鍙傛暟 runType 1: 瀹炴椂 0 杞 -bool dbapi_get_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> &list) { +bool dbapi_get_cameras_by_runType(void *handle, std::vector<protomsg::Camera> &list, char *runType, bool gb28181) { const char *topic = DATA_URL_PREFIX("/camera/getCamerasByRunType"); + if (gb28181) { + topic = DATA_URL_PREFIX("/gb28181/camera/getCamerasByRunType)"); + } - bool ret = bus_dbapi_get_list(handle, topic, list); + std::map<string, string> params; + params["runType"] = runType; + bool ret = bus_dbapi_get_list(handle, topic, list, params); + params.clear(); return ret; } -// 鍔爂et鍙傛暟 runType 1: 瀹炴椂 0 杞 -bool dbapi_get_gb28181_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> &list) { - const char *topic = DATA_URL_PREFIX("/gb28181/camera/getCamerasByRunType"); - bool ret = bus_dbapi_get_list(handle, topic, list); +bool dbapi_get_json_by_cameralist(std::vector<protomsg::Camera> &list, string &json) { + bool ret = bus_dbapi_get_json(list, json); return ret; } + -- Gitblit v1.8.0