Stay organized with collections
Save and categorize content based on your preferences.
ndk::ICInterface
This is an abstract class.
#include <binder_interface_utils.h>
wrapper analog to IInterface
Summary
Inheritance
Inherits from:
ndk::SharedRefBase
Public functions
|
asBinder()=0
|
This either returns the single existing implementation or creates a new implementation.
|
dump(int fd, const char **args, uint32_t numArgs)
|
Dumps information about the interface.
|
isRemote()=0
|
virtual bool
Returns whether this interface is in a remote process.
|
Public static functions
|
asInterface(AIBinder *binder)
|
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-17 UTC.
[null,null,["Last updated 2024-04-17 UTC."],[],[],null,["# ndk::ICInterface Class Reference\n\nndk::ICInterface\n================\n\n\n**This is an abstract class.**\n\n\n`#include \u003cbinder_interface_utils.h\u003e`\n\nwrapper analog to IInterface\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: [ndk::SharedRefBase](/ndk/reference/classndk/1-1-shared-ref-base)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ICInterface](#classndk_1_1_i_c_interface_1a20e8eac2f337a4576264d2f2ce7f6aec)`()` ||\n| [~ICInterface](#classndk_1_1_i_c_interface_1a8529b9552704f6c89342a4575999f8da)`()` ||\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [asBinder](#classndk_1_1_i_c_interface_1a2287a60355c6cca8c49e4cbc8e253252)`()=0` | `virtual `[SpAIBinder](/ndk/reference/classndk/1-1-sp-a-i-binder#classndk_1_1_sp_a_i_binder) This either returns the single existing implementation or creates a new implementation. |\n| [dump](#classndk_1_1_i_c_interface_1a91c81f99c7b8ee334e562398934bcda4)`(int fd, const char **args, uint32_t numArgs)` | `virtual `[binder_status_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1ga26845d019135385e22a356743fdf639f) Dumps information about the interface. |\n| [isRemote](#classndk_1_1_i_c_interface_1a43e875f0ba7f52d4b5e86b4dece8dbe6)`()=0` | `virtual bool` Returns whether this interface is in a remote process. |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [asInterface](#classndk_1_1_i_c_interface_1a5331d17da8d807b8c72e2665c03a4c42)`(AIBinder *binder)` | `std::shared_ptr\u003c `[ICInterface](/ndk/reference/classndk/1-1-i-c-interface#classndk_1_1_i_c_interface)` \u003e` Interprets this binder as this underlying interface if this has stored an [ICInterface](/ndk/reference/classndk/1-1-i-c-interface#classndk_1_1_i_c_interface) in the binder's user data. |\n| [defineClass](#classndk_1_1_i_c_interface_1a90d695e8b932640d70c98e37d3725f4e)`(const char *interfaceDescriptor, `[AIBinder_Class_onTransact](/ndk/reference/group/ndk-binder#group___ndk_binder_1gaccd8f0f08b77c34c8e9beb1630430ee1)` onTransact)` | `AIBinder_Class *` Helper method to create a class. |\n\nPublic functions\n----------------\n\n### ICInterface\n\n```text\n ICInterface()\n``` \n\n### asBinder\n\n```text\nvirtual SpAIBinder asBinder()=0\n``` \nThis either returns the single existing implementation or creates a new implementation. \n\n### dump\n\n```gdscript\nvirtual binder_status_t dump(\n int fd,\n const char **args,\n uint32_t numArgs\n)\n``` \nDumps information about the interface.\n\nBy default, dumps nothing.\n\nThis method is not given ownership of the FD. \n\n### isRemote\n\n```text\nvirtual bool isRemote()=0\n``` \nReturns whether this interface is in a remote process.\n\nIf it cannot be determined locally, this will be checked using AIBinder_isRemote. \n\n### \\~ICInterface\n\n```text\nvirtual ~ICInterface()\n``` \n\nPublic static functions\n-----------------------\n\n### asInterface\n\n```scdoc\nstd::shared_ptr\u003c ICInterface \u003e asInterface(\n AIBinder *binder\n)\n``` \nInterprets this binder as this underlying interface if this has stored an [ICInterface](/ndk/reference/classndk/1-1-i-c-interface#classndk_1_1_i_c_interface) in the binder's user data.\n\nThis does not do type checking and should only be used when the binder is known to originate from [ICInterface](/ndk/reference/classndk/1-1-i-c-interface#classndk_1_1_i_c_interface). Most likely, you want to use I\\*::fromBinder. \n\n### defineClass\n\n```gdscript\nAIBinder_Class * defineClass(\n const char *interfaceDescriptor,\n AIBinder_Class_onTransact onTransact\n)\n``` \nHelper method to create a class."]]