diff options
author | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-04-21 17:53:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-04-21 17:53:07 +0000 |
commit | 51805a169e3ac961a84d6de222b0797cfff0f919 (patch) | |
tree | e66b0fb458a71a808fdb7bf880c6b1ed1882bcbe /include | |
parent | 76915d0ba35aeca907be1a500032b078152f05d4 (diff) | |
parent | 7f6484ff67f30f0ab78945d5125eb91770a7dabb (diff) | |
download | libweave-51805a169e3ac961a84d6de222b0797cfff0f919.tar.gz |
Merge "Merge remote-tracking branch 'weave/master' into 'weave/aosp-master'" into aosp-master
Diffstat (limited to 'include')
-rw-r--r-- | include/weave/device.h | 2 | ||||
-rw-r--r-- | include/weave/provider/http_client.h | 2 | ||||
-rw-r--r-- | include/weave/provider/network.h | 2 | ||||
-rw-r--r-- | include/weave/provider/test/fake_task_runner.h | 4 | ||||
-rw-r--r-- | include/weave/provider/test/mock_config_store.h | 3 | ||||
-rw-r--r-- | include/weave/settings.h | 7 |
6 files changed, 8 insertions, 12 deletions
diff --git a/include/weave/device.h b/include/weave/device.h index 5d455de..c0c3584 100644 --- a/include/weave/device.h +++ b/include/weave/device.h @@ -152,7 +152,7 @@ class Device { // |component| is the name of the component for which commands should be // handled. // |command_name| is the full command name of the command to handle. e.g. - // "base.reboot". Each command can have no more than one handler. + // "device.setConfig". Each command can have no more than one handler. // Empty |component| and |command_name| sets default handler for all unhanded // commands. // No new command handlers can be set after default handler was set. diff --git a/include/weave/provider/http_client.h b/include/weave/provider/http_client.h index bf01022..5a53374 100644 --- a/include/weave/provider/http_client.h +++ b/include/weave/provider/http_client.h @@ -48,7 +48,7 @@ namespace provider { // request is complete), callback should be invokes on the same thread. // Callback should never be called before SendRequest(...) returns. // -// When invoking callback function, user should privide implementation +// When invoking callback function, user should provide implementation // of the Response interface. For example, the following could be used as a // simple implementation: // struct ResponseImpl : public provider::HttpClient::Response { diff --git a/include/weave/provider/network.h b/include/weave/provider/network.h index a73b75e..2be2dfb 100644 --- a/include/weave/provider/network.h +++ b/include/weave/provider/network.h @@ -20,7 +20,7 @@ namespace provider { // sockets, implementing XMPP push notifications channel. // // There are 2 main parts of this interface. One part is used to check network -// connection status and signup for notification if connection status changes. +// connection status and sign up for notification if connection status changes. // Implementation of GetConnectionState() should return current network // connection state (enum Network::State). // Implementation of AddConnectionChangedCallback() should remember callback diff --git a/include/weave/provider/test/fake_task_runner.h b/include/weave/provider/test/fake_task_runner.h index 4080072..9476d02 100644 --- a/include/weave/provider/test/fake_task_runner.h +++ b/include/weave/provider/test/fake_task_runner.h @@ -34,10 +34,6 @@ class FakeTaskRunner : public TaskRunner { size_t GetTaskQueueSize() const; private: - void SaveTask(const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay); - using QueueItem = std::pair<std::pair<base::Time, size_t>, base::Closure>; struct Greater { diff --git a/include/weave/provider/test/mock_config_store.h b/include/weave/provider/test/mock_config_store.h index a7eb374..2a61fc7 100644 --- a/include/weave/provider/test/mock_config_store.h +++ b/include/weave/provider/test/mock_config_store.h @@ -28,6 +28,7 @@ class MockConfigStore : public ConfigStore { EXPECT_CALL(*this, LoadDefaults(_)) .WillRepeatedly(testing::Invoke([](Settings* settings) { settings->firmware_version = "TEST_FIRMWARE"; + settings->serial_number = "TEST_SERIAL_NUMBER"; settings->oem_name = "TEST_OEM"; settings->model_name = "TEST_MODEL"; settings->model_id = "ABCDE"; @@ -39,7 +40,7 @@ class MockConfigStore : public ConfigStore { })); EXPECT_CALL(*this, LoadSettings()) .WillRepeatedly(Return(R"({ - "version": 1, + "version": 2, "device_id": "TEST_DEVICE_ID" })")); EXPECT_CALL(*this, LoadSettings(_)).WillRepeatedly(Return("")); diff --git a/include/weave/settings.h b/include/weave/settings.h index 2ba619c..2dceedb 100644 --- a/include/weave/settings.h +++ b/include/weave/settings.h @@ -30,6 +30,7 @@ enum class PairingType { struct Settings { // Model specific information. Must be set by ConfigStore::LoadDefaults. std::string firmware_version; + std::string serial_number; std::string oem_name; std::string model_name; std::string model_id; @@ -47,10 +48,8 @@ struct Settings { // Options mirrored into "base" state. // Maximum role for local anonymous user. AuthScope local_anonymous_access_role{AuthScope::kViewer}; - // 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}; + // If true, allows local pairing using Privet API, including mDNS. + bool local_access_enabled{true}; // Set of pairing modes supported by device. std::set<PairingType> pairing_modes; |