Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/widget/filedialog/PWinFileDialog.h"
#include "mozilla/widget/filedialog/PWinFileDialogParent.h"
#include "mozilla/widget/filedialog/PWinFileDialogChild.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 widget {
namespace filedialog {
namespace PWinFileDialog {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestInfo, aChildDestInfo, aParent, aChild);
}
nsresult
CreateEndpoints(
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_ShowFileDialog(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_ShowFileDialog__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_ShowFileDialog(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_ShowFileDialog__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_ShowFolderDialog(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_ShowFolderDialog__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_ShowFolderDialog(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_ShowFolderDialog__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 PWinFileDialog
} // namespace filedialog
} // namespace widget
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union FileResult|
//
namespace mozilla {
namespace widget {
namespace filedialog {
auto FileResult::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TMaybeResults:
{
(ptr_MaybeResults())->~MaybeResults__tdef();
break;
}
case TRemoteError:
{
(ptr_RemoteError())->~RemoteError__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT FileResult::FileResult(const mozilla::Maybe<Results>& aOther)
{
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(aOther);
mType = TMaybeResults;
}
MOZ_IMPLICIT FileResult::FileResult(mozilla::Maybe<Results>&& aOther)
{
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(std::move(aOther));
mType = TMaybeResults;
}
MOZ_IMPLICIT FileResult::FileResult(const RemoteError& aOther)
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(aOther);
mType = TRemoteError;
}
MOZ_IMPLICIT FileResult::FileResult(RemoteError&& aOther)
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move(aOther));
mType = TRemoteError;
}
MOZ_IMPLICIT FileResult::FileResult(const FileResult& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TMaybeResults:
{
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>((aOther).get_MaybeResults());
break;
}
case TRemoteError:
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError((aOther).get_RemoteError());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT FileResult::FileResult(FileResult&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TMaybeResults:
{
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(std::move((aOther).get_MaybeResults()));
(aOther).MaybeDestroy();
break;
}
case TRemoteError:
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move((aOther).get_RemoteError()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
FileResult::~FileResult()
{
MaybeDestroy();
}
auto FileResult::operator=(const mozilla::Maybe<Results>& aRhs) -> FileResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(aRhs);
mType = TMaybeResults;
return (*(this));
}
auto FileResult::operator=(mozilla::Maybe<Results>&& aRhs) -> FileResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(std::move(aRhs));
mType = TMaybeResults;
return (*(this));
}
auto FileResult::operator=(const RemoteError& aRhs) -> FileResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(aRhs);
mType = TRemoteError;
return (*(this));
}
auto FileResult::operator=(RemoteError&& aRhs) -> FileResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move(aRhs));
mType = TRemoteError;
return (*(this));
}
auto FileResult::operator=(const FileResult& aRhs) -> FileResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMaybeResults:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>((aRhs).get_MaybeResults());
break;
}
case TRemoteError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError((aRhs).get_RemoteError());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto FileResult::operator=(FileResult&& aRhs) -> FileResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMaybeResults:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybeResults()) mozilla::Maybe<Results>(std::move((aRhs).get_MaybeResults()));
(aRhs).MaybeDestroy();
break;
}
case TRemoteError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move((aRhs).get_RemoteError()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace filedialog
} // namespace widget
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::widget::filedialog::FileResult>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::widget::filedialog::FileResult union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'FileResult'
(aWriter)->WriteSentinel(351667200);
switch (type) {
case union__::TMaybeResults:
{
IPC::WriteParam(aWriter, (aVar).get_MaybeResults());
// Sentinel = 'TMaybeResults'
(aWriter)->WriteSentinel(582616373);
return;
}
case union__::TRemoteError:
{
IPC::WriteParam(aWriter, (aVar).get_RemoteError());
// Sentinel = 'TRemoteError'
(aWriter)->WriteSentinel(504497355);
return;
}
default:
{
aWriter->FatalError("unknown variant of union FileResult");
return;
}
}
}
auto ParamTraits<::mozilla::widget::filedialog::FileResult>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::widget::filedialog::FileResult union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union FileResult");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'FileResult'
if ((!((aReader)->ReadSentinel(351667200)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union FileResult");
return {};
}
switch (type) {
case union__::TMaybeResults:
{
auto maybe__tmp = IPC::ReadParam<mozilla::Maybe<::mozilla::widget::filedialog::Results>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMaybeResults of union FileResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMaybeResults'
if ((!((aReader)->ReadSentinel(582616373)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMaybeResults of union FileResult");
return {};
}
return std::move(tmp);
}
case union__::TRemoteError:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::widget::filedialog::RemoteError>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TRemoteError of union FileResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TRemoteError'
if ((!((aReader)->ReadSentinel(504497355)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TRemoteError of union FileResult");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union FileResult");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union FolderResult|
//
namespace mozilla {
namespace widget {
namespace filedialog {
auto FolderResult::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TMaybensString:
{
(ptr_MaybensString())->~MaybensString__tdef();
break;
}
case TRemoteError:
{
(ptr_RemoteError())->~RemoteError__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT FolderResult::FolderResult(const mozilla::Maybe<nsString>& aOther)
{
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(aOther);
mType = TMaybensString;
}
MOZ_IMPLICIT FolderResult::FolderResult(mozilla::Maybe<nsString>&& aOther)
{
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(std::move(aOther));
mType = TMaybensString;
}
MOZ_IMPLICIT FolderResult::FolderResult(const RemoteError& aOther)
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(aOther);
mType = TRemoteError;
}
MOZ_IMPLICIT FolderResult::FolderResult(RemoteError&& aOther)
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move(aOther));
mType = TRemoteError;
}
MOZ_IMPLICIT FolderResult::FolderResult(const FolderResult& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TMaybensString:
{
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>((aOther).get_MaybensString());
break;
}
case TRemoteError:
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError((aOther).get_RemoteError());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT FolderResult::FolderResult(FolderResult&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TMaybensString:
{
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(std::move((aOther).get_MaybensString()));
(aOther).MaybeDestroy();
break;
}
case TRemoteError:
{
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move((aOther).get_RemoteError()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
FolderResult::~FolderResult()
{
MaybeDestroy();
}
auto FolderResult::operator=(const mozilla::Maybe<nsString>& aRhs) -> FolderResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(aRhs);
mType = TMaybensString;
return (*(this));
}
auto FolderResult::operator=(mozilla::Maybe<nsString>&& aRhs) -> FolderResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(std::move(aRhs));
mType = TMaybensString;
return (*(this));
}
auto FolderResult::operator=(const RemoteError& aRhs) -> FolderResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(aRhs);
mType = TRemoteError;
return (*(this));
}
auto FolderResult::operator=(RemoteError&& aRhs) -> FolderResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move(aRhs));
mType = TRemoteError;
return (*(this));
}
auto FolderResult::operator=(const FolderResult& aRhs) -> FolderResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMaybensString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>((aRhs).get_MaybensString());
break;
}
case TRemoteError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError((aRhs).get_RemoteError());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto FolderResult::operator=(FolderResult&& aRhs) -> FolderResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TMaybensString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MaybensString()) mozilla::Maybe<nsString>(std::move((aRhs).get_MaybensString()));
(aRhs).MaybeDestroy();
break;
}
case TRemoteError:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_RemoteError()) RemoteError(std::move((aRhs).get_RemoteError()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace filedialog
} // namespace widget
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::widget::filedialog::FolderResult>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::widget::filedialog::FolderResult union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'FolderResult'
(aWriter)->WriteSentinel(511116508);
switch (type) {
case union__::TMaybensString:
{
IPC::WriteParam(aWriter, (aVar).get_MaybensString());
// Sentinel = 'TMaybensString'
(aWriter)->WriteSentinel(683672987);
return;
}
case union__::TRemoteError:
{
IPC::WriteParam(aWriter, (aVar).get_RemoteError());
// Sentinel = 'TRemoteError'
(aWriter)->WriteSentinel(504497355);
return;
}
default:
{
aWriter->FatalError("unknown variant of union FolderResult");
return;
}
}
}
auto ParamTraits<::mozilla::widget::filedialog::FolderResult>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::widget::filedialog::FolderResult union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union FolderResult");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'FolderResult'
if ((!((aReader)->ReadSentinel(511116508)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union FolderResult");
return {};
}
switch (type) {
case union__::TMaybensString:
{
auto maybe__tmp = IPC::ReadParam<mozilla::Maybe<::nsString>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMaybensString of union FolderResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMaybensString'
if ((!((aReader)->ReadSentinel(683672987)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMaybensString of union FolderResult");
return {};
}
return std::move(tmp);
}
case union__::TRemoteError:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::widget::filedialog::RemoteError>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TRemoteError of union FolderResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TRemoteError'
if ((!((aReader)->ReadSentinel(504497355)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TRemoteError of union FolderResult");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union FolderResult");
return {};
}
}
}
} // namespace IPC