Age | Commit message (Collapse) | Author |
|
Do periodic command queue cleanup to reclaim memory from commands
that have been in terminal state for certain period of time (5 mins).
Change-Id: Ief9cdbf023a222412c296644c9e927c4be000024
Reviewed-on: https://weave-review.googlesource.com/2434
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
Changed the method name to be more consistent with similar primitives
of base/ (e.g. MessageLoop::DeleteSoon).
Change-Id: I4038e3a77c014e0adf83a44baf770c834246b5a1
Reviewed-on: https://weave-review.googlesource.com/2429
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
The observers for CommandInstance were forcefully cleared in
CommandInstance::DetachFromQueue which caused failure of invoking
CommandInstance::Observer::OnCommandDestroyed() and, as a result,
CloudCommandProxy::OnCommandDestroyed was not called which caused
leaking CloudCommandProxy object instance.
BUG: 25707196
Change-Id: I119a67efce4968ffaa528632e77045265b8e8f2b
Reviewed-on: https://weave-review.googlesource.com/2428
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
When CommandInstance is deleted, it should trigger destruction of
associated CloudCommandProxy. Add a unit test to confirm this is the
case.
BUG: 25707196
Change-Id: I95cadf60e99302d236f1bc67782b7315efcec6d6
Reviewed-on: https://weave-review.googlesource.com/2427
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
Change-Id: If86496af0c68af31a3e0c618b0fae861975a4ebf
Reviewed-on: https://weave-review.googlesource.com/2321
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
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>
|
|
Change-Id: Ia98499f9ada220151b24ecb8b60b02524d700bc4
Reviewed-on: https://weave-review.googlesource.com/1967
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
This was removed in https://weave-review.googlesource.com/#/c/1788/
Change-Id: I7c1165c0e003cd7bb478555ac7886ed99d320615
Reviewed-on: https://weave-review.googlesource.com/1794
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
Removed the old StateManager, CommandManager and related classes
and switched over to using ComponentManager for all device trait and
component definitions as well as device state.
Change-Id: I99b99a935ba217703d31aa523a3124cca0fa3e90
Reviewed-on: https://weave-review.googlesource.com/1788
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
When sending commands, we'll use "component" to route the command to
the target component it was designated for.
As a temporary stop-gap, use "device" as the component name before
we have full implementation of component/trait schema model.
Also removed CommandDictionary from CommandInstance::FromJson since
the validation will be done outside of JSON parsing code in the future
Component Manager class.
BUG: 25841719
Change-Id: I5c649c257fb48ecaaedc1ced84931009f94c2bb3
Reviewed-on: https://weave-review.googlesource.com/1764
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
Change-Id: I3227a7245ebb8eede99b5469f3aa0cffaafe9450
Reviewed-on: https://weave-review.googlesource.com/1732
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
In preparation for traits support, remove CommandDefinition class
and incorporate the missing functionality into CommandDictionary.
BUG: 25841719
Change-Id: Iead48aa0503e9de6061c4c1588b0b930dd82c8d0
Reviewed-on: https://weave-review.googlesource.com/1680
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
GCC 4.7.2 fail overriding constructors defined with virtual and default.
Debian build also fails linking without -lrt.
INT64_C is not defined on Debian with 4.7.2. "ll" should be enough.
Change-Id: Ia779f094ed64fc3b1941429485e81520d017c2f5
Reviewed-on: https://weave-review.googlesource.com/1671
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
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>
|
|
Since libweave no longer semantically parses command/state definitions
and validates commands and states, there is no need for this extra
code.
BUG: 25841230
Change-Id: I53dfab20db8c97b621c07fe234a7b3c6da7325bb
Reviewed-on: https://weave-review.googlesource.com/1660
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
Removed constructors inheritance.
Removed emplace use.
Change-Id: I45224e3232d39ff22f758c7e387be2c9aff5eae0
Reviewed-on: https://weave-review.googlesource.com/1606
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
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>
|
|
Do not use ObjectSchema and instead pass parameters, progress and
return values as opaque JSON objects.
BUG: 25841230
Change-Id: I0ea5fc31d526b1e5d6c66453b613e7284aa3fcac
Reviewed-on: https://weave-review.googlesource.com/1611
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
Change-Id: I0275b8090c96a2762597c62ecfd9dd422fd731a7
Reviewed-on: https://weave-review.googlesource.com/1470
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
|
|
Change-Id: Ife62ee96608a76f70d7118d6cd2de92d45988708
Reviewed-on: https://weave-review.googlesource.com/1443
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
|
|
Change-Id: I30fd8c5626cf83da6415ffa14a2019ef43be9916
Reviewed-on: https://weave-review.googlesource.com/1450
Reviewed-by: Paul Westbrook <pwestbro@google.com>
|