ndk::ICInterface

This is an abstract class.

#include <binder_interface_utils.h>

wrapper analog to IInterface

Summary

Inheritance

Inherits from: ndk::SharedRefBase

Constructors and Destructors

ICInterface()
~ICInterface()

Public functions

asBinder()=0
virtual SpAIBinder
This either returns the single existing implementation or creates a new implementation.
dump(int fd, const char **args, uint32_t numArgs)
virtual binder_status_t
Dumps information about the interface.
isRemote()=0
virtual bool
Returns whether this interface is in a remote process.

Public static functions

asInterface(AIBinder *binder)
std::shared_ptr< ICInterface >
Interprets this binder as this underlying interface if this has stored an ICInterface in the binder's user data.
defineClass(const char *interfaceDescriptor, AIBinder_Class_onTransact onTransact)
AIBinder_Class *
Helper method to create a class.

Public functions

ICInterface

 ICInterface()

asBinder

virtual SpAIBinder asBinder()=0

This either returns the single existing implementation or creates a new implementation.

dump

virtual binder_status_t dump(
  int fd,
  const char **args,
  uint32_t numArgs
)

Dumps information about the interface.

By default, dumps nothing.

This method is not given ownership of the FD.

isRemote

virtual bool isRemote()=0

Returns whether this interface is in a remote process.

If it cannot be determined locally, this will be checked using AIBinder_isRemote.

~ICInterface

virtual  ~ICInterface()

Public static functions

asInterface

std::shared_ptr< ICInterface > asInterface(
  AIBinder *binder
)

Interprets this binder as this underlying interface if this has stored an ICInterface in the binder's user data.

This does not do type checking and should only be used when the binder is known to originate from ICInterface. Most likely, you want to use I*::fromBinder.

defineClass

AIBinder_Class * defineClass(
  const char *interfaceDescriptor,
  AIBinder_Class_onTransact onTransact
)

Helper method to create a class.