aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-01-27 15:59:28 -0800
committerVitaly Buka <vitalybuka@google.com>2016-01-30 01:48:27 +0000
commit919a8a9908cd48271a0b3e6afa5a444d912459e2 (patch)
treefdf22e371c9c6163d01115b93d0905e53434b988 /examples
parentac18fcf3e15a74d9980ea6b09d2482a86d7fdf18 (diff)
downloadlibweave-919a8a9908cd48271a0b3e6afa5a444d912459e2.tar.gz
Remove crypto type "None"
Unused for a while. If necessary better to set local_anonymous_access_role into kOwner. Change-Id: Ifdd39a9a6069f54ac641730550ed71da106fe10e Reviewed-on: https://weave-review.googlesource.com/2377 Reviewed-by: Alex Vakulenko <avakulenko@google.com> (cherry picked from commit d7c6deb0576805c0e043686e220a7a27e17b50d4) Reviewed-on: https://weave-review.googlesource.com/2423 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/daemon/common/daemon.h7
-rw-r--r--examples/provider/file_config_store.cc7
-rw-r--r--examples/provider/file_config_store.h4
3 files changed, 4 insertions, 14 deletions
diff --git a/examples/daemon/common/daemon.h b/examples/daemon/common/daemon.h
index 6dc021d..985c5e5 100644
--- a/examples/daemon/common/daemon.h
+++ b/examples/daemon/common/daemon.h
@@ -20,7 +20,6 @@ class Daemon {
public:
struct Options {
bool force_bootstrapping_{false};
- bool disable_security_{false};
bool disable_privet_{false};
std::string registration_ticket_;
std::string model_id_{"AAAAA"};
@@ -31,7 +30,6 @@ class Daemon {
<< "\t-h,--help Show this help message\n"
<< "\t--v=LEVEL Logging level\n"
<< "\t-b,--bootstrapping Force WiFi bootstrapping\n"
- << "\t-d,--disable_security Disable privet security\n"
<< "\t--registration_ticket=TICKET Register device with the "
"given ticket\n"
<< "\t--disable_privet Disable local privet\n";
@@ -44,8 +42,6 @@ class Daemon {
return false;
} else if (arg == "-b" || arg == "--bootstrapping") {
force_bootstrapping_ = true;
- } else if (arg == "-d" || arg == "--disable_security") {
- disable_security_ = true;
} else if (arg == "--disable_privet") {
disable_privet_ = true;
} else if (arg.find("--registration_ticket") != std::string::npos) {
@@ -71,8 +67,7 @@ class Daemon {
Daemon(const Options& opts)
: task_runner_{new weave::examples::EventTaskRunner},
config_store_{
- new weave::examples::FileConfigStore(opts.disable_security_,
- opts.model_id_,
+ new weave::examples::FileConfigStore(opts.model_id_,
task_runner_.get())},
http_client_{new weave::examples::CurlHttpClient(task_runner_.get())},
network_{new weave::examples::EventNetworkImpl(task_runner_.get())},
diff --git a/examples/provider/file_config_store.cc b/examples/provider/file_config_store.cc
index 31efaa7..a6c2e60 100644
--- a/examples/provider/file_config_store.cc
+++ b/examples/provider/file_config_store.cc
@@ -19,11 +19,9 @@ namespace examples {
const char kSettingsDir[] = "/var/lib/weave/";
-FileConfigStore::FileConfigStore(bool disable_security,
- const std::string& model_id,
+FileConfigStore::FileConfigStore(const std::string& model_id,
provider::TaskRunner* task_runner)
- : disable_security_{disable_security},
- model_id_{model_id},
+ : model_id_{model_id},
task_runner_{task_runner} {}
std::string FileConfigStore::GetPath(const std::string& name) const {
@@ -61,7 +59,6 @@ bool FileConfigStore::LoadDefaults(Settings* settings) {
settings->client_secret = "LS_iPYo_WIOE0m2VnLdduhnx";
settings->api_key = "AIzaSyACK3oZtmIylUKXiTMqkZqfuRiCgQmQSAQ";
- settings->disable_security = disable_security_;
return true;
}
diff --git a/examples/provider/file_config_store.h b/examples/provider/file_config_store.h
index e7398d1..337e82a 100644
--- a/examples/provider/file_config_store.h
+++ b/examples/provider/file_config_store.h
@@ -17,8 +17,7 @@ namespace examples {
class FileConfigStore : public provider::ConfigStore {
public:
- FileConfigStore(bool disable_security,
- const std::string& model_id,
+ FileConfigStore(const std::string& model_id,
provider::TaskRunner* task_runner);
bool LoadDefaults(Settings* settings) override;
@@ -31,7 +30,6 @@ class FileConfigStore : public provider::ConfigStore {
private:
std::string GetPath(const std::string& name) const;
- const bool disable_security_;
const std::string model_id_;
provider::TaskRunner* task_runner_{nullptr};
};