#include <services/IInformant.h>
Inheritance diagram for IInformant:
This interface is often used as part of the informant service (published at /services/informant
), however objects can also implement it themselves for a private notification registry.
Informant notifications are sent out asynchronously -- they are not called back in the same thread that calls Inform().
For using the informant from C++, Binder Recipes has many examples.
For using the informant from the shell, see Example: Informant.
Public Member Functions | |
virtual status_t | Inform (const SValue &key, const SValue &information)=0 |
Send informant notifications to registered objects. | |
status_t | LinkInformant (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
virtual status_t | RegisterForCallback (const SValue &key, const sptr< IBinder > &target, const SValue &method, uint32_t flags=0, const SValue &cookie=B_UNDEFINED_VALUE)=0 |
Register to receive notifications through a callback to an existing object. | |
virtual status_t | RegisterForCreation (const SValue &key, const sptr< INode > &context, const sptr< IProcess > &process, const SString &component, const SValue &inspect, const SValue &method, uint32_t flags=0, const SValue &cookie=B_UNDEFINED_VALUE)=0 |
Register to receive notifications through a newly instantiated component. | |
status_t | UnlinkInformant (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
virtual status_t | UnregisterForCallback (const SValue &key, const sptr< IBinder > &target, const SValue &method, uint32_t flags=0)=0 |
Remove an existing callback registration from the informant. | |
virtual status_t | UnregisterForCreation (const SValue &key, const sptr< INode > &context, const sptr< IProcess > &process, const SString &component, const SValue &inspect, const SValue &method, uint32_t flags=0)=0 |
Remove an existing creation registration from the informant. | |
Protected Member Functions | |
IInformant () | |
virtual | ~IInformant () |
|
|
|
|
|
Send informant notifications to registered objects.
Implemented in BInformant. |
|
|
|
Register to receive notifications through a callback to an existing object.
When receiving a notification, your function method will be called with the parameters (SValue information, SValue cookie, SValue key). The information is supplied by the caller to Inform(). Implemented in BInformant. |
|
Register to receive notifications through a newly instantiated component.
When processing an informant notifications that this component is registered for, the informant will:
Use UnregisterForCreation() to remove your component from the informant. Implemented in BInformant. |
|
|
|
Remove an existing callback registration from the informant.
Implemented in BInformant. |
|
Remove an existing creation registration from the informant.
Implemented in BInformant. |