Merge branch 'master' of http://192.168.5.5:10010/r/valib/c_bhomedbapi
| | |
| | | ) |
| | | |
| | | set(src |
| | | ${CMAKE_SOURCE_DIR}/camera.cpp |
| | | ${CMAKE_SOURCE_DIR}/polygon.cpp |
| | | ${CMAKE_SOURCE_DIR}/rule.cpp |
| | | ${CMAKE_SOURCE_DIR}/sdk.cpp |
| | | ${CMAKE_SOURCE_DIR}/stack.cpp |
| | | ${CMAKE_SOURCE_DIR}/sysset.cpp |
| | | ${CMAKE_SOURCE_DIR}/util.cpp |
| | | ${CMAKE_SOURCE_DIR}/3rdparty/yyjson/yyjson.c |
New file |
| | |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | |
| | | using namespace protomsg; |
| | | |
| | | // 加get参数 runType 1: 实时 0 轮询 |
| | | bool dbapi_get_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/camera/getCamerasByRunType"); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | // 加get参数 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; |
| | | } |
| | | |
New file |
| | |
| | | #ifndef C_BHOME_BUS_DBAPIS_H |
| | | #define C_BHOME_BUS_DBAPIS_H |
| | | |
| | | #include <vector> |
| | | |
| | | #include "proto/x86_64/sysset.pb.h" |
| | | #include "proto/x86_64/protomsg.pb.h" |
| | | #include "proto/x86_64/fileanalysis.pb.h" |
| | | |
| | | using namespace std; |
| | | |
| | | bool dbapi_get_server_info(void *handle, protomsg::LocalConfig & message); |
| | | bool dbapi_get_poll_config(void *handle, protomsg::PollConfig & message); |
| | | bool dbapi_get_stack_config(void *handle, protomsg::FileAnalysisSetting & message); |
| | | bool dbapi_get_time_rules(void *handle, std::vector<protomsg::CameraTimerule> & list); |
| | | bool dbapi_get_camera_rules(void *handle, std::vector<protomsg::CameraAndRules> & list); |
| | | |
| | | bool dbapi_get_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> & list); |
| | | bool dbapi_get_gb28181_cameras_by_runtype(void *handle, std::vector<protomsg::Camera> & list); |
| | | bool dbapi_get_sdk_channel_set(void *handle, std::vector<protomsg::SdkChanSet> & list); |
| | | bool dbapi_get_sdks(void *handle, std::vector<protomsg::Sdk> & list); |
| | | |
| | | bool dbapi_get_doing_stacks(void *handle, std::vector<protomsg::FileStack> & list); |
| | | bool dbapi_get_polygons(void *handle, std::vector<protomsg::CameraPolygon> & list); |
| | | bool dbapi_get_polygon_relations(void *handle, std::vector<protomsg::CameraPolygonRelation> & list); |
| | | |
| | | #endif |
| | |
| | | #include "3rdparty/bus_client/cbhomeclient.h" |
| | | #include "3rdparty/bus_client/message.h" |
| | | |
| | | #include "sysset.h" |
| | | #include "rule.h" |
| | | #include "dbapi.h" |
| | | #include "proto/x86_64/sysset.pb.h" |
| | | #include "proto/x86_64/fileanalysis.pb.h" |
| | | #include "proto/x86_64/protomsg.pb.h" |
New file |
| | |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | |
| | | using namespace protomsg; |
| | | |
| | | bool dbapi_get_polygons(void *handle, std::vector<protomsg::CameraPolygon> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/polygon/findAll"); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | bool dbapi_get_polygon_relations(void *handle, std::vector<protomsg::CameraPolygonRelation> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/polygon/relation/findAll"); |
| | | |
| | | return true;; |
| | | } |
| | | |
| | |
| | | #include "rule.h" |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | #include "3rdparty/yyjson/yyjson.h" |
| | | |
| | | using namespace protomsg; |
| | | |
| | | bool dbapi_get_time_rules(void *handle, vector<protomsg::CameraTimerule> & list) { |
| | | bool dbapi_get_time_rules(void *handle, std::vector<protomsg::CameraTimerule> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/cameraTimerule/findAll"); |
| | | |
| | | char * ptr_value = NULL; |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | bool dbapi_get_camera_rules(void *handle, std::vector<protomsg::CameraAndRules> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/camera/rule/findAll"); |
| | | |
| | | return true;; |
| | | } |
| | | |
New file |
| | |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | |
| | | using namespace protomsg; |
| | | |
| | | bool dbapi_get_sdk_channel_set(void *handle, std::vector<protomsg::SdkChanSet> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/sdk/getAllSdkChanSet"); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | bool dbapi_get_sdks(void *handle, std::vector<protomsg::Sdk> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/sdk/findAllSdk"); |
| | | |
| | | return true; |
| | | } |
New file |
| | |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | |
| | | using namespace protomsg; |
| | | |
| | | bool dbapi_get_doing_stacks(void *handle, std::vector<protomsg::FileStack> & list) { |
| | | const char *topic = DATA_URL_PREFIX("/fileStack/findAllDoingStacks"); |
| | | |
| | | return true; |
| | | } |
| | | |
| | |
| | | #include "sysset.h" |
| | | #include "dbapi.h" |
| | | #include "util.h" |
| | | |
| | | using namespace protomsg; |