#include <services/Informant.h>
Inheritance diagram for BInformant:
Public Member Functions | |
BInformant (const SContext &context) | |
BInformant () | |
virtual status_t | HandleMessage (const SMessage &msg) |
Subclasses override this to receive messages. | |
virtual status_t | RegisterForCallback (const SValue &key, const sptr< IBinder > &target, const SValue &method, uint32_t flags=0, const SValue &cookie=B_UNDEFINED_VALUE) |
virtual status_t | RegisterForCreation (const SValue &key, const sptr< INode > &context, const sptr< IProcess > &process, const SString &component, const SValue &interface, const SValue &method, uint32_t flags, const SValue &cookie) |
virtual status_t | UnregisterForCallback (const SValue &key, const sptr< IBinder > &target, const SValue &method, uint32_t flags) |
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) |
Remove an existing creation registration from the informant. | |
Protected Member Functions | |
virtual status_t | FinishAtom (const void *id) |
Objects can optionally override this function to extend the lifetime of an atom (past the last strong reference). | |
virtual status_t | Inform (const SValue &key, const SValue &information) |
virtual void | InitAtom () |
Called the first time a strong reference is acquired. All significant object initialization should go here. | |
virtual | ~BInformant () |
|
|
|
|
|
|
|
Objects can optionally override this function to extend the lifetime of an atom (past the last strong reference). If you return FINISH_ATOM_ASYNC here, your object's destructor will be called asynchronously from the current thread. This is highly recommend if you must acquire a lock in the destructor, to avoid unexpected deadlocks due to things like sptr<> going out of scope while a lock is held. If you return an error code here, the object's destructor will not be called at this point. The default implementation will return B_OK, allowing the SAtom destruction to proceed as normal. Don't override this method unless you want some other behavior. Like InitAtom(), you do not need to call the SAtom implementation.
Reimplemented from SAtom. |
|
Subclasses override this to receive messages.
Reimplemented from SHandler. |
|
Call this to push out the key and the information Implements IInformant. |
|
Called the first time a strong reference is acquired. All significant object initialization should go here. You can override it and do any setup you need. Note that you do not need to call the SAtom implementation. (So you can derive from two different SAtom implementations and safely call down to both of their IncStrong() methods.)
Reimplemented from SAtom. |
|
Register to be called when key is pushed.
Implements IInformant. |
|
Register to have your component created when key is pushed. See the descriptions in RegisterForCallback for the key, method, flags and cookie parameters.
Implements IInformant. |
|
Remove an existing callback registration from the informant.
Implements IInformant. |
|
Remove an existing creation registration from the informant.
Implements IInformant. |