blob: 398039dfd262a86471543fd95901c07fc3a00c8d [file] [log] [blame]
// 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>
#include <fuchsia/device/llcpp/fidl.h>
namespace llcpp {
namespace fuchsia {
namespace device {
namespace power {
namespace test {
struct TestDevice_GetCurrentDevicePowerState_Response;
struct TestDevice_GetCurrentDevicePowerState_Result;
struct TestDevice_GetCurrentDeviceAutoSuspendConfig_Response;
struct TestDevice_GetCurrentDeviceAutoSuspendConfig_Result;
struct TestDevice_GetCurrentSuspendReason_Response;
struct TestDevice_GetCurrentSuspendReason_Result;
struct TestDevice_GetCurrentDevicePerformanceState_Response;
struct TestDevice_GetCurrentDevicePerformanceState_Result;
struct TestDevice_AddDeviceWithPowerArgs_Response;
struct TestDevice_AddDeviceWithPowerArgs_Result;
class TestDevice;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDevice_GetCurrentDevicePowerState_ResultTable;
struct TestDevice_GetCurrentDevicePowerState_Result {
TestDevice_GetCurrentDevicePowerState_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 TestDevice_GetCurrentDevicePowerState_Result WithResponse(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response* val) {
TestDevice_GetCurrentDevicePowerState_Result result;
result.set_response(val);
return result;
}
void set_response(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response* elem) {
ordinal_ = Ordinal::kResponse;
envelope_.data = static_cast<void*>(elem);
}
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response& mutable_response() {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response*>(envelope_.data);
}
const ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response& response() const {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response*>(envelope_.data);
}
bool is_err() const { return ordinal() == Ordinal::kErr; }
static TestDevice_GetCurrentDevicePowerState_Result WithErr(int32_t* val) {
TestDevice_GetCurrentDevicePowerState_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_device_power_test_TestDevice_GetCurrentDevicePowerState_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_device_power_test_TestDevice_GetCurrentDeviceAutoSuspendConfig_ResultTable;
struct TestDevice_GetCurrentDeviceAutoSuspendConfig_Result {
TestDevice_GetCurrentDeviceAutoSuspendConfig_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 TestDevice_GetCurrentDeviceAutoSuspendConfig_Result WithResponse(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response* val) {
TestDevice_GetCurrentDeviceAutoSuspendConfig_Result result;
result.set_response(val);
return result;
}
void set_response(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response* elem) {
ordinal_ = Ordinal::kResponse;
envelope_.data = static_cast<void*>(elem);
}
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response& mutable_response() {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response*>(envelope_.data);
}
const ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response& response() const {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response*>(envelope_.data);
}
bool is_err() const { return ordinal() == Ordinal::kErr; }
static TestDevice_GetCurrentDeviceAutoSuspendConfig_Result WithErr(int32_t* val) {
TestDevice_GetCurrentDeviceAutoSuspendConfig_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_device_power_test_TestDevice_GetCurrentDeviceAutoSuspendConfig_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_device_power_test_TestDevice_GetCurrentSuspendReason_ResultTable;
struct TestDevice_GetCurrentSuspendReason_Result {
TestDevice_GetCurrentSuspendReason_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 TestDevice_GetCurrentSuspendReason_Result WithResponse(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response* val) {
TestDevice_GetCurrentSuspendReason_Result result;
result.set_response(val);
return result;
}
void set_response(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response* elem) {
ordinal_ = Ordinal::kResponse;
envelope_.data = static_cast<void*>(elem);
}
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response& mutable_response() {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response*>(envelope_.data);
}
const ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response& response() const {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response*>(envelope_.data);
}
bool is_err() const { return ordinal() == Ordinal::kErr; }
static TestDevice_GetCurrentSuspendReason_Result WithErr(int32_t* val) {
TestDevice_GetCurrentSuspendReason_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_device_power_test_TestDevice_GetCurrentSuspendReason_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_device_power_test_TestDevice_GetCurrentDevicePerformanceState_ResultTable;
struct TestDevice_GetCurrentDevicePerformanceState_Result {
TestDevice_GetCurrentDevicePerformanceState_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 TestDevice_GetCurrentDevicePerformanceState_Result WithResponse(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response* val) {
TestDevice_GetCurrentDevicePerformanceState_Result result;
result.set_response(val);
return result;
}
void set_response(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response* elem) {
ordinal_ = Ordinal::kResponse;
envelope_.data = static_cast<void*>(elem);
}
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response& mutable_response() {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response*>(envelope_.data);
}
const ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response& response() const {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response*>(envelope_.data);
}
bool is_err() const { return ordinal() == Ordinal::kErr; }
static TestDevice_GetCurrentDevicePerformanceState_Result WithErr(int32_t* val) {
TestDevice_GetCurrentDevicePerformanceState_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_device_power_test_TestDevice_GetCurrentDevicePerformanceState_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_device_power_test_TestDevice_AddDeviceWithPowerArgs_ResultTable;
struct TestDevice_AddDeviceWithPowerArgs_Result {
TestDevice_AddDeviceWithPowerArgs_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 TestDevice_AddDeviceWithPowerArgs_Result WithResponse(::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response* val) {
TestDevice_AddDeviceWithPowerArgs_Result result;
result.set_response(val);
return result;
}
void set_response(::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response* elem) {
ordinal_ = Ordinal::kResponse;
envelope_.data = static_cast<void*>(elem);
}
::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response& mutable_response() {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response*>(envelope_.data);
}
const ::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response& response() const {
ZX_ASSERT(ordinal() == Ordinal::kResponse);
return *static_cast<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response*>(envelope_.data);
}
bool is_err() const { return ordinal() == Ordinal::kErr; }
static TestDevice_AddDeviceWithPowerArgs_Result WithErr(int32_t* val) {
TestDevice_AddDeviceWithPowerArgs_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_device_power_test_TestDevice_AddDeviceWithPowerArgs_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_device_power_test_TestDevice_GetCurrentDevicePowerState_ResponseTable;
struct TestDevice_GetCurrentDevicePowerState_Response {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDevice_GetCurrentDevicePowerState_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;
::llcpp::fuchsia::device::DevicePowerState cur_state = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDevice_GetCurrentDeviceAutoSuspendConfig_ResponseTable;
struct TestDevice_GetCurrentDeviceAutoSuspendConfig_Response {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDevice_GetCurrentDeviceAutoSuspendConfig_ResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 2;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
bool enabled = {};
::llcpp::fuchsia::device::DevicePowerState deepest_sleep_state = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDevice_GetCurrentSuspendReason_ResponseTable;
struct TestDevice_GetCurrentSuspendReason_Response {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDevice_GetCurrentSuspendReason_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 cur_suspend_reason = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDevice_GetCurrentDevicePerformanceState_ResponseTable;
struct TestDevice_GetCurrentDevicePerformanceState_Response {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDevice_GetCurrentDevicePerformanceState_ResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 4;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
int32_t cur_state = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDevice_AddDeviceWithPowerArgs_ResponseTable;
struct TestDevice_AddDeviceWithPowerArgs_Response {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDevice_AddDeviceWithPowerArgs_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_device_power_test_TestDeviceAddDeviceWithPowerArgsRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceAddDeviceWithPowerArgsResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePowerStateRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePowerStateResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentSuspendReasonRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentSuspendReasonResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePerformanceStateRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePerformanceStateResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDeviceAutoSuspendConfigRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_power_test_TestDeviceGetCurrentDeviceAutoSuspendConfigResponseTable;
class TestDevice final {
TestDevice() = delete;
public:
struct AddDeviceWithPowerArgsResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Result result;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceAddDeviceWithPowerArgsResponseTable;
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 AddDeviceWithPowerArgsRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info;
::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info;
bool make_visible;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceAddDeviceWithPowerArgsRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 56;
static constexpr uint32_t MaxOutOfLine = 4294967295;
static constexpr uint32_t AltPrimarySize = 56;
static constexpr uint32_t AltMaxOutOfLine = 4294967295;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = true;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = AddDeviceWithPowerArgsResponse;
};
struct GetCurrentDevicePowerStateResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Result result;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePowerStateResponseTable;
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 GetCurrentDevicePowerStateRequest = ::fidl::AnyZeroArgMessage;
struct GetCurrentSuspendReasonResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Result result;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceGetCurrentSuspendReasonResponseTable;
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 GetCurrentSuspendReasonRequest = ::fidl::AnyZeroArgMessage;
struct GetCurrentDevicePerformanceStateResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Result result;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceGetCurrentDevicePerformanceStateResponseTable;
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 GetCurrentDevicePerformanceStateRequest = ::fidl::AnyZeroArgMessage;
struct GetCurrentDeviceAutoSuspendConfigResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Result result;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_power_test_TestDeviceGetCurrentDeviceAutoSuspendConfigResponseTable;
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 GetCurrentDeviceAutoSuspendConfigRequest = ::fidl::AnyZeroArgMessage;
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
template <typename ResponseType>
class AddDeviceWithPowerArgs_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
AddDeviceWithPowerArgs_Impl(::zx::unowned_channel _client_end, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible);
~AddDeviceWithPowerArgs_Impl() = default;
AddDeviceWithPowerArgs_Impl(AddDeviceWithPowerArgs_Impl&& other) = default;
AddDeviceWithPowerArgs_Impl& operator=(AddDeviceWithPowerArgs_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 GetCurrentDevicePowerState_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetCurrentDevicePowerState_Impl(::zx::unowned_channel _client_end);
~GetCurrentDevicePowerState_Impl() = default;
GetCurrentDevicePowerState_Impl(GetCurrentDevicePowerState_Impl&& other) = default;
GetCurrentDevicePowerState_Impl& operator=(GetCurrentDevicePowerState_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 GetCurrentSuspendReason_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetCurrentSuspendReason_Impl(::zx::unowned_channel _client_end);
~GetCurrentSuspendReason_Impl() = default;
GetCurrentSuspendReason_Impl(GetCurrentSuspendReason_Impl&& other) = default;
GetCurrentSuspendReason_Impl& operator=(GetCurrentSuspendReason_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 GetCurrentDevicePerformanceState_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetCurrentDevicePerformanceState_Impl(::zx::unowned_channel _client_end);
~GetCurrentDevicePerformanceState_Impl() = default;
GetCurrentDevicePerformanceState_Impl(GetCurrentDevicePerformanceState_Impl&& other) = default;
GetCurrentDevicePerformanceState_Impl& operator=(GetCurrentDevicePerformanceState_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 GetCurrentDeviceAutoSuspendConfig_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetCurrentDeviceAutoSuspendConfig_Impl(::zx::unowned_channel _client_end);
~GetCurrentDeviceAutoSuspendConfig_Impl() = default;
GetCurrentDeviceAutoSuspendConfig_Impl(GetCurrentDeviceAutoSuspendConfig_Impl&& other) = default;
GetCurrentDeviceAutoSuspendConfig_Impl& operator=(GetCurrentDeviceAutoSuspendConfig_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 AddDeviceWithPowerArgs = AddDeviceWithPowerArgs_Impl<AddDeviceWithPowerArgsResponse>;
using GetCurrentDevicePowerState = GetCurrentDevicePowerState_Impl<GetCurrentDevicePowerStateResponse>;
using GetCurrentSuspendReason = GetCurrentSuspendReason_Impl<GetCurrentSuspendReasonResponse>;
using GetCurrentDevicePerformanceState = GetCurrentDevicePerformanceState_Impl<GetCurrentDevicePerformanceStateResponse>;
using GetCurrentDeviceAutoSuspendConfig = GetCurrentDeviceAutoSuspendConfig_Impl<GetCurrentDeviceAutoSuspendConfigResponse>;
};
// 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 AddDeviceWithPowerArgs_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
AddDeviceWithPowerArgs_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible, ::fidl::BytePart _response_buffer);
~AddDeviceWithPowerArgs_Impl() = default;
AddDeviceWithPowerArgs_Impl(AddDeviceWithPowerArgs_Impl&& other) = default;
AddDeviceWithPowerArgs_Impl& operator=(AddDeviceWithPowerArgs_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 GetCurrentDevicePowerState_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetCurrentDevicePowerState_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
~GetCurrentDevicePowerState_Impl() = default;
GetCurrentDevicePowerState_Impl(GetCurrentDevicePowerState_Impl&& other) = default;
GetCurrentDevicePowerState_Impl& operator=(GetCurrentDevicePowerState_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 GetCurrentSuspendReason_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetCurrentSuspendReason_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
~GetCurrentSuspendReason_Impl() = default;
GetCurrentSuspendReason_Impl(GetCurrentSuspendReason_Impl&& other) = default;
GetCurrentSuspendReason_Impl& operator=(GetCurrentSuspendReason_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 GetCurrentDevicePerformanceState_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetCurrentDevicePerformanceState_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
~GetCurrentDevicePerformanceState_Impl() = default;
GetCurrentDevicePerformanceState_Impl(GetCurrentDevicePerformanceState_Impl&& other) = default;
GetCurrentDevicePerformanceState_Impl& operator=(GetCurrentDevicePerformanceState_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 GetCurrentDeviceAutoSuspendConfig_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetCurrentDeviceAutoSuspendConfig_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
~GetCurrentDeviceAutoSuspendConfig_Impl() = default;
GetCurrentDeviceAutoSuspendConfig_Impl(GetCurrentDeviceAutoSuspendConfig_Impl&& other) = default;
GetCurrentDeviceAutoSuspendConfig_Impl& operator=(GetCurrentDeviceAutoSuspendConfig_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 AddDeviceWithPowerArgs = AddDeviceWithPowerArgs_Impl<AddDeviceWithPowerArgsResponse>;
using GetCurrentDevicePowerState = GetCurrentDevicePowerState_Impl<GetCurrentDevicePowerStateResponse>;
using GetCurrentSuspendReason = GetCurrentSuspendReason_Impl<GetCurrentSuspendReasonResponse>;
using GetCurrentDevicePerformanceState = GetCurrentDevicePerformanceState_Impl<GetCurrentDevicePerformanceStateResponse>;
using GetCurrentDeviceAutoSuspendConfig = GetCurrentDeviceAutoSuspendConfig_Impl<GetCurrentDeviceAutoSuspendConfigResponse>;
};
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_; }
// Add Test Device with some powerargs
// Allocates 48 bytes of response buffer on the stack. Request is heap-allocated.
ResultOf::AddDeviceWithPowerArgs AddDeviceWithPowerArgs(::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible);
// Add Test Device with some powerargs
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::AddDeviceWithPowerArgs AddDeviceWithPowerArgs(::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible, ::fidl::BytePart _response_buffer);
// Get current power state of the device
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::GetCurrentDevicePowerState GetCurrentDevicePowerState();
// Get current power state of the device
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetCurrentDevicePowerState GetCurrentDevicePowerState(::fidl::BytePart _response_buffer);
// Get the suspend reason of the last suspend call
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::GetCurrentSuspendReason GetCurrentSuspendReason();
// Get the suspend reason of the last suspend call
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetCurrentSuspendReason GetCurrentSuspendReason(::fidl::BytePart _response_buffer);
// Get current performance state of the device
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::GetCurrentDevicePerformanceState GetCurrentDevicePerformanceState();
// Get current performance state of the device
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetCurrentDevicePerformanceState GetCurrentDevicePerformanceState(::fidl::BytePart _response_buffer);
// Get current auto suspend status and deepest_sleep_state
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::GetCurrentDeviceAutoSuspendConfig GetCurrentDeviceAutoSuspendConfig();
// Get current auto suspend status and deepest_sleep_state
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetCurrentDeviceAutoSuspendConfig GetCurrentDeviceAutoSuspendConfig(::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:
// Add Test Device with some powerargs
// Allocates 48 bytes of response buffer on the stack. Request is heap-allocated.
static ResultOf::AddDeviceWithPowerArgs AddDeviceWithPowerArgs(::zx::unowned_channel _client_end, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible);
// Add Test Device with some powerargs
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::AddDeviceWithPowerArgs AddDeviceWithPowerArgs(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible, ::fidl::BytePart _response_buffer);
// Get current power state of the device
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::GetCurrentDevicePowerState GetCurrentDevicePowerState(::zx::unowned_channel _client_end);
// Get current power state of the device
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetCurrentDevicePowerState GetCurrentDevicePowerState(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
// Get the suspend reason of the last suspend call
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::GetCurrentSuspendReason GetCurrentSuspendReason(::zx::unowned_channel _client_end);
// Get the suspend reason of the last suspend call
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetCurrentSuspendReason GetCurrentSuspendReason(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
// Get current performance state of the device
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::GetCurrentDevicePerformanceState GetCurrentDevicePerformanceState(::zx::unowned_channel _client_end);
// Get current performance state of the device
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetCurrentDevicePerformanceState GetCurrentDevicePerformanceState(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer);
// Get current auto suspend status and deepest_sleep_state
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::GetCurrentDeviceAutoSuspendConfig GetCurrentDeviceAutoSuspendConfig(::zx::unowned_channel _client_end);
// Get current auto suspend status and deepest_sleep_state
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetCurrentDeviceAutoSuspendConfig GetCurrentDeviceAutoSuspendConfig(::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:
// Add Test Device with some powerargs
static ::fidl::DecodeResult<AddDeviceWithPowerArgsResponse> AddDeviceWithPowerArgs(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<AddDeviceWithPowerArgsRequest> params, ::fidl::BytePart response_buffer);
// Get current power state of the device
static ::fidl::DecodeResult<GetCurrentDevicePowerStateResponse> GetCurrentDevicePowerState(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer);
// Get the suspend reason of the last suspend call
static ::fidl::DecodeResult<GetCurrentSuspendReasonResponse> GetCurrentSuspendReason(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer);
// Get current performance state of the device
static ::fidl::DecodeResult<GetCurrentDevicePerformanceStateResponse> GetCurrentDevicePerformanceState(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer);
// Get current auto suspend status and deepest_sleep_state
static ::fidl::DecodeResult<GetCurrentDeviceAutoSuspendConfigResponse> GetCurrentDeviceAutoSuspendConfig(::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 = TestDevice;
using _Base = ::fidl::CompleterBase;
class AddDeviceWithPowerArgsCompleterBase : public _Base {
public:
void Reply(::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Result result);
void ReplySuccess();
void ReplyError(int32_t error);
void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Result result);
void ReplySuccess(::fidl::BytePart _buffer);
void Reply(::fidl::DecodedMessage<AddDeviceWithPowerArgsResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using AddDeviceWithPowerArgsCompleter = ::fidl::Completer<AddDeviceWithPowerArgsCompleterBase>;
virtual void AddDeviceWithPowerArgs(::fidl::VectorView<::llcpp::fuchsia::device::DevicePowerStateInfo> info, ::fidl::VectorView<::llcpp::fuchsia::device::DevicePerformanceStateInfo> perf_state_info, bool make_visible, AddDeviceWithPowerArgsCompleter::Sync _completer) = 0;
class GetCurrentDevicePowerStateCompleterBase : public _Base {
public:
void Reply(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Result result);
void ReplySuccess(::llcpp::fuchsia::device::DevicePowerState cur_state);
void ReplyError(int32_t error);
void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Result result);
void ReplySuccess(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::DevicePowerState cur_state);
void Reply(::fidl::DecodedMessage<GetCurrentDevicePowerStateResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetCurrentDevicePowerStateCompleter = ::fidl::Completer<GetCurrentDevicePowerStateCompleterBase>;
virtual void GetCurrentDevicePowerState(GetCurrentDevicePowerStateCompleter::Sync _completer) = 0;
class GetCurrentSuspendReasonCompleterBase : public _Base {
public:
void Reply(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Result result);
void ReplySuccess(uint8_t cur_suspend_reason);
void ReplyError(int32_t error);
void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Result result);
void ReplySuccess(::fidl::BytePart _buffer, uint8_t cur_suspend_reason);
void Reply(::fidl::DecodedMessage<GetCurrentSuspendReasonResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetCurrentSuspendReasonCompleter = ::fidl::Completer<GetCurrentSuspendReasonCompleterBase>;
virtual void GetCurrentSuspendReason(GetCurrentSuspendReasonCompleter::Sync _completer) = 0;
class GetCurrentDevicePerformanceStateCompleterBase : public _Base {
public:
void Reply(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Result result);
void ReplySuccess(int32_t cur_state);
void ReplyError(int32_t error);
void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Result result);
void ReplySuccess(::fidl::BytePart _buffer, int32_t cur_state);
void Reply(::fidl::DecodedMessage<GetCurrentDevicePerformanceStateResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetCurrentDevicePerformanceStateCompleter = ::fidl::Completer<GetCurrentDevicePerformanceStateCompleterBase>;
virtual void GetCurrentDevicePerformanceState(GetCurrentDevicePerformanceStateCompleter::Sync _completer) = 0;
class GetCurrentDeviceAutoSuspendConfigCompleterBase : public _Base {
public:
void Reply(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Result result);
void ReplySuccess(bool enabled, ::llcpp::fuchsia::device::DevicePowerState deepest_sleep_state);
void ReplyError(int32_t error);
void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Result result);
void ReplySuccess(::fidl::BytePart _buffer, bool enabled, ::llcpp::fuchsia::device::DevicePowerState deepest_sleep_state);
void Reply(::fidl::DecodedMessage<GetCurrentDeviceAutoSuspendConfigResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetCurrentDeviceAutoSuspendConfigCompleter = ::fidl::Completer<GetCurrentDeviceAutoSuspendConfigCompleterBase>;
virtual void GetCurrentDeviceAutoSuspendConfig(GetCurrentDeviceAutoSuspendConfigCompleter::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 AddDeviceWithPowerArgsRequest(const ::fidl::DecodedMessage<TestDevice::AddDeviceWithPowerArgsRequest>& _msg);
static void AddDeviceWithPowerArgsResponse(const ::fidl::DecodedMessage<TestDevice::AddDeviceWithPowerArgsResponse>& _msg);
static void GetCurrentDevicePowerStateRequest(const ::fidl::DecodedMessage<TestDevice::GetCurrentDevicePowerStateRequest>& _msg);
static void GetCurrentDevicePowerStateResponse(const ::fidl::DecodedMessage<TestDevice::GetCurrentDevicePowerStateResponse>& _msg);
static void GetCurrentSuspendReasonRequest(const ::fidl::DecodedMessage<TestDevice::GetCurrentSuspendReasonRequest>& _msg);
static void GetCurrentSuspendReasonResponse(const ::fidl::DecodedMessage<TestDevice::GetCurrentSuspendReasonResponse>& _msg);
static void GetCurrentDevicePerformanceStateRequest(const ::fidl::DecodedMessage<TestDevice::GetCurrentDevicePerformanceStateRequest>& _msg);
static void GetCurrentDevicePerformanceStateResponse(const ::fidl::DecodedMessage<TestDevice::GetCurrentDevicePerformanceStateResponse>& _msg);
static void GetCurrentDeviceAutoSuspendConfigRequest(const ::fidl::DecodedMessage<TestDevice::GetCurrentDeviceAutoSuspendConfigRequest>& _msg);
static void GetCurrentDeviceAutoSuspendConfigResponse(const ::fidl::DecodedMessage<TestDevice::GetCurrentDeviceAutoSuspendConfigResponse>& _msg);
};
};
} // namespace test
} // namespace power
} // namespace device
} // namespace fuchsia
} // namespace llcpp
namespace fidl {
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response>);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response, cur_state) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response) == ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Response::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Result> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePowerState_Result>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response>);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response, enabled) == 0);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response, deepest_sleep_state) == 1);
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response) == ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Response::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Result> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDeviceAutoSuspendConfig_Result>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response>);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response, cur_suspend_reason) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response) == ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Response::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Result> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentSuspendReason_Result>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response>);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response, cur_state) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response) == ::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Response::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Result> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_GetCurrentDevicePerformanceState_Result>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response>);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response, __reserved) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response) == ::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Response::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Result> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::power::test::TestDevice_AddDeviceWithPowerArgs_Result>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest)
== ::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest, info) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest, perf_state_info) == 32);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsRequest, make_visible) == 48);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsResponse)
== ::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::AddDeviceWithPowerArgsResponse, result) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePowerStateResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePowerStateResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePowerStateResponse)
== ::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePowerStateResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePowerStateResponse, result) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentSuspendReasonResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentSuspendReasonResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentSuspendReasonResponse)
== ::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentSuspendReasonResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentSuspendReasonResponse, result) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePerformanceStateResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePerformanceStateResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePerformanceStateResponse)
== ::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePerformanceStateResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDevicePerformanceStateResponse, result) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDeviceAutoSuspendConfigResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDeviceAutoSuspendConfigResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDeviceAutoSuspendConfigResponse)
== ::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDeviceAutoSuspendConfigResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::power::test::TestDevice::GetCurrentDeviceAutoSuspendConfigResponse, result) == 16);
} // namespace fidl