anbox-platform-sdk
1.25.0
Anbox Platform SDK API documentation
|
AnboxProxy provides a proxy layer which encapsulates callbacks that can be used by a platform to change Android system behaviors. E.g. change the screen orientation. The platform can invoke the callbacks which are provided by Anbox on demand when triggering an action or changing a behavior. More...
#include <anbox_proxy.h>
Public Member Functions | |
AnboxProxy ()=default | |
virtual | ~AnboxProxy ()=default |
AnboxProxy (const AnboxProxy &)=delete | |
AnboxProxy & | operator= (const AnboxProxy &)=delete |
int | change_screen_orientation (AnboxScreenOrientationType orientation_type) |
Change the screen orientation. More... | |
void | set_change_screen_orientation_callback (const AnboxChangeScreenOrientationCallback &callback, void *user_data) |
Set the screen orientation change callback. More... | |
int | change_display_density (uint32_t density) |
Change the display density. More... | |
void | set_change_display_density_callback (const AnboxChangeDisplayDensityCallback &callback, void *user_data) |
Set the display density change callback. More... | |
int | change_display_size (uint32_t width, uint32_t height) |
Change the display size. More... | |
void | set_change_display_size_callback (const AnboxChangeDisplaySizeCallback &callback, void *user_data) |
Set the display size change callback. More... | |
int | trigger_action (const char *name, const char **args, size_t args_len) |
Trigger an action which is executed within the Android container. More... | |
void | set_trigger_action_callback (const AnboxTriggerActionCallback &callback, void *user_data) |
Set the trigger action callback. More... | |
virtual int | send_message (const char *type, size_t type_size, const char *data, size_t data_size) |
Send a message from Anbox to the platform. More... | |
int | create_adb_connection (const char *id) |
Create ADB connection. More... | |
void | set_create_adb_connection_callback (const AnboxCreateADBConnectionCallback &callback, void *user_data) |
Set the ADB connection creation callback. More... | |
int | disconnect_adb_connection (const char *id) |
Disconnect ADB connection. More... | |
void | set_disconnect_adb_connection_callback (const AnboxDisconnectADBConnectionCallback &callback, void *user_data) |
Set the ADB connection disconnect callback. More... | |
AnboxProxy provides a proxy layer which encapsulates callbacks that can be used by a platform to change Android system behaviors. E.g. change the screen orientation. The platform can invoke the callbacks which are provided by Anbox on demand when triggering an action or changing a behavior.
Definition at line 71 of file anbox_proxy.h.
|
default |
|
virtualdefault |
|
delete |
|
inline |
Change the display density.
density | the density value of the display |
Definition at line 103 of file anbox_proxy.h.
|
inline |
Change the display size.
width | the width of the display size |
height | the height of the display size |
Definition at line 123 of file anbox_proxy.h.
|
inline |
Change the screen orientation.
orientation_type | the type of orientation to be applied to Android container |
Definition at line 84 of file anbox_proxy.h.
|
inline |
Create ADB connection.
id | the unique ID of the ADB connection |
Definition at line 190 of file anbox_proxy.h.
|
inline |
Disconnect ADB connection.
id | the unique ID of the ADB connection |
Definition at line 209 of file anbox_proxy.h.
|
delete |
|
inlinevirtual |
Send a message from Anbox to the platform.
type | pointer to type data |
type_size | length of type data |
data | pointer to message data |
data_size | length of message data |
Definition at line 174 of file anbox_proxy.h.
|
inline |
Set the display density change callback.
Definition at line 110 of file anbox_proxy.h.
|
inline |
Set the display size change callback.
Definition at line 130 of file anbox_proxy.h.
|
inline |
Set the screen orientation change callback.
Definition at line 91 of file anbox_proxy.h.
|
inline |
Set the ADB connection creation callback.
Definition at line 197 of file anbox_proxy.h.
|
inline |
Set the ADB connection disconnect callback.
Definition at line 216 of file anbox_proxy.h.
|
inline |
Set the trigger action callback.
Definition at line 159 of file anbox_proxy.h.
|
inline |
Trigger an action which is executed within the Android container.
name | the name of action |
args | the arguments to be launched the action |
args_len | the number of arguments to launch the action |
args_len
only reflects the number of parameters, the name of the action must not be counted. The returned value 0 only implies the request to launch action is handled by Anbox successfully, it doesn't tell if the action is invoked successfully within the Android container or not. To check the actual error message if the action script is not executed successfully within the Android container, please view the log of anbox service unit. Definition at line 152 of file anbox_proxy.h.