BnInterface Class Template Reference

#include <support/Binder.h>

Inheritance diagram for BnInterface:

BBinder IBinder SAtom List of all members.

Detailed Description

template<class INTERFACE>
class BnInterface< INTERFACE >

This is the base implementation for a native (local) IInterface.

You will not normally use this, instead letting pidgen generate similar code from an IDL file.

Public Member Functions

virtual SValue Inspect (const sptr< IBinder > &, const SValue &which, uint32_t flags=0)
 Probe binder for interface information.
virtual sptr< IInterfaceInterfaceFor (const SValue &desc, uint32_t flags=0)
 Retrieve direct interface for this binder.

Protected Member Functions

virtual sptr< const IBinderAsBinderImpl () const
virtual sptr< IBinderAsBinderImpl ()
 BnInterface (const BnInterface< INTERFACE > &other)
 BnInterface (const SContext &context)
 BnInterface ()
virtual ~BnInterface ()

Constructor & Destructor Documentation

BnInterface  )  [inline, protected]

BnInterface const SContext context  )  [inline, protected]

BnInterface const BnInterface< INTERFACE > &  other  )  [inline, protected]

~BnInterface  )  [inline, protected, virtual]

Member Function Documentation

virtual sptr<const IBinder> AsBinderImpl  )  const [inline, protected, virtual]

virtual sptr<IBinder> AsBinderImpl  )  [inline, protected, virtual]

virtual SValue Inspect const sptr< IBinder > &  ,
const SValue which,
uint32_t  flags = 0
[inline, virtual]

Probe binder for interface information.

Return interfaces implemented by this binder object that are requested by which. This is a composition of all interfaces, expressed as { descriptor -> binder } mappings, which are selected through which.

Much more information on Inspect() can be found at Binder Inspect() Details.

Reimplemented from BBinder.

Reimplemented in BStreamDatum::Stream, BByteStream, BReadOnlyStream, BWriteOnlyStream, BIOSStream, BMemoryStore, BNullStream, and BPipe.

virtual sptr<IInterface> InterfaceFor const SValue desc,
uint32_t  flags = 0
[inline, virtual]

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.

Reimplemented from BBinder.

The documentation for this class was generated from the following file: