From 379ec7cb8b5b36aade5ce2714b4a990bf34f8eb6 Mon Sep 17 00:00:00 2001
From: cheliequan <liequanche@126.com>
Date: 星期五, 13 一月 2023 10:44:35 +0800
Subject: [PATCH] 增加函数实现

---
 rule.cpp |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/rule.cpp b/rule.cpp
index 12636de..2c5e94a 100644
--- a/rule.cpp
+++ b/rule.cpp
@@ -1,10 +1,21 @@
-#include "rule.h"
+#include "dbapi.h"
 #include "util.h"
+#include "3rdparty/yyjson/yyjson.h"
 
 using namespace protomsg;
 
-bool dbapi_get_time_rules(void *handle, protomsg::CameraTimerule & message) {
-    const char *topic = DATA_URL_PREFIX("/cameraTimerule/findAll");
+bool dbapi_get_time_rules(void *handle, std::vector<protomsg::CameraTimerule> & list){
+    const char *topic = DATA_URL_PREFIX("/cameraTimerule/findAll");	
 
-    return bus_dbapi_get(handle, topic, message);
+	bool ret = bus_dbapi_get_list(handle, topic, list);
+	return ret;
 }
+
+
+bool dbapi_get_camera_rules(void *handle, std::vector<protomsg::CameraAndRules> & list) {
+    const char *topic = DATA_URL_PREFIX("/camera/rule/findAll");
+
+	bool ret = bus_dbapi_get_list(handle, topic, list);
+    return true;;
+}
+

--
Gitblit v1.8.0