Added comments into weave/settings.h BUG:24267885 Change-Id: Ic511385780217343a07b770d7bcf482ca32c09bb Reviewed-on: https://weave-review.googlesource.com/1192 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/libweave/include/weave/settings.h b/libweave/include/weave/settings.h index 4d55f97..84d7e0b 100644 --- a/libweave/include/weave/settings.h +++ b/libweave/include/weave/settings.h
@@ -20,32 +20,42 @@ std::string model_name; std::string model_id; - // Basic device information. Can be set from ConfigStore::LoadDefaults. + // Basic device information. Must be set from ConfigStore::LoadDefaults. std::string name; std::string description; std::string location; - // Cloud information. Must be set from ConfigStore::LoadDefaults. + // OAuth 2.0 related options. Must be set from ConfigStore::LoadDefaults. std::string api_key; std::string client_id; std::string client_secret; + // Options mirrored into "base" state. + // Maximum role for local anonymous user. + std::string local_anonymous_access_role; + // If true, allows local discovery using DNS-SD. + bool local_discovery_enabled{true}; + // If true, allows local pairing using Privet API. + bool local_pairing_enabled{true}; + + // Set of pairing modes supported by device. + std::set<PairingType> pairing_modes; + + // Embedded code. Will be used only if pairing_modes contains kEmbeddedCode. + std::string embedded_code; + // Optional cloud information. Can be used for testing or debugging. std::string oauth_url; std::string service_url; - std::string local_anonymous_access_role; - bool local_discovery_enabled{true}; - bool local_pairing_enabled{true}; + // Cloud ID of the registered device. Empty of device is not registered. + std::string cloud_id; + + // Internal options used by libweave. External code should not use them. base::TimeDelta polling_period; base::TimeDelta backup_polling_period; - bool wifi_auto_setup_enabled{true}; bool ble_setup_enabled{false}; - std::set<PairingType> pairing_modes; - std::string embedded_code; - - std::string cloud_id; std::string refresh_token; std::string robot_account; std::string last_configured_ssid;