From dccc1ca1304dc1fcb86c8e24edd491509269b3e7 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期日, 29 一月 2023 14:44:52 +0800 Subject: [PATCH] 解决编译告警 --- rule.cpp | 40 +++++++++++++++++++++++++++++++--------- 1 files changed, 31 insertions(+), 9 deletions(-) diff --git a/rule.cpp b/rule.cpp index 2c5e94a..060cc21 100644 --- a/rule.cpp +++ b/rule.cpp @@ -1,21 +1,43 @@ +#include "3rdparty/yyjson/yyjson.h" #include "dbapi.h" #include "util.h" -#include "3rdparty/yyjson/yyjson.h" using namespace protomsg; -bool dbapi_get_time_rules(void *handle, std::vector<protomsg::CameraTimerule> & list){ - 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"); - bool ret = bus_dbapi_get_list(handle, topic, list); - return ret; + bool ret = bus_dbapi_get_list(handle, topic, list); + + return ret; } +bool dbapi_get_dayctls(char *timeRules, std::vector<protomsg::DayCtl> & list) +{ + bool is_array = true; -bool dbapi_get_camera_rules(void *handle, std::vector<protomsg::CameraAndRules> & list) { + bool ret = bus_dbapi_get_list(timeRules, is_array, list); + + return ret; + +} + +bool dbapi_get_timeranges(char *datactls, std::vector<protomsg::TimeRange> & list) +{ + const char * flag_key = NULL; + + const char * data_key = NULL; + + bool ret = bus_dbapi_get_list(datactls, flag_key, data_key, 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;; -} + bool ret = bus_dbapi_get_list(handle, topic, list); + return true; +} -- Gitblit v1.8.0