| | |
| | | #include <stdio.h> |
| | | |
| | | #include <vector> |
| | | #include <map> |
| | | #include <memory> |
| | | #include <string> |
| | | #include <thread> |
| | | #include <memory> |
| | | #include <vector> |
| | | |
| | | using namespace std; |
| | | |
| | | #include "3rdparty/bus_client/cbhomeclient.h" |
| | | #include "3rdparty/bus_client/message.h" |
| | | |
| | | #include "sysset.h" |
| | | #include "rule.h" |
| | | #include "proto/x86_64/sysset.pb.h" |
| | | #include "dbapi.h" |
| | | #include "proto/x86_64/fileanalysis.pb.h" |
| | | #include "proto/x86_64/protomsg.pb.h" |
| | | #include "proto/x86_64/sysset.pb.h" |
| | | |
| | | |
| | | int main(int argc, char const *argv[]) |
| | | { |
| | | int main(int argc, char const *argv[]) { |
| | | // 初始化bus |
| | | creg* reg = make_creg_from_cproc(make_cproc("request", "requestid")); |
| | | creg *reg = make_creg_from_cproc(make_cproc("request", "requestid")); |
| | | |
| | | printf("make_creg_from_cproc\n"); |
| | | |
| | | void* handle = bus_client_init(NULL, 0, reg); |
| | | void *handle = bus_client_init(NULL, 0, reg); |
| | | creg_free(reg); |
| | | |
| | | printf("bus_client_init end\n"); |
| | | |
| | | |
| | | // 服务器配置 sysset.pb.h |
| | | // protomsg::LocalConfig node; |
| | |
| | | // } |
| | | |
| | | // 时间规则 |
| | | std::vector<protomsg::CameraTimerule> list; |
| | | if (dbapi_get_time_rules(handle, list)) { |
| | | printf("CameraTimerule:\n"); |
| | | // std::vector<protomsg::CameraTimerule> list; |
| | | // if (dbapi_get_time_rules(handle, list)) { |
| | | // for (unsigned int i = 0; i < list.size(); i++) { |
| | | // printf("CameraTimerule: %s\n", list[i].id().c_str()); |
| | | // } |
| | | // } |
| | | |
| | | // 系统授权信息 |
| | | // printf("isExpired:%d\n", dbapi_get_server_get_is_sys_expired(handle)); |
| | | |
| | | // 摄像机 |
| | | std::vector<protomsg::Camera> list; |
| | | char *runType = (char *)"1"; // 1 实时 0 轮询 |
| | | if (dbapi_get_cameras_by_runType(handle, list, runType, false)) { |
| | | for (unsigned int i = 0; i < list.size(); i++) { |
| | | printf("Camera: %s\n", list[i].id().c_str()); |
| | | } |
| | | } |
| | | |
| | | return 0; |