#include <support/Binder.h>
Inheritance diagram for BBinder:
Public Member Functions | |
virtual status_t | AutobinderGet (const BAutobinderDef *def, void *result) |
virtual status_t | AutobinderInvoke (const BAutobinderDef *def, void **params, void *result) |
virtual status_t | AutobinderPut (const BAutobinderDef *def, const void *value) |
const SContext & | Context () const |
virtual status_t | Effect (const SValue &in, const SValue &inBindings, const SValue &outBindings, SValue *out) |
Perform an action on the binder. | |
virtual SValue | Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags=0) |
Probe binder for interface information. | |
virtual sptr< IInterface > | InterfaceFor (const SValue &descriptor, uint32_t flags=0) |
Retrieve direct interface for this binder. | |
virtual bool | IsBinderAlive () const |
Return true if this binder still existed as of the last executed operation. | |
bool | IsLinked () const |
virtual status_t | Link (const sptr< IBinder > &target, const SValue &bindings, uint32_t flags=0) |
Link registers the IBinder "target" for notification of events. | |
virtual status_t | LinkToDeath (const sptr< BBinder > &target, const SValue &method, uint32_t flags=0) |
Register the IBinder "target" for a notification if this binder goes away. | |
virtual BBinder * | LocalBinder () |
Use this function instead of a dynamic_cast<> to up-cast to a BBinder. | |
virtual status_t | PingBinder () |
Send a ping to the remote binder, and return status. | |
status_t | Push (const SValue &out) |
virtual BpBinder * | RemoteBinder () |
virtual status_t | Transact (uint32_t code, SParcel &data, SParcel *reply=NULL, uint32_t flags=0) |
Low-level data transfer. | |
virtual status_t | Unlink (const wptr< IBinder > &target, const SValue &bindings, uint32_t flags=0) |
Remove a mapping previously added by Link(). | |
virtual status_t | UnlinkToDeath (const wptr< BBinder > &target, const SValue &method, uint32_t flags=0) |
Remove a previously registered death notification. | |
Protected Member Functions | |
virtual status_t | Asked (const SValue &what, SValue *out) |
BBinder (const BBinder &other) | |
BBinder (const SContext &context) | |
BBinder () | |
virtual status_t | Called (const SValue &func, const SValue &args, SValue *out) |
virtual status_t | HandleEffect (const SValue &in, const SValue &inBindings, const SValue &outBindings, SValue *out) |
virtual bool | HoldRefForLink (const SValue &binding, uint32_t flags) |
Control when links from this object will also hold references on the object. | |
virtual status_t | Pull (SValue *inMaskAndDefaultsOutData) |
virtual status_t | Told (const SValue &what, const SValue &in) |
virtual | ~BBinder () |
|
|
|
|
|
|
|
|
|
|
|
Implements IBinder. |
|
Implements IBinder. |
|
Implements IBinder. |
|
|
|
Reimplemented in BGenericCatalog, BIndexedCatalog, and BTokenSource. |
|
Perform an action on the binder. Either a get, put, or invocation, depending on the supplied and requested bindings. Implements IBinder. Reimplemented in BnByteInput, BnByteOutput, and BnByteSeekable. |
|
|
Control when links from this object will also hold references on the object. The default implementation always returns false, meaning references are never held. You can override this to return true when you would like a new linking being adding to this BBinder to also cause a reference to be added to it. This is useful, for example, when dynamically creating objects on demand -- in that case, you usually want the object to stay around as long as others have references on them or there are active links from it. If you allow the object to be destroyed while links exist, the next time someone accesses the object a new one will be created and any changes to it will not push the links on the old object. Reimplemented in BSchemaRowIDJoin::RowNode, BSchemaTableNode::RowNode, SDatumGeneratorInt::IndexedDatum, and BIndexedTableNode::RowNode. |
|
|
Retrieve direct interface for this binder. Given a SValue interface descriptor, return an IInterface implementing it. The default implementation of this function returns NULL, meaning it does not implement a direct interface to it. If the return is non-NULL, you are guaranteed to be able to static_cast<> the returned interface into the requested subclass and have it work. Note that this is NOT the same as calling Inspect(), which performs conversion between different IBinder objects. This method converts to an IInterface only for this binder object. Implements IBinder. Reimplemented in BnCommand, BnProgress, BnTerminalView, BnInstallHandler, BnInformant, BnInformed, BnReferable, BnCatalog, BnCatalogPermissions, BnDatum, BnIterable, BnIterator, BnNib, BnNode, BnNodeObserver, BnProcess, BnProcessManager, BnRandomIterator, BnSelector, BnTable, BnUuid, BnVirtualMachine, BnInterface, BnInterface< IStorage >, BnInterface< IMemoryDealer >, BnInterface< IXMLOStr >, BnInterface< IMemory >, BnInterface< IByteOutput >, BnInterface< IByteInput >, BnInterface< IMemoryHeap >, and BnInterface< IByteSeekable >. |
|
Return true if this binder still existed as of the last executed operation.
Implements IBinder. |
|
|
|
Link registers the IBinder "target" for notification of events. The bindings is a mapping of keys that will get pushed on this IBinder, to keys that will get pushed on the "target" IBinder. e.g.
Implements IBinder. Reimplemented in BNodeDelegate, BnByteInput, BnByteOutput, BnByteSeekable, and BCatalogMirror. |
|
Register the IBinder "target" for a notification if this binder goes away.
The method is the name of a method to call if this binder unexpectedly goes away. This is accomplished by performing an Effect() on target with the given method. Prior to doing so, a mapping
SomethingDied(const wptr<IBinder>& who)
Implements IBinder. |
|
Use this function instead of a dynamic_cast<> to up-cast to a BBinder. Since multiple BBinder instances can appear in a single object, a regular dynamic_cast<> is ambiguous. Note that there is a default implementation of this (which returns NULL) so that we can call the method even if the object has been destroyed. (That is, if we only have a weak reference on it.) Reimplemented from IBinder. |
|
Send a ping to the remote binder, and return status. If this is a local binder, ping always returns B_OK. If this is a remote binder, it performs a Transact() to the local binder and returns that status. This should be either B_OK or B_BINDER_DEAD. Implements IBinder. |
|
|
|
|
|
|
|
|
|
Low-level data transfer. This is the Binder's IPC primitive. It allows you to send a parcel of data to another Binder (possibly in another process or language) and get a parcel of data back. The parcel can contain IBinder objects to transfer references between environments. The code can be any arbitrary value, though some standard codes are defined for parts of the higher-level IBinder protocol (B_EFFECT_TRANSACTION, B_INSPECT_TRANSACTION, etc). The flags are used for internal IPC implementation and must always be set to 0 when calling. If your implementation of Transact() returns an error code (instead of B_OK), that code will be propagated back to the caller WITHOUT any reply data. Implements IBinder. Reimplemented in BnCommand, BnProgress, BnTerminalView, BnInstallHandler, BnInformant, BnInformed, BnReferable, BnCatalog, BnCatalogPermissions, BnDatum, BnIterable, BnIterator, BnNib, BnNode, BnNodeObserver, BnProcess, BnProcessManager, BnRandomIterator, BnSelector, BnTable, BnUuid, BnVirtualMachine, BnByteInput, BnByteOutput, BnByteSeekable, BnMemoryHeap, BnMemory, BnMemoryDealer, and BnStorage. |
|
Remove a mapping previously added by Link().
Implements IBinder. Reimplemented in BNodeDelegate, BnByteInput, BnByteOutput, BnByteSeekable, and BCatalogMirror. |
|
Remove a previously registered death notification. The target and method must exactly match the values passed in to LinkToDeath(). Implements IBinder. |