zhangzengfei
2023-01-16 71156fd4aaa5f18ba9f95f9f08bc930a321e257c
camera.cpp
@@ -56,19 +56,16 @@
using namespace protomsg;
// 加get参数 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)");
    }
    bool ret = bus_dbapi_get_list(handle, topic, list);
    std::map<string, string> params;
    params["runType"] = runType;
    bool ret = bus_dbapi_get_list(handle, topic, list, params);
    params.clear();
    return ret;
}
// 加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");
    bool ret = bus_dbapi_get_list(handle, topic, list);
    return ret;
}
}