Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PWebTransport.h"
#include "mozilla/dom/PWebTransportParent.h"
#include "mozilla/dom/PWebTransportChild.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
namespace mozilla {
namespace dom {
namespace PWebTransport {
nsresult
CreateEndpoints(
base::ProcessId aParentDestPid,
base::ProcessId aChildDestPid,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestPid, aChildDestPid, aParent, aChild);
}
nsresult
CreateEndpoints(
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_Close(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Close__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_CreateUnidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_CreateUnidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_CreateUnidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_CreateUnidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_CreateBidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_CreateBidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_CreateBidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_CreateBidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OutgoingDatagram(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_OutgoingDatagram__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_OutgoingDatagram(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_OutgoingDatagram__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_GetMaxDatagramSize(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_GetMaxDatagramSize__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_GetMaxDatagramSize(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_GetMaxDatagramSize__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_SetSendOrder(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_SetSendOrder__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_IncomingUnidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_IncomingUnidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_IncomingBidirectionalStream(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_IncomingBidirectionalStream__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_IncomingDatagram(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_IncomingDatagram__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_RemoteClosed(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_RemoteClosed__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnStreamResetOrStopSending(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_OnStreamResetOrStopSending__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_CloseAll(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_CloseAll__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_CloseAll(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_CloseAll__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
} // namespace PWebTransport
} // namespace dom
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct UnidirectionalStream|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::UnidirectionalStream>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).outStream());
// Sentinel = 'outStream'
(aWriter)->WriteSentinel(320865221);
(aWriter)->WriteBytes((&((aVar).streamId())), 8);
// Sentinel = 'streamId'
(aWriter)->WriteSentinel(254935866);
}
auto ParamTraits<::mozilla::dom::UnidirectionalStream>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___outStream = IPC::ReadParam<RefPtr<::mozilla::ipc::DataPipeSender>>(aReader);
if (!maybe___outStream) {
aReader->FatalError("Error deserializing 'outStream' (DataPipeSender) member of 'UnidirectionalStream'");
return {};
}
auto& _outStream = *maybe___outStream;
// Sentinel = 'outStream'
if ((!((aReader)->ReadSentinel(320865221)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'outStream' (DataPipeSender) member of 'UnidirectionalStream'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0},
std::move(_outStream)};
if ((!((aReader)->ReadBytesInto((&((result__)->streamId())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'streamId'
if ((!((aReader)->ReadSentinel(254935866)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union UnidirectionalStreamResponse|
//
namespace mozilla {
namespace dom {
auto UnidirectionalStreamResponse::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TUnidirectionalStream:
{
(ptr_UnidirectionalStream())->~UnidirectionalStream__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(const UnidirectionalStream& aOther)
{
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(aOther);
mType = TUnidirectionalStream;
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(UnidirectionalStream&& aOther)
{
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(std::move(aOther));
mType = TUnidirectionalStream;
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(const UnidirectionalStreamResponse& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TUnidirectionalStream:
{
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream((aOther).get_UnidirectionalStream());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT UnidirectionalStreamResponse::UnidirectionalStreamResponse(UnidirectionalStreamResponse&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case TUnidirectionalStream:
{
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(std::move((aOther).get_UnidirectionalStream()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
UnidirectionalStreamResponse::~UnidirectionalStreamResponse()
{
MaybeDestroy();
}
auto UnidirectionalStreamResponse::operator=(const nsresult& aRhs) -> UnidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto UnidirectionalStreamResponse::operator=(nsresult&& aRhs) -> UnidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto UnidirectionalStreamResponse::operator=(const UnidirectionalStream& aRhs) -> UnidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(aRhs);
mType = TUnidirectionalStream;
return (*(this));
}
auto UnidirectionalStreamResponse::operator=(UnidirectionalStream&& aRhs) -> UnidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(std::move(aRhs));
mType = TUnidirectionalStream;
return (*(this));
}
auto UnidirectionalStreamResponse::operator=(const UnidirectionalStreamResponse& aRhs) -> UnidirectionalStreamResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TUnidirectionalStream:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream((aRhs).get_UnidirectionalStream());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto UnidirectionalStreamResponse::operator=(UnidirectionalStreamResponse&& aRhs) -> UnidirectionalStreamResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case TUnidirectionalStream:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_UnidirectionalStream()) UnidirectionalStream(std::move((aRhs).get_UnidirectionalStream()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::UnidirectionalStreamResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::dom::UnidirectionalStreamResponse union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'UnidirectionalStreamResponse'
(aWriter)->WriteSentinel(2767194998);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TUnidirectionalStream:
{
IPC::WriteParam(aWriter, (aVar).get_UnidirectionalStream());
// Sentinel = 'TUnidirectionalStream'
(aWriter)->WriteSentinel(1545013371);
return;
}
default:
{
aWriter->FatalError("unknown variant of union UnidirectionalStreamResponse");
return;
}
}
}
auto ParamTraits<::mozilla::dom::UnidirectionalStreamResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::UnidirectionalStreamResponse union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union UnidirectionalStreamResponse");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'UnidirectionalStreamResponse'
if ((!((aReader)->ReadSentinel(2767194998)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union UnidirectionalStreamResponse");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union UnidirectionalStreamResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union UnidirectionalStreamResponse");
return {};
}
return std::move(tmp);
}
case union__::TUnidirectionalStream:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::UnidirectionalStream>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TUnidirectionalStream of union UnidirectionalStreamResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TUnidirectionalStream'
if ((!((aReader)->ReadSentinel(1545013371)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TUnidirectionalStream of union UnidirectionalStreamResponse");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union UnidirectionalStreamResponse");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct BidirectionalStream|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::BidirectionalStream>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).inStream());
// Sentinel = 'inStream'
(aWriter)->WriteSentinel(246285124);
IPC::WriteParam(aWriter, (aVar).outStream());
// Sentinel = 'outStream'
(aWriter)->WriteSentinel(320865221);
(aWriter)->WriteBytes((&((aVar).streamId())), 8);
// Sentinel = 'streamId'
(aWriter)->WriteSentinel(254935866);
}
auto ParamTraits<::mozilla::dom::BidirectionalStream>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___inStream = IPC::ReadParam<RefPtr<::mozilla::ipc::DataPipeReceiver>>(aReader);
if (!maybe___inStream) {
aReader->FatalError("Error deserializing 'inStream' (DataPipeReceiver) member of 'BidirectionalStream'");
return {};
}
auto& _inStream = *maybe___inStream;
// Sentinel = 'inStream'
if ((!((aReader)->ReadSentinel(246285124)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'inStream' (DataPipeReceiver) member of 'BidirectionalStream'");
return {};
}
auto maybe___outStream = IPC::ReadParam<RefPtr<::mozilla::ipc::DataPipeSender>>(aReader);
if (!maybe___outStream) {
aReader->FatalError("Error deserializing 'outStream' (DataPipeSender) member of 'BidirectionalStream'");
return {};
}
auto& _outStream = *maybe___outStream;
// Sentinel = 'outStream'
if ((!((aReader)->ReadSentinel(320865221)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'outStream' (DataPipeSender) member of 'BidirectionalStream'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0},
std::move(_inStream),
std::move(_outStream)};
if ((!((aReader)->ReadBytesInto((&((result__)->streamId())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'streamId'
if ((!((aReader)->ReadSentinel(254935866)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union BidirectionalStreamResponse|
//
namespace mozilla {
namespace dom {
auto BidirectionalStreamResponse::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TBidirectionalStream:
{
(ptr_BidirectionalStream())->~BidirectionalStream__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(const BidirectionalStream& aOther)
{
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(aOther);
mType = TBidirectionalStream;
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(BidirectionalStream&& aOther)
{
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(std::move(aOther));
mType = TBidirectionalStream;
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(const BidirectionalStreamResponse& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TBidirectionalStream:
{
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream((aOther).get_BidirectionalStream());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT BidirectionalStreamResponse::BidirectionalStreamResponse(BidirectionalStreamResponse&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case TBidirectionalStream:
{
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(std::move((aOther).get_BidirectionalStream()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
BidirectionalStreamResponse::~BidirectionalStreamResponse()
{
MaybeDestroy();
}
auto BidirectionalStreamResponse::operator=(const nsresult& aRhs) -> BidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto BidirectionalStreamResponse::operator=(nsresult&& aRhs) -> BidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto BidirectionalStreamResponse::operator=(const BidirectionalStream& aRhs) -> BidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(aRhs);
mType = TBidirectionalStream;
return (*(this));
}
auto BidirectionalStreamResponse::operator=(BidirectionalStream&& aRhs) -> BidirectionalStreamResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(std::move(aRhs));
mType = TBidirectionalStream;
return (*(this));
}
auto BidirectionalStreamResponse::operator=(const BidirectionalStreamResponse& aRhs) -> BidirectionalStreamResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TBidirectionalStream:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream((aRhs).get_BidirectionalStream());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto BidirectionalStreamResponse::operator=(BidirectionalStreamResponse&& aRhs) -> BidirectionalStreamResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case TBidirectionalStream:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BidirectionalStream()) BidirectionalStream(std::move((aRhs).get_BidirectionalStream()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::BidirectionalStreamResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::dom::BidirectionalStreamResponse union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'BidirectionalStreamResponse'
(aWriter)->WriteSentinel(2533296885);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TBidirectionalStream:
{
IPC::WriteParam(aWriter, (aVar).get_BidirectionalStream());
// Sentinel = 'TBidirectionalStream'
(aWriter)->WriteSentinel(1373243386);
return;
}
default:
{
aWriter->FatalError("unknown variant of union BidirectionalStreamResponse");
return;
}
}
}
auto ParamTraits<::mozilla::dom::BidirectionalStreamResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::BidirectionalStreamResponse union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union BidirectionalStreamResponse");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'BidirectionalStreamResponse'
if ((!((aReader)->ReadSentinel(2533296885)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union BidirectionalStreamResponse");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union BidirectionalStreamResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union BidirectionalStreamResponse");
return {};
}
return std::move(tmp);
}
case union__::TBidirectionalStream:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::BidirectionalStream>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TBidirectionalStream of union BidirectionalStreamResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TBidirectionalStream'
if ((!((aReader)->ReadSentinel(1373243386)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TBidirectionalStream of union BidirectionalStreamResponse");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union BidirectionalStreamResponse");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ResetError|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::ResetError>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).error());
// Sentinel = 'error'
(aWriter)->WriteSentinel(107741739);
}
auto ParamTraits<::mozilla::dom::ResetError>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___error = IPC::ReadParam<::nsresult>(aReader);
if (!maybe___error) {
aReader->FatalError("Error deserializing 'error' (nsresult) member of 'ResetError'");
return {};
}
auto& _error = *maybe___error;
// Sentinel = 'error'
if ((!((aReader)->ReadSentinel(107741739)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'error' (nsresult) member of 'ResetError'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_error)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct StopSendingError|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::StopSendingError>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).error());
// Sentinel = 'error'
(aWriter)->WriteSentinel(107741739);
}
auto ParamTraits<::mozilla::dom::StopSendingError>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___error = IPC::ReadParam<::nsresult>(aReader);
if (!maybe___error) {
aReader->FatalError("Error deserializing 'error' (nsresult) member of 'StopSendingError'");
return {};
}
auto& _error = *maybe___error;
// Sentinel = 'error'
if ((!((aReader)->ReadSentinel(107741739)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'error' (nsresult) member of 'StopSendingError'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_error)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union StreamResetOrStopSendingError|
//
namespace mozilla {
namespace dom {
auto StreamResetOrStopSendingError::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TResetError:
{
(ptr_ResetError())->~ResetError__tdef();
break;
}
case TStopSendingError:
{
(ptr_StopSendingError())->~StopSendingError__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(const ResetError& aOther)
{
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(aOther);
mType = TResetError;
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(ResetError&& aOther)
{
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(std::move(aOther));
mType = TResetError;
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(const StopSendingError& aOther)
{
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(aOther);
mType = TStopSendingError;
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(StopSendingError&& aOther)
{
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(std::move(aOther));
mType = TStopSendingError;
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(const StreamResetOrStopSendingError& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TResetError:
{
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError((aOther).get_ResetError());
break;
}
case TStopSendingError:
{
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError((aOther).get_StopSendingError());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT StreamResetOrStopSendingError::StreamResetOrStopSendingError(StreamResetOrStopSendingError&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TResetError:
{
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(std::move((aOther).get_ResetError()));
(aOther).MaybeDestroy();
break;
}
case TStopSendingError:
{
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(std::move((aOther).get_StopSendingError()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
StreamResetOrStopSendingError::~StreamResetOrStopSendingError()
{
MaybeDestroy();
}
auto StreamResetOrStopSendingError::operator=(const ResetError& aRhs) -> StreamResetOrStopSendingError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(aRhs);
mType = TResetError;
return (*(this));
}
auto StreamResetOrStopSendingError::operator=(ResetError&& aRhs) -> StreamResetOrStopSendingError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(std::move(aRhs));
mType = TResetError;
return (*(this));
}
auto StreamResetOrStopSendingError::operator=(const StopSendingError& aRhs) -> StreamResetOrStopSendingError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(aRhs);
mType = TStopSendingError;
return (*(this));
}
auto StreamResetOrStopSendingError::operator=(StopSendingError&& aRhs) -> StreamResetOrStopSendingError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(std::move(aRhs));
mType = TStopSendingError;
return (*(this));
}
auto StreamResetOrStopSendingError::operator=(const StreamResetOrStopSendingError& aRhs) -> StreamResetOrStopSendingError&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TResetError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError((aRhs).get_ResetError());
break;
}
case TStopSendingError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError((aRhs).get_StopSendingError());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto StreamResetOrStopSendingError::operator=(StreamResetOrStopSendingError&& aRhs) -> StreamResetOrStopSendingError&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TResetError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetError()) ResetError(std::move((aRhs).get_ResetError()));
(aRhs).MaybeDestroy();
break;
}
case TStopSendingError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StopSendingError()) StopSendingError(std::move((aRhs).get_StopSendingError()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::StreamResetOrStopSendingError>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::dom::StreamResetOrStopSendingError union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'StreamResetOrStopSendingError'
(aWriter)->WriteSentinel(2911636393);
switch (type) {
case union__::TResetError:
{
IPC::WriteParam(aWriter, (aVar).get_ResetError());
// Sentinel = 'TResetError'
(aWriter)->WriteSentinel(423756898);
return;
}
case union__::TStopSendingError:
{
IPC::WriteParam(aWriter, (aVar).get_StopSendingError());
// Sentinel = 'TStopSendingError'
(aWriter)->WriteSentinel(1005127373);
return;
}
default:
{
aWriter->FatalError("unknown variant of union StreamResetOrStopSendingError");
return;
}
}
}
auto ParamTraits<::mozilla::dom::StreamResetOrStopSendingError>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::StreamResetOrStopSendingError union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union StreamResetOrStopSendingError");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'StreamResetOrStopSendingError'
if ((!((aReader)->ReadSentinel(2911636393)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union StreamResetOrStopSendingError");
return {};
}
switch (type) {
case union__::TResetError:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ResetError>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TResetError of union StreamResetOrStopSendingError");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TResetError'
if ((!((aReader)->ReadSentinel(423756898)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TResetError of union StreamResetOrStopSendingError");
return {};
}
return std::move(tmp);
}
case union__::TStopSendingError:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::StopSendingError>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TStopSendingError of union StreamResetOrStopSendingError");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TStopSendingError'
if ((!((aReader)->ReadSentinel(1005127373)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TStopSendingError of union StreamResetOrStopSendingError");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union StreamResetOrStopSendingError");
return {};
}
}
}
} // namespace IPC