aboutsummaryrefslogtreecommitdiff
path: root/libweaved
AgeCommit message (Collapse)Author
2016-02-04weaved: Fix binder connection logic from client sideAlex Vakulenko
When weaved client tries to connect to weaved process over binder, it first obtains the binder service exposed by weaved, then invokes connect() method and provides a callback binder object which is invoked when weaved is fully initialized and connected. Only then the client monitors the provided IWeaveService for death notifications. However if weaved crashes during this process, the client will never notice the death of weaved. This change makes the client to subscribe for death notifications as soon as IWeaveServiceManager binder is obtained instead of using IWeaveService provided in IWeaveClient::onServiceConnected() BUG: 26981732 Change-Id: I9b0c3b020558c336a933bdfe106f73673294c062
2016-01-29weaved: Remove brillo::Any from public weaved APIsAlex Vakulenko
Replaced brillo::Any with base::Value in weaved client library APIs in order to remove remaining dependency on D-Bus libraries. BUG: 26558300 Change-Id: I8365743c31022a2f76a8a8768adf6ad19d509749
2016-01-08Add ability for daemons to subscribe to pairing session changesbrillo-m9-releasebrillo-m9-devAlex Vakulenko
Added Service::SetPairingInfoListener() to provide a callback to be invoked when pairing session starts/ends. This will let vendor daemons to display/indicate pairing code to the user. BUG: 26467076 Change-Id: Ic531c6599eb0dc665670346e5df59cb2cb3ed4cf
2016-01-08weaved: Split command and state property name into a trait and a nameAlex Vakulenko
Service::AddCommandHandler and Service::SetStateProperty now accept the propetry name and the trait name as separate parameter which allows for using a literal constant for the trait name in client code. BUG: 26443877 Change-Id: I77a7cf22db74b64b28a890cdd2dafeb5546ce78b
2016-01-08weaved: Add Command::AbortWithCustomError() and SetError/SetCustomErrorAlex Vakulenko
Client code often obtains error information through brillo::Error or binder::Status during weave command execution. It is convenient to use this error information directly to abort the weave command (or put it into a temporary state). Added helpers Command::AbortWithCustomError() as well as exposed missing Command::SetError()/SetCustomError and Command::Pause() methods. BUG: 25875613 Change-Id: Ic68871317b35604aa6bc5c4a20bb48c5c3153672
2016-01-07Add Binder support to weaved and remove D-Bus interfaceAlex Vakulenko
Added binder-based IPC to weaved instead of D-Bus. Removed the old weave commands based on D-Bus and redesigned client library interface to be more in line with how Binder operates. BUG: 23782171, 25523591 Change-Id: Ic39a6a2edf2e033e506d233919c9d04e4fab8d01
2015-12-09Add trait/component APIs to weavedAlex Vakulenko
Added new Device::AddComponent() method as well as added |component| parameter to AddCommandHandler, SetStateProperty/SetStateProperties methods. Added GetComponent() method to Command class. Marked old APIs (that don't take component name) as deprecated. Finally, made weaved load trait definitions from /etc/weaved/traits directory. BUG: 25917608, 25917704, 25916429, 25917604, 25917426, 25916428 Change-Id: I252f3930d1fda79e41c062d71f008210d2c116a4
2015-12-09weaved: Use abstract D-Bus proxy interfacesAlex Vakulenko
D-Bus code generator now uses abstract proxy interfaces whenever possible, so made necessary modifications on the caller side to use them as well. BUG: 26092352 Change-Id: I99fa287ea00646c3d9ad6225bfcce8a83284d672
2015-11-20weaved: Fix a typo in libweaved/device.ccAlex Vakulenko
Device::OnManagerRemoved was passed to CommandRemovedCallback instead of ManagerRemovedCallback. Stupid copy-paste problems. BUG: 25813877 Change-Id: Iafbdf9ad43c8008d4aff489b7f9ea358c263a31f
2015-10-13weaved: Rename "chromeos" -> "brillo" in include paths and namespacesAlex Vakulenko
libchromeos is transitioning to libbrillo and chromeos namespaces and include directory is changing to brillo. Bug: 24872993 Change-Id: Ic91fe342fb2c29ae915300d1ce9ae8473303238b
2015-10-12Add client library for weavedAlex Vakulenko
Added client library for weaved to hide the underlying D-Bus IPC as much as possible. Change-Id: Id91dad80c593c58124b27a90a34cd3b1852e898f