History log of /external/libweave/examples/daemon/sample/sample.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/sample/sample.cc
e6fee32eeccd56bc0e07e513aa53e31042baff7b 05-Jan-2016 Vitaly Buka <vitalybuka@google.com> Update command definition of sample daemon

Now server requires "results" to be defined.

BUG: 26384142
Change-Id: Ib3e7eea554995feb4c2d0b52f613ef225fa2f48a
Reviewed-on: https://weave-review.googlesource.com/2100
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
/external/libweave/examples/daemon/sample/sample.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/sample/sample.cc
ec9d8481ae5deaaf7901f944b06682e77b978881 10-Dec-2015 Alex Vakulenko <avakulenko@google.com> Mark old APIs officially deprecated

Marked the old state/commanddef APIs deprecated. Had to fix a couple
of issues on libweave side where old APIs were still called.

Also added AddTraitDefsChangedCallback() so weaved can listen to trait
updates and publish them onto its own RPC.

BUG: 25917706
Change-Id: I1e50e25c5251c12162c9b63e066f54c8a8f63c50
Reviewed-on: https://weave-review.googlesource.com/1877
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
/external/libweave/examples/daemon/sample/sample.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/sample/sample.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/sample/sample.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/sample/sample.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/sample/sample.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/sample/sample.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/sample/sample.cc