Multithreading & UX update

This commit is contained in:
Brendan LE GLAUNEC
2016-10-28 09:50:37 +02:00
committed by Brendan Le Glaunec
parent de757e848d
commit 509d68f023
39 changed files with 572 additions and 407 deletions
+14 -7
View File
@@ -14,19 +14,26 @@
#pragma once
#include <json/reader.h> // Json::Value
#include <json/value.h> // Json::Value
#include <logger.h> // _LOG_
#include <opt_parse.h> // parsing opt
#include <string> // std::string
#include <utility> // std::pair
#include <logger.h> // _LOG_
#include <json/value.h> // Json::Value
#include <json/reader.h> // Json::Value
namespace etix {
namespace cameradar {
static const std::string default_configuration_path = "conf/cameradar.conf.json";
static const std::string default_ids_file_path_ = "conf/ids.json";
static const std::string default_urls_file_path_ = "conf/url.json";
static const std::string default_ports = "554,8554";
static const std::string default_subnets = "localhost,168.0.0.0/24";
static const std::string default_thumbnail_storage_path = "/tmp";
static const std::string default_rtsp_url_file = "conf/url.json";
static const std::string default_rtsp_ids_file = "conf/ids.json";
static const std::string default_cache_manager_path = "../cache_managers/dumb_cache_manager";
static const std::string default_cache_manager_name = "dumb";
struct configuration {
std::string thumbnail_storage_path;
@@ -49,7 +56,7 @@ struct configuration {
const std::string& rtsp_ids_file,
const std::string& cache_manager_path,
const std::string& cache_manager_name,
const std::string& ports = "1-65535")
const std::string& ports)
: thumbnail_storage_path(thumbnail_storage_path)
, subnets(subnets)
, rtsp_url_file(rtsp_url_file)
@@ -67,6 +74,6 @@ struct configuration {
};
std::pair<bool, std::string> read_file(const std::string& path);
std::pair<bool, configuration> load(const std::string& path);
std::pair<bool, configuration> load(const std::pair<bool, etix::tool::opt_parse>& args);
}
}