anbox-platform-sdk
1.23.0
Anbox Platform SDK API documentation
|
Platform defines the custom Anbox platform implemented by a plugin. More...
#include <platform.h>
Public Member Functions | |
Platform ()=default | |
virtual | ~Platform ()=default |
Platform (const Platform &)=delete | |
Platform & | operator= (const Platform &)=delete |
virtual AudioProcessor * | audio_processor ()=0 |
Retrieve the platform audio processor instance. More... | |
virtual InputProcessor * | input_processor ()=0 |
Retrieve the platform input processor instance. More... | |
virtual GraphicsProcessor * | graphics_processor () |
Retrieve the platform graphics processor instance. More... | |
virtual SensorProcessor * | sensor_processor () |
Retrieve the platform sensor processor instance. More... | |
virtual GpsProcessor * | gps_processor () |
Retrieve the platform gps processor instance. More... | |
virtual CameraProcessor * | camera_processor () |
Retrieve the platform camera processor instance. More... | |
virtual AnboxProxy * | anbox_proxy () |
Retrieve the platform anbox proxy. More... | |
virtual VideoDecoder * | create_video_decoder (AnboxVideoCodecType codec_type) |
Create a video decoder instances for a codec of the given name. More... | |
virtual VhalConnector * | vhal_connector () |
Retrieve the platform vhal connector instance. More... | |
virtual bool | ready () const =0 |
Query the platform for its ready status. More... | |
virtual int | wait_until_ready ()=0 |
Wait for platform plugin to be initialized. More... | |
virtual int | get_config_item (AnboxPlatformConfigurationKey key, void *data, size_t data_size)=0 |
Retrieve the configuration options provided by platform plugin. More... | |
virtual int | stop () |
Ask the platform to stop any pending work it has to prepare for Anbox to terminate. More... | |
virtual void | handle_event (AnboxEventType type) |
Handle an event sending from Anbox. More... | |
virtual int | set_config_item (AnboxPlatformConfigurationKey key, void *data, size_t data_size) |
Set the configuration options by Anbox to the platform. More... | |
virtual void | setup_event_tracer (AnboxTracerGetCategoryEnabledFunc get_category_enabled_callback, AnboxTracerAddEventFunc add_event_callback) |
Register an external event tracing implementation withe platform. More... | |
Platform defines the custom Anbox platform implemented by a plugin.
It supports the following features:
Definition at line 45 of file platform.h.
|
default |
|
virtualdefault |
|
delete |
|
inlinevirtual |
Retrieve the platform anbox proxy.
A platform is supposed to have only a single anbox proxy instance at all time.
Definition at line 128 of file platform.h.
|
pure virtual |
Retrieve the platform audio processor instance.
A platform is supposed to have only a single audio processor instance at all time.
|
inlinevirtual |
Retrieve the platform camera processor instance.
A platform is supposed to have only a single camera processor instance at all time.
Definition at line 118 of file platform.h.
|
inlinevirtual |
Create a video decoder instances for a codec of the given name.
Definition at line 136 of file platform.h.
|
pure virtual |
Retrieve the configuration options provided by platform plugin.
This function provides a way for anbox to read a configuration option from the plugin.
key | plugin configuration option key. |
data | pointer stores the address of the configuration key value. |
data_size | size of the memory the data pointer points to |
|
inlinevirtual |
Retrieve the platform gps processor instance.
A platform is supposed to have only a single gps processor instance at all time.
Definition at line 106 of file platform.h.
|
inlinevirtual |
Retrieve the platform graphics processor instance.
A platform is supposed to have only a single graphics processor instance at all time. Providing a graphics processor is not mandatory for a platform.
Definition at line 84 of file platform.h.
|
inlinevirtual |
Handle an event sending from Anbox.
Some operations (E.g. trigger an action) or initialization routine of a platform may require Android container fully booted or all essential components of Anbox are fully initialized.
This enables a platform to get notified when an event was fired from Anbox and perform one specific operation when a certain event is received.
Definition at line 209 of file platform.h.
|
pure virtual |
Retrieve the platform input processor instance.
A platform is supposed to have only a single input processor instance at all time.
|
pure virtual |
Query the platform for its ready status.
A platform is supposed to have different status during initialization
|
inlinevirtual |
Retrieve the platform sensor processor instance.
A platform is supposed to have only a single sensor processor instance at all time.
Definition at line 95 of file platform.h.
|
inlinevirtual |
Set the configuration options by Anbox to the platform.
This function provides a way for anbox to write a configuration option to the plugin.
key | plugin configuration option key. |
data | pointer stores the address of the configuration key value. |
data_size | size of the memory the data pointer points to |
Definition at line 223 of file platform.h.
|
inlinevirtual |
Register an external event tracing implementation withe platform.
get_category_enabled_callback | Callback the platform can use to determine if a certain tracing category is enabled |
add_event_callback | Callback to submit a tracing event to the Anbox runtime |
Definition at line 236 of file platform.h.
|
inlinevirtual |
Ask the platform to stop any pending work it has to prepare for Anbox to terminate.
Anbox will wait for the function to return before it finishes its termination process. The function is called very early on before the Android container is stopped.
The platform is expected to stop its processors and don't provide any further data to Anbox. Any further data provided to Anbox after the function has returned will not be considered.
Definition at line 198 of file platform.h.
|
inlinevirtual |
Retrieve the platform vhal connector instance.
A platform is supposed to have only a single vhal connector instance at all time.
Definition at line 151 of file platform.h.
|
pure virtual |
Wait for platform plugin to be initialized.
This function allows the caller to wait until the plugin platform has fully initialized all internal components. Once the platform plugin reports it is ready Anbox will start the Android container.