aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-07libweave: Reformat examples/provider/READMEMike Colagrosso
This change indents nested lists at four spaces, which renders them properly. Change-Id: I8bc972e8c14ec973223e5115f8109aa8e79f8ba2 Reviewed-on: https://weave-review.googlesource.com/3174 Reviewed-by: Johan Euphrosine <proppy@google.com>
2016-04-07libweave: Remove unused local constantAlex Vakulenko
This causes on clang. Change-Id: I8bdffc52e9000c4033927555032b8b8294b80cfd Reviewed-on: https://weave-review.googlesource.com/3172 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-07add _ledflasher traits to the test_schema device.Surender Kodam
Change-Id: I79d3a9cd45461771b9129d2cea95e9c158b73dc2 Reviewed-on: https://weave-review.googlesource.com/3140 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-07libweave: Always fetch commands from server, even if XMPP delivers JSONAlex Vakulenko
XMPP notification may include the command payload in its message. If it it does, we normally don't go to the cloud server and fetch the current command queue. However if XMPP notification is missed, there is no easy way of obtaining the missed command. If we use the notification as a cue to pull the current command queue from the server, we would also pull any missed commands from earlier missed notifications. BUG: None Change-Id: I85f0c2e58df7c2e6d2ce1be034d3c367870f7f7a Reviewed-on: https://weave-review.googlesource.com/3170 Reviewed-by: Robert Ginda <rginda@google.com>
2016-04-07libweave: Remove backup polling (30 minute poll interval)Alex Vakulenko
The "just-in-case" polling every 30 minutes was a backup mechanism to guard against XMPP channel possibly missing command notifications. This hasn't been observed to be a major source of problems, so it was decided that this backup polling is no longer needed. BUG: 27878849 Change-Id: Ie8c816391e5bc5dfec0601fdd699f56eaee53efe Reviewed-on: https://weave-review.googlesource.com/3149 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-06clean up example/test_device clashesMike Frysinger
Move the duplicated libevhtp logic to third_party.mk so that multiple targets can rely on it being set up in the same way. Delete the duplicate example object rules from tests_schema.mk. We already include examples.mk before tests_schema.mk, so we know those rules are defined for us. We just need to depend on the output libs. Finally namespace the daemon variables in examples & tests_schema so they don't stop on each other in weird ways. Change-Id: I28fa152d8c8a30c84f7095e335e31a52889b5682 Reviewed-on: https://weave-review.googlesource.com/3152 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-06disable builtin rulesMike Frysinger
We define all rules/targets ourselves, so the builtin ones just get in our way and cause weirdness & slow things down. Disable them. Change-Id: I85075297322e3e0515141cc908a67065cbfe8e2c Reviewed-on: https://weave-review.googlesource.com/3151 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-06add standard "check" targetMike Frysinger
The wider build world uses `make check` to run all unittests. Add that target to our build too. Change-Id: I55f867e75ea8c01fd6a6e121d3f393403a8d9d34 Reviewed-on: https://weave-review.googlesource.com/3150 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-06readme: document cross-compiling for end usersMike Frysinger
Clarify the builtin cross-compiling support is meant for libweave developers only. BUG=b/26741388 Change-Id: I81c0d897d6b2f5d257ab9d50d2f96bf3d0a5448f Reviewed-on: https://weave-review.googlesource.com/3070 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-06Add "make coverage" target to build code coverage.Bryan Lewandowski
Change-Id: I8b00004e9ea5954ee7117cdaaaa2969090762570 Reviewed-on: https://weave-review.googlesource.com/3126 Reviewed-by: Mike Frysinger <vapier@google.com>
2016-04-05Add general-use-and-purpose comment for Device interface.Bryan Lewandowski
Change-Id: Id6c24bb037790e1d8fd328225b84e036fe70179e Reviewed-on: https://weave-review.googlesource.com/2860 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-04create generic test device for multiple traits testing.Surender Kodam
As part of testing multiple traits using libweave API, creating a test_schema which can hold multiple traits, and these multiple traits will be used in one single test device, and this test device will be used in test cases for test libweave API. Change-Id: Ia68e8aa9d43b927f41c7961e62d8ab78c46a85c8 Reviewed-on: https://weave-review.googlesource.com/3068 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-01libuweave: Fix break on Android toolchainAlex Vakulenko
Android toolchain defines "unix" to be 1 which breaks one function prototype in libuweave code. Changed the param name from "unix" to "unix_timestamp". Change-Id: Ic484d74aa3af1459af7cf6d15da4bc5b20226cf8 Reviewed-on: https://weave-review.googlesource.com/3120 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-04-01libweave: Convert the blacklist trait into a standard oneAlex Vakulenko
Now that revokation blacklist trait has been standardized, stop using a custom trait and rename it to match the name on the server. BUG: 26520268 Change-Id: I0555a600027796b5b4882f973f6455601d88c81e Reviewed-on: https://weave-review.googlesource.com/3107 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-31examples: refactor README fileJohan Euphrosine
- use weave console instead of oauth playground for sending commands - bootstrap provider documentation - fix markdown, prose and formating for the daemon readme Change-Id: Ie5c16b8ce68f856e4059158142ee984c2a131cdf Reviewed-on: https://weave-review.googlesource.com/2977 Reviewed-by: Dan Yu <dsyu@google.com> Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-31Tweak the README.md with respect to the repo subdirectories.John McCullough
Change-Id: Ic883e7bebfaa20b6f62c5e734fed5e081031d2fc Reviewed-on: https://weave-review.googlesource.com/3100 Reviewed-by: John Mccullough <jmccullough@google.com>
2016-03-29libweave: Remove release() calls on scoped_ptrAlex Vakulenko
Now that scoped_ptr is just a type alias to std::unique_ptr, there is no need to do release()/aquire semantics to convert between scoped_ptr and unique_ptr. Also, replaced base::Value::DeepCopy with the safer smart-pointer-enabled base::Value::CreateDeepCopy. Change-Id: I6b7ed78b3fae6d42a68b7d73ae4d9d5eebf48922 Reviewed-on: https://weave-review.googlesource.com/3067 Reviewed-by: Robert Ginda <rginda@google.com>
2016-03-29libweave: Port base/ changes from Chromium projectAlex Vakulenko
Now this makes the state of base/ match libchrome's implementation on Brillo and Chrome OS. Change-Id: I1c1eb30d2669aeb58a77f332f8c69f130d00878c Reviewed-on: https://weave-review.googlesource.com/3065 Reviewed-by: Robert Ginda <rginda@google.com>
2016-03-29libweave: Fix compile errors on Chrome OSAlex Vakulenko
Need to include <algorithm> explicitly to use std::find and std::replace. On Android these included indirectly by some other library headers, but on Chrome OS they are not and this breaks the build. Change-Id: I590e00aaaa3796a6614147bd5acb404c2fe078d6 Reviewed-on: https://weave-review.googlesource.com/3063 Reviewed-by: Robert Ginda <rginda@google.com>
2016-03-24libevhtp: build checked out copyMike Frysinger
Now that libevhtp is part of the manifest, build it directly and store the results in out/. This also deletes references to third_party/{include,lib} as they're no longer needed. BUG=b/27820899 TEST+`make` still works, as does the unittests Change-Id: I6b1dd91cea0f152f8e79527e842add6a9d797a3c Reviewed-on: https://weave-review.googlesource.com/3001 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-22add integrated cross-compile & qemu supportMike Frysinger
This uses the existing CrOS toolchains & boards to cross-compile for arm and mipsel boards. It also includes qemu support for running tests. BUG=b/26741388 TEST=`make cross-arm all-libs` downloads & builds w/arm Change-Id: Ie974b1c3c2b61759e87f87bab535068a1c31a727 Reviewed-on: https://weave-review.googlesource.com/3000 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-22examples/daemon/ledflasher: switch to onOffJohan Euphrosine
Bug: 27550969 Change-Id: I3b9c940b52707cf8ee3523bf33f48c6f9e2bfc5b Reviewed-on: https://weave-review.googlesource.com/2976 Reviewed-by: Peng Ying <pying@google.com> Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-17readme: add more tips/linksMike Frysinger
Change-Id: Ie4152539a64fe73cbf494809e2f271b5b00bfc85 Reviewed-on: https://weave-review.googlesource.com/2921 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-17gtest/gmock: build checked out copyMike Frysinger
Now that gtest/gmock are part of the manifest, build them directly and store the results in out/. BUG=b/27707648 TEST+`make` still works, as does the unittests Change-Id: I8a8235b4bc0100731168a44c6553859a5d85bbe1 Reviewed-on: https://weave-review.googlesource.com/2952 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-10Fail setup/start if device already registeredVitaly Buka
Previously device didn't check condition until wifi is switched. Bug we can detect the issue and reply to client in the same request. BUG: 27432528 Change-Id: I6564c47fba86671dbd59dc0ff70cfba3a25d60dc Reviewed-on: https://weave-review.googlesource.com/2890 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-10Add HTTPS port into TXT recordVitaly Buka
Example: https=123 BUG: 26687064 Change-Id: I8ebba527102eec2f916e6e9239ba07d026de7b7e Reviewed-on: https://weave-review.googlesource.com/2889 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-09Return 'component' in command JSONVitaly Buka
BUG: 26730593 Change-Id: I7661511669de35ff0e67d1da06fbd5ff5df510e0 Reviewed-on: https://weave-review.googlesource.com/2887 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-09Avoid Revocation list overflowVitaly Buka
When revocation list is full we remove two oldest entries and replace them with single entry that block all IDs older or equal to the second oldest entry. BUG: 27558454 Change-Id: I6b1a6c8f37fb3883605fb91f48beca7e60d71165 Reviewed-on: https://weave-review.googlesource.com/2881 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
2016-03-09Bound j2000 timestamps into [0, <int32_t>::max()] intervalVitaly Buka
We use j2000 timestamps in base::Values and macaroon tokens. base::Values use int32_t and macaroon use uint32_t, so this interval should be safe. Change-Id: Ibcd7a8b8749ace62c561b2c03f3ccfdac2e74706 Reviewed-on: https://weave-review.googlesource.com/2882 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-09Take into account scope from /privet/v3/auth callVitaly Buka
For local case the scope was ignored. Behavior was similar to "auto" scope. Change-Id: I6aabca13929d10101f5b350641aa6edd84d50a23 Reviewed-on: https://weave-review.googlesource.com/2880 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-09examples/daemon: fix ledflasher param namesJohan Euphrosine
tested with: http://instaweave.devrel.pub:90/?branch=54b4b0e7643738cd7c5014e01d4aeaab01165304 Change-Id: I9f5547bf33c418322d90dfae7aac2d8248c629cd Reviewed-on: https://weave-review.googlesource.com/2883 Reviewed-by: Paul Westbrook <pwestbro@google.com>
2016-03-07Implement local_discovery_enabled settingVitaly Buka
Implementation will reset entire privet::Manager component if setting was changed to false, and recreate component if it was changed into true. Additionally removing of HTTP callback was added. BUG: 27480269 Change-Id: Ieea91057fc0bdbd5f12c439b791250c9cf6c3741 Reviewed-on: https://weave-review.googlesource.com/2833 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-07Remove ObserverList from cloud delegateVitaly Buka
Change-Id: Icc3e7c11c4b01b1b1105a2be6c48f0ec1b7b6d92 Reviewed-on: https://weave-review.googlesource.com/2832 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-05Remove CloudDelegate::Observer::OnDeviceInfoChangedVitaly Buka
This method notification is just a proxy for config change event. We can directly signup for this notifications from config. BUG:27480269 Change-Id: Ic83dd9c6f5180428168cc2a22d2671035334211e Reviewed-on: https://weave-review.googlesource.com/2824 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-04Fixed issues configuring devices with date before 2000.Vitaly Buka
BUG: 27484275 Change-Id: Ia7158fdea6cac60d8b99630b4cb43b5e368c3776 Reviewed-on: https://weave-review.googlesource.com/2817 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-04Update READMEs to reflect cloud_id name in Cloud Services for deviceIdShawn S
Added git add <files> in README for Making Changes Bug#: 27458291 Change-Id: I66bb1b6507f21c2a67020d9ba4e6a941794515b8 Reviewed-on: https://weave-review.googlesource.com/2802 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
2016-03-02VERISON: Initial commit on master - 1.4.1Ben Henry
BUG=None TEST=None Change-Id: I52554fb5a0582d598737c755c794000548822199 Reviewed-on: https://weave-review.googlesource.com/2799 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-02Update macaroon libVitaly Buka
Change-Id: Iada0942ea1037ba061d53ee271a40965393306c1 Reviewed-on: https://weave-review.googlesource.com/2797 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-02Insert the description of the change.Gene Gutnik
BUG: 27418257 Change-Id: I4c10da5990c1002d28cfc76133c9cec6a05601cf Reviewed-on: https://weave-review.googlesource.com/2785 Reviewed-by: Alex Vakulenko <avakulenko@google.com> Reviewed-by: Vitaly Buka <vitalybuka@google.com>
2016-03-01Applied clang-formatVitaly Buka
git clang-format -f weave/master~100 --style=file Change-Id: I94c111e81a59172c6e1ebb5d330f2d563fe43c15 Reviewed-on: https://weave-review.googlesource.com/2795 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-01Fix crash when device in access point modeVitaly Buka
BUG: 27431574 Change-Id: I6c217c78bd9809383d13528ec21b9447ee7a4fce Reviewed-on: https://weave-review.googlesource.com/2794 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-01Implement minimalRole for state definitionsAlex Vakulenko
State definition may now specify the user's minimal role needed to see the value of the state. When a user with lower access rights is requesting the component tree, state properties unavailable to that user will be removed from the resulting JSON object. BUG: 24622262 Change-Id: I3b75c60e868d14fe9a9eaec373fcb148bfac1188 Reviewed-on: https://weave-review.googlesource.com/2721 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-03-01Update _accessRevocationList traitVitaly Buka
BUG: 27313743 Change-Id: I68977c7badb0f7ae747d3d4567211eded31b45a3 Reviewed-on: https://weave-review.googlesource.com/2789 Reviewed-by: Gene Gutnik <gene@google.com>
2016-02-29Fixes to event_http_server for examplesDavid Paul
Set Content-Length on responses. Otherwise e.g. curl will wait forever for the connection to close. Set request data to request body only, instead of full request. Parsing of any local commands would fail previously. Change-Id: Iba8ebb429ec3430d32d8a166dcc6985a5f79562e Reviewed-on: https://weave-review.googlesource.com/2781 Reviewed-by: Dave Paul <davepaul@google.com>
2016-02-29Add provider::Wifi::GetConnectedSsidVitaly Buka
BUG:25820726 Change-Id: I3dc156df00e53bdf879b5a201d4f6cfa5badb1cd Reviewed-on: https://weave-review.googlesource.com/2769 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
2016-02-27examples/lock: fix lock traitJohan Euphrosine
Bug: 27276010 Change-Id: I06d468faab07863f9af1eb81cf68a82707857fa4 Reviewed-on: https://weave-review.googlesource.com/2748 Reviewed-by: Paul Westbrook <pwestbro@google.com>
2016-02-27examples/speaker: fix volume traitJohan Euphrosine
Bug: 27276010 Change-Id: Ib5c6fbf51d4d6ae8d2e09920c3bd4134e1f87ae5 Reviewed-on: https://weave-review.googlesource.com/2749 Reviewed-by: Paul Westbrook <pwestbro@google.com>
2016-02-25Update local auth info if server side information does not matchVitaly Buka
Missing fingerprint or different than local one means server data is not useful for auth purpose. BUG: 26140342 Change-Id: If57bdd5b2c589d30748b572bc3e4020c1bec472e Reviewed-on: https://weave-review.googlesource.com/2738 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-02-24Simplify few comparison helpersVitaly Buka
Change-Id: Id2ec35da6579c81d193663353d40872a9bebda38 Reviewed-on: https://weave-review.googlesource.com/2736 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
2016-02-24Moved previous comment to README fileAlex Vakulenko
The original comment was put in the wrong location. It should have been in the Google-specific README file, not in the author's change list. Change-Id: I3eb5f0baca84b76672a793fc3edea68be196150c Reviewed-on: https://weave-review.googlesource.com/2735 Reviewed-by: Alex Vakulenko <avakulenko@google.com>