| // WARNING: This file is machine generated by fidlgen. |
| |
| #pragma once |
| |
| #include <lib/fidl/internal.h> |
| #include <lib/fidl/txn_header.h> |
| #include <lib/fidl/llcpp/array.h> |
| #include <lib/fidl/llcpp/coding.h> |
| #include <lib/fidl/llcpp/connect_service.h> |
| #include <lib/fidl/llcpp/service_handler_interface.h> |
| #include <lib/fidl/llcpp/string_view.h> |
| #include <lib/fidl/llcpp/sync_call.h> |
| #include <lib/fidl/llcpp/traits.h> |
| #include <lib/fidl/llcpp/transaction.h> |
| #include <lib/fidl/llcpp/vector_view.h> |
| #include <lib/fit/function.h> |
| #include <lib/zx/channel.h> |
| #include <zircon/fidl.h> |
| |
| namespace llcpp { |
| |
| namespace fuchsia { |
| namespace hardware { |
| namespace backlight { |
| |
| struct State; |
| struct Device_GetStateNormalized_Response; |
| struct Device_GetStateNormalized_Result; |
| struct Device_GetStateAbsolute_Response; |
| struct Device_GetStateAbsolute_Result; |
| struct Device_SetStateNormalized_Response; |
| struct Device_SetStateNormalized_Result; |
| struct Device_SetStateAbsolute_Response; |
| struct Device_SetStateAbsolute_Result; |
| struct Device_GetMaxAbsoluteBrightness_Response; |
| struct Device_GetMaxAbsoluteBrightness_Result; |
| class Device; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetStateNormalized_ResultTable; |
| |
| struct Device_GetStateNormalized_Result { |
| Device_GetStateNormalized_Result() : ordinal_(Ordinal::Invalid), envelope_{} {} |
| |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; } |
| |
| bool is_response() const { return ordinal() == Ordinal::kResponse; } |
| |
| static Device_GetStateNormalized_Result WithResponse(::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response* val) { |
| Device_GetStateNormalized_Result result; |
| result.set_response(val); |
| return result; |
| } |
| |
| void set_response(::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response* elem) { |
| ordinal_ = Ordinal::kResponse; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| ::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response& mutable_response() { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response*>(envelope_.data); |
| } |
| const ::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response& response() const { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response*>(envelope_.data); |
| } |
| |
| bool is_err() const { return ordinal() == Ordinal::kErr; } |
| |
| static Device_GetStateNormalized_Result WithErr(int32_t* val) { |
| Device_GetStateNormalized_Result result; |
| result.set_err(val); |
| return result; |
| } |
| |
| void set_err(int32_t* elem) { |
| ordinal_ = Ordinal::kErr; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| int32_t& mutable_err() { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| const int32_t& err() const { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| Tag which() const { |
| ZX_ASSERT(!has_invalid_tag()); |
| return static_cast<Tag>(ordinal()); |
| } |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetStateNormalized_ResultTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 16; |
| static constexpr bool HasPointer = true; |
| |
| private: |
| enum class Ordinal : fidl_xunion_tag_t { |
| Invalid = 0, |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| Ordinal ordinal() const { |
| return ordinal_; |
| } |
| |
| static void SizeAndOffsetAssertionHelper(); |
| Ordinal ordinal_; |
| FIDL_ALIGNDECL |
| fidl_envelope_t envelope_; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetStateAbsolute_ResultTable; |
| |
| struct Device_GetStateAbsolute_Result { |
| Device_GetStateAbsolute_Result() : ordinal_(Ordinal::Invalid), envelope_{} {} |
| |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; } |
| |
| bool is_response() const { return ordinal() == Ordinal::kResponse; } |
| |
| static Device_GetStateAbsolute_Result WithResponse(::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response* val) { |
| Device_GetStateAbsolute_Result result; |
| result.set_response(val); |
| return result; |
| } |
| |
| void set_response(::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response* elem) { |
| ordinal_ = Ordinal::kResponse; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| ::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response& mutable_response() { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response*>(envelope_.data); |
| } |
| const ::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response& response() const { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response*>(envelope_.data); |
| } |
| |
| bool is_err() const { return ordinal() == Ordinal::kErr; } |
| |
| static Device_GetStateAbsolute_Result WithErr(int32_t* val) { |
| Device_GetStateAbsolute_Result result; |
| result.set_err(val); |
| return result; |
| } |
| |
| void set_err(int32_t* elem) { |
| ordinal_ = Ordinal::kErr; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| int32_t& mutable_err() { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| const int32_t& err() const { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| Tag which() const { |
| ZX_ASSERT(!has_invalid_tag()); |
| return static_cast<Tag>(ordinal()); |
| } |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetStateAbsolute_ResultTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 16; |
| static constexpr bool HasPointer = true; |
| |
| private: |
| enum class Ordinal : fidl_xunion_tag_t { |
| Invalid = 0, |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| Ordinal ordinal() const { |
| return ordinal_; |
| } |
| |
| static void SizeAndOffsetAssertionHelper(); |
| Ordinal ordinal_; |
| FIDL_ALIGNDECL |
| fidl_envelope_t envelope_; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_SetStateNormalized_ResultTable; |
| |
| struct Device_SetStateNormalized_Result { |
| Device_SetStateNormalized_Result() : ordinal_(Ordinal::Invalid), envelope_{} {} |
| |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; } |
| |
| bool is_response() const { return ordinal() == Ordinal::kResponse; } |
| |
| static Device_SetStateNormalized_Result WithResponse(::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response* val) { |
| Device_SetStateNormalized_Result result; |
| result.set_response(val); |
| return result; |
| } |
| |
| void set_response(::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response* elem) { |
| ordinal_ = Ordinal::kResponse; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| ::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response& mutable_response() { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response*>(envelope_.data); |
| } |
| const ::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response& response() const { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response*>(envelope_.data); |
| } |
| |
| bool is_err() const { return ordinal() == Ordinal::kErr; } |
| |
| static Device_SetStateNormalized_Result WithErr(int32_t* val) { |
| Device_SetStateNormalized_Result result; |
| result.set_err(val); |
| return result; |
| } |
| |
| void set_err(int32_t* elem) { |
| ordinal_ = Ordinal::kErr; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| int32_t& mutable_err() { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| const int32_t& err() const { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| Tag which() const { |
| ZX_ASSERT(!has_invalid_tag()); |
| return static_cast<Tag>(ordinal()); |
| } |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_SetStateNormalized_ResultTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasPointer = true; |
| |
| private: |
| enum class Ordinal : fidl_xunion_tag_t { |
| Invalid = 0, |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| Ordinal ordinal() const { |
| return ordinal_; |
| } |
| |
| static void SizeAndOffsetAssertionHelper(); |
| Ordinal ordinal_; |
| FIDL_ALIGNDECL |
| fidl_envelope_t envelope_; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_SetStateAbsolute_ResultTable; |
| |
| struct Device_SetStateAbsolute_Result { |
| Device_SetStateAbsolute_Result() : ordinal_(Ordinal::Invalid), envelope_{} {} |
| |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; } |
| |
| bool is_response() const { return ordinal() == Ordinal::kResponse; } |
| |
| static Device_SetStateAbsolute_Result WithResponse(::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response* val) { |
| Device_SetStateAbsolute_Result result; |
| result.set_response(val); |
| return result; |
| } |
| |
| void set_response(::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response* elem) { |
| ordinal_ = Ordinal::kResponse; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| ::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response& mutable_response() { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response*>(envelope_.data); |
| } |
| const ::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response& response() const { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response*>(envelope_.data); |
| } |
| |
| bool is_err() const { return ordinal() == Ordinal::kErr; } |
| |
| static Device_SetStateAbsolute_Result WithErr(int32_t* val) { |
| Device_SetStateAbsolute_Result result; |
| result.set_err(val); |
| return result; |
| } |
| |
| void set_err(int32_t* elem) { |
| ordinal_ = Ordinal::kErr; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| int32_t& mutable_err() { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| const int32_t& err() const { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| Tag which() const { |
| ZX_ASSERT(!has_invalid_tag()); |
| return static_cast<Tag>(ordinal()); |
| } |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_SetStateAbsolute_ResultTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasPointer = true; |
| |
| private: |
| enum class Ordinal : fidl_xunion_tag_t { |
| Invalid = 0, |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| Ordinal ordinal() const { |
| return ordinal_; |
| } |
| |
| static void SizeAndOffsetAssertionHelper(); |
| Ordinal ordinal_; |
| FIDL_ALIGNDECL |
| fidl_envelope_t envelope_; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetMaxAbsoluteBrightness_ResultTable; |
| |
| struct Device_GetMaxAbsoluteBrightness_Result { |
| Device_GetMaxAbsoluteBrightness_Result() : ordinal_(Ordinal::Invalid), envelope_{} {} |
| |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; } |
| |
| bool is_response() const { return ordinal() == Ordinal::kResponse; } |
| |
| static Device_GetMaxAbsoluteBrightness_Result WithResponse(::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response* val) { |
| Device_GetMaxAbsoluteBrightness_Result result; |
| result.set_response(val); |
| return result; |
| } |
| |
| void set_response(::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response* elem) { |
| ordinal_ = Ordinal::kResponse; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| ::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response& mutable_response() { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response*>(envelope_.data); |
| } |
| const ::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response& response() const { |
| ZX_ASSERT(ordinal() == Ordinal::kResponse); |
| return *static_cast<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response*>(envelope_.data); |
| } |
| |
| bool is_err() const { return ordinal() == Ordinal::kErr; } |
| |
| static Device_GetMaxAbsoluteBrightness_Result WithErr(int32_t* val) { |
| Device_GetMaxAbsoluteBrightness_Result result; |
| result.set_err(val); |
| return result; |
| } |
| |
| void set_err(int32_t* elem) { |
| ordinal_ = Ordinal::kErr; |
| envelope_.data = static_cast<void*>(elem); |
| } |
| |
| int32_t& mutable_err() { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| const int32_t& err() const { |
| ZX_ASSERT(ordinal() == Ordinal::kErr); |
| return *static_cast<int32_t*>(envelope_.data); |
| } |
| Tag which() const { |
| ZX_ASSERT(!has_invalid_tag()); |
| return static_cast<Tag>(ordinal()); |
| } |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetMaxAbsoluteBrightness_ResultTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasPointer = true; |
| |
| private: |
| enum class Ordinal : fidl_xunion_tag_t { |
| Invalid = 0, |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| Ordinal ordinal() const { |
| return ordinal_; |
| } |
| |
| static void SizeAndOffsetAssertionHelper(); |
| Ordinal ordinal_; |
| FIDL_ALIGNDECL |
| fidl_envelope_t envelope_; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_StateTable; |
| |
| struct State { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_StateTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 16; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| bool backlight_on = {}; |
| |
| // |brightness| can either be: |
| // 1. The unitless brightness value on a linear scale where 0.0 is the minimum |
| // brightness and 1.0 is the maximum brightness - represents the current / |
| // desired brightness as a percentage within the supported range. Used |
| // by the |GetStateNormalized| / |SetStateNormalized| calls. |
| // 2. Absolute brightness in nits. Used by the |GetStateAbsolute| / |
| // |SetStateAbsolute| calls. |
| double brightness = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetStateNormalized_ResponseTable; |
| |
| struct Device_GetStateNormalized_Response { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetStateNormalized_ResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 16; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| ::llcpp::fuchsia::hardware::backlight::State state = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetStateAbsolute_ResponseTable; |
| |
| struct Device_GetStateAbsolute_Response { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetStateAbsolute_ResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 16; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| ::llcpp::fuchsia::hardware::backlight::State state = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_SetStateNormalized_ResponseTable; |
| |
| struct Device_SetStateNormalized_Response { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_SetStateNormalized_ResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 1; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| uint8_t __reserved = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_SetStateAbsolute_ResponseTable; |
| |
| struct Device_SetStateAbsolute_Response { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_SetStateAbsolute_ResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 1; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| uint8_t __reserved = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_Device_GetMaxAbsoluteBrightness_ResponseTable; |
| |
| struct Device_GetMaxAbsoluteBrightness_Response { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_Device_GetMaxAbsoluteBrightness_ResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 8; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| double max_brightness = {}; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetStateNormalizedRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetStateNormalizedResponseTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceSetStateNormalizedRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceSetStateNormalizedResponseTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetStateAbsoluteRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetStateAbsoluteResponseTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceSetStateAbsoluteRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceSetStateAbsoluteResponseTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetMaxAbsoluteBrightnessRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_hardware_backlight_DeviceGetMaxAbsoluteBrightnessResponseTable; |
| |
| class Device final { |
| Device() = delete; |
| public: |
| |
| struct GetStateNormalizedResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Result result; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceGetStateNormalizedResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 40; |
| static constexpr uint32_t MaxOutOfLine = 16; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = true; |
| static constexpr bool ContainsUnion = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| using GetStateNormalizedRequest = ::fidl::AnyZeroArgMessage; |
| |
| struct SetStateNormalizedResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Result result; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceSetStateNormalizedResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 40; |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = true; |
| static constexpr bool ContainsUnion = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| struct SetStateNormalizedRequest final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::State state; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceSetStateNormalizedRequestTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 32; |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr uint32_t AltPrimarySize = 32; |
| static constexpr uint32_t AltMaxOutOfLine = 0; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = false; |
| static constexpr bool ContainsUnion = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kRequest; |
| using ResponseType = SetStateNormalizedResponse; |
| }; |
| |
| struct GetStateAbsoluteResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Result result; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceGetStateAbsoluteResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 40; |
| static constexpr uint32_t MaxOutOfLine = 16; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = true; |
| static constexpr bool ContainsUnion = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| using GetStateAbsoluteRequest = ::fidl::AnyZeroArgMessage; |
| |
| struct SetStateAbsoluteResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Result result; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceSetStateAbsoluteResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 40; |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = true; |
| static constexpr bool ContainsUnion = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| struct SetStateAbsoluteRequest final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::State state; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceSetStateAbsoluteRequestTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 32; |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr uint32_t AltPrimarySize = 32; |
| static constexpr uint32_t AltMaxOutOfLine = 0; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = false; |
| static constexpr bool ContainsUnion = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kRequest; |
| using ResponseType = SetStateAbsoluteResponse; |
| }; |
| |
| struct GetMaxAbsoluteBrightnessResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Result result; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_hardware_backlight_DeviceGetMaxAbsoluteBrightnessResponseTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 40; |
| static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = true; |
| static constexpr bool ContainsUnion = true; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| using GetMaxAbsoluteBrightnessRequest = ::fidl::AnyZeroArgMessage; |
| |
| |
| // Collection of return types of FIDL calls in this interface. |
| class ResultOf final { |
| ResultOf() = delete; |
| private: |
| template <typename ResponseType> |
| class GetStateNormalized_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| GetStateNormalized_Impl(::zx::unowned_channel _client_end); |
| ~GetStateNormalized_Impl() = default; |
| GetStateNormalized_Impl(GetStateNormalized_Impl&& other) = default; |
| GetStateNormalized_Impl& operator=(GetStateNormalized_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class SetStateNormalized_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| SetStateNormalized_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::hardware::backlight::State state); |
| ~SetStateNormalized_Impl() = default; |
| SetStateNormalized_Impl(SetStateNormalized_Impl&& other) = default; |
| SetStateNormalized_Impl& operator=(SetStateNormalized_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class GetStateAbsolute_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| GetStateAbsolute_Impl(::zx::unowned_channel _client_end); |
| ~GetStateAbsolute_Impl() = default; |
| GetStateAbsolute_Impl(GetStateAbsolute_Impl&& other) = default; |
| GetStateAbsolute_Impl& operator=(GetStateAbsolute_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class SetStateAbsolute_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| SetStateAbsolute_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::hardware::backlight::State state); |
| ~SetStateAbsolute_Impl() = default; |
| SetStateAbsolute_Impl(SetStateAbsolute_Impl&& other) = default; |
| SetStateAbsolute_Impl& operator=(SetStateAbsolute_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class GetMaxAbsoluteBrightness_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| GetMaxAbsoluteBrightness_Impl(::zx::unowned_channel _client_end); |
| ~GetMaxAbsoluteBrightness_Impl() = default; |
| GetMaxAbsoluteBrightness_Impl(GetMaxAbsoluteBrightness_Impl&& other) = default; |
| GetMaxAbsoluteBrightness_Impl& operator=(GetMaxAbsoluteBrightness_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using GetStateNormalized = GetStateNormalized_Impl<GetStateNormalizedResponse>; |
| using SetStateNormalized = SetStateNormalized_Impl<SetStateNormalizedResponse>; |
| using GetStateAbsolute = GetStateAbsolute_Impl<GetStateAbsoluteResponse>; |
| using SetStateAbsolute = SetStateAbsolute_Impl<SetStateAbsoluteResponse>; |
| using GetMaxAbsoluteBrightness = GetMaxAbsoluteBrightness_Impl<GetMaxAbsoluteBrightnessResponse>; |
| }; |
| |
| // Collection of return types of FIDL calls in this interface, |
| // when the caller-allocate flavor or in-place call is used. |
| class UnownedResultOf final { |
| UnownedResultOf() = delete; |
| private: |
| template <typename ResponseType> |
| class GetStateNormalized_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| GetStateNormalized_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| ~GetStateNormalized_Impl() = default; |
| GetStateNormalized_Impl(GetStateNormalized_Impl&& other) = default; |
| GetStateNormalized_Impl& operator=(GetStateNormalized_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class SetStateNormalized_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| SetStateNormalized_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| ~SetStateNormalized_Impl() = default; |
| SetStateNormalized_Impl(SetStateNormalized_Impl&& other) = default; |
| SetStateNormalized_Impl& operator=(SetStateNormalized_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class GetStateAbsolute_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| GetStateAbsolute_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| ~GetStateAbsolute_Impl() = default; |
| GetStateAbsolute_Impl(GetStateAbsolute_Impl&& other) = default; |
| GetStateAbsolute_Impl& operator=(GetStateAbsolute_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class SetStateAbsolute_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| SetStateAbsolute_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| ~SetStateAbsolute_Impl() = default; |
| SetStateAbsolute_Impl(SetStateAbsolute_Impl&& other) = default; |
| SetStateAbsolute_Impl& operator=(SetStateAbsolute_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| template <typename ResponseType> |
| class GetMaxAbsoluteBrightness_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| GetMaxAbsoluteBrightness_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| ~GetMaxAbsoluteBrightness_Impl() = default; |
| GetMaxAbsoluteBrightness_Impl(GetMaxAbsoluteBrightness_Impl&& other) = default; |
| GetMaxAbsoluteBrightness_Impl& operator=(GetMaxAbsoluteBrightness_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using GetStateNormalized = GetStateNormalized_Impl<GetStateNormalizedResponse>; |
| using SetStateNormalized = SetStateNormalized_Impl<SetStateNormalizedResponse>; |
| using GetStateAbsolute = GetStateAbsolute_Impl<GetStateAbsoluteResponse>; |
| using SetStateAbsolute = SetStateAbsolute_Impl<SetStateAbsoluteResponse>; |
| using GetMaxAbsoluteBrightness = GetMaxAbsoluteBrightness_Impl<GetMaxAbsoluteBrightnessResponse>; |
| }; |
| |
| class SyncClient final { |
| public: |
| explicit SyncClient(::zx::channel channel) : channel_(std::move(channel)) {} |
| ~SyncClient() = default; |
| SyncClient(SyncClient&&) = default; |
| SyncClient& operator=(SyncClient&&) = default; |
| |
| const ::zx::channel& channel() const { return channel_; } |
| |
| ::zx::channel* mutable_channel() { return &channel_; } |
| |
| // Gets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Allocates 72 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::GetStateNormalized GetStateNormalized(); |
| |
| // Gets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::GetStateNormalized GetStateNormalized(::fidl::BytePart _response_buffer); |
| |
| // Sets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Allocates 80 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::SetStateNormalized SetStateNormalized(::llcpp::fuchsia::hardware::backlight::State state); |
| |
| // Sets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::SetStateNormalized SetStateNormalized(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| |
| // Gets the current backlight brightness in nits |
| // Allocates 72 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::GetStateAbsolute GetStateAbsolute(); |
| |
| // Gets the current backlight brightness in nits |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::GetStateAbsolute GetStateAbsolute(::fidl::BytePart _response_buffer); |
| |
| // Sets the current backlight brightness in nits |
| // Allocates 80 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::SetStateAbsolute SetStateAbsolute(::llcpp::fuchsia::hardware::backlight::State state); |
| |
| // Sets the current backlight brightness in nits |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::SetStateAbsolute SetStateAbsolute(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| |
| // Gets the maximum supported backlight brightness in nits, if known. |
| // Otherwise returns error ZX_ERR_NOT_SUPPORTED. |
| // Allocates 64 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::GetMaxAbsoluteBrightness GetMaxAbsoluteBrightness(); |
| |
| // Gets the maximum supported backlight brightness in nits, if known. |
| // Otherwise returns error ZX_ERR_NOT_SUPPORTED. |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::GetMaxAbsoluteBrightness GetMaxAbsoluteBrightness(::fidl::BytePart _response_buffer); |
| |
| private: |
| ::zx::channel channel_; |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned channel, avoiding setting up a client. |
| class Call final { |
| Call() = delete; |
| public: |
| |
| // Gets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Allocates 72 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::GetStateNormalized GetStateNormalized(::zx::unowned_channel _client_end); |
| |
| // Gets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::GetStateNormalized GetStateNormalized(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| |
| // Sets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Allocates 80 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::SetStateNormalized SetStateNormalized(::zx::unowned_channel _client_end, ::llcpp::fuchsia::hardware::backlight::State state); |
| |
| // Sets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::SetStateNormalized SetStateNormalized(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| |
| // Gets the current backlight brightness in nits |
| // Allocates 72 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::GetStateAbsolute GetStateAbsolute(::zx::unowned_channel _client_end); |
| |
| // Gets the current backlight brightness in nits |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::GetStateAbsolute GetStateAbsolute(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| |
| // Sets the current backlight brightness in nits |
| // Allocates 80 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::SetStateAbsolute SetStateAbsolute(::zx::unowned_channel _client_end, ::llcpp::fuchsia::hardware::backlight::State state); |
| |
| // Sets the current backlight brightness in nits |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::SetStateAbsolute SetStateAbsolute(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::hardware::backlight::State state, ::fidl::BytePart _response_buffer); |
| |
| // Gets the maximum supported backlight brightness in nits, if known. |
| // Otherwise returns error ZX_ERR_NOT_SUPPORTED. |
| // Allocates 64 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::GetMaxAbsoluteBrightness GetMaxAbsoluteBrightness(::zx::unowned_channel _client_end); |
| |
| // Gets the maximum supported backlight brightness in nits, if known. |
| // Otherwise returns error ZX_ERR_NOT_SUPPORTED. |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::GetMaxAbsoluteBrightness GetMaxAbsoluteBrightness(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| |
| }; |
| |
| // Messages are encoded and decoded in-place when these methods are used. |
| // Additionally, requests must be already laid-out according to the FIDL wire-format. |
| class InPlace final { |
| InPlace() = delete; |
| public: |
| |
| // Gets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| static ::fidl::DecodeResult<GetStateNormalizedResponse> GetStateNormalized(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer); |
| |
| // Sets the current backlight brightness as a percentage value between 0.0 |
| // and 1.0 |
| static ::fidl::DecodeResult<SetStateNormalizedResponse> SetStateNormalized(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<SetStateNormalizedRequest> params, ::fidl::BytePart response_buffer); |
| |
| // Gets the current backlight brightness in nits |
| static ::fidl::DecodeResult<GetStateAbsoluteResponse> GetStateAbsolute(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer); |
| |
| // Sets the current backlight brightness in nits |
| static ::fidl::DecodeResult<SetStateAbsoluteResponse> SetStateAbsolute(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<SetStateAbsoluteRequest> params, ::fidl::BytePart response_buffer); |
| |
| // Gets the maximum supported backlight brightness in nits, if known. |
| // Otherwise returns error ZX_ERR_NOT_SUPPORTED. |
| static ::fidl::DecodeResult<GetMaxAbsoluteBrightnessResponse> GetMaxAbsoluteBrightness(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer); |
| |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| class Interface { |
| public: |
| Interface() = default; |
| virtual ~Interface() = default; |
| using _Outer = Device; |
| using _Base = ::fidl::CompleterBase; |
| |
| class GetStateNormalizedCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Result result); |
| void ReplySuccess(::llcpp::fuchsia::hardware::backlight::State state); |
| void ReplyError(int32_t error); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Result result); |
| void ReplySuccess(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::State state); |
| void Reply(::fidl::DecodedMessage<GetStateNormalizedResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using GetStateNormalizedCompleter = ::fidl::Completer<GetStateNormalizedCompleterBase>; |
| |
| virtual void GetStateNormalized(GetStateNormalizedCompleter::Sync _completer) = 0; |
| |
| class SetStateNormalizedCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Result result); |
| void ReplySuccess(); |
| void ReplyError(int32_t error); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Result result); |
| void ReplySuccess(::fidl::BytePart _buffer); |
| void Reply(::fidl::DecodedMessage<SetStateNormalizedResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using SetStateNormalizedCompleter = ::fidl::Completer<SetStateNormalizedCompleterBase>; |
| |
| virtual void SetStateNormalized(::llcpp::fuchsia::hardware::backlight::State state, SetStateNormalizedCompleter::Sync _completer) = 0; |
| |
| class GetStateAbsoluteCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Result result); |
| void ReplySuccess(::llcpp::fuchsia::hardware::backlight::State state); |
| void ReplyError(int32_t error); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Result result); |
| void ReplySuccess(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::State state); |
| void Reply(::fidl::DecodedMessage<GetStateAbsoluteResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using GetStateAbsoluteCompleter = ::fidl::Completer<GetStateAbsoluteCompleterBase>; |
| |
| virtual void GetStateAbsolute(GetStateAbsoluteCompleter::Sync _completer) = 0; |
| |
| class SetStateAbsoluteCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Result result); |
| void ReplySuccess(); |
| void ReplyError(int32_t error); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Result result); |
| void ReplySuccess(::fidl::BytePart _buffer); |
| void Reply(::fidl::DecodedMessage<SetStateAbsoluteResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using SetStateAbsoluteCompleter = ::fidl::Completer<SetStateAbsoluteCompleterBase>; |
| |
| virtual void SetStateAbsolute(::llcpp::fuchsia::hardware::backlight::State state, SetStateAbsoluteCompleter::Sync _completer) = 0; |
| |
| class GetMaxAbsoluteBrightnessCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Result result); |
| void ReplySuccess(double max_brightness); |
| void ReplyError(int32_t error); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Result result); |
| void ReplySuccess(::fidl::BytePart _buffer, double max_brightness); |
| void Reply(::fidl::DecodedMessage<GetMaxAbsoluteBrightnessResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using GetMaxAbsoluteBrightnessCompleter = ::fidl::Completer<GetMaxAbsoluteBrightnessCompleterBase>; |
| |
| virtual void GetMaxAbsoluteBrightness(GetMaxAbsoluteBrightnessCompleter::Sync _completer) = 0; |
| |
| }; |
| |
| // Attempts to dispatch the incoming message to a handler function in the server implementation. |
| // If there is no matching handler, it returns false, leaving the message and transaction intact. |
| // In all other cases, it consumes the message and returns true. |
| // It is possible to chain multiple TryDispatch functions in this manner. |
| static bool TryDispatch(Interface* impl, fidl_msg_t* msg, ::fidl::Transaction* txn); |
| |
| // Dispatches the incoming message to one of the handlers functions in the interface. |
| // If there is no matching handler, it closes all the handles in |msg| and closes the channel with |
| // a |ZX_ERR_NOT_SUPPORTED| epitaph, before returning false. The message should then be discarded. |
| static bool Dispatch(Interface* impl, fidl_msg_t* msg, ::fidl::Transaction* txn); |
| |
| // Same as |Dispatch|, but takes a |void*| instead of |Interface*|. Only used with |fidl::Bind| |
| // to reduce template expansion. |
| // Do not call this method manually. Use |Dispatch| instead. |
| static bool TypeErasedDispatch(void* impl, fidl_msg_t* msg, ::fidl::Transaction* txn) { |
| return Dispatch(static_cast<Interface*>(impl), msg, txn); |
| } |
| |
| |
| // Helper functions to fill in the transaction header in a |DecodedMessage<TransactionalMessage>|. |
| class SetTransactionHeaderFor final { |
| SetTransactionHeaderFor() = delete; |
| public: |
| static void GetStateNormalizedRequest(const ::fidl::DecodedMessage<Device::GetStateNormalizedRequest>& _msg); |
| static void GetStateNormalizedResponse(const ::fidl::DecodedMessage<Device::GetStateNormalizedResponse>& _msg); |
| static void SetStateNormalizedRequest(const ::fidl::DecodedMessage<Device::SetStateNormalizedRequest>& _msg); |
| static void SetStateNormalizedResponse(const ::fidl::DecodedMessage<Device::SetStateNormalizedResponse>& _msg); |
| static void GetStateAbsoluteRequest(const ::fidl::DecodedMessage<Device::GetStateAbsoluteRequest>& _msg); |
| static void GetStateAbsoluteResponse(const ::fidl::DecodedMessage<Device::GetStateAbsoluteResponse>& _msg); |
| static void SetStateAbsoluteRequest(const ::fidl::DecodedMessage<Device::SetStateAbsoluteRequest>& _msg); |
| static void SetStateAbsoluteResponse(const ::fidl::DecodedMessage<Device::SetStateAbsoluteResponse>& _msg); |
| static void GetMaxAbsoluteBrightnessRequest(const ::fidl::DecodedMessage<Device::GetMaxAbsoluteBrightnessRequest>& _msg); |
| static void GetMaxAbsoluteBrightnessResponse(const ::fidl::DecodedMessage<Device::GetMaxAbsoluteBrightnessResponse>& _msg); |
| }; |
| }; |
| |
| } // namespace backlight |
| } // namespace hardware |
| } // namespace fuchsia |
| } // namespace llcpp |
| |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::State> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::State>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::State, backlight_on) == 0); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::State, brightness) == 8); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::State) == ::llcpp::fuchsia::hardware::backlight::State::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response, state) == 0); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response) == ::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Response::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Result> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetStateNormalized_Result>); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response, state) == 0); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response) == ::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Response::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Result> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetStateAbsolute_Result>); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response, __reserved) == 0); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response) == ::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Response::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Result> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_SetStateNormalized_Result>); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response, __reserved) == 0); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response) == ::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Response::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Result> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_SetStateAbsolute_Result>); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response>); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response, max_brightness) == 0); |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response) == ::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Response::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Result> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::hardware::backlight::Device_GetMaxAbsoluteBrightness_Result>); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::GetStateNormalizedResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::GetStateNormalizedResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::GetStateNormalizedResponse) |
| == ::llcpp::fuchsia::hardware::backlight::Device::GetStateNormalizedResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::GetStateNormalizedResponse, result) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedRequest> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedRequest> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedRequest) |
| == ::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedRequest::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedRequest, state) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedResponse) |
| == ::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::SetStateNormalizedResponse, result) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::GetStateAbsoluteResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::GetStateAbsoluteResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::GetStateAbsoluteResponse) |
| == ::llcpp::fuchsia::hardware::backlight::Device::GetStateAbsoluteResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::GetStateAbsoluteResponse, result) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteRequest> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteRequest> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteRequest) |
| == ::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteRequest::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteRequest, state) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteResponse) |
| == ::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::SetStateAbsoluteResponse, result) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::hardware::backlight::Device::GetMaxAbsoluteBrightnessResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::hardware::backlight::Device::GetMaxAbsoluteBrightnessResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::hardware::backlight::Device::GetMaxAbsoluteBrightnessResponse) |
| == ::llcpp::fuchsia::hardware::backlight::Device::GetMaxAbsoluteBrightnessResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::hardware::backlight::Device::GetMaxAbsoluteBrightnessResponse, result) == 16); |
| |
| } // namespace fidl |