Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/ipc/PBackgroundParent.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/dom/PBackgroundLSRequest.h"
#include "mozilla/dom/PBackgroundLSRequestParent.h"
#include "mozilla/dom/PBackgroundLSRequestChild.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 PBackgroundLSRequest {
nsresult
CreateEndpoints(
base::ProcessId aParentDestPid,
base::ProcessId aChildDestPid,
mozilla::ipc::Endpoint<::mozilla::dom::PBackgroundLSRequestParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::PBackgroundLSRequestChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestPid, aChildDestPid, aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_Cancel(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Cancel__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_Finish(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Finish__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___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg___delete____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___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply___delete____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_Ready(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Ready__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));
}
} // namespace PBackgroundLSRequest
} // namespace dom
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct LSRequestPreloadDatastoreResponse|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::LSRequestPreloadDatastoreResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
}
auto ParamTraits<::mozilla::dom::LSRequestPreloadDatastoreResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{std::in_place};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct LSRequestPrepareDatastoreResponse|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::LSRequestPrepareDatastoreResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
(aWriter)->WriteBytes((&((aVar).datastoreId())), 8);
// Sentinel = 'datastoreId'
(aWriter)->WriteSentinel(456262773);
}
auto ParamTraits<::mozilla::dom::LSRequestPrepareDatastoreResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->datastoreId())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'datastoreId'
if ((!((aReader)->ReadSentinel(456262773)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct LSRequestPrepareObserverResponse|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::LSRequestPrepareObserverResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
(aWriter)->WriteBytes((&((aVar).observerId())), 8);
// Sentinel = 'observerId'
(aWriter)->WriteSentinel(386335766);
}
auto ParamTraits<::mozilla::dom::LSRequestPrepareObserverResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->observerId())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'observerId'
if ((!((aReader)->ReadSentinel(386335766)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union LSRequestResponse|
//
namespace mozilla {
namespace dom {
auto LSRequestResponse::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TLSRequestPreloadDatastoreResponse:
{
(ptr_LSRequestPreloadDatastoreResponse())->~LSRequestPreloadDatastoreResponse__tdef();
break;
}
case TLSRequestPrepareDatastoreResponse:
{
(ptr_LSRequestPrepareDatastoreResponse())->~LSRequestPrepareDatastoreResponse__tdef();
break;
}
case TLSRequestPrepareObserverResponse:
{
(ptr_LSRequestPrepareObserverResponse())->~LSRequestPrepareObserverResponse__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(const LSRequestPreloadDatastoreResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(aOther);
mType = TLSRequestPreloadDatastoreResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(LSRequestPreloadDatastoreResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(std::move(aOther));
mType = TLSRequestPreloadDatastoreResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(const LSRequestPrepareDatastoreResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(aOther);
mType = TLSRequestPrepareDatastoreResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(LSRequestPrepareDatastoreResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(std::move(aOther));
mType = TLSRequestPrepareDatastoreResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(const LSRequestPrepareObserverResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(aOther);
mType = TLSRequestPrepareObserverResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(LSRequestPrepareObserverResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(std::move(aOther));
mType = TLSRequestPrepareObserverResponse;
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(const LSRequestResponse& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TLSRequestPreloadDatastoreResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse((aOther).get_LSRequestPreloadDatastoreResponse());
break;
}
case TLSRequestPrepareDatastoreResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse((aOther).get_LSRequestPrepareDatastoreResponse());
break;
}
case TLSRequestPrepareObserverResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse((aOther).get_LSRequestPrepareObserverResponse());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT LSRequestResponse::LSRequestResponse(LSRequestResponse&& 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 TLSRequestPreloadDatastoreResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(std::move((aOther).get_LSRequestPreloadDatastoreResponse()));
(aOther).MaybeDestroy();
break;
}
case TLSRequestPrepareDatastoreResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(std::move((aOther).get_LSRequestPrepareDatastoreResponse()));
(aOther).MaybeDestroy();
break;
}
case TLSRequestPrepareObserverResponse:
{
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(std::move((aOther).get_LSRequestPrepareObserverResponse()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
LSRequestResponse::~LSRequestResponse()
{
MaybeDestroy();
}
auto LSRequestResponse::operator=(const nsresult& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto LSRequestResponse::operator=(nsresult&& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto LSRequestResponse::operator=(const LSRequestPreloadDatastoreResponse& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(aRhs);
mType = TLSRequestPreloadDatastoreResponse;
return (*(this));
}
auto LSRequestResponse::operator=(LSRequestPreloadDatastoreResponse&& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(std::move(aRhs));
mType = TLSRequestPreloadDatastoreResponse;
return (*(this));
}
auto LSRequestResponse::operator=(const LSRequestPrepareDatastoreResponse& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(aRhs);
mType = TLSRequestPrepareDatastoreResponse;
return (*(this));
}
auto LSRequestResponse::operator=(LSRequestPrepareDatastoreResponse&& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(std::move(aRhs));
mType = TLSRequestPrepareDatastoreResponse;
return (*(this));
}
auto LSRequestResponse::operator=(const LSRequestPrepareObserverResponse& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(aRhs);
mType = TLSRequestPrepareObserverResponse;
return (*(this));
}
auto LSRequestResponse::operator=(LSRequestPrepareObserverResponse&& aRhs) -> LSRequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(std::move(aRhs));
mType = TLSRequestPrepareObserverResponse;
return (*(this));
}
auto LSRequestResponse::operator=(const LSRequestResponse& aRhs) -> LSRequestResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TLSRequestPreloadDatastoreResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse((aRhs).get_LSRequestPreloadDatastoreResponse());
break;
}
case TLSRequestPrepareDatastoreResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse((aRhs).get_LSRequestPrepareDatastoreResponse());
break;
}
case TLSRequestPrepareObserverResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse((aRhs).get_LSRequestPrepareObserverResponse());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto LSRequestResponse::operator=(LSRequestResponse&& aRhs) -> LSRequestResponse&
{
(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 TLSRequestPreloadDatastoreResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPreloadDatastoreResponse()) LSRequestPreloadDatastoreResponse(std::move((aRhs).get_LSRequestPreloadDatastoreResponse()));
(aRhs).MaybeDestroy();
break;
}
case TLSRequestPrepareDatastoreResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareDatastoreResponse()) LSRequestPrepareDatastoreResponse(std::move((aRhs).get_LSRequestPrepareDatastoreResponse()));
(aRhs).MaybeDestroy();
break;
}
case TLSRequestPrepareObserverResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_LSRequestPrepareObserverResponse()) LSRequestPrepareObserverResponse(std::move((aRhs).get_LSRequestPrepareObserverResponse()));
(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::LSRequestResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::dom::LSRequestResponse union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'LSRequestResponse'
(aWriter)->WriteSentinel(994641624);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TLSRequestPreloadDatastoreResponse:
{
IPC::WriteParam(aWriter, (aVar).get_LSRequestPreloadDatastoreResponse());
// Sentinel = 'TLSRequestPreloadDatastoreResponse'
(aWriter)->WriteSentinel(3891006874);
return;
}
case union__::TLSRequestPrepareDatastoreResponse:
{
IPC::WriteParam(aWriter, (aVar).get_LSRequestPrepareDatastoreResponse());
// Sentinel = 'TLSRequestPrepareDatastoreResponse'
(aWriter)->WriteSentinel(3900509602);
return;
}
case union__::TLSRequestPrepareObserverResponse:
{
IPC::WriteParam(aWriter, (aVar).get_LSRequestPrepareObserverResponse());
// Sentinel = 'TLSRequestPrepareObserverResponse'
(aWriter)->WriteSentinel(3683454275);
return;
}
default:
{
aWriter->FatalError("unknown variant of union LSRequestResponse");
return;
}
}
}
auto ParamTraits<::mozilla::dom::LSRequestResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::LSRequestResponse union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union LSRequestResponse");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'LSRequestResponse'
if ((!((aReader)->ReadSentinel(994641624)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union LSRequestResponse");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union LSRequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union LSRequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TLSRequestPreloadDatastoreResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::LSRequestPreloadDatastoreResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TLSRequestPreloadDatastoreResponse of union LSRequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TLSRequestPreloadDatastoreResponse'
if ((!((aReader)->ReadSentinel(3891006874)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TLSRequestPreloadDatastoreResponse of union LSRequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TLSRequestPrepareDatastoreResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::LSRequestPrepareDatastoreResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TLSRequestPrepareDatastoreResponse of union LSRequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TLSRequestPrepareDatastoreResponse'
if ((!((aReader)->ReadSentinel(3900509602)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TLSRequestPrepareDatastoreResponse of union LSRequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TLSRequestPrepareObserverResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::LSRequestPrepareObserverResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TLSRequestPrepareObserverResponse of union LSRequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TLSRequestPrepareObserverResponse'
if ((!((aReader)->ReadSentinel(3683454275)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TLSRequestPrepareObserverResponse of union LSRequestResponse");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union LSRequestResponse");
return {};
}
}
}
} // namespace IPC