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 |   74 +++++++++++++++++++++++++++++++++---
 1 files changed, 67 insertions(+), 7 deletions(-)

diff --git a/camera.cpp b/camera.cpp
index 127ed6e..e02a8db 100644
--- a/camera.cpp
+++ b/camera.cpp
@@ -1,19 +1,79 @@
+/******************************************************************************
+
+                  鐗堟潈鎵�鏈� (C), 2001-2011, 鍖椾含璐濇�濈鎶�鏈湁闄愬叕鍙�
+
+ ******************************************************************************
+  鏂� 浠� 鍚�   : camera.cpp
+  鐗� 鏈� 鍙�   : 鍒濈
+  浣�    鑰�   : cheliequan
+  鐢熸垚鏃ユ湡   : 2023骞�1鏈�13鏃�
+  鏈�杩戜慨鏀�   :
+  鍔熻兘鎻忚堪   : 鑾峰彇鐩告満鐩稿叧淇℃伅
+  鍑芥暟鍒楄〃   :
+              dbapi_get_cameras_by_runtype
+              dbapi_get_gb28181_cameras_by_runtype
+  淇敼鍘嗗彶   :
+  1.鏃�    鏈�   : 2023骞�1鏈�13鏃�
+    浣�    鑰�   : cheliequan
+    淇敼鍐呭   : 鍒涘缓鏂囦欢
+
+******************************************************************************/
+
+/*----------------------------------------------*
+ * 鍖呭惈澶存枃浠�                                   *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 澶栭儴鍙橀噺璇存槑                                 *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 澶栭儴鍑芥暟鍘熷瀷璇存槑                             *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 鍐呴儴鍑芥暟鍘熷瀷璇存槑                             *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 鍏ㄥ眬鍙橀噺                                     *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 妯″潡绾у彉閲�                                   *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 甯搁噺瀹氫箟                                     *
+ *----------------------------------------------*/
+
+/*----------------------------------------------*
+ * 瀹忓畾涔�                                       *
+ *----------------------------------------------*/
+
 #include "dbapi.h"
 #include "util.h"
-
 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)");
+    }
 
-    return true;
+    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");
 
-    return true;
+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