19 #ifndef ANBOX_SDK_VHAL_CONNECTOR_H_
20 #define ANBOX_SDK_VHAL_CONNECTOR_H_
155 return callbacks_.
get_callback(request, result, user_data_);
179 callbacks_ = callbacks;
180 user_data_ = user_data;
185 void *user_data_{
nullptr};
Connects a platform with the Android VHAL interface. The platform can invoke the callbacks which are ...
bool is_available()
Check if the Android VHAL is supported and available.
void set_callbacks(const AnboxVhalConnectorCallbacks &callbacks, void *user_data)
Set all VHAL-related callbacks.
AnboxVhalAnswerStatus get_all_prop_configs(AnboxVhalAnswerGetConfigs *result)
Get all property configs.
VhalConnector(const VhalConnector &)=delete
VhalConnector & operator=(const VhalConnector &)=delete
AnboxVhalAnswerStatus get(AnboxVhalCommandGet *request, AnboxVhalPropertyValue *result)
Get the requested value.
AnboxVhalAnswerStatus set(AnboxVhalCommandSet *request)
Set the requested value.
virtual ~VhalConnector()=default
AnboxVhalAnswerStatus get_prop_configs(int32_t *props, size_t props_size, AnboxVhalAnswerGetConfigs *result)
Get requested property configs.
AnboxVhalAnswerGet contains the answer for a GetAllPropConfigs or GetPropConfigs request sent to the ...
AnboxVhalCommandGet describes a get request to send to the Android VHAL.
AnboxVhalCommandSet describes a set request to send to the Android VHAL.
AnboxVhalConnectorCallbacks is the structure holding all VHAL-related callbacks.
AnboxVhalIsAvailableCallback is_available_callback
AnboxVhalGetAllPropConfigsCallback get_all_prop_configs_callback
AnboxVhalGetPropConfigsCallback get_prop_configs_callback
AnboxVhalGetCallback get_callback
AnboxVhalSetCallback set_callback
AnboxVhalPropertyValue describes the current value of a VHAL property, as returned by a get call to t...
AnboxVhalAnswerStatus
AnboxVhalAnswerStatus describes the return status of a request sent to the Android VHAL.
@ ANBOX_VHAL_ANSWER_STATUS_INVALID
AnboxVhalAnswerStatus(* AnboxVhalGetAllPropConfigsCallback)(AnboxVhalAnswerGetConfigs *result, void *user_data)
AnboxVhalGetAllPropConfigsCallback is invoked when requesting all prop configs.
AnboxVhalAnswerStatus(* AnboxVhalSetCallback)(AnboxVhalCommandSet *request, void *user_data)
AnboxVhalSetCallback is invoked when requesting to change property values.
AnboxVhalAnswerStatus(* AnboxVhalGetPropConfigsCallback)(int32_t *props, size_t props_size, AnboxVhalAnswerGetConfigs *result, void *user_data)
AnboxVhalGetPropConfigsCallback is invoked when requesting some prop configs.
AnboxVhalAnswerStatus(* AnboxVhalGetCallback)(AnboxVhalCommandGet *request, AnboxVhalPropertyValue *result, void *user_data)
AnboxVhalGetCallback is invoked when requesting property values.
bool(* AnboxVhalIsAvailableCallback)(void *user_data)
AnboxVhalIsAvailableCallback is invoked when checking if the Android VHAL is supported and available.