diff options
author | Martijn Coenen <maco@google.com> | 2016-12-09 15:51:06 +0100 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2016-12-22 10:30:29 +0000 |
commit | 9b8f9c38ea8ac1fe1fdf11ea219097885a5f2fa7 (patch) | |
tree | 4d71890e2733c10f1ce1f7bd43d9b2464b038311 /transport/base | |
parent | dcc90d7f054f2b3a5e189c1b4cb32201f77ae877 (diff) | |
download | libhidl-9b8f9c38ea8ac1fe1fdf11ea219097885a5f2fa7.tar.gz |
Add (un)linkToDeath to IBase.
With corresponding callback interfaces. hidl_death_recipient
is a transport-independent interface, used directly by clients
and servers. hidl_binder_death_recipient wraps a hidl_death_recipient
object and implements the Binder-specific death recipient. It
holds a weak reference to the callback interface, as well as the
interface it was called on (so we can include that in the callback).
Bug: 31632518
Test: mma, hidl_test
Change-Id: I0430efff24c2bfd3993438c6ed3fe007d9f9e3ef
Diffstat (limited to 'transport/base')
-rw-r--r-- | transport/base/1.0/IBase.hal | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/transport/base/1.0/IBase.hal b/transport/base/1.0/IBase.hal index 379213a..d696249 100644 --- a/transport/base/1.0/IBase.hal +++ b/transport/base/1.0/IBase.hal @@ -54,4 +54,21 @@ interface IBase { * tags). */ oneway notifySyspropsChanged(); + + /* + * Registers a death recipient, to be called when the process hosting this + * interface dies. + * + * @param recipient a hidl_death_recipient callback object + * @param cookie a cookie that must be returned with the callback + * @return success whether the death recipient was registered successfully. + */ + linkToDeath(death_recipient recipient, uint64_t cookie) generates (bool success); + + /* + * Unregisters a previously registered death recipient. + * @param recipient a previously registered hidl_death_recipient callback + * @return success whether the death recipient was unregistered successfully. + */ + unlinkToDeath(death_recipient recipient) generates (bool success); }; |