| // 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 <lib/zx/vmo.h> |
| #include <zircon/fidl.h> |
| |
| namespace llcpp { |
| |
| namespace fuchsia { |
| namespace blobfs { |
| |
| enum class TakeAction : uint8_t { |
| RETURN_ERROR = 0u, |
| DELETE_AND_HANG = 1u, |
| DELETE_AND_RETURN_ERROR = 2u, |
| }; |
| |
| |
| class CorruptBlobHandler; |
| class BlobfsAdmin; |
| class Blobfs; |
| struct BlockRegion; |
| |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_CorruptBlobHandlerCorruptBlobRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_CorruptBlobHandlerCorruptBlobResponseTable; |
| |
| class CorruptBlobHandler final { |
| CorruptBlobHandler() = delete; |
| public: |
| |
| struct CorruptBlobResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::llcpp::fuchsia::blobfs::TakeAction action; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_CorruptBlobHandlerCorruptBlobResponseTable; |
| 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 CorruptBlobRequest final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::fidl::VectorView<uint8_t> merkleroot; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_CorruptBlobHandlerCorruptBlobRequestTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 32; |
| static constexpr uint32_t MaxOutOfLine = 64; |
| static constexpr uint32_t AltPrimarySize = 32; |
| static constexpr uint32_t AltMaxOutOfLine = 64; |
| 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 = CorruptBlobResponse; |
| }; |
| |
| |
| // Collection of return types of FIDL calls in this interface. |
| class ResultOf final { |
| ResultOf() = delete; |
| private: |
| template <typename ResponseType> |
| class CorruptBlob_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| CorruptBlob_Impl(::zx::unowned_channel _client_end, ::fidl::VectorView<uint8_t> merkleroot); |
| ~CorruptBlob_Impl() = default; |
| CorruptBlob_Impl(CorruptBlob_Impl&& other) = default; |
| CorruptBlob_Impl& operator=(CorruptBlob_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using CorruptBlob = CorruptBlob_Impl<CorruptBlobResponse>; |
| }; |
| |
| // 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 CorruptBlob_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| CorruptBlob_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<uint8_t> merkleroot, ::fidl::BytePart _response_buffer); |
| ~CorruptBlob_Impl() = default; |
| CorruptBlob_Impl(CorruptBlob_Impl&& other) = default; |
| CorruptBlob_Impl& operator=(CorruptBlob_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using CorruptBlob = CorruptBlob_Impl<CorruptBlobResponse>; |
| }; |
| |
| 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_; } |
| |
| // Allocates 120 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::CorruptBlob CorruptBlob(::fidl::VectorView<uint8_t> merkleroot); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::CorruptBlob CorruptBlob(::fidl::BytePart _request_buffer, ::fidl::VectorView<uint8_t> merkleroot, ::fidl::BytePart _response_buffer); |
| |
| private: |
| ::zx::channel channel_; |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned channel, avoiding setting up a client. |
| class Call final { |
| Call() = delete; |
| public: |
| |
| // Allocates 120 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::CorruptBlob CorruptBlob(::zx::unowned_channel _client_end, ::fidl::VectorView<uint8_t> merkleroot); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::CorruptBlob CorruptBlob(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::fidl::VectorView<uint8_t> merkleroot, ::fidl::BytePart _response_buffer); |
| |
| }; |
| |
| // Messages are encoded and decoded in-place when these methods are used. |
| // Additionally, requests must be already laid-out according to the FIDL wire-format. |
| class InPlace final { |
| InPlace() = delete; |
| public: |
| |
| static ::fidl::DecodeResult<CorruptBlobResponse> CorruptBlob(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<CorruptBlobRequest> params, ::fidl::BytePart response_buffer); |
| |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| class Interface { |
| public: |
| Interface() = default; |
| virtual ~Interface() = default; |
| using _Outer = CorruptBlobHandler; |
| using _Base = ::fidl::CompleterBase; |
| |
| class CorruptBlobCompleterBase : public _Base { |
| public: |
| void Reply(::llcpp::fuchsia::blobfs::TakeAction action); |
| void Reply(::fidl::BytePart _buffer, ::llcpp::fuchsia::blobfs::TakeAction action); |
| void Reply(::fidl::DecodedMessage<CorruptBlobResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using CorruptBlobCompleter = ::fidl::Completer<CorruptBlobCompleterBase>; |
| |
| virtual void CorruptBlob(::fidl::VectorView<uint8_t> merkleroot, CorruptBlobCompleter::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 CorruptBlobRequest(const ::fidl::DecodedMessage<CorruptBlobHandler::CorruptBlobRequest>& _msg); |
| static void CorruptBlobResponse(const ::fidl::DecodedMessage<CorruptBlobHandler::CorruptBlobResponse>& _msg); |
| }; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_BlobfsAdminHandleCorruptBlobsRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_BlobfsAdminHandleCorruptBlobsResponseTable; |
| |
| class BlobfsAdmin final { |
| BlobfsAdmin() = delete; |
| public: |
| |
| struct HandleCorruptBlobsResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| int32_t status; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_BlobfsAdminHandleCorruptBlobsResponseTable; |
| 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 HandleCorruptBlobsRequest final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| ::zx::channel handler; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_BlobfsAdminHandleCorruptBlobsRequestTable; |
| static constexpr uint32_t MaxNumHandles = 1; |
| 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; |
| using ResponseType = HandleCorruptBlobsResponse; |
| }; |
| |
| |
| // Collection of return types of FIDL calls in this interface. |
| class ResultOf final { |
| ResultOf() = delete; |
| private: |
| template <typename ResponseType> |
| class HandleCorruptBlobs_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| HandleCorruptBlobs_Impl(::zx::unowned_channel _client_end, ::zx::channel handler); |
| ~HandleCorruptBlobs_Impl() = default; |
| HandleCorruptBlobs_Impl(HandleCorruptBlobs_Impl&& other) = default; |
| HandleCorruptBlobs_Impl& operator=(HandleCorruptBlobs_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using HandleCorruptBlobs = HandleCorruptBlobs_Impl<HandleCorruptBlobsResponse>; |
| }; |
| |
| // 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 HandleCorruptBlobs_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| HandleCorruptBlobs_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel handler, ::fidl::BytePart _response_buffer); |
| ~HandleCorruptBlobs_Impl() = default; |
| HandleCorruptBlobs_Impl(HandleCorruptBlobs_Impl&& other) = default; |
| HandleCorruptBlobs_Impl& operator=(HandleCorruptBlobs_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using HandleCorruptBlobs = HandleCorruptBlobs_Impl<HandleCorruptBlobsResponse>; |
| }; |
| |
| 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_; } |
| |
| // Allocates 48 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::HandleCorruptBlobs HandleCorruptBlobs(::zx::channel handler); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::HandleCorruptBlobs HandleCorruptBlobs(::fidl::BytePart _request_buffer, ::zx::channel handler, ::fidl::BytePart _response_buffer); |
| |
| private: |
| ::zx::channel channel_; |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned channel, avoiding setting up a client. |
| class Call final { |
| Call() = delete; |
| public: |
| |
| // Allocates 48 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::HandleCorruptBlobs HandleCorruptBlobs(::zx::unowned_channel _client_end, ::zx::channel handler); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::HandleCorruptBlobs HandleCorruptBlobs(::zx::unowned_channel _client_end, ::fidl::BytePart _request_buffer, ::zx::channel handler, ::fidl::BytePart _response_buffer); |
| |
| }; |
| |
| // Messages are encoded and decoded in-place when these methods are used. |
| // Additionally, requests must be already laid-out according to the FIDL wire-format. |
| class InPlace final { |
| InPlace() = delete; |
| public: |
| |
| static ::fidl::DecodeResult<HandleCorruptBlobsResponse> HandleCorruptBlobs(::zx::unowned_channel _client_end, ::fidl::DecodedMessage<HandleCorruptBlobsRequest> params, ::fidl::BytePart response_buffer); |
| |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| class Interface { |
| public: |
| Interface() = default; |
| virtual ~Interface() = default; |
| using _Outer = BlobfsAdmin; |
| using _Base = ::fidl::CompleterBase; |
| |
| class HandleCorruptBlobsCompleterBase : public _Base { |
| public: |
| void Reply(int32_t status); |
| void Reply(::fidl::BytePart _buffer, int32_t status); |
| void Reply(::fidl::DecodedMessage<HandleCorruptBlobsResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using HandleCorruptBlobsCompleter = ::fidl::Completer<HandleCorruptBlobsCompleterBase>; |
| |
| virtual void HandleCorruptBlobs(::zx::channel handler, HandleCorruptBlobsCompleter::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 HandleCorruptBlobsRequest(const ::fidl::DecodedMessage<BlobfsAdmin::HandleCorruptBlobsRequest>& _msg); |
| static void HandleCorruptBlobsResponse(const ::fidl::DecodedMessage<BlobfsAdmin::HandleCorruptBlobsResponse>& _msg); |
| }; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_BlobfsGetAllocatedRegionsRequestTable; |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_BlobfsGetAllocatedRegionsResponseTable; |
| |
| class Blobfs final { |
| Blobfs() = delete; |
| public: |
| |
| struct GetAllocatedRegionsResponse final { |
| FIDL_ALIGNDECL |
| fidl_message_header_t _hdr; |
| int32_t status; |
| ::zx::vmo regions; |
| uint64_t count; |
| |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_BlobfsGetAllocatedRegionsResponseTable; |
| static constexpr uint32_t MaxNumHandles = 1; |
| static constexpr uint32_t PrimarySize = 32; |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasFlexibleEnvelope = false; |
| static constexpr bool HasPointer = false; |
| static constexpr bool ContainsUnion = false; |
| static constexpr ::fidl::internal::TransactionalMessageKind MessageKind = |
| ::fidl::internal::TransactionalMessageKind::kResponse; |
| }; |
| using GetAllocatedRegionsRequest = ::fidl::AnyZeroArgMessage; |
| |
| |
| // Collection of return types of FIDL calls in this interface. |
| class ResultOf final { |
| ResultOf() = delete; |
| private: |
| template <typename ResponseType> |
| class GetAllocatedRegions_Impl final : private ::fidl::internal::OwnedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::OwnedSyncCallBase<ResponseType>; |
| public: |
| GetAllocatedRegions_Impl(::zx::unowned_channel _client_end); |
| ~GetAllocatedRegions_Impl() = default; |
| GetAllocatedRegions_Impl(GetAllocatedRegions_Impl&& other) = default; |
| GetAllocatedRegions_Impl& operator=(GetAllocatedRegions_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using GetAllocatedRegions = GetAllocatedRegions_Impl<GetAllocatedRegionsResponse>; |
| }; |
| |
| // 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 GetAllocatedRegions_Impl final : private ::fidl::internal::UnownedSyncCallBase<ResponseType> { |
| using Super = ::fidl::internal::UnownedSyncCallBase<ResponseType>; |
| public: |
| GetAllocatedRegions_Impl(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| ~GetAllocatedRegions_Impl() = default; |
| GetAllocatedRegions_Impl(GetAllocatedRegions_Impl&& other) = default; |
| GetAllocatedRegions_Impl& operator=(GetAllocatedRegions_Impl&& other) = default; |
| using Super::status; |
| using Super::error; |
| using Super::ok; |
| using Super::Unwrap; |
| using Super::value; |
| using Super::operator->; |
| using Super::operator*; |
| }; |
| |
| public: |
| using GetAllocatedRegions = GetAllocatedRegions_Impl<GetAllocatedRegionsResponse>; |
| }; |
| |
| 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_; } |
| |
| // Allocates 48 bytes of message buffer on the stack. No heap allocation necessary. |
| ResultOf::GetAllocatedRegions GetAllocatedRegions(); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| UnownedResultOf::GetAllocatedRegions GetAllocatedRegions(::fidl::BytePart _response_buffer); |
| |
| private: |
| ::zx::channel channel_; |
| }; |
| |
| // Methods to make a sync FIDL call directly on an unowned channel, avoiding setting up a client. |
| class Call final { |
| Call() = delete; |
| public: |
| |
| // Allocates 48 bytes of message buffer on the stack. No heap allocation necessary. |
| static ResultOf::GetAllocatedRegions GetAllocatedRegions(::zx::unowned_channel _client_end); |
| |
| // Caller provides the backing storage for FIDL message via request and response buffers. |
| static UnownedResultOf::GetAllocatedRegions GetAllocatedRegions(::zx::unowned_channel _client_end, ::fidl::BytePart _response_buffer); |
| |
| }; |
| |
| // Messages are encoded and decoded in-place when these methods are used. |
| // Additionally, requests must be already laid-out according to the FIDL wire-format. |
| class InPlace final { |
| InPlace() = delete; |
| public: |
| |
| static ::fidl::DecodeResult<GetAllocatedRegionsResponse> GetAllocatedRegions(::zx::unowned_channel _client_end, ::fidl::BytePart response_buffer); |
| |
| }; |
| |
| // Pure-virtual interface to be implemented by a server. |
| class Interface { |
| public: |
| Interface() = default; |
| virtual ~Interface() = default; |
| using _Outer = Blobfs; |
| using _Base = ::fidl::CompleterBase; |
| |
| class GetAllocatedRegionsCompleterBase : public _Base { |
| public: |
| void Reply(int32_t status, ::zx::vmo regions, uint64_t count); |
| void Reply(::fidl::BytePart _buffer, int32_t status, ::zx::vmo regions, uint64_t count); |
| void Reply(::fidl::DecodedMessage<GetAllocatedRegionsResponse> params); |
| |
| protected: |
| using ::fidl::CompleterBase::CompleterBase; |
| }; |
| |
| using GetAllocatedRegionsCompleter = ::fidl::Completer<GetAllocatedRegionsCompleterBase>; |
| |
| virtual void GetAllocatedRegions(GetAllocatedRegionsCompleter::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 GetAllocatedRegionsRequest(const ::fidl::DecodedMessage<Blobfs::GetAllocatedRegionsRequest>& _msg); |
| static void GetAllocatedRegionsResponse(const ::fidl::DecodedMessage<Blobfs::GetAllocatedRegionsResponse>& _msg); |
| }; |
| }; |
| |
| extern "C" const fidl_type_t v1_fuchsia_blobfs_BlockRegionTable; |
| |
| struct BlockRegion { |
| static constexpr const fidl_type_t* Type = &v1_fuchsia_blobfs_BlockRegionTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 16; |
| [[maybe_unused]] |
| static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| |
| uint64_t offset = {}; |
| |
| uint64_t length = {}; |
| }; |
| |
| } // namespace blobfs |
| } // namespace fuchsia |
| } // namespace llcpp |
| |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobRequest> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobRequest> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobRequest) |
| == ::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobRequest::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobRequest, merkleroot) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobResponse) |
| == ::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::CorruptBlobHandler::CorruptBlobResponse, action) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsRequest> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsRequest> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsRequest) |
| == ::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsRequest::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsRequest, handler) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsResponse) |
| == ::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::BlobfsAdmin::HandleCorruptBlobsResponse, status) == 16); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse> : public std::true_type {}; |
| template <> |
| struct IsFidlMessage<::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse> : public std::true_type {}; |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse) |
| == ::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse::PrimarySize); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse, status) == 16); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse, regions) == 20); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::Blobfs::GetAllocatedRegionsResponse, count) == 24); |
| |
| template <> |
| struct IsFidlType<::llcpp::fuchsia::blobfs::BlockRegion> : public std::true_type {}; |
| static_assert(std::is_standard_layout_v<::llcpp::fuchsia::blobfs::BlockRegion>); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::BlockRegion, offset) == 0); |
| static_assert(offsetof(::llcpp::fuchsia::blobfs::BlockRegion, length) == 8); |
| static_assert(sizeof(::llcpp::fuchsia::blobfs::BlockRegion) == ::llcpp::fuchsia::blobfs::BlockRegion::PrimarySize); |
| |
| } // namespace fidl |