blob: 70ab31b873f2e0e3af05aa7276a2390cf5a5d874 [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>
namespace llcpp {
namespace fuchsia {
namespace device {
namespace mock {
struct AddDeviceAction;
struct HookInvocation;
struct UnbindReplyAction;
struct SuspendReplyAction;
struct Action;
class MockDeviceThread;
class MockDevice;
extern "C" const fidl_type_t v1_fuchsia_device_mock_ActionTable;
// What a hook should do.
struct Action {
Action() : ordinal_(Ordinal::Invalid), envelope_{} {}
enum class Tag : fidl_xunion_tag_t {
kReturnStatus = 1, // 0x1
kWrite = 2, // 0x2
kCreateThread = 3, // 0x3
kAsyncRemoveDevice = 4, // 0x4
kUnbindReply = 5, // 0x5
kAddDevice = 6, // 0x6
kSuspendReply = 7, // 0x7
};
bool has_invalid_tag() const { return ordinal_ == Ordinal::Invalid; }
bool is_return_status() const { return ordinal() == Ordinal::kReturnStatus; }
static Action WithReturnStatus(int32_t* val) {
Action result;
result.set_return_status(val);
return result;
}
// Return this status.
void set_return_status(int32_t* elem) {
ordinal_ = Ordinal::kReturnStatus;
envelope_.data = static_cast<void*>(elem);
}
// Return this status.
int32_t& mutable_return_status() {
ZX_ASSERT(ordinal() == Ordinal::kReturnStatus);
return *static_cast<int32_t*>(envelope_.data);
}
const int32_t& return_status() const {
ZX_ASSERT(ordinal() == Ordinal::kReturnStatus);
return *static_cast<int32_t*>(envelope_.data);
}
bool is_write() const { return ordinal() == Ordinal::kWrite; }
static Action WithWrite(::fidl::VectorView<uint8_t>* val) {
Action result;
result.set_write(val);
return result;
}
// Write these bytes to the buffer associated with the hook.
void set_write(::fidl::VectorView<uint8_t>* elem) {
ordinal_ = Ordinal::kWrite;
envelope_.data = static_cast<void*>(elem);
}
// Write these bytes to the buffer associated with the hook.
::fidl::VectorView<uint8_t>& mutable_write() {
ZX_ASSERT(ordinal() == Ordinal::kWrite);
return *static_cast<::fidl::VectorView<uint8_t>*>(envelope_.data);
}
const ::fidl::VectorView<uint8_t>& write() const {
ZX_ASSERT(ordinal() == Ordinal::kWrite);
return *static_cast<::fidl::VectorView<uint8_t>*>(envelope_.data);
}
bool is_create_thread() const { return ordinal() == Ordinal::kCreateThread; }
static Action WithCreateThread(::zx::channel* val) {
Action result;
result.set_create_thread(val);
return result;
}
// Create a new thread with a processing loop.
void set_create_thread(::zx::channel* elem) {
ordinal_ = Ordinal::kCreateThread;
envelope_.data = static_cast<void*>(elem);
}
// Create a new thread with a processing loop.
::zx::channel& mutable_create_thread() {
ZX_ASSERT(ordinal() == Ordinal::kCreateThread);
return *static_cast<::zx::channel*>(envelope_.data);
}
const ::zx::channel& create_thread() const {
ZX_ASSERT(ordinal() == Ordinal::kCreateThread);
return *static_cast<::zx::channel*>(envelope_.data);
}
bool is_async_remove_device() const { return ordinal() == Ordinal::kAsyncRemoveDevice; }
static Action WithAsyncRemoveDevice(bool* val) {
Action result;
result.set_async_remove_device(val);
return result;
}
// Invoke device_async_remove() on our device.
void set_async_remove_device(bool* elem) {
ordinal_ = Ordinal::kAsyncRemoveDevice;
envelope_.data = static_cast<void*>(elem);
}
// Invoke device_async_remove() on our device.
bool& mutable_async_remove_device() {
ZX_ASSERT(ordinal() == Ordinal::kAsyncRemoveDevice);
return *static_cast<bool*>(envelope_.data);
}
const bool& async_remove_device() const {
ZX_ASSERT(ordinal() == Ordinal::kAsyncRemoveDevice);
return *static_cast<bool*>(envelope_.data);
}
bool is_unbind_reply() const { return ordinal() == Ordinal::kUnbindReply; }
static Action WithUnbindReply(::llcpp::fuchsia::device::mock::UnbindReplyAction* val) {
Action result;
result.set_unbind_reply(val);
return result;
}
// Signal that the unbind has completed.
void set_unbind_reply(::llcpp::fuchsia::device::mock::UnbindReplyAction* elem) {
ordinal_ = Ordinal::kUnbindReply;
envelope_.data = static_cast<void*>(elem);
}
// Signal that the unbind has completed.
::llcpp::fuchsia::device::mock::UnbindReplyAction& mutable_unbind_reply() {
ZX_ASSERT(ordinal() == Ordinal::kUnbindReply);
return *static_cast<::llcpp::fuchsia::device::mock::UnbindReplyAction*>(envelope_.data);
}
const ::llcpp::fuchsia::device::mock::UnbindReplyAction& unbind_reply() const {
ZX_ASSERT(ordinal() == Ordinal::kUnbindReply);
return *static_cast<::llcpp::fuchsia::device::mock::UnbindReplyAction*>(envelope_.data);
}
bool is_add_device() const { return ordinal() == Ordinal::kAddDevice; }
static Action WithAddDevice(::llcpp::fuchsia::device::mock::AddDeviceAction* val) {
Action result;
result.set_add_device(val);
return result;
}
// Create a new child device
void set_add_device(::llcpp::fuchsia::device::mock::AddDeviceAction* elem) {
ordinal_ = Ordinal::kAddDevice;
envelope_.data = static_cast<void*>(elem);
}
// Create a new child device
::llcpp::fuchsia::device::mock::AddDeviceAction& mutable_add_device() {
ZX_ASSERT(ordinal() == Ordinal::kAddDevice);
return *static_cast<::llcpp::fuchsia::device::mock::AddDeviceAction*>(envelope_.data);
}
const ::llcpp::fuchsia::device::mock::AddDeviceAction& add_device() const {
ZX_ASSERT(ordinal() == Ordinal::kAddDevice);
return *static_cast<::llcpp::fuchsia::device::mock::AddDeviceAction*>(envelope_.data);
}
bool is_suspend_reply() const { return ordinal() == Ordinal::kSuspendReply; }
static Action WithSuspendReply(::llcpp::fuchsia::device::mock::SuspendReplyAction* val) {
Action result;
result.set_suspend_reply(val);
return result;
}
// Signal that the suspend has completed.
void set_suspend_reply(::llcpp::fuchsia::device::mock::SuspendReplyAction* elem) {
ordinal_ = Ordinal::kSuspendReply;
envelope_.data = static_cast<void*>(elem);
}
// Signal that the suspend has completed.
::llcpp::fuchsia::device::mock::SuspendReplyAction& mutable_suspend_reply() {
ZX_ASSERT(ordinal() == Ordinal::kSuspendReply);
return *static_cast<::llcpp::fuchsia::device::mock::SuspendReplyAction*>(envelope_.data);
}
const ::llcpp::fuchsia::device::mock::SuspendReplyAction& suspend_reply() const {
ZX_ASSERT(ordinal() == Ordinal::kSuspendReply);
return *static_cast<::llcpp::fuchsia::device::mock::SuspendReplyAction*>(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_mock_ActionTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 24;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 16400;
static constexpr bool HasPointer = true;
private:
enum class Ordinal : fidl_xunion_tag_t {
Invalid = 0,
kReturnStatus = 1, // 0x1
kWrite = 2, // 0x2
kCreateThread = 3, // 0x3
kAsyncRemoveDevice = 4, // 0x4
kUnbindReply = 5, // 0x5
kAddDevice = 6, // 0x6
kSuspendReply = 7, // 0x7
};
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_mock_AddDeviceActionTable;
// Request to add a new child device
struct AddDeviceAction {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_AddDeviceActionTable;
static constexpr uint32_t MaxNumHandles = 1;
static constexpr uint32_t PrimarySize = 56;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 288;
static constexpr bool HasPointer = true;
// Value that will be echoed back in the completion message
uint64_t action_id = {};
// If true, will let the device go through the bind protocol.
// Otherwise, will just create another mock device and skip binding.
bool do_bind = {};
// If creating a mock device, the service the new device will listen to.
::zx::channel controller = {};
// The name that should be given to the new device. Used by devfs and
// debug messages.
::fidl::StringView name = {};
// The properties to attach the newly created device
::fidl::VectorView<uint64_t> properties = {};
// The expected return status from device_add()
int32_t expect_status = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_mock_HookInvocationTable;
// A record of the invocation of a hook
struct HookInvocation {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_HookInvocationTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
// Process that the hook was invoked in
uint64_t process_koid = {};
// Thread that the hook was invoked on
uint64_t thread_koid = {};
// An opaque identifier identifying a specific device
uint64_t device_id = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_mock_UnbindReplyActionTable;
// Marker struct for unbind reply action
struct UnbindReplyAction {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_UnbindReplyActionTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
// Value that will be echoed back in the completion message
uint64_t action_id = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_mock_SuspendReplyActionTable;
// Marker struct for suspend reply action
struct SuspendReplyAction {
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_SuspendReplyActionTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 8;
[[maybe_unused]]
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr bool HasPointer = false;
// Value that will be echoed back in the completion message
uint64_t action_id = {};
};
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadPerformActionsRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadPerformActionsResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadAddDeviceDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadAddDeviceDoneEventTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadUnbindReplyDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadUnbindReplyDoneEventTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadSuspendReplyDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceThreadSuspendReplyDoneEventTable;
// Interface for requesting a mock device thread do something. The mock device implements
// this interface. Closing the interface causes the thread to exit.
class MockDeviceThread final {
MockDeviceThread() = delete;
public:
struct PerformActionsRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceThreadPerformActionsRequestTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
static constexpr uint32_t AltPrimarySize = 32;
static constexpr uint32_t AltMaxOutOfLine = 164240;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = true;
static constexpr bool ContainsUnion = true;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct AddDeviceDoneResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceThreadAddDeviceDoneEventTable;
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 bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct UnbindReplyDoneResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceThreadUnbindReplyDoneEventTable;
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 bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct SuspendReplyDoneResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceThreadSuspendReplyDoneEventTable;
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 bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kResponse;
};
struct EventHandlers {
// Notification that the requested action was done
fit::callback<zx_status_t(uint64_t action_id)> add_device_done;
fit::callback<zx_status_t(uint64_t action_id)> unbind_reply_done;
fit::callback<zx_status_t(uint64_t action_id)> suspend_reply_done;
// Fallback handler when an unknown ordinal is received.
// Caller may put custom error handling logic here.
fit::callback<zx_status_t()> unknown;
};
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
class PerformActions_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
PerformActions_Impl(::zx::unowned_channel _client_end, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
~PerformActions_Impl() = default;
PerformActions_Impl(PerformActions_Impl&& other) = default;
PerformActions_Impl& operator=(PerformActions_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
public:
using PerformActions = PerformActions_Impl;
};
// 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 PerformActions_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
PerformActions_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
~PerformActions_Impl() = default;
PerformActions_Impl(PerformActions_Impl&& other) = default;
PerformActions_Impl& operator=(PerformActions_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
public:
using PerformActions = PerformActions_Impl;
};
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_; }
// Perform the actions in the given list. Threads may not create other threads.
// Request is heap-allocated.
ResultOf::PerformActions PerformActions(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
// Perform the actions in the given list. Threads may not create other threads.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::PerformActions PerformActions(::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
// Handle all possible events defined in this protocol.
// Blocks to consume exactly one message from the channel, then call the corresponding handler
// defined in |EventHandlers|. The return status of the handler function is folded with any
// transport-level errors and returned.
zx_status_t HandleEvents(EventHandlers handlers);
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:
// Perform the actions in the given list. Threads may not create other threads.
// Request is heap-allocated.
static ResultOf::PerformActions PerformActions(::zx::unowned_channel _client_end, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
// Perform the actions in the given list. Threads may not create other threads.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::PerformActions PerformActions(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
// Handle all possible events defined in this protocol.
// Blocks to consume exactly one message from the channel, then call the corresponding handler
// defined in |EventHandlers|. The return status of the handler function is folded with any
// transport-level errors and returned.
static zx_status_t HandleEvents(::zx::unowned_channel client_end, EventHandlers handlers);
};
// 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:
// Perform the actions in the given list. Threads may not create other threads.
static ::fidl::internal::StatusAndError PerformActions(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<PerformActionsRequest> params);
};
// Pure-virtual interface to be implemented by a server.
class Interface {
public:
Interface() = default;
virtual ~Interface() = default;
using _Outer = MockDeviceThread;
using _Base = ::fidl::CompleterBase;
using PerformActionsCompleter = ::fidl::Completer<>;
virtual void PerformActions(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions, PerformActionsCompleter::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);
}
// Notification that the requested action was done
static zx_status_t SendAddDeviceDoneEvent(::zx::unowned_channel _chan, uint64_t action_id);
// Notification that the requested action was done
// Caller provides the backing storage for FIDL message via response buffers.
static zx_status_t SendAddDeviceDoneEvent(::zx::unowned_channel _chan, ::fidl::BytePart _buffer, uint64_t action_id);
// Notification that the requested action was done
// Messages are encoded in-place.
static zx_status_t SendAddDeviceDoneEvent(::zx::unowned_channel _chan, ::fidl::DecodedMessage<AddDeviceDoneResponse> params);
static zx_status_t SendUnbindReplyDoneEvent(::zx::unowned_channel _chan, uint64_t action_id);
// Caller provides the backing storage for FIDL message via response buffers.
static zx_status_t SendUnbindReplyDoneEvent(::zx::unowned_channel _chan, ::fidl::BytePart _buffer, uint64_t action_id);
// Messages are encoded in-place.
static zx_status_t SendUnbindReplyDoneEvent(::zx::unowned_channel _chan, ::fidl::DecodedMessage<UnbindReplyDoneResponse> params);
static zx_status_t SendSuspendReplyDoneEvent(::zx::unowned_channel _chan, uint64_t action_id);
// Caller provides the backing storage for FIDL message via response buffers.
static zx_status_t SendSuspendReplyDoneEvent(::zx::unowned_channel _chan, ::fidl::BytePart _buffer, uint64_t action_id);
// Messages are encoded in-place.
static zx_status_t SendSuspendReplyDoneEvent(::zx::unowned_channel _chan, ::fidl::DecodedMessage<SuspendReplyDoneResponse> params);
// Helper functions to fill in the transaction header in a |DecodedMessage<TransactionalMessage>|.
class SetTransactionHeaderFor final {
SetTransactionHeaderFor() = delete;
public:
static void PerformActionsRequest(const ::fidl::DecodedMessage<MockDeviceThread::PerformActionsRequest>& _msg);
static void AddDeviceDoneResponse(const ::fidl::DecodedMessage<MockDeviceThread::AddDeviceDoneResponse>& _msg);
static void UnbindReplyDoneResponse(const ::fidl::DecodedMessage<MockDeviceThread::UnbindReplyDoneResponse>& _msg);
static void SuspendReplyDoneResponse(const ::fidl::DecodedMessage<MockDeviceThread::SuspendReplyDoneResponse>& _msg);
};
};
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceBindRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceBindResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceReleaseRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceReleaseResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceGetProtocolRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceGetProtocolResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceOpenRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceOpenResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceCloseRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceCloseResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceUnbindRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceUnbindResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceReadRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceReadResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceWriteRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceWriteResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceGetSizeRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceGetSizeResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceSuspendRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceSuspendResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceResumeRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceResumeResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceMessageRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceMessageResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceRxrpcRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceRxrpcResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceAddDeviceDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceAddDeviceDoneResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceUnbindReplyDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceUnbindReplyDoneResponseTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceSuspendReplyDoneRequestTable;
extern "C" const fidl_type_t v1_fuchsia_device_mock_MockDeviceSuspendReplyDoneResponseTable;
// Interface for controlling a mock device. The test suite will implement this interface.
// Any method that returns a list of actions is interpreted as requesting the corresponding hook
// to perform that list of actions in order.
class MockDevice final {
MockDevice() = delete;
public:
struct BindResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceBindResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 BindRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceBindRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = BindResponse;
};
struct ReleaseRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceReleaseRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct GetProtocolResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceGetProtocolResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 GetProtocolRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint32_t protocol_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceGetProtocolRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 48;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 48;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = GetProtocolResponse;
};
struct OpenResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceOpenResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 OpenRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint32_t flags;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceOpenRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 48;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 48;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = OpenResponse;
};
struct CloseResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceCloseResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 CloseRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint32_t flags;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceCloseRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 48;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 48;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = CloseResponse;
};
struct UnbindResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceUnbindResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 UnbindRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceUnbindRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = UnbindResponse;
};
struct ReadResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceReadResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 ReadRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint64_t count;
uint64_t off;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceReadRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 56;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 56;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = ReadResponse;
};
struct WriteResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceWriteResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 WriteRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
::fidl::VectorView<uint8_t> buffer;
uint64_t off;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceWriteRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 64;
static constexpr uint32_t MaxOutOfLine = 16384;
static constexpr uint32_t AltPrimarySize = 64;
static constexpr uint32_t AltMaxOutOfLine = 16384;
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 = WriteResponse;
};
struct GetSizeResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceGetSizeResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 GetSizeRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceGetSizeRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = GetSizeResponse;
};
struct SuspendResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceSuspendResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 SuspendRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint8_t requested_state;
bool enable_wake;
uint8_t suspend_reason;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceSuspendRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 48;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 48;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = SuspendResponse;
};
struct ResumeResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceResumeResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 ResumeRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
uint32_t flags;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceResumeRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 48;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 48;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = ResumeResponse;
};
struct MessageResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceMessageResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 MessageRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceMessageRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = MessageResponse;
};
struct RxrpcResponse final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceRxrpcResponseTable;
static constexpr uint32_t MaxNumHandles = 10;
static constexpr uint32_t PrimarySize = 32;
static constexpr uint32_t MaxOutOfLine = 164240;
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 RxrpcRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
::llcpp::fuchsia::device::mock::HookInvocation record;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceRxrpcRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 40;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 40;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
using ResponseType = RxrpcResponse;
};
struct AddDeviceDoneRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceAddDeviceDoneRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 24;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct UnbindReplyDoneRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceUnbindReplyDoneRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 24;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
struct SuspendReplyDoneRequest final {
FIDL_ALIGNDECL
fidl_message_header_t _hdr;
uint64_t action_id;
static constexpr const fidl_type_t* Type = &v1_fuchsia_device_mock_MockDeviceSuspendReplyDoneRequestTable;
static constexpr uint32_t MaxNumHandles = 0;
static constexpr uint32_t PrimarySize = 24;
static constexpr uint32_t MaxOutOfLine = 0;
static constexpr uint32_t AltPrimarySize = 24;
static constexpr uint32_t AltMaxOutOfLine = 0;
static constexpr bool HasFlexibleEnvelope = false;
static constexpr bool HasPointer = false;
static constexpr bool ContainsUnion = false;
static constexpr ::fidl::internal::TransactionalMessageKind MessageKind =
::fidl::internal::TransactionalMessageKind::kRequest;
};
// Collection of return types of FIDL calls in this interface.
class ResultOf final {
ResultOf() = delete;
private:
template <typename ResponseType>
class Bind_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Bind_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Bind_Impl() = default;
Bind_Impl(Bind_Impl&& other) = default;
Bind_Impl& operator=(Bind_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
using Super::Unwrap;
using Super::value;
using Super::operator->;
using Super::operator*;
};
class Release_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
Release_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Release_Impl() = default;
Release_Impl(Release_Impl&& other) = default;
Release_Impl& operator=(Release_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
template <typename ResponseType>
class GetProtocol_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetProtocol_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id);
~GetProtocol_Impl() = default;
GetProtocol_Impl(GetProtocol_Impl&& other) = default;
GetProtocol_Impl& operator=(GetProtocol_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 Open_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Open_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
~Open_Impl() = default;
Open_Impl(Open_Impl&& other) = default;
Open_Impl& operator=(Open_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 Close_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Close_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
~Close_Impl() = default;
Close_Impl(Close_Impl&& other) = default;
Close_Impl& operator=(Close_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 Unbind_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Unbind_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Unbind_Impl() = default;
Unbind_Impl(Unbind_Impl&& other) = default;
Unbind_Impl& operator=(Unbind_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 Read_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Read_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off);
~Read_Impl() = default;
Read_Impl(Read_Impl&& other) = default;
Read_Impl& operator=(Read_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 Write_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Write_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off);
~Write_Impl() = default;
Write_Impl(Write_Impl&& other) = default;
Write_Impl& operator=(Write_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 GetSize_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
GetSize_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~GetSize_Impl() = default;
GetSize_Impl(GetSize_Impl&& other) = default;
GetSize_Impl& operator=(GetSize_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 Suspend_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Suspend_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason);
~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*;
};
template <typename ResponseType>
class Resume_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Resume_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
~Resume_Impl() = default;
Resume_Impl(Resume_Impl&& other) = default;
Resume_Impl& operator=(Resume_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 Message_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Message_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Message_Impl() = default;
Message_Impl(Message_Impl&& other) = default;
Message_Impl& operator=(Message_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 Rxrpc_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>;
public:
Rxrpc_Impl(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Rxrpc_Impl() = default;
Rxrpc_Impl(Rxrpc_Impl&& other) = default;
Rxrpc_Impl& operator=(Rxrpc_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
using Super::Unwrap;
using Super::value;
using Super::operator->;
using Super::operator*;
};
class AddDeviceDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
AddDeviceDone_Impl(::zx::unowned_channel _client_end, uint64_t action_id);
~AddDeviceDone_Impl() = default;
AddDeviceDone_Impl(AddDeviceDone_Impl&& other) = default;
AddDeviceDone_Impl& operator=(AddDeviceDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class UnbindReplyDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
UnbindReplyDone_Impl(::zx::unowned_channel _client_end, uint64_t action_id);
~UnbindReplyDone_Impl() = default;
UnbindReplyDone_Impl(UnbindReplyDone_Impl&& other) = default;
UnbindReplyDone_Impl& operator=(UnbindReplyDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class SuspendReplyDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
SuspendReplyDone_Impl(::zx::unowned_channel _client_end, uint64_t action_id);
~SuspendReplyDone_Impl() = default;
SuspendReplyDone_Impl(SuspendReplyDone_Impl&& other) = default;
SuspendReplyDone_Impl& operator=(SuspendReplyDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
public:
using Bind = Bind_Impl<BindResponse>;
using Release = Release_Impl;
using GetProtocol = GetProtocol_Impl<GetProtocolResponse>;
using Open = Open_Impl<OpenResponse>;
using Close = Close_Impl<CloseResponse>;
using Unbind = Unbind_Impl<UnbindResponse>;
using Read = Read_Impl<ReadResponse>;
using Write = Write_Impl<WriteResponse>;
using GetSize = GetSize_Impl<GetSizeResponse>;
using Suspend = Suspend_Impl<SuspendResponse>;
using Resume = Resume_Impl<ResumeResponse>;
using Message = Message_Impl<MessageResponse>;
using Rxrpc = Rxrpc_Impl<RxrpcResponse>;
using AddDeviceDone = AddDeviceDone_Impl;
using UnbindReplyDone = UnbindReplyDone_Impl;
using SuspendReplyDone = SuspendReplyDone_Impl;
};
// 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 Bind_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Bind_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
~Bind_Impl() = default;
Bind_Impl(Bind_Impl&& other) = default;
Bind_Impl& operator=(Bind_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
using Super::Unwrap;
using Super::value;
using Super::operator->;
using Super::operator*;
};
class Release_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
Release_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record);
~Release_Impl() = default;
Release_Impl(Release_Impl&& other) = default;
Release_Impl& operator=(Release_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
template <typename ResponseType>
class GetProtocol_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetProtocol_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id, ::fidl::BytePart _response_buffer);
~GetProtocol_Impl() = default;
GetProtocol_Impl(GetProtocol_Impl&& other) = default;
GetProtocol_Impl& operator=(GetProtocol_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 Open_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Open_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
~Open_Impl() = default;
Open_Impl(Open_Impl&& other) = default;
Open_Impl& operator=(Open_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 Close_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Close_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
~Close_Impl() = default;
Close_Impl(Close_Impl&& other) = default;
Close_Impl& operator=(Close_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 Unbind_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Unbind_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
~Unbind_Impl() = default;
Unbind_Impl(Unbind_Impl&& other) = default;
Unbind_Impl& operator=(Unbind_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 Read_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Read_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off, ::fidl::BytePart _response_buffer);
~Read_Impl() = default;
Read_Impl(Read_Impl&& other) = default;
Read_Impl& operator=(Read_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 Write_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Write_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off, ::fidl::BytePart _response_buffer);
~Write_Impl() = default;
Write_Impl(Write_Impl&& other) = default;
Write_Impl& operator=(Write_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 GetSize_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
GetSize_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
~GetSize_Impl() = default;
GetSize_Impl(GetSize_Impl&& other) = default;
GetSize_Impl& operator=(GetSize_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 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, ::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason, ::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*;
};
template <typename ResponseType>
class Resume_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Resume_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
~Resume_Impl() = default;
Resume_Impl(Resume_Impl&& other) = default;
Resume_Impl& operator=(Resume_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 Message_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Message_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
~Message_Impl() = default;
Message_Impl(Message_Impl&& other) = default;
Message_Impl& operator=(Message_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 Rxrpc_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> {
using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>;
public:
Rxrpc_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
~Rxrpc_Impl() = default;
Rxrpc_Impl(Rxrpc_Impl&& other) = default;
Rxrpc_Impl& operator=(Rxrpc_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
using Super::Unwrap;
using Super::value;
using Super::operator->;
using Super::operator*;
};
class AddDeviceDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
AddDeviceDone_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
~AddDeviceDone_Impl() = default;
AddDeviceDone_Impl(AddDeviceDone_Impl&& other) = default;
AddDeviceDone_Impl& operator=(AddDeviceDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class UnbindReplyDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
UnbindReplyDone_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
~UnbindReplyDone_Impl() = default;
UnbindReplyDone_Impl(UnbindReplyDone_Impl&& other) = default;
UnbindReplyDone_Impl& operator=(UnbindReplyDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
class SuspendReplyDone_Impl final : private ::fidl::internal::StatusAndError {
using Super = ::fidl::internal::StatusAndError;
public:
SuspendReplyDone_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
~SuspendReplyDone_Impl() = default;
SuspendReplyDone_Impl(SuspendReplyDone_Impl&& other) = default;
SuspendReplyDone_Impl& operator=(SuspendReplyDone_Impl&& other) = default;
using Super::status;
using Super::error;
using Super::ok;
};
public:
using Bind = Bind_Impl<BindResponse>;
using Release = Release_Impl;
using GetProtocol = GetProtocol_Impl<GetProtocolResponse>;
using Open = Open_Impl<OpenResponse>;
using Close = Close_Impl<CloseResponse>;
using Unbind = Unbind_Impl<UnbindResponse>;
using Read = Read_Impl<ReadResponse>;
using Write = Write_Impl<WriteResponse>;
using GetSize = GetSize_Impl<GetSizeResponse>;
using Suspend = Suspend_Impl<SuspendResponse>;
using Resume = Resume_Impl<ResumeResponse>;
using Message = Message_Impl<MessageResponse>;
using Rxrpc = Rxrpc_Impl<RxrpcResponse>;
using AddDeviceDone = AddDeviceDone_Impl;
using UnbindReplyDone = UnbindReplyDone_Impl;
using SuspendReplyDone = SuspendReplyDone_Impl;
};
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_; }
// `record.device_id` corresponds to the parent here.
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Bind Bind(::llcpp::fuchsia::device::mock::HookInvocation record);
// `record.device_id` corresponds to the parent here.
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Bind Bind(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::Release Release(::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Release Release(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::GetProtocol GetProtocol(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetProtocol GetProtocol(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Open Open(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Open Open(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Close Close(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Close Close(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Unbind Unbind(::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Unbind Unbind(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 56 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Read Read(::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Read Read(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off, ::fidl::BytePart _response_buffer);
// Request is heap-allocated. Response is heap-allocated.
ResultOf::Write Write(::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Write Write(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::GetSize GetSize(::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::GetSize GetSize(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Suspend Suspend(::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Suspend Suspend(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Resume Resume(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Resume Resume(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Message Message(::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Message Message(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
ResultOf::Rxrpc Rxrpc(::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::Rxrpc Rxrpc(::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Notification that the requested action was done
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::AddDeviceDone AddDeviceDone(uint64_t action_id);
// Notification that the requested action was done
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::AddDeviceDone AddDeviceDone(::fidl::BytePart _request_buffer, uint64_t action_id);
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::UnbindReplyDone UnbindReplyDone(uint64_t action_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::UnbindReplyDone UnbindReplyDone(::fidl::BytePart _request_buffer, uint64_t action_id);
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
ResultOf::SuspendReplyDone SuspendReplyDone(uint64_t action_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
UnownedResultOf::SuspendReplyDone SuspendReplyDone(::fidl::BytePart _request_buffer, uint64_t action_id);
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:
// `record.device_id` corresponds to the parent here.
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Bind Bind(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// `record.device_id` corresponds to the parent here.
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Bind Bind(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::Release Release(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Release Release(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::GetProtocol GetProtocol(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetProtocol GetProtocol(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Open Open(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Open Open(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Close Close(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Close Close(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Unbind Unbind(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Unbind Unbind(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 56 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Read Read(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Read Read(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off, ::fidl::BytePart _response_buffer);
// Request is heap-allocated. Response is heap-allocated.
static ResultOf::Write Write(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Write Write(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::GetSize GetSize(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::GetSize GetSize(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Suspend Suspend(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason);
// 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, ::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason, ::fidl::BytePart _response_buffer);
// Allocates 48 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Resume Resume(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Resume Resume(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Message Message(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Message Message(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Allocates 40 bytes of request buffer on the stack. Response is heap-allocated.
static ResultOf::Rxrpc Rxrpc(::zx::unowned_channel _client_end, ::llcpp::fuchsia::device::mock::HookInvocation record);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::Rxrpc Rxrpc(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::BytePart _response_buffer);
// Notification that the requested action was done
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::AddDeviceDone AddDeviceDone(::zx::unowned_channel _client_end, uint64_t action_id);
// Notification that the requested action was done
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::AddDeviceDone AddDeviceDone(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::UnbindReplyDone UnbindReplyDone(::zx::unowned_channel _client_end, uint64_t action_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::UnbindReplyDone UnbindReplyDone(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
// Allocates 24 bytes of message buffer on the stack. No heap allocation necessary.
static ResultOf::SuspendReplyDone SuspendReplyDone(::zx::unowned_channel _client_end, uint64_t action_id);
// Caller provides the backing storage for FIDL message via request and response buffers.
static UnownedResultOf::SuspendReplyDone SuspendReplyDone(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, uint64_t action_id);
};
// 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:
// `record.device_id` corresponds to the parent here.
static ::fidl::DecodeResult<BindResponse> Bind(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<BindRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::internal::StatusAndError Release(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<ReleaseRequest> params);
static ::fidl::DecodeResult<GetProtocolResponse> GetProtocol(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<GetProtocolRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<OpenResponse> Open(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<OpenRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<CloseResponse> Close(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<CloseRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<UnbindResponse> Unbind(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<UnbindRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<ReadResponse> Read(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<ReadRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<WriteResponse> Write(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<WriteRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<GetSizeResponse> GetSize(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<GetSizeRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<SuspendResponse> Suspend(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<SuspendRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<ResumeResponse> Resume(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<ResumeRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<MessageResponse> Message(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<MessageRequest> params, ::fidl::BytePart response_buffer);
static ::fidl::DecodeResult<RxrpcResponse> Rxrpc(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<RxrpcRequest> params, ::fidl::BytePart response_buffer);
// Notification that the requested action was done
static ::fidl::internal::StatusAndError AddDeviceDone(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<AddDeviceDoneRequest> params);
static ::fidl::internal::StatusAndError UnbindReplyDone(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<UnbindReplyDoneRequest> params);
static ::fidl::internal::StatusAndError SuspendReplyDone(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<SuspendReplyDoneRequest> params);
};
// Pure-virtual interface to be implemented by a server.
class Interface {
public:
Interface() = default;
virtual ~Interface() = default;
using _Outer = MockDevice;
using _Base = ::fidl::CompleterBase;
class BindCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<BindResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using BindCompleter = ::fidl::Completer<BindCompleterBase>;
virtual void Bind(::llcpp::fuchsia::device::mock::HookInvocation record, BindCompleter::Sync _completer) = 0;
using ReleaseCompleter = ::fidl::Completer<>;
virtual void Release(::llcpp::fuchsia::device::mock::HookInvocation record, ReleaseCompleter::Sync _completer) = 0;
class GetProtocolCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<GetProtocolResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetProtocolCompleter = ::fidl::Completer<GetProtocolCompleterBase>;
virtual void GetProtocol(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t protocol_id, GetProtocolCompleter::Sync _completer) = 0;
class OpenCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<OpenResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using OpenCompleter = ::fidl::Completer<OpenCompleterBase>;
virtual void Open(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, OpenCompleter::Sync _completer) = 0;
class CloseCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<CloseResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using CloseCompleter = ::fidl::Completer<CloseCompleterBase>;
virtual void Close(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, CloseCompleter::Sync _completer) = 0;
class UnbindCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<UnbindResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using UnbindCompleter = ::fidl::Completer<UnbindCompleterBase>;
virtual void Unbind(::llcpp::fuchsia::device::mock::HookInvocation record, UnbindCompleter::Sync _completer) = 0;
class ReadCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<ReadResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using ReadCompleter = ::fidl::Completer<ReadCompleterBase>;
virtual void Read(::llcpp::fuchsia::device::mock::HookInvocation record, uint64_t count, uint64_t off, ReadCompleter::Sync _completer) = 0;
class WriteCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<WriteResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using WriteCompleter = ::fidl::Completer<WriteCompleterBase>;
virtual void Write(::llcpp::fuchsia::device::mock::HookInvocation record, ::fidl::VectorView<uint8_t> buffer, uint64_t off, WriteCompleter::Sync _completer) = 0;
class GetSizeCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<GetSizeResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using GetSizeCompleter = ::fidl::Completer<GetSizeCompleterBase>;
virtual void GetSize(::llcpp::fuchsia::device::mock::HookInvocation record, GetSizeCompleter::Sync _completer) = 0;
class SuspendCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<SuspendResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using SuspendCompleter = ::fidl::Completer<SuspendCompleterBase>;
virtual void Suspend(::llcpp::fuchsia::device::mock::HookInvocation record, uint8_t requested_state, bool enable_wake, uint8_t suspend_reason, SuspendCompleter::Sync _completer) = 0;
class ResumeCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<ResumeResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using ResumeCompleter = ::fidl::Completer<ResumeCompleterBase>;
virtual void Resume(::llcpp::fuchsia::device::mock::HookInvocation record, uint32_t flags, ResumeCompleter::Sync _completer) = 0;
class MessageCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<MessageResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using MessageCompleter = ::fidl::Completer<MessageCompleterBase>;
virtual void Message(::llcpp::fuchsia::device::mock::HookInvocation record, MessageCompleter::Sync _completer) = 0;
class RxrpcCompleterBase : public _Base {
public:
void Reply(::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::BytePart _buffer, ::fidl::VectorView<::llcpp::fuchsia::device::mock::Action> actions);
void Reply(::fidl::DecodedMessage<RxrpcResponse> params);
protected:
using ::fidl::CompleterBase::CompleterBase;
};
using RxrpcCompleter = ::fidl::Completer<RxrpcCompleterBase>;
virtual void Rxrpc(::llcpp::fuchsia::device::mock::HookInvocation record, RxrpcCompleter::Sync _completer) = 0;
using AddDeviceDoneCompleter = ::fidl::Completer<>;
virtual void AddDeviceDone(uint64_t action_id, AddDeviceDoneCompleter::Sync _completer) = 0;
using UnbindReplyDoneCompleter = ::fidl::Completer<>;
virtual void UnbindReplyDone(uint64_t action_id, UnbindReplyDoneCompleter::Sync _completer) = 0;
using SuspendReplyDoneCompleter = ::fidl::Completer<>;
virtual void SuspendReplyDone(uint64_t action_id, SuspendReplyDoneCompleter::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 BindRequest(const ::fidl::DecodedMessage<MockDevice::BindRequest>& _msg);
static void BindResponse(const ::fidl::DecodedMessage<MockDevice::BindResponse>& _msg);
static void ReleaseRequest(const ::fidl::DecodedMessage<MockDevice::ReleaseRequest>& _msg);
static void GetProtocolRequest(const ::fidl::DecodedMessage<MockDevice::GetProtocolRequest>& _msg);
static void GetProtocolResponse(const ::fidl::DecodedMessage<MockDevice::GetProtocolResponse>& _msg);
static void OpenRequest(const ::fidl::DecodedMessage<MockDevice::OpenRequest>& _msg);
static void OpenResponse(const ::fidl::DecodedMessage<MockDevice::OpenResponse>& _msg);
static void CloseRequest(const ::fidl::DecodedMessage<MockDevice::CloseRequest>& _msg);
static void CloseResponse(const ::fidl::DecodedMessage<MockDevice::CloseResponse>& _msg);
static void UnbindRequest(const ::fidl::DecodedMessage<MockDevice::UnbindRequest>& _msg);
static void UnbindResponse(const ::fidl::DecodedMessage<MockDevice::UnbindResponse>& _msg);
static void ReadRequest(const ::fidl::DecodedMessage<MockDevice::ReadRequest>& _msg);
static void ReadResponse(const ::fidl::DecodedMessage<MockDevice::ReadResponse>& _msg);
static void WriteRequest(const ::fidl::DecodedMessage<MockDevice::WriteRequest>& _msg);
static void WriteResponse(const ::fidl::DecodedMessage<MockDevice::WriteResponse>& _msg);
static void GetSizeRequest(const ::fidl::DecodedMessage<MockDevice::GetSizeRequest>& _msg);
static void GetSizeResponse(const ::fidl::DecodedMessage<MockDevice::GetSizeResponse>& _msg);
static void SuspendRequest(const ::fidl::DecodedMessage<MockDevice::SuspendRequest>& _msg);
static void SuspendResponse(const ::fidl::DecodedMessage<MockDevice::SuspendResponse>& _msg);
static void ResumeRequest(const ::fidl::DecodedMessage<MockDevice::ResumeRequest>& _msg);
static void ResumeResponse(const ::fidl::DecodedMessage<MockDevice::ResumeResponse>& _msg);
static void MessageRequest(const ::fidl::DecodedMessage<MockDevice::MessageRequest>& _msg);
static void MessageResponse(const ::fidl::DecodedMessage<MockDevice::MessageResponse>& _msg);
static void RxrpcRequest(const ::fidl::DecodedMessage<MockDevice::RxrpcRequest>& _msg);
static void RxrpcResponse(const ::fidl::DecodedMessage<MockDevice::RxrpcResponse>& _msg);
static void AddDeviceDoneRequest(const ::fidl::DecodedMessage<MockDevice::AddDeviceDoneRequest>& _msg);
static void UnbindReplyDoneRequest(const ::fidl::DecodedMessage<MockDevice::UnbindReplyDoneRequest>& _msg);
static void SuspendReplyDoneRequest(const ::fidl::DecodedMessage<MockDevice::SuspendReplyDoneRequest>& _msg);
};
};
constexpr uint32_t MAX_WRITE_BYTES = 16384u;
constexpr uint32_t MAX_PROPERTIES_LEN = 32u;
constexpr uint32_t MAX_NAME_LEN = 32u;
constexpr uint32_t MAX_ACTIONS = 10u;
} // namespace mock
} // namespace device
} // namespace fuchsia
} // namespace llcpp
namespace fidl {
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::AddDeviceAction> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::mock::AddDeviceAction>);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, action_id) == 0);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, do_bind) == 8);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, controller) == 12);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, name) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, properties) == 32);
static_assert(offsetof(::llcpp::fuchsia::device::mock::AddDeviceAction, expect_status) == 48);
static_assert(sizeof(::llcpp::fuchsia::device::mock::AddDeviceAction) == ::llcpp::fuchsia::device::mock::AddDeviceAction::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::HookInvocation> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::mock::HookInvocation>);
static_assert(offsetof(::llcpp::fuchsia::device::mock::HookInvocation, process_koid) == 0);
static_assert(offsetof(::llcpp::fuchsia::device::mock::HookInvocation, thread_koid) == 8);
static_assert(offsetof(::llcpp::fuchsia::device::mock::HookInvocation, device_id) == 16);
static_assert(sizeof(::llcpp::fuchsia::device::mock::HookInvocation) == ::llcpp::fuchsia::device::mock::HookInvocation::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::UnbindReplyAction> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::mock::UnbindReplyAction>);
static_assert(offsetof(::llcpp::fuchsia::device::mock::UnbindReplyAction, action_id) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::mock::UnbindReplyAction) == ::llcpp::fuchsia::device::mock::UnbindReplyAction::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::SuspendReplyAction> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::mock::SuspendReplyAction>);
static_assert(offsetof(::llcpp::fuchsia::device::mock::SuspendReplyAction, action_id) == 0);
static_assert(sizeof(::llcpp::fuchsia::device::mock::SuspendReplyAction) == ::llcpp::fuchsia::device::mock::SuspendReplyAction::PrimarySize);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::Action> : public std::true_type {};
static_assert(std::is_standard_layout_v<::llcpp::fuchsia::device::mock::Action>);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDeviceThread::PerformActionsRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDeviceThread::PerformActionsRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDeviceThread::PerformActionsRequest)
== ::llcpp::fuchsia::device::mock::MockDeviceThread::PerformActionsRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDeviceThread::PerformActionsRequest, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDeviceThread::AddDeviceDoneResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDeviceThread::AddDeviceDoneResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDeviceThread::AddDeviceDoneResponse)
== ::llcpp::fuchsia::device::mock::MockDeviceThread::AddDeviceDoneResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDeviceThread::AddDeviceDoneResponse, action_id) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDeviceThread::UnbindReplyDoneResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDeviceThread::UnbindReplyDoneResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDeviceThread::UnbindReplyDoneResponse)
== ::llcpp::fuchsia::device::mock::MockDeviceThread::UnbindReplyDoneResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDeviceThread::UnbindReplyDoneResponse, action_id) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDeviceThread::SuspendReplyDoneResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDeviceThread::SuspendReplyDoneResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDeviceThread::SuspendReplyDoneResponse)
== ::llcpp::fuchsia::device::mock::MockDeviceThread::SuspendReplyDoneResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDeviceThread::SuspendReplyDoneResponse, action_id) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::BindRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::BindRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::BindRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::BindRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::BindRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::BindResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::BindResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::BindResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::BindResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::BindResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::ReleaseRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::ReleaseRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::ReleaseRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::ReleaseRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ReleaseRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::GetProtocolRequest, protocol_id) == 40);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::GetProtocolResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::GetProtocolResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::GetProtocolResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::GetProtocolResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::GetProtocolResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::OpenRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::OpenRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::OpenRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::OpenRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::OpenRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::OpenRequest, flags) == 40);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::OpenResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::OpenResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::OpenResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::OpenResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::OpenResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::CloseRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::CloseRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::CloseRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::CloseRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::CloseRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::CloseRequest, flags) == 40);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::CloseResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::CloseResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::CloseResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::CloseResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::CloseResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::UnbindRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::UnbindRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::UnbindRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::UnbindRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::UnbindRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::UnbindResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::UnbindResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::UnbindResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::UnbindResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::UnbindResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::ReadRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::ReadRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::ReadRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::ReadRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ReadRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ReadRequest, count) == 40);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ReadRequest, off) == 48);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::ReadResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::ReadResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::ReadResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::ReadResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ReadResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::WriteRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::WriteRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::WriteRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::WriteRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::WriteRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::WriteRequest, buffer) == 40);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::WriteRequest, off) == 56);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::WriteResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::WriteResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::WriteResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::WriteResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::WriteResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::GetSizeRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::GetSizeRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::GetSizeRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::GetSizeRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::GetSizeRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::GetSizeResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::GetSizeResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::GetSizeResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::GetSizeResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::GetSizeResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest, requested_state) == 40);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest, enable_wake) == 41);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendRequest, suspend_reason) == 42);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::SuspendResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::SuspendResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::SuspendResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::SuspendResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest, record) == 16);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ResumeRequest, flags) == 40);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::ResumeResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::ResumeResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::ResumeResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::ResumeResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::ResumeResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::MessageRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::MessageRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::MessageRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::MessageRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::MessageRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::MessageResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::MessageResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::MessageResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::MessageResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::MessageResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::RxrpcRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::RxrpcRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::RxrpcRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::RxrpcRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::RxrpcRequest, record) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::RxrpcResponse> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::RxrpcResponse> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::RxrpcResponse)
== ::llcpp::fuchsia::device::mock::MockDevice::RxrpcResponse::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::RxrpcResponse, actions) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::AddDeviceDoneRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::AddDeviceDoneRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::AddDeviceDoneRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::AddDeviceDoneRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::AddDeviceDoneRequest, action_id) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::UnbindReplyDoneRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::UnbindReplyDoneRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::UnbindReplyDoneRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::UnbindReplyDoneRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::UnbindReplyDoneRequest, action_id) == 16);
template <>
struct IsFidlType<::llcpp::fuchsia::device::mock::MockDevice::SuspendReplyDoneRequest> : public std::true_type {};
template <>
struct IsFidlMessage<::llcpp::fuchsia::device::mock::MockDevice::SuspendReplyDoneRequest> : public std::true_type {};
static_assert(sizeof(::llcpp::fuchsia::device::mock::MockDevice::SuspendReplyDoneRequest)
== ::llcpp::fuchsia::device::mock::MockDevice::SuspendReplyDoneRequest::PrimarySize);
static_assert(offsetof(::llcpp::fuchsia::device::mock::MockDevice::SuspendReplyDoneRequest, action_id) == 16);
} // namespace fidl