v1.1.4 : Renamed MySQL table & Updated CONTRIBUTION.md for 2.0.0

This commit is contained in:
Brendan LE GLAUNEC
2017-01-18 09:37:24 +01:00
parent 1af533a1d3
commit fd88e761e2
2 changed files with 31 additions and 18 deletions
+13
View File
@@ -6,6 +6,19 @@ If you're not into software development or not into C++, you can still help. Upd
If you have other cool ideas, feel free to share them with me at [brendan.leglaunec@etixgroup.com](mailto:brendan.leglaunec@etixgroup.com) !
## Version 2.0.0
- *Cameradar* will become the name of the library.
- *Cameraccess* will be the name of the binary that uses Cameradar to _hack_ the cameras.
This quite big refactoring comes from the fact that most users who want to access cameras either want to launch it with the basic cache manager, mostly using the docker image already provided in this repository, or will not use it because it does not integrate into their software solution without sharing their database with Cameradar, which would cause issues with database migrations for example.
Transforming it into a library will allow developers to use it directly in their own code exactly as they want, allowing for a greater flexibility. The Cameraccess binary will then provide a simple use example as well as maintaining the current simple way of using Cameradar for non-developers.
This is quite a huge task compared to the tiny changes I usually do on Cameradar, so it might take a long time.
If you want to contribute, note that the develop will stay in 1.x until the 2.0.0 is released. A new development branch will be created especially for the 2.0 version, called `2.0.0` from which all work on the 2.0.0 version will be done until the 2.0.0 version is ready to replace the 1.x on the master and develop branches. The rest of the workflow is exactly the same as for the rest of the repository.
## Workflow
### Branches & issues
@@ -38,7 +38,7 @@ namespace etix {
namespace cameradar {
const std::string mysql_cache_manager::create_table_query =
"CREATE TABLE IF NOT EXISTS `results` ("
"CREATE TABLE IF NOT EXISTS `cameradar_results` ("
"`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, "
"`address` tinytext NOT NULL, "
"`password` tinytext NOT NULL, "
@@ -55,31 +55,31 @@ const std::string mysql_cache_manager::create_table_query =
"PRIMARY KEY (`id`));";
const std::string mysql_cache_manager::insert_with_id_query =
"INSERT INTO `%s`.`results`"
"INSERT INTO `%s`.`cameradar_results`"
" (`address`, `password`, `product`, `protocol`, `route`, `service_name`, `state`, "
"`thumbnail_path`, `username`, `port`, `ids_found`, `path_found`)"
" VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')";
const std::string mysql_cache_manager::update_result_query =
"UPDATE `%s`.`results` SET"
" `results`.`address` = '%s',"
" `results`.`password` = '%s',"
" `results`.`product` = '%s',"
" `results`.`protocol` = '%s',"
" `results`.`route` = '%s',"
" `results`.`service_name` = '%s',"
" `results`.`state` = '%s',"
" `results`.`thumbnail_path` = '%s',"
" `results`.`username` = '%s',"
" `results`.`port` = '%s',"
" `results`.`ids_found` = '%s',"
" `results`.`path_found` = '%s'"
" WHERE `results`.`address` LIKE '%s'";
"UPDATE `%s`.`cameradar_results` SET"
" `cameradar_results`.`address` = '%s',"
" `cameradar_results`.`password` = '%s',"
" `cameradar_results`.`product` = '%s',"
" `cameradar_results`.`protocol` = '%s',"
" `cameradar_results`.`route` = '%s',"
" `cameradar_results`.`service_name` = '%s',"
" `cameradar_results`.`state` = '%s',"
" `cameradar_results`.`thumbnail_path` = '%s',"
" `cameradar_results`.`username` = '%s',"
" `cameradar_results`.`port` = '%s',"
" `cameradar_results`.`ids_found` = '%s',"
" `cameradar_results`.`path_found` = '%s'"
" WHERE `cameradar_results`.`address` LIKE '%s'";
const std::string mysql_cache_manager::exist_query =
"SELECT * FROM `%s`.`results` WHERE `results`.`address` = '%s'";
"SELECT * FROM `%s`.`cameradar_results` WHERE `cameradar_results`.`address` = '%s'";
const std::string mysql_cache_manager::get_results_query = "SELECT * FROM `%s`.`results`";
const std::string mysql_cache_manager::get_results_query = "SELECT * FROM `%s`.`cameradar_results`";
const std::string mysql_cache_manager::name = "mysql-cache-manager";