blob: 19b1809ac7de1285c01db7f38a72222223f41933 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#pragma once
#include <lib/fidl/internal.h>
#include <lib/fidl/cpp/vector_view.h>
#include <lib/fidl/cpp/string_view.h>
#include <lib/fidl/llcpp/array.h>
#include <lib/fidl/llcpp/coding.h>
#include <lib/fidl/llcpp/sync_call.h>
#include <lib/fidl/llcpp/traits.h>
#include <lib/fidl/llcpp/transaction.h>
#include <lib/fit/function.h>
#include <lib/zx/channel.h>
#include <lib/zx/handle.h>
#include <lib/zx/vmo.h>
#include <zircon/fidl.h>
namespace llcpp {
namespace fuchsia {
namespace device {
namespace manager {
enum class SystemPowerState : uint8_t {
SYSTEM_POWER_STATE_REBOOT = 0u,
SYSTEM_POWER_STATE_REBOOT_BOOTLOADER = 1u,
SYSTEM_POWER_STATE_REBOOT_RECOVERY = 2u,
SYSTEM_POWER_STATE_REBOOT_POWEROFF = 3u,
SYSTEM_POWER_STATE_REBOOT_MEXEC = 4u,
SYSTEM_POWER_STATE_REBOOT_SUSPEND_RAM = 5u,
};
class DebugDumper;
class Administrator;
class DevhostController;
struct Coordinator_AddDevice_Response;
struct Coordinator_AddDevice_Result;
struct Coordinator_AddDeviceInvisible_Response;
struct Coordinator_AddDeviceInvisible_Result;
struct Coordinator_RunCompatibilityTests_Response;
struct Coordinator_RunCompatibilityTests_Result;
struct Coordinator_RemoveDevice_Response;
struct Coordinator_RemoveDevice_Result;
struct Coordinator_PublishMetadata_Response;
struct Coordinator_PublishMetadata_Result;
struct Coordinator_MakeVisible_Response;
struct Coordinator_MakeVisible_Result;
struct Coordinator_LoadFirmware_Response;
struct Coordinator_LoadFirmware_Result;
struct Coordinator_GetTopologicalPath_Response;
struct Coordinator_GetTopologicalPath_Result;
struct Coordinator_GetMetadata_Response;
struct Coordinator_GetMetadata_Result;
struct Coordinator_GetMetadataSize_Response;
struct Coordinator_GetMetadataSize_Result;
struct Coordinator_DirectoryWatch_Response;
struct Coordinator_DirectoryWatch_Result;
struct Coordinator_BindDevice_Response;
struct Coordinator_BindDevice_Result;
struct Coordinator_AddMetadata_Response;
struct Coordinator_AddMetadata_Result;
struct Coordinator_AddCompositeDevice_Response;
struct Coordinator_AddCompositeDevice_Result;
enum class CompatibilityTestStatus : uint32_t {
OK = 1u,
ERR_BIND_NO_DDKADD = 2u,
ERR_BIND_TIMEOUT = 3u,
ERR_UNBIND_NO_DDKREMOVE = 4u,
ERR_UNBIND_TIMEOUT = 5u,
ERR_SUSPEND_DDKREMOVE = 6u,
ERR_INTERNAL = 7u,
};
class DeviceController;
struct BindInstruction;
struct DeviceComponentPart;
struct DeviceComponent;
class AddDeviceConfig final {
public:
constexpr AddDeviceConfig() : value_(0u) {}
explicit constexpr AddDeviceConfig(uint32_t value) : value_(value) {}
const static AddDeviceConfig ALLOW_MULTI_COMPOSITE;
const static AddDeviceConfig mask;
explicit constexpr inline operator uint32_t() const { return value_; }
constexpr inline operator bool() const { return value_; }
constexpr inline AddDeviceConfig operator~() const;
constexpr inline AddDeviceConfig operator|(const AddDeviceConfig& other) const;
constexpr inline AddDeviceConfig operator&(const AddDeviceConfig& other) const;
constexpr inline AddDeviceConfig operator^(const AddDeviceConfig& other) const;
constexpr inline void operator|=(const AddDeviceConfig& other);
constexpr inline void operator&=(const AddDeviceConfig& other);
constexpr inline void operator^=(const AddDeviceConfig& other);
private:
uint32_t value_;
};
constexpr const ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::ALLOW_MULTI_COMPOSITE = ::llcpp::fuchsia::device::manager::AddDeviceConfig(1u);
constexpr const ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::mask = ::llcpp::fuchsia::device::manager::AddDeviceConfig(1u);
constexpr inline ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::operator~() const {
return ::llcpp::fuchsia::device::manager::AddDeviceConfig(static_cast<uint32_t>(~this->value_ & mask.value_));
}
constexpr inline ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::operator|(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) const {
return ::llcpp::fuchsia::device::manager::AddDeviceConfig(static_cast<uint32_t>(this->value_ | other.value_));
}
constexpr inline ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::operator&(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) const {
return ::llcpp::fuchsia::device::manager::AddDeviceConfig(static_cast<uint32_t>(this->value_ & other.value_));
}
constexpr inline ::llcpp::fuchsia::device::manager::AddDeviceConfig AddDeviceConfig::operator^(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) const {
return ::llcpp::fuchsia::device::manager::AddDeviceConfig(static_cast<uint32_t>(this->value_ ^ other.value_));
}
constexpr inline void AddDeviceConfig::operator|=(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) {
this->value_ |= other.value_;
}
constexpr inline void AddDeviceConfig::operator&=(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) {
this->value_ &= other.value_;
}
constexpr inline void AddDeviceConfig::operator^=(
const ::llcpp::fuchsia::device::manager::AddDeviceConfig& other) {
this->value_ ^= other.value_;
}
class Coordinator;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpTreeRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpTreeResponseTable;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpDriversRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpDriversResponseTable;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpBindingPropertiesRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DebugDumperDumpBindingPropertiesResponseTable;
// Dumps text debug information.
//
// All methods dump ascii text into a VMO, this allows the caller the flexibility to decide
// how much data they want. Use the returned `written` value to read the data, no string
// termination is guaranteed.
class DebugDumper final {
DebugDumper() = delete;
public:
static constexpr char Name[] = "fuchsia.device.manager.DebugDumper";
struct DumpTreeResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
int32_t status;
uint64_t written;
uint64_t available;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpTreeResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct DumpTreeRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::vmo output;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpTreeRequestTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = DumpTreeResponse;
};
struct DumpDriversResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
int32_t status;
uint64_t written;
uint64_t available;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpDriversResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct DumpDriversRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::vmo output;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpDriversRequestTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = DumpDriversResponse;
};
struct DumpBindingPropertiesResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
int32_t status;
uint64_t written;
uint64_t available;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpBindingPropertiesResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct DumpBindingPropertiesRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::vmo output;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DebugDumperDumpBindingPropertiesRequestTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = DumpBindingPropertiesResponse;
};
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
template <typename ResponseType>
class DumpTree_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
DumpTree_Impl(zx::unowned_channel _client_end, ::zx::vmo output);
~DumpTree_Impl() = default;
DumpTree_Impl(DumpTree_Impl&& other) = default;
DumpTree_Impl& operator=(DumpTree_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 DumpDrivers_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
DumpDrivers_Impl(zx::unowned_channel _client_end, ::zx::vmo output);
~DumpDrivers_Impl() = default;
DumpDrivers_Impl(DumpDrivers_Impl&& other) = default;
DumpDrivers_Impl& operator=(DumpDrivers_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 DumpBindingProperties_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
DumpBindingProperties_Impl(zx::unowned_channel _client_end, ::zx::vmo output);
~DumpBindingProperties_Impl() = default;
DumpBindingProperties_Impl(DumpBindingProperties_Impl&& other) = default;
DumpBindingProperties_Impl& operator=(DumpBindingProperties_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 DumpTree = DumpTree_Impl<DumpTreeResponse>;
using DumpDrivers = DumpDrivers_Impl<DumpDriversResponse>;
using DumpBindingProperties = DumpBindingProperties_Impl<DumpBindingPropertiesResponse>;
};
// 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 DumpTree_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
DumpTree_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
~DumpTree_Impl() = default;
DumpTree_Impl(DumpTree_Impl&& other) = default;
DumpTree_Impl& operator=(DumpTree_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 DumpDrivers_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
DumpDrivers_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
~DumpDrivers_Impl() = default;
DumpDrivers_Impl(DumpDrivers_Impl&& other) = default;
DumpDrivers_Impl& operator=(DumpDrivers_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 DumpBindingProperties_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
DumpBindingProperties_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
~DumpBindingProperties_Impl() = default;
DumpBindingProperties_Impl(DumpBindingProperties_Impl&& other) = default;
DumpBindingProperties_Impl& operator=(DumpBindingProperties_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 DumpTree = DumpTree_Impl<DumpTreeResponse>;
using DumpDrivers = DumpDrivers_Impl<DumpDriversResponse>;
using DumpBindingProperties = DumpBindingProperties_Impl<DumpBindingPropertiesResponse>;
};
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_; }
// Print device tree into `output`, returns bytes `written` and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::DumpTree DumpTree(::zx::vmo output);
// Print device tree into `output`, returns bytes `written` and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::DumpTree DumpTree(::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
// Print information about all drivers into `output`, returns bytes `written` and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::DumpDrivers DumpDrivers(::zx::vmo output);
// Print information about all drivers into `output`, returns bytes `written` and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::DumpDrivers DumpDrivers(::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
// Print all devices and their binding properties into `output`, returns bytes `written`
// and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::DumpBindingProperties DumpBindingProperties(::zx::vmo output);
// Print all devices and their binding properties into `output`, returns bytes `written`
// and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::DumpBindingProperties DumpBindingProperties(::fidl::BytePart _request_buffer, ::zx::vmo output, ::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:
// Print device tree into `output`, returns bytes `written` and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::DumpTree DumpTree(zx::unowned_channel _client_end, ::zx::vmo output);
// Print device tree into `output`, returns bytes `written` and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::DumpTree DumpTree(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
// Print information about all drivers into `output`, returns bytes `written` and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::DumpDrivers DumpDrivers(zx::unowned_channel _client_end, ::zx::vmo output);
// Print information about all drivers into `output`, returns bytes `written` and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::DumpDrivers DumpDrivers(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::fidl::BytePart _response_buffer);
// Print all devices and their binding properties into `output`, returns bytes `written`
// and bytes `available` to write.
// Allocates 64 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::DumpBindingProperties DumpBindingProperties(zx::unowned_channel _client_end, ::zx::vmo output);
// Print all devices and their binding properties into `output`, returns bytes `written`
// and bytes `available` to write.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::DumpBindingProperties DumpBindingProperties(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::vmo output, ::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:
// Print device tree into `output`, returns bytes `written` and bytes `available` to write.
static ::fidl::DecodeResult<DumpTreeResponse> DumpTree(zx::unowned_channel _client_end, ::fidl::DecodedMessage<DumpTreeRequest> params, ::fidl::BytePart response_buffer);
// Print information about all drivers into `output`, returns bytes `written` and bytes `available` to write.
static ::fidl::DecodeResult<DumpDriversResponse> DumpDrivers(zx::unowned_channel _client_end, ::fidl::DecodedMessage<DumpDriversRequest> params, ::fidl::BytePart response_buffer);
// Print all devices and their binding properties into `output`, returns bytes `written`
// and bytes `available` to write.
static ::fidl::DecodeResult<DumpBindingPropertiesResponse> DumpBindingProperties(zx::unowned_channel _client_end, ::fidl::DecodedMessage<DumpBindingPropertiesRequest> params, ::fidl::BytePart response_buffer);
};
// Pure-virtual interface to be implemented by a server.
class Interface {
public:
Interface() = default;
virtual ~Interface() = default;
using _Outer = DebugDumper;
using _Base = ::fidl::CompleterBase;
class DumpTreeCompleterBase : public _Base {
public:
void Reply(int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::BytePart _buffer, int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::DecodedMessage<DumpTreeResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using DumpTreeCompleter = ::fidl::Completer<DumpTreeCompleterBase>;
virtual void DumpTree(::zx::vmo output, DumpTreeCompleter::Sync _completer) = 0;
class DumpDriversCompleterBase : public _Base {
public:
void Reply(int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::BytePart _buffer, int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::DecodedMessage<DumpDriversResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using DumpDriversCompleter = ::fidl::Completer<DumpDriversCompleterBase>;
virtual void DumpDrivers(::zx::vmo output, DumpDriversCompleter::Sync _completer) = 0;
class DumpBindingPropertiesCompleterBase : public _Base {
public:
void Reply(int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::BytePart _buffer, int32_t status, uint64_t written, uint64_t available);
void Reply(::fidl::DecodedMessage<DumpBindingPropertiesResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using DumpBindingPropertiesCompleter = ::fidl::Completer<DumpBindingPropertiesCompleterBase>;
virtual void DumpBindingProperties(::zx::vmo output, DumpBindingPropertiesCompleter::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);
}
};
extern "C" const fidl_type_t fuchsia_device_manager_AdministratorSuspendRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_AdministratorSuspendResponseTable;
// Provides administration services for the device manager service and the device tree it controls.
class Administrator final {
Administrator() = delete;
public:
static constexpr char Name[] = "fuchsia.device.manager.Administrator";
struct SuspendResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
int32_t status;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_AdministratorSuspendResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct SuspendRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint32_t flags;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_AdministratorSuspendRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = SuspendResponse;
};
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
template <typename ResponseType>
class Suspend_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Suspend_Impl(zx::unowned_channel _client_end, uint32_t flags);
~Suspend_Impl() = default;
Suspend_Impl(Suspend_Impl&& other) = default;
Suspend_Impl& operator=(Suspend_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 Suspend = Suspend_Impl<SuspendResponse>;
};
// 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 Suspend_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Suspend_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint32_t flags, ::fidl::BytePart _response_buffer);
~Suspend_Impl() = default;
Suspend_Impl(Suspend_Impl&& other) = default;
Suspend_Impl& operator=(Suspend_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 Suspend = Suspend_Impl<SuspendResponse>;
};
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_; }
// Ask all devices to enter the suspend state indicated by `flags`. Flags should be some
// combination of `DEVICE_SUSPEND_FLAG_*` from the DDK.
// Allocates 48 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::Suspend Suspend(uint32_t flags);
// Ask all devices to enter the suspend state indicated by `flags`. Flags should be some
// combination of `DEVICE_SUSPEND_FLAG_*` from the DDK.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Suspend Suspend(::fidl::BytePart _request_buffer, uint32_t flags, ::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:
// Ask all devices to enter the suspend state indicated by `flags`. Flags should be some
// combination of `DEVICE_SUSPEND_FLAG_*` from the DDK.
// Allocates 48 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::Suspend Suspend(zx::unowned_channel _client_end, uint32_t flags);
// Ask all devices to enter the suspend state indicated by `flags`. Flags should be some
// combination of `DEVICE_SUSPEND_FLAG_*` from the DDK.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Suspend Suspend(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint32_t flags, ::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:
// Ask all devices to enter the suspend state indicated by `flags`. Flags should be some
// combination of `DEVICE_SUSPEND_FLAG_*` from the DDK.
static ::fidl::DecodeResult<SuspendResponse> Suspend(zx::unowned_channel _client_end, ::fidl::DecodedMessage<SuspendRequest> params, ::fidl::BytePart response_buffer);
};
// Pure-virtual interface to be implemented by a server.
class Interface {
public:
Interface() = default;
virtual ~Interface() = default;
using _Outer = Administrator;
using _Base = ::fidl::CompleterBase;
class SuspendCompleterBase : public _Base {
public:
void Reply(int32_t status);
void Reply(::fidl::BytePart _buffer, int32_t status);
void Reply(::fidl::DecodedMessage<SuspendResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using SuspendCompleter = ::fidl::Completer<SuspendCompleterBase>;
virtual void Suspend(uint32_t flags, SuspendCompleter::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);
}
};
constexpr uint32_t SUSPEND_FLAG_SUSPEND_RAM = 3705406464u;
constexpr uint32_t SUSPEND_FLAG_REBOOT_RECOVERY = 3705405698u;
constexpr uint32_t SUSPEND_FLAG_REBOOT_BOOTLOADER = 3705405697u;
// All available flags currently treated as system power states.
constexpr uint32_t SUSPEND_FLAG_REBOOT = 3705405696u;
constexpr uint32_t SUSPEND_FLAG_POWEROFF = 3705405952u;
constexpr uint32_t SUSPEND_FLAG_MEXEC = 3705406208u;
// Maximum number of properties that can be attached to a device
constexpr uint32_t PROPERTIES_MAX = 256u;
// Maximum number of bytes in a metadata payload
constexpr uint32_t METADATA_MAX = 8192u;
constexpr uint32_t MAX_SYSTEM_POWER_STATES = 6u;
extern "C" const fidl_type_t fuchsia_device_manager_DevhostControllerCreateDeviceStubRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DevhostControllerCreateDeviceRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DevhostControllerCreateCompositeDeviceRequestTable;
extern "C" const fidl_type_t fuchsia_device_manager_DevhostControllerCreateCompositeDeviceResponseTable;
// Protocol for controlling a devhost process from the devcoordinator
class DevhostController final {
DevhostController() = delete;
public:
struct CreateDeviceStubRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::channel rpc;
uint32_t protocol_id;
uint64_t local_device_id;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DevhostControllerCreateDeviceStubRequestTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct CreateDeviceRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::channel rpc;
::fidl::StringView driver_path;
::zx::vmo driver;
::zx::handle parent_proxy;
::fidl::StringView proxy_args;
uint64_t local_device_id;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DevhostControllerCreateDeviceRequestTable;
static constexpr uint32_t MaxNumHandles = 3;
static constexpr uint32_t PrimarySize = 72;
static constexpr uint32_t MaxOutOfLine = 2048;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct CreateCompositeDeviceResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
int32_t status;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DevhostControllerCreateCompositeDeviceResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct CreateCompositeDeviceRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::zx::channel rpc;
::fidl::VectorView<uint64_t> components;
::fidl::StringView name;
uint64_t local_device_id;
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_DevhostControllerCreateCompositeDeviceRequestTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 64;
static constexpr uint32_t MaxOutOfLine = 96;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = CreateCompositeDeviceResponse;
};
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
class CreateDeviceStub_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
CreateDeviceStub_Impl(zx::unowned_channel _client_end, ::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
~CreateDeviceStub_Impl() = default;
CreateDeviceStub_Impl(CreateDeviceStub_Impl&& other) = default;
CreateDeviceStub_Impl& operator=(CreateDeviceStub_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class CreateDevice_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
CreateDevice_Impl(zx::unowned_channel _client_end, ::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
~CreateDevice_Impl() = default;
CreateDevice_Impl(CreateDevice_Impl&& other) = default;
CreateDevice_Impl& operator=(CreateDevice_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
template <typename ResponseType>
class CreateCompositeDevice_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
CreateCompositeDevice_Impl(zx::unowned_channel _client_end, ::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id);
~CreateCompositeDevice_Impl() = default;
CreateCompositeDevice_Impl(CreateCompositeDevice_Impl&& other) = default;
CreateCompositeDevice_Impl& operator=(CreateCompositeDevice_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 CreateDeviceStub = CreateDeviceStub_Impl;
using CreateDevice = CreateDevice_Impl;
using CreateCompositeDevice = CreateCompositeDevice_Impl<CreateCompositeDeviceResponse>;
};
// 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:
class CreateDeviceStub_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
CreateDeviceStub_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
~CreateDeviceStub_Impl() = default;
CreateDeviceStub_Impl(CreateDeviceStub_Impl&& other) = default;
CreateDeviceStub_Impl& operator=(CreateDeviceStub_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class CreateDevice_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
CreateDevice_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
~CreateDevice_Impl() = default;
CreateDevice_Impl(CreateDevice_Impl&& other) = default;
CreateDevice_Impl& operator=(CreateDevice_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
template <typename ResponseType>
class CreateCompositeDevice_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
CreateCompositeDevice_Impl(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id, ::fidl::BytePart _response_buffer);
~CreateCompositeDevice_Impl() = default;
CreateCompositeDevice_Impl(CreateCompositeDevice_Impl&& other) = default;
CreateCompositeDevice_Impl& operator=(CreateCompositeDevice_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 CreateDeviceStub = CreateDeviceStub_Impl;
using CreateDevice = CreateDevice_Impl;
using CreateCompositeDevice = CreateCompositeDevice_Impl<CreateCompositeDeviceResponse>;
};
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_; }
// Create a device in the devhost that only implements the device protocol
// and claims to support the given `protocol_id`. This device will communicate
// with the devcoordinator via `rpc`.
// Allocates 32 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::CreateDeviceStub CreateDeviceStub(::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
// Create a device in the devhost that only implements the device protocol
// and claims to support the given `protocol_id`. This device will communicate
// with the devcoordinator via `rpc`.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::CreateDeviceStub CreateDeviceStub(::fidl::BytePart _request_buffer, ::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
// Create a device in the devhost representing the shadowed half of device
// in another devhost. This new device will communicate with the devcoordinator
// via `rpc`, and with its other half via `parent_proxy`.
//
// The new device will have the given driver responsible for running its half
// of the driver's cross-process protocol. It's create() method will be invoked,
// giving it access to `parent_proxy` and `proxy_args`.
//
// parent_proxy, if present, will usually be a channel to the upper half of
// a shadowed device. The one exception is when this method is used
// to create the Platform Bus, in which case it will be a channel to a
// fuchsia.boot.Items protocol.
//
// `local_device_id` will be a unique value within the device's devhost
// Request is heap-allocated.
ResultOf::CreateDevice CreateDevice(::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
// Create a device in the devhost representing the shadowed half of device
// in another devhost. This new device will communicate with the devcoordinator
// via `rpc`, and with its other half via `parent_proxy`.
//
// The new device will have the given driver responsible for running its half
// of the driver's cross-process protocol. It's create() method will be invoked,
// giving it access to `parent_proxy` and `proxy_args`.
//
// parent_proxy, if present, will usually be a channel to the upper half of
// a shadowed device. The one exception is when this method is used
// to create the Platform Bus, in which case it will be a channel to a
// fuchsia.boot.Items protocol.
//
// `local_device_id` will be a unique value within the device's devhost
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::CreateDevice CreateDevice(::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
// Introduce a composite device that has the given name and properties.
// `components` will be a list of all of the composite's components,
// described using devhost local device ids. The order of the components
// will match the original composite creation request. The new device will
// communicate with devcoordinator via `rpc`.
//
// `local_device_id` will be a unique value within the device's devhost, identifying
// the resulting composite device.
// Allocates 184 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::CreateCompositeDevice CreateCompositeDevice(::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id);
// Introduce a composite device that has the given name and properties.
// `components` will be a list of all of the composite's components,
// described using devhost local device ids. The order of the components
// will match the original composite creation request. The new device will
// communicate with devcoordinator via `rpc`.
//
// `local_device_id` will be a unique value within the device's devhost, identifying
// the resulting composite device.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::CreateCompositeDevice CreateCompositeDevice(::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id, ::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:
// Create a device in the devhost that only implements the device protocol
// and claims to support the given `protocol_id`. This device will communicate
// with the devcoordinator via `rpc`.
// Allocates 32 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::CreateDeviceStub CreateDeviceStub(zx::unowned_channel _client_end, ::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
// Create a device in the devhost that only implements the device protocol
// and claims to support the given `protocol_id`. This device will communicate
// with the devcoordinator via `rpc`.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::CreateDeviceStub CreateDeviceStub(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id);
// Create a device in the devhost representing the shadowed half of device
// in another devhost. This new device will communicate with the devcoordinator
// via `rpc`, and with its other half via `parent_proxy`.
//
// The new device will have the given driver responsible for running its half
// of the driver's cross-process protocol. It's create() method will be invoked,
// giving it access to `parent_proxy` and `proxy_args`.
//
// parent_proxy, if present, will usually be a channel to the upper half of
// a shadowed device. The one exception is when this method is used
// to create the Platform Bus, in which case it will be a channel to a
// fuchsia.boot.Items protocol.
//
// `local_device_id` will be a unique value within the device's devhost
// Request is heap-allocated.
static ResultOf::CreateDevice CreateDevice(zx::unowned_channel _client_end, ::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
// Create a device in the devhost representing the shadowed half of device
// in another devhost. This new device will communicate with the devcoordinator
// via `rpc`, and with its other half via `parent_proxy`.
//
// The new device will have the given driver responsible for running its half
// of the driver's cross-process protocol. It's create() method will be invoked,
// giving it access to `parent_proxy` and `proxy_args`.
//
// parent_proxy, if present, will usually be a channel to the upper half of
// a shadowed device. The one exception is when this method is used
// to create the Platform Bus, in which case it will be a channel to a
// fuchsia.boot.Items protocol.
//
// `local_device_id` will be a unique value within the device's devhost
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::CreateDevice CreateDevice(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id);
// Introduce a composite device that has the given name and properties.
// `components` will be a list of all of the composite's components,
// described using devhost local device ids. The order of the components
// will match the original composite creation request. The new device will
// communicate with devcoordinator via `rpc`.
//
// `local_device_id` will be a unique value within the device's devhost, identifying
// the resulting composite device.
// Allocates 184 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::CreateCompositeDevice CreateCompositeDevice(zx::unowned_channel _client_end, ::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id);
// Introduce a composite device that has the given name and properties.
// `components` will be a list of all of the composite's components,
// described using devhost local device ids. The order of the components
// will match the original composite creation request. The new device will
// communicate with devcoordinator via `rpc`.
//
// `local_device_id` will be a unique value within the device's devhost, identifying
// the resulting composite device.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::CreateCompositeDevice CreateCompositeDevice(zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id, ::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:
// Create a device in the devhost that only implements the device protocol
// and claims to support the given `protocol_id`. This device will communicate
// with the devcoordinator via `rpc`.
static ::fidl::internal::StatusAndError CreateDeviceStub(zx::unowned_channel _client_end, ::fidl::DecodedMessage<CreateDeviceStubRequest> params);
// Create a device in the devhost representing the shadowed half of device
// in another devhost. This new device will communicate with the devcoordinator
// via `rpc`, and with its other half via `parent_proxy`.
//
// The new device will have the given driver responsible for running its half
// of the driver's cross-process protocol. It's create() method will be invoked,
// giving it access to `parent_proxy` and `proxy_args`.
//
// parent_proxy, if present, will usually be a channel to the upper half of
// a shadowed device. The one exception is when this method is used
// to create the Platform Bus, in which case it will be a channel to a
// fuchsia.boot.Items protocol.
//
// `local_device_id` will be a unique value within the device's devhost
static ::fidl::internal::StatusAndError CreateDevice(zx::unowned_channel _client_end, ::fidl::DecodedMessage<CreateDeviceRequest> params);
// Introduce a composite device that has the given name and properties.
// `components` will be a list of all of the composite's components,
// described using devhost local device ids. The order of the components
// will match the original composite creation request. The new device will
// communicate with devcoordinator via `rpc`.
//
// `local_device_id` will be a unique value within the device's devhost, identifying
// the resulting composite device.
static ::fidl::DecodeResult<CreateCompositeDeviceResponse> CreateCompositeDevice(zx::unowned_channel _client_end, ::fidl::DecodedMessage<CreateCompositeDeviceRequest> params, ::fidl::BytePart response_buffer);
};
// Pure-virtual interface to be implemented by a server.
class Interface {
public:
Interface() = default;
virtual ~Interface() = default;
using _Outer = DevhostController;
using _Base = ::fidl::CompleterBase;
using CreateDeviceStubCompleter = ::fidl::Completer<>;
virtual void CreateDeviceStub(::zx::channel rpc, uint32_t protocol_id, uint64_t local_device_id, CreateDeviceStubCompleter::Sync _completer) = 0;
using CreateDeviceCompleter = ::fidl::Completer<>;
virtual void CreateDevice(::zx::channel rpc, ::fidl::StringView driver_path, ::zx::vmo driver, ::zx::handle parent_proxy, ::fidl::StringView proxy_args, uint64_t local_device_id, CreateDeviceCompleter::Sync _completer) = 0;
class CreateCompositeDeviceCompleterBase : public _Base {
public:
void Reply(int32_t status);
void Reply(::fidl::BytePart _buffer, int32_t status);
void Reply(::fidl::DecodedMessage<CreateCompositeDeviceResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using CreateCompositeDeviceCompleter = ::fidl::Completer<CreateCompositeDeviceCompleterBase>;
virtual void CreateCompositeDevice(::zx::channel rpc, ::fidl::VectorView<uint64_t> components, ::fidl::StringView name, uint64_t local_device_id, CreateCompositeDeviceCompleter::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);
}
};
struct Coordinator_AddDevice_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint64_t local_device_id = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_AddDevice_ResultTable;
struct Coordinator_AddDevice_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_AddDevice_Result();
~Coordinator_AddDevice_Result();
Coordinator_AddDevice_Result(Coordinator_AddDevice_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_AddDevice_Result& operator=(Coordinator_AddDevice_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_AddDevice_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddDevice_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddDevice_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_AddDevice_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_AddDevice_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_AddDevice_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_AddDevice_Response response_;
int32_t err_;
};
};
struct Coordinator_AddDeviceInvisible_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint64_t local_device_id = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_AddDeviceInvisible_ResultTable;
struct Coordinator_AddDeviceInvisible_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_AddDeviceInvisible_Result();
~Coordinator_AddDeviceInvisible_Result();
Coordinator_AddDeviceInvisible_Result(Coordinator_AddDeviceInvisible_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_AddDeviceInvisible_Result& operator=(Coordinator_AddDeviceInvisible_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_AddDeviceInvisible_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddDeviceInvisible_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddDeviceInvisible_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_AddDeviceInvisible_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_AddDeviceInvisible_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_AddDeviceInvisible_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_AddDeviceInvisible_Response response_;
int32_t err_;
};
};
// Maximum number of bytes in a path
constexpr uint32_t DEVICE_PATH_MAX = 1024u;
// This definition must match `ZX_DEVICE_NAME_MAX` and is checked by a static assert.
constexpr uint32_t DEVICE_NAME_MAX = 31u;
// Maximum instructions in a match program
constexpr uint32_t DEVICE_COMPONENT_PART_INSTRUCTIONS_MAX = 32u;
// Maximum number of parts that a composite device component can have
constexpr uint32_t DEVICE_COMPONENT_PARTS_MAX = 16u;
// Maximum number of bytes in a device arguments string.
constexpr uint32_t DEVICE_ARGS_MAX = 1024u;
struct Coordinator_RunCompatibilityTests_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_RunCompatibilityTests_ResultTable;
struct Coordinator_RunCompatibilityTests_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_RunCompatibilityTests_Result();
~Coordinator_RunCompatibilityTests_Result();
Coordinator_RunCompatibilityTests_Result(Coordinator_RunCompatibilityTests_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_RunCompatibilityTests_Result& operator=(Coordinator_RunCompatibilityTests_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_RunCompatibilityTests_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_RunCompatibilityTests_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_RunCompatibilityTests_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_RunCompatibilityTests_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_RunCompatibilityTests_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_RunCompatibilityTests_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_RunCompatibilityTests_Response response_;
int32_t err_;
};
};
struct Coordinator_RemoveDevice_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_RemoveDevice_ResultTable;
struct Coordinator_RemoveDevice_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_RemoveDevice_Result();
~Coordinator_RemoveDevice_Result();
Coordinator_RemoveDevice_Result(Coordinator_RemoveDevice_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_RemoveDevice_Result& operator=(Coordinator_RemoveDevice_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_RemoveDevice_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_RemoveDevice_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_RemoveDevice_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_RemoveDevice_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_RemoveDevice_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_RemoveDevice_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_RemoveDevice_Response response_;
int32_t err_;
};
};
struct Coordinator_PublishMetadata_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_PublishMetadata_ResultTable;
struct Coordinator_PublishMetadata_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_PublishMetadata_Result();
~Coordinator_PublishMetadata_Result();
Coordinator_PublishMetadata_Result(Coordinator_PublishMetadata_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_PublishMetadata_Result& operator=(Coordinator_PublishMetadata_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_PublishMetadata_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_PublishMetadata_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_PublishMetadata_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_PublishMetadata_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_PublishMetadata_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_PublishMetadata_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_PublishMetadata_Response response_;
int32_t err_;
};
};
struct Coordinator_MakeVisible_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_MakeVisible_ResultTable;
struct Coordinator_MakeVisible_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_MakeVisible_Result();
~Coordinator_MakeVisible_Result();
Coordinator_MakeVisible_Result(Coordinator_MakeVisible_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_MakeVisible_Result& operator=(Coordinator_MakeVisible_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_MakeVisible_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_MakeVisible_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_MakeVisible_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_MakeVisible_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_MakeVisible_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_MakeVisible_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_MakeVisible_Response response_;
int32_t err_;
};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_LoadFirmware_ResponseTable;
struct Coordinator_LoadFirmware_Response {
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_LoadFirmware_ResponseTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
::zx::vmo vmo = {};
uint64_t size = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_LoadFirmware_ResultTable;
struct Coordinator_LoadFirmware_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_LoadFirmware_Result();
~Coordinator_LoadFirmware_Result();
Coordinator_LoadFirmware_Result(Coordinator_LoadFirmware_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_LoadFirmware_Result& operator=(Coordinator_LoadFirmware_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_LoadFirmware_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_LoadFirmware_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_LoadFirmware_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_LoadFirmware_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_LoadFirmware_ResultTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 24;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_LoadFirmware_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_LoadFirmware_Response response_;
int32_t err_;
};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_GetTopologicalPath_ResponseTable;
struct Coordinator_GetTopologicalPath_Response {
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_GetTopologicalPath_ResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 1024;
::fidl::StringView path = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_GetTopologicalPath_ResultTable;
struct Coordinator_GetTopologicalPath_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_GetTopologicalPath_Result();
~Coordinator_GetTopologicalPath_Result();
Coordinator_GetTopologicalPath_Result(Coordinator_GetTopologicalPath_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_GetTopologicalPath_Result& operator=(Coordinator_GetTopologicalPath_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_GetTopologicalPath_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetTopologicalPath_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetTopologicalPath_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_GetTopologicalPath_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_GetTopologicalPath_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 1024;
private:
void Destroy();
void MoveImpl_(Coordinator_GetTopologicalPath_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_GetTopologicalPath_Response response_;
int32_t err_;
};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_GetMetadata_ResponseTable;
struct Coordinator_GetMetadata_Response {
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_GetMetadata_ResponseTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 8192;
::fidl::VectorView<uint8_t> data = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_GetMetadata_ResultTable;
struct Coordinator_GetMetadata_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_GetMetadata_Result();
~Coordinator_GetMetadata_Result();
Coordinator_GetMetadata_Result(Coordinator_GetMetadata_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_GetMetadata_Result& operator=(Coordinator_GetMetadata_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_GetMetadata_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetMetadata_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetMetadata_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_GetMetadata_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_GetMetadata_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 8192;
private:
void Destroy();
void MoveImpl_(Coordinator_GetMetadata_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_GetMetadata_Response response_;
int32_t err_;
};
};
struct Coordinator_GetMetadataSize_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint64_t size = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_GetMetadataSize_ResultTable;
struct Coordinator_GetMetadataSize_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_GetMetadataSize_Result();
~Coordinator_GetMetadataSize_Result();
Coordinator_GetMetadataSize_Result(Coordinator_GetMetadataSize_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_GetMetadataSize_Result& operator=(Coordinator_GetMetadataSize_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_GetMetadataSize_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetMetadataSize_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_GetMetadataSize_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_GetMetadataSize_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_GetMetadataSize_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 16;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_GetMetadataSize_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_GetMetadataSize_Response response_;
int32_t err_;
};
};
struct Coordinator_DirectoryWatch_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_DirectoryWatch_ResultTable;
struct Coordinator_DirectoryWatch_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_DirectoryWatch_Result();
~Coordinator_DirectoryWatch_Result();
Coordinator_DirectoryWatch_Result(Coordinator_DirectoryWatch_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_DirectoryWatch_Result& operator=(Coordinator_DirectoryWatch_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_DirectoryWatch_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_DirectoryWatch_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_DirectoryWatch_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_DirectoryWatch_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_DirectoryWatch_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_DirectoryWatch_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_DirectoryWatch_Response response_;
int32_t err_;
};
};
struct Coordinator_BindDevice_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_BindDevice_ResultTable;
struct Coordinator_BindDevice_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_BindDevice_Result();
~Coordinator_BindDevice_Result();
Coordinator_BindDevice_Result(Coordinator_BindDevice_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_BindDevice_Result& operator=(Coordinator_BindDevice_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_BindDevice_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_BindDevice_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_BindDevice_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_BindDevice_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag which() const { return tag_; }
static constexpr const fidl_type_t* Type = &fuchsia_device_manager_Coordinator_BindDevice_ResultTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
private:
void Destroy();
void MoveImpl_(Coordinator_BindDevice_Result&& other);
static void SizeAndOffsetAssertionHelper();
Tag tag_;
union {
Coordinator_BindDevice_Response response_;
int32_t err_;
};
};
struct Coordinator_AddMetadata_Response {
static constexpr const fidl_type_t* Type = nullptr;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 1;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
uint8_t __reserved = {};
};
extern "C" const fidl_type_t fuchsia_device_manager_Coordinator_AddMetadata_ResultTable;
struct Coordinator_AddMetadata_Result {
enum class Tag : fidl_union_tag_t {
kResponse = 0,
kErr = 1,
Invalid = ::std::numeric_limits<::fidl_union_tag_t>::max(),
};
Coordinator_AddMetadata_Result();
~Coordinator_AddMetadata_Result();
Coordinator_AddMetadata_Result(Coordinator_AddMetadata_Result&& other) {
tag_ = Tag::Invalid;
if (this != &other) {
MoveImpl_(std::move(other));
}
}
Coordinator_AddMetadata_Result& operator=(Coordinator_AddMetadata_Result&& other) {
if (this != &other) {
MoveImpl_(std::move(other));
}
return *this;
}
bool has_invalid_tag() const { return tag_ == Tag::Invalid; }
bool is_response() const { return tag_ == Tag::kResponse; }
Coordinator_AddMetadata_Response& mutable_response();
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddMetadata_Response>::value && std::is_copy_assignable<T>::value>
set_response(const T& v) {
mutable_response() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, Coordinator_AddMetadata_Response>::value && std::is_move_assignable<T>::value>
set_response(T&& v) {
mutable_response() = std::move(v);
}
Coordinator_AddMetadata_Response const & response() const { return response_; }
bool is_err() const { return tag_ == Tag::kErr; }
int32_t& mutable_err();
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_copy_assignable<T>::value>
set_err(const T& v) {
mutable_err() = v;
}
template <typename T>
std::enable_if_t<std::is_convertible<T, int32_t>::value && std::is_move_assignable<T>::value>
set_err(T&& v) {
mutable_err() = std::move(v);
}
int32_t const & err() const { return err_; }
Tag