#include <support/IBinder.h>
Inheritance diagram for IBinder:
Public Member Functions | |
virtual status_t | AutobinderGet (const BAutobinderDef *def, void *result)=0 |
virtual status_t | AutobinderInvoke (const BAutobinderDef *def, void **params, void *result)=0 |
virtual status_t | AutobinderPut (const BAutobinderDef *def, const void *value)=0 |
virtual | BNS (palmos::osp::) BpBinder *RemoteBinder() |
Internal function to retrieve remote proxy object. | |
virtual status_t | Effect (const SValue &in, const SValue &inBindings, const SValue &outBindings, SValue *out)=0 |
Perform an action on the binder. | |
SValue | Get () const |
Synonym for Effect(SValue::undefined, SValue::undefined, SValue::wild, [result]). | |
SValue | Get (const SValue &bindings) const |
Synonym for Effect(SValue::undefined, SValue::undefined, bindings, [result]). | |
virtual SValue | Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags=0)=0 |
Probe binder for interface information. | |
virtual sptr< IInterface > | InterfaceFor (const SValue &descriptor, uint32_t flags=0)=0 |
Retrieve direct interface for this binder. | |
SValue | Invoke (const SValue &func) |
Synonym for Effect(SValue(func,SValue::wild), SValue::wild, func, [result]). | |
SValue | Invoke (const SValue &func, const SValue &args) |
Synonym for Effect(SValue(func,args), SValue::wild, func, [result]). | |
virtual bool | IsBinderAlive () const =0 |
Return true if this binder still existed as of the last executed operation. | |
virtual status_t | Link (const sptr< IBinder > &target, const SValue &bindings, uint32_t flags=0)=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)=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 ()=0 |
Send a ping to the remote binder, and return status. | |
status_t | Put (const SValue &in) |
Synonym for Effect(in, SValue::wild, SValue::undefined, NULL). | |
virtual status_t | Transact (uint32_t code, SParcel &data, SParcel *reply=NULL, uint32_t flags=0)=0 |
Low-level data transfer. | |
virtual status_t | Unlink (const wptr< IBinder > &target, const SValue &bindings, uint32_t flags=0)=0 |
Remove a mapping previously added by Link(). | |
virtual status_t | UnlinkToDeath (const wptr< BBinder > &target, const SValue &method, uint32_t flags=0)=0 |
Remove a previously registered death notification. | |
Protected Member Functions | |
IBinder () | |
virtual | ~IBinder () |
|
|
|
|
|
|
|
|
|
|
|
Internal function to retrieve remote proxy object. This is for internal use by the system. Use LocalBinder() to determine if this IBinder is a local object. |
|
Perform an action on the binder. Either a get, put, or invocation, depending on the supplied and requested bindings. Implemented in BBinder, BnByteInput, BnByteOutput, BnByteSeekable, and BpBinder. |
|
Synonym for Effect(SValue::undefined, SValue::undefined, SValue::wild, [result]).
|
|
Synonym for Effect(SValue::undefined, SValue::undefined, bindings, [result]).
|
|
|
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. Implemented in BnCommand, BnProgress, BnTerminalView, BnInstallHandler, BnInformant, BnInformed, BnReferable, BnCatalog, BnCatalogPermissions, BnDatum, BnIterable, BnIterator, BnNib, BnNode, BnNodeObserver, BnProcess, BnProcessManager, BnRandomIterator, BnSelector, BnTable, BnUuid, BnVirtualMachine, BBinder, BnInterface, BpBinder, BnInterface< IStorage >, BnInterface< IMemoryDealer >, BnInterface< IXMLOStr >, BnInterface< IMemory >, BnInterface< IByteOutput >, BnInterface< IByteInput >, BnInterface< IMemoryHeap >, and BnInterface< IByteSeekable >. |
|
Synonym for Effect(SValue(func,SValue::wild), SValue::wild, func, [result]).
|
|
Synonym for Effect(SValue(func,args), SValue::wild, func, [result]).
|
|
Return true if this binder still existed as of the last executed operation.
|
|
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.
Implemented in BNodeDelegate, BBinder, BnByteInput, BnByteOutput, BnByteSeekable, BCatalogMirror, and BpBinder. |
|
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)
|
|
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.) |
|
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. |
|
Synonym for Effect(in, SValue::wild, SValue::undefined, NULL).
|
|
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. Implemented in BnCommand, BnProgress, BnTerminalView, BnInstallHandler, BnInformant, BnInformed, BnReferable, BnCatalog, BnCatalogPermissions, BnDatum, BnIterable, BnIterator, BnNib, BnNode, BnNodeObserver, BnProcess, BnProcessManager, BnRandomIterator, BnSelector, BnTable, BnUuid, BnVirtualMachine, BBinder, BnByteInput, BnByteOutput, BnByteSeekable, BnMemoryHeap, BnMemory, BnMemoryDealer, BnStorage, and BpBinder. |
|
Remove a mapping previously added by Link().
Implemented in BNodeDelegate, BBinder, BnByteInput, BnByteOutput, BnByteSeekable, BCatalogMirror, and BpBinder. |
|
Remove a previously registered death notification. The target and method must exactly match the values passed in to LinkToDeath(). |