History log of /external/libweave/examples/daemon/light/light.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
48a8669ddc2e8d785aad9ad18a5abbf8f1224fde 22-Jan-2016 Vitaly Buka <vitalybuka@google.com> Remove domain from weave::Error

We don't filter out errors by domain in libweave.

BUG:26071451
Change-Id: I2114450aca1c8ede71cc45f19bd8e71d3464cb73
Reviewed-on: https://weave-review.googlesource.com/2289
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/light/light.cc
8d0cfefae24985025a934ea5461a51472c59cfc0 16-Dec-2015 Alex Vakulenko <avakulenko@google.com> Fix new schema to match the new server definitions

A new server version now validates the state definitions in
traits as well as commands and some of our sample traits were
not defined properly. Also, the server now requires the 'base'
trait to be complete (and have base.reboot and base.identify
commands defined).

Change-Id: Icc576918895eba642498aa9b8bb1771825562f06
Reviewed-on: https://weave-review.googlesource.com/1971
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc
34668e731bb194b443bc0e6029d6d3583f08de28 15-Dec-2015 Vitaly Buka <vitalybuka@google.com> Reformat

Change-Id: Ia98499f9ada220151b24ecb8b60b02524d700bc4
Reviewed-on: https://weave-review.googlesource.com/1967
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc
04e628f7854b7252ccda1b303a8e99d840cf9a98 09-Dec-2015 Paul Westbrook <pwestbro@google.com> Specify device kinds

For the sample devices, specify a model manfest id
that will cause the right device kind to be used.

Bug: 25690094
Change-Id: Ib70513a0f1159a4af7abb6e3f58c57eb55f5c2fd
Reviewed-on: https://weave-review.googlesource.com/1845
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/light/light.cc
d6db0498402a32ef8ff5b681cef555e4c4fc2079 08-Dec-2015 Alex Vakulenko <avakulenko@google.com> Update example daemons to use the new component/trait APIs

Using AddStateDefinitionsFromJson/AddComponent instead of old and
deprecated AddCommandDefinitions.../AddStateDefinitions... methods.

BUG: 26070118, 25917541
Change-Id: I1f264c737cc19a577a0026e6d6212d63bdc480cf
Reviewed-on: https://weave-review.googlesource.com/1802
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/light/light.cc
05a979e3ad64a2e6c1986cf5151d032f672b6b2d 04-Dec-2015 Paul Westbrook <pwestbro@google.com> Update light command definitions

Bug: 25824489
Change-Id: Ie4eb04917acd18d5c38348a5f8b20d7593b42ec7
Reviewed-on: https://weave-review.googlesource.com/1768
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/light/light.cc
c4305600835b91630f9ca4b10ad9070ea55a726c 25-Nov-2015 Vitaly Buka <vitalybuka@google.com> Replace Get* methods returning unique_ptr with reference alternative

Existing code created temporarily objects and returned them to the
client. It was not efficient and error-prone as client code could
retrieve pointers to internal objects without keeping unique_ptr alive.

Change-Id: I9e17c8d9f66dfc9f52ce9ffc9a31992b16b00461
Reviewed-on: https://weave-review.googlesource.com/1672
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/light/light.cc
42d63b9d2b41aab4cb13d55482f7ebf66fee7f27 25-Nov-2015 Alex Vakulenko <avakulenko@google.com> Fix example command schema to match the expectations of the server

Actually tested the example schemas against real production server
and fixed inconsitencies in command definitions.

Change-Id: I7d8deea11b9501af28bd0bb485b88201af5404c0
Reviewed-on: https://weave-review.googlesource.com/1655
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc
42b0a7b1235eb029f9f678dd54076d7b6b0c5a70 25-Nov-2015 Alex Vakulenko <avakulenko@google.com> Make sure example command definitions include 'minimalRole'

Server doesn't work correctly if minimalRole is not specified.
It just fails to forward a command to the device.

Also since Command::GetParameters returns a unique_ptr (rvalue),
it is generally a bad pattern to use cmd->GetParameter()->Get...
especially with dictionary and list values because by the time
the pointer to inner object is used the outer object will be
destroyed and access-after-free errors will occur.

Change-Id: I33fd3fadbf993ce172725d17befef016089fc0a7
Reviewed-on: https://weave-review.googlesource.com/1653
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc
7e894da1c5fcc4fafa6cc69b612c9c14f78aed51 23-Nov-2015 Alex Vakulenko <avakulenko@google.com> Remove object schema parsing in CommandDefinition

The only thing we now care about in CommandDefinition is the
"minimalRole" field. Everything else is a black-box which we just
forward to the server without any semantic parsing.

Also completely removed command visibility support since it no
longer applies to trait/component model.

BUG: 25841230
Change-Id: Ie8fff57ffada289caa7876c2a53150bb116fd65b
Reviewed-on: https://weave-review.googlesource.com/1617
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc
03cd192eceb46f936ad89e6ae04dac130202e18c 17-Nov-2015 Paul Westbrook <pwestbro@google.com> Add support for the custom colorXY trait

This adds color support to the virtual light
Change-Id: Iff26f08d8852b8d6465eed2fa3e7ba1471c9bcb2
Reviewed-on: https://weave-review.googlesource.com/1528
Reviewed-by: Paul Westbrook <pwestbro@google.com>
/external/libweave/examples/daemon/light/light.cc
3fb474e64c9ed199919313321e46da3a531ecc7d 29-Oct-2015 Johan Euphrosine <proppy@google.com> examples/daemon: split daemon into seperate binaries

Also introducing helpers for the daemon argument parsing and
constructions.

Change-Id: I4b4438785eb7322ede1d16409e6f057d037a66e5
Reviewed-on: https://weave-review.googlesource.com/1442
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/light/light.cc