blob: 9cf9d6ffc1fdf2640da5837a97d99183fabbed4a [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include "lib/fidl/cpp/internal/header.h"
namespace test {
namespace inheritance {
//
// Domain objects declarations
//
class SuperFooRequest;
class SuperFooResponse;
#ifdef __Fuchsia__
class super;
using superHandle = ::fidl::InterfaceHandle<super>;
#endif // __Fuchsia__
#ifdef __Fuchsia__
class sub;
using subHandle = ::fidl::InterfaceHandle<sub>;
#endif // __Fuchsia__
class SuperFooRequest final {
public:
static const fidl_type_t* FidlType;
::std::string s;
static inline ::std::unique_ptr<SuperFooRequest> New() { return ::std::make_unique<SuperFooRequest>(); }
void Encode(::fidl::Encoder* _encoder, size_t _offset,
cpp17::optional<::fidl::HandleInformation> maybe_handle_info = cpp17::nullopt);
static void Decode(::fidl::Decoder* _decoder, SuperFooRequest* value, size_t _offset);
zx_status_t Clone(SuperFooRequest* result) const;
};
inline zx_status_t Clone(const ::test::inheritance::SuperFooRequest& _value,
::test::inheritance::SuperFooRequest* _result) {
return _value.Clone(_result);
}
using SuperFooRequestPtr = ::std::unique_ptr<SuperFooRequest>;
class SuperFooResponse final {
public:
static const fidl_type_t* FidlType;
int64_t y{};
static inline ::std::unique_ptr<SuperFooResponse> New() { return ::std::make_unique<SuperFooResponse>(); }
void Encode(::fidl::Encoder* _encoder, size_t _offset,
cpp17::optional<::fidl::HandleInformation> maybe_handle_info = cpp17::nullopt);
static void Decode(::fidl::Decoder* _decoder, SuperFooResponse* value, size_t _offset);
zx_status_t Clone(SuperFooResponse* result) const;
};
inline zx_status_t Clone(const ::test::inheritance::SuperFooResponse& _value,
::test::inheritance::SuperFooResponse* _result) {
return _value.Clone(_result);
}
using SuperFooResponsePtr = ::std::unique_ptr<SuperFooResponse>;
#ifdef __Fuchsia__
namespace _internal {
__LOCAL extern "C" const fidl_type_t test_inheritance_SuperFooRequestTable;
} // namespace _internal
class super_RequestEncoder {
public:
static ::fidl::HLCPPOutgoingMessage foo(::fidl::MessageEncoder* _encoder, ::std::string* s) {
_encoder->Alloc(16);
::fidl::Encode(_encoder, s, 0 + sizeof(fidl_message_header_t));
return _encoder->GetMessage();
}
};
namespace _internal {
__LOCAL extern "C" const fidl_type_t test_inheritance_SuperFooResponseTable;
} // namespace _internal
class super_ResponseEncoder {
public:
static ::fidl::HLCPPOutgoingMessage foo(::fidl::MessageEncoder* _encoder, int64_t* y) {
_encoder->Alloc(8);
::fidl::Encode(_encoder, y, 0 + sizeof(fidl_message_header_t));
return _encoder->GetMessage();
}
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
class sub_RequestEncoder {
public:
static ::fidl::HLCPPOutgoingMessage foo(::fidl::MessageEncoder* _encoder, ::std::string* s) {
_encoder->Alloc(16);
::fidl::Encode(_encoder, s, 0 + sizeof(fidl_message_header_t));
return _encoder->GetMessage();
}
};
class sub_ResponseEncoder {
public:
static ::fidl::HLCPPOutgoingMessage foo(::fidl::MessageEncoder* _encoder, int64_t* y) {
_encoder->Alloc(8);
::fidl::Encode(_encoder, y, 0 + sizeof(fidl_message_header_t));
return _encoder->GetMessage();
}
};
#endif // __Fuchsia__
} // namespace inheritance
} // namespace test
namespace fidl {
template <>
struct CodingTraits<::test::inheritance::SuperFooRequest>
: public EncodableCodingTraits<::test::inheritance::SuperFooRequest, 16> {};
template <>
struct HasPadding<::test::inheritance::SuperFooRequest> : public std::true_type {};
template <>
struct IsMemcpyCompatible<::test::inheritance::SuperFooRequest> : public internal::BoolConstant<
!HasPadding<::test::inheritance::SuperFooRequest>::value && IsMemcpyCompatible<::std::string>::value> {};
inline zx_status_t Clone(const ::test::inheritance::SuperFooRequest& value,
::test::inheritance::SuperFooRequest* result) {
return ::test::inheritance::Clone(value, result);
}
template <>
struct Equality<::test::inheritance::SuperFooRequest> {
bool operator()(const ::test::inheritance::SuperFooRequest& _lhs, const ::test::inheritance::SuperFooRequest& _rhs) const {
if (!::fidl::Equals(_lhs.s, _rhs.s)) {
return false;
}
return true;
}
};
template <>
struct CodingTraits<::test::inheritance::SuperFooResponse>
: public EncodableCodingTraits<::test::inheritance::SuperFooResponse, 8> {};
template <>
struct IsMemcpyCompatible<::test::inheritance::SuperFooResponse> : public internal::BoolConstant<
!HasPadding<::test::inheritance::SuperFooResponse>::value && IsMemcpyCompatible<int64_t>::value> {};
inline zx_status_t Clone(const ::test::inheritance::SuperFooResponse& value,
::test::inheritance::SuperFooResponse* result) {
return ::test::inheritance::Clone(value, result);
}
template <>
struct Equality<::test::inheritance::SuperFooResponse> {
bool operator()(const ::test::inheritance::SuperFooResponse& _lhs, const ::test::inheritance::SuperFooResponse& _rhs) const {
if (!::fidl::Equals(_lhs.y, _rhs.y)) {
return false;
}
return true;
}
};
//
// Proxies and stubs declarations
//
} // namespace fidl
namespace test {
namespace inheritance {
#ifdef __Fuchsia__
using superPtr = ::fidl::InterfacePtr<super>;
class super_Proxy;
class super_Stub;
class super_EventSender;
class super_Sync;
using superSyncPtr = ::fidl::SynchronousInterfacePtr<super>;
class super_SyncProxy;
namespace internal {
constexpr uint64_t ksuper_foo_Ordinal = 0x68a61c2a230db8b8lu;
constexpr ::fidl::MessageDynamicFlags ksuper_foo_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod;
} // namespace internal
#endif // __Fuchsia__
#ifdef __Fuchsia__
using subPtr = ::fidl::InterfacePtr<sub>;
class sub_Proxy;
class sub_Stub;
class sub_EventSender;
class sub_Sync;
using subSyncPtr = ::fidl::SynchronousInterfacePtr<sub>;
class sub_SyncProxy;
namespace internal {
constexpr uint64_t ksub_foo_Ordinal = 0x68a61c2a230db8b8lu;
constexpr ::fidl::MessageDynamicFlags ksub_foo_DynamicFlags = ::fidl::MessageDynamicFlags::kStrictMethod;
} // namespace internal
#endif // __Fuchsia__
#ifdef __Fuchsia__
class super {
public:
using Proxy_ = ::test::inheritance::super_Proxy;
using Stub_ = ::test::inheritance::super_Stub;
using EventSender_ = ::test::inheritance::super_EventSender;
using Sync_ = ::test::inheritance::super_Sync;
virtual ~super();
using fooCallback =
fit::function<void(int64_t)>;
virtual void foo(::std::string s, fooCallback callback) = 0;
};
class super_RequestDecoder {
public:
super_RequestDecoder() = default;
virtual ~super_RequestDecoder() = default;
static const fidl_type_t* GetType(uint64_t ordinal, bool* out_needs_response, bool* is_known);
virtual void foo(::std::string s) = 0;
};
class super_ResponseDecoder {
public:
super_ResponseDecoder() = default;
virtual ~super_ResponseDecoder() = default;
static const fidl_type_t* GetType(uint64_t ordinal);
virtual void foo(int64_t y) = 0;
};
class super_EventSender {
public:
virtual ~super_EventSender();
};
class super_Sync {
public:
using Proxy_ = ::test::inheritance::super_SyncProxy;
virtual ~super_Sync();
virtual zx_status_t foo(::std::string s, int64_t* out_y) = 0;
};
class super_Proxy final : public ::fidl::internal::Proxy, public super {
public:
explicit super_Proxy(::fidl::internal::ProxyController* controller);
~super_Proxy() override;
zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message) override;
// cts-coverage-fidl-name:test.inheritance/super.foo
void foo(::std::string s, fooCallback callback) override;
private:
super_Proxy(const ::test::inheritance::super_Proxy&) = delete;
super_Proxy& operator=(const ::test::inheritance::super_Proxy&) = delete;
::fidl::internal::ProxyController* controller_;
};
class super_Stub final : public ::fidl::internal::Stub, public ::test::inheritance::super_EventSender {
public:
typedef class ::test::inheritance::super super_clazz;
explicit super_Stub(::test::inheritance::super_Stub::super_clazz* impl);
~super_Stub() override;
zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message,
::fidl::internal::PendingResponse response) override;
private:
::test::inheritance::super_Stub::super_clazz* impl_;
};
class super_SyncProxy : public ::test::inheritance::super_Sync {
public:
explicit super_SyncProxy(::zx::channel channel);
~super_SyncProxy() override;
// cts-coverage-fidl-name:test.inheritance/super.foo
zx_status_t foo(::std::string s, int64_t* out_y) override;
private:
::fidl::internal::SynchronousProxy proxy_;
friend class ::fidl::SynchronousInterfacePtr<super>;
};
#endif // __Fuchsia__
#ifdef __Fuchsia__
class sub {
public:
using Proxy_ = ::test::inheritance::sub_Proxy;
using Stub_ = ::test::inheritance::sub_Stub;
using EventSender_ = ::test::inheritance::sub_EventSender;
using Sync_ = ::test::inheritance::sub_Sync;
virtual ~sub();
using fooCallback =
fit::function<void(int64_t)>;
virtual void foo(::std::string s, fooCallback callback) = 0;
};
class sub_RequestDecoder {
public:
sub_RequestDecoder() = default;
virtual ~sub_RequestDecoder() = default;
static const fidl_type_t* GetType(uint64_t ordinal, bool* out_needs_response, bool* is_known);
virtual void foo(::std::string s) = 0;
};
class sub_ResponseDecoder {
public:
sub_ResponseDecoder() = default;
virtual ~sub_ResponseDecoder() = default;
static const fidl_type_t* GetType(uint64_t ordinal);
virtual void foo(int64_t y) = 0;
};
class sub_EventSender {
public:
virtual ~sub_EventSender();
};
class sub_Sync {
public:
using Proxy_ = ::test::inheritance::sub_SyncProxy;
virtual ~sub_Sync();
virtual zx_status_t foo(::std::string s, int64_t* out_y) = 0;
};
class sub_Proxy final : public ::fidl::internal::Proxy, public sub {
public:
explicit sub_Proxy(::fidl::internal::ProxyController* controller);
~sub_Proxy() override;
zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message) override;
// cts-coverage-fidl-name:test.inheritance/sub.foo
void foo(::std::string s, fooCallback callback) override;
private:
sub_Proxy(const ::test::inheritance::sub_Proxy&) = delete;
sub_Proxy& operator=(const ::test::inheritance::sub_Proxy&) = delete;
::fidl::internal::ProxyController* controller_;
};
class sub_Stub final : public ::fidl::internal::Stub, public ::test::inheritance::sub_EventSender {
public:
typedef class ::test::inheritance::sub sub_clazz;
explicit sub_Stub(::test::inheritance::sub_Stub::sub_clazz* impl);
~sub_Stub() override;
zx_status_t Dispatch_(::fidl::HLCPPIncomingMessage message,
::fidl::internal::PendingResponse response) override;
private:
::test::inheritance::sub_Stub::sub_clazz* impl_;
};
class sub_SyncProxy : public ::test::inheritance::sub_Sync {
public:
explicit sub_SyncProxy(::zx::channel channel);
~sub_SyncProxy() override;
// cts-coverage-fidl-name:test.inheritance/sub.foo
zx_status_t foo(::std::string s, int64_t* out_y) override;
private:
::fidl::internal::SynchronousProxy proxy_;
friend class ::fidl::SynchronousInterfacePtr<sub>;
};
#endif // __Fuchsia__
} // namespace inheritance
} // namespace test