Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PMLSTransactionChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/MLSTransactionChild.h"
#include "mozilla/dom/MLSTransactionMessage.h"
#include "mozilla/ipc/PBackgroundChild.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 {
auto PMLSTransactionChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PMLSTransactionChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PMLSTransactionChild::PMLSTransactionChild() :
mozilla::ipc::IToplevelProtocol("PMLSTransactionChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PMLSTransactionChild);
}
PMLSTransactionChild::~PMLSTransactionChild()
{
MOZ_COUNT_DTOR(PMLSTransactionChild);
}
auto PMLSTransactionChild::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsParentProcess() || XRE_IsContentProcess(), "Invalid process for `PMLSTransactionChild'");
AddRef();
}
auto PMLSTransactionChild::ActorDealloc() -> void
{
Release();
}
auto PMLSTransactionChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PMLSTransactionChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PMLSTransactionChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PMLSTransactionChild::SendRequestStateDelete(
mozilla::ipc::ResolveCallback<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestStateDelete(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestStateDelete", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestStateDelete__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<bool>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestStateDelete() -> RefPtr<RequestStateDeletePromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestStateDelete([promise__](bool&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupStateDelete(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupStateDelete(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupStateDelete", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupStateDelete__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkGroupIdEpoch>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupStateDelete(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier) -> RefPtr<RequestGroupStateDeletePromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupStateDelete(std::move(groupIdentifier), std::move(identifier), [promise__](mozilla::Maybe<GkGroupIdEpoch>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGenerateIdentityKeypair(
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGenerateIdentityKeypair(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateIdentityKeypair", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGenerateIdentityKeypair__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGenerateIdentityKeypair() -> RefPtr<RequestGenerateIdentityKeypairPromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGenerateIdentityKeypair([promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGenerateCredentialBasic(
mozilla::Span<uint8_t const> credName,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGenerateCredentialBasic(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), credName);
// Sentinel = 'credName'
((&(writer__)))->WriteSentinel(237634336);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateCredentialBasic", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGenerateCredentialBasic__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGenerateCredentialBasic(mozilla::Span<uint8_t const> credName) -> RefPtr<RequestGenerateCredentialBasicPromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGenerateCredentialBasic(std::move(credName), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGenerateKeyPackage(
mozilla::Span<uint8_t const> identity,
mozilla::Span<uint8_t const> credential,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGenerateKeyPackage(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), identity);
// Sentinel = 'identity'
((&(writer__)))->WriteSentinel(251396971);
IPC::WriteParam((&(writer__)), credential);
// Sentinel = 'credential'
((&(writer__)))->WriteSentinel(378209308);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateKeyPackage", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGenerateKeyPackage__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGenerateKeyPackage(
mozilla::Span<uint8_t const> identity,
mozilla::Span<uint8_t const> credential) -> RefPtr<RequestGenerateKeyPackagePromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGenerateKeyPackage(std::move(identity), std::move(credential), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupCreate(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> credential,
mozilla::Span<uint8_t const> inOptGroupIdentifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupCreate(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), credential);
// Sentinel = 'credential'
((&(writer__)))->WriteSentinel(378209308);
IPC::WriteParam((&(writer__)), inOptGroupIdentifier);
// Sentinel = 'inOptGroupIdentifier'
((&(writer__)))->WriteSentinel(1415579675);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupCreate", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupCreate__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkGroupIdEpoch>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupCreate(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> credential,
mozilla::Span<uint8_t const> inOptGroupIdentifier) -> RefPtr<RequestGroupCreatePromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupCreate(std::move(identifier), std::move(credential), std::move(inOptGroupIdentifier), [promise__](mozilla::Maybe<GkGroupIdEpoch>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupJoin(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> welcome,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupJoin(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), welcome);
// Sentinel = 'welcome'
((&(writer__)))->WriteSentinel(198836973);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupJoin", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupJoin__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkGroupIdEpoch>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkGroupIdEpoch?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupJoin(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> welcome) -> RefPtr<RequestGroupJoinPromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupJoin(std::move(identifier), std::move(welcome), [promise__](mozilla::Maybe<GkGroupIdEpoch>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupAdd(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> keyPackage,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupAdd(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), keyPackage);
// Sentinel = 'keyPackage'
((&(writer__)))->WriteSentinel(368313334);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupAdd", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupAdd__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkMlsCommitOutput>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupAdd(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> keyPackage) -> RefPtr<RequestGroupAddPromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupAdd(std::move(groupIdentifier), std::move(identifier), std::move(keyPackage), [promise__](mozilla::Maybe<GkMlsCommitOutput>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupProposeAdd(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> keyPackage,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupProposeAdd(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), keyPackage);
// Sentinel = 'keyPackage'
((&(writer__)))->WriteSentinel(368313334);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupProposeAdd", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupProposeAdd__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupProposeAdd(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> keyPackage) -> RefPtr<RequestGroupProposeAddPromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupProposeAdd(std::move(groupIdentifier), std::move(identifier), std::move(keyPackage), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupRemove(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> remIdentifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupRemove(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), remIdentifier);
// Sentinel = 'remIdentifier'
((&(writer__)))->WriteSentinel(614335816);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupRemove", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupRemove__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkMlsCommitOutput>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupRemove(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> remIdentifier) -> RefPtr<RequestGroupRemovePromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupRemove(std::move(groupIdentifier), std::move(identifier), std::move(remIdentifier), [promise__](mozilla::Maybe<GkMlsCommitOutput>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupProposeRemove(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> remIdentifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupProposeRemove(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), remIdentifier);
// Sentinel = 'remIdentifier'
((&(writer__)))->WriteSentinel(614335816);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupProposeRemove", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupProposeRemove__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupProposeRemove(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> remIdentifier) -> RefPtr<RequestGroupProposeRemovePromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupProposeRemove(std::move(groupIdentifier), std::move(identifier), std::move(remIdentifier), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupClose(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupClose(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupClose", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupClose__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkMlsCommitOutput>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkMlsCommitOutput?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupClose(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier) -> RefPtr<RequestGroupClosePromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupClose(std::move(groupIdentifier), std::move(identifier), [promise__](mozilla::Maybe<GkMlsCommitOutput>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGroupDetails(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupDetails>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGroupDetails(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupDetails", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGroupDetails__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkGroupDetails>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkGroupDetails?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkGroupDetails?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGroupDetails(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier) -> RefPtr<RequestGroupDetailsPromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkGroupDetails>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkGroupDetails>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGroupDetails(std::move(groupIdentifier), std::move(identifier), [promise__](mozilla::Maybe<GkGroupDetails>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestReceive(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> message,
mozilla::ipc::ResolveCallback<GkReceived>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestReceive(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), message);
// Sentinel = 'message'
((&(writer__)))->WriteSentinel(197198566);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestReceive", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestReceive__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<GkReceived>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkReceived'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkReceived'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestReceive(
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> message) -> RefPtr<RequestReceivePromise>
{
RefPtr<MozPromise<GkReceived, ResponseRejectReason, true>::Private> promise__ = new MozPromise<GkReceived, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestReceive(std::move(identifier), std::move(message), [promise__](GkReceived&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestApplyPendingCommit(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::ipc::ResolveCallback<GkReceived>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestApplyPendingCommit(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestApplyPendingCommit", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestApplyPendingCommit__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<GkReceived>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkReceived'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkReceived'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestApplyPendingCommit(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier) -> RefPtr<RequestApplyPendingCommitPromise>
{
RefPtr<MozPromise<GkReceived, ResponseRejectReason, true>::Private> promise__ = new MozPromise<GkReceived, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestApplyPendingCommit(std::move(groupIdentifier), std::move(identifier), [promise__](GkReceived&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestSend(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> message,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestSend(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), message);
// Sentinel = 'message'
((&(writer__)))->WriteSentinel(197198566);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestSend", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestSend__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestSend(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> message) -> RefPtr<RequestSendPromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestSend(std::move(groupIdentifier), std::move(identifier), std::move(message), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestExportSecret(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> label,
mozilla::Span<uint8_t const> content,
const uint64_t& len,
mozilla::ipc::ResolveCallback<mozilla::Maybe<GkExporterOutput>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestExportSecret(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), groupIdentifier);
// Sentinel = 'groupIdentifier'
((&(writer__)))->WriteSentinel(832505393);
IPC::WriteParam((&(writer__)), identifier);
// Sentinel = 'identifier'
((&(writer__)))->WriteSentinel(379978788);
IPC::WriteParam((&(writer__)), label);
// Sentinel = 'label'
((&(writer__)))->WriteSentinel(100729345);
IPC::WriteParam((&(writer__)), content);
// Sentinel = 'content'
((&(writer__)))->WriteSentinel(197853948);
IPC::WriteParam((&(writer__)), len);
// Sentinel = 'len'
((&(writer__)))->WriteSentinel(41877824);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestExportSecret", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestExportSecret__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<GkExporterOutput>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'GkExporterOutput?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GkExporterOutput?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestExportSecret(
mozilla::Span<uint8_t const> groupIdentifier,
mozilla::Span<uint8_t const> identifier,
mozilla::Span<uint8_t const> label,
mozilla::Span<uint8_t const> content,
const uint64_t& len) -> RefPtr<RequestExportSecretPromise>
{
RefPtr<MozPromise<mozilla::Maybe<GkExporterOutput>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<GkExporterOutput>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestExportSecret(std::move(groupIdentifier), std::move(identifier), std::move(label), std::move(content), std::move(len), [promise__](mozilla::Maybe<GkExporterOutput>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::SendRequestGetGroupIdentifier(
mozilla::Span<uint8_t const> message,
mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PMLSTransaction::Msg_RequestGetGroupIdentifier(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), message);
// Sentinel = 'message'
((&(writer__)))->WriteSentinel(197198566);
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGetGroupIdentifier", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PMLSTransaction::Reply_RequestGetGroupIdentifier__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__result = IPC::ReadParam<mozilla::Maybe<RawBytes>>(aReader);
if (!maybe__result) {
(aReader)->FatalError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!((aReader)->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RawBytes?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(result));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PMLSTransactionChild::SendRequestGetGroupIdentifier(mozilla::Span<uint8_t const> message) -> RefPtr<RequestGetGroupIdentifierPromise>
{
RefPtr<MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestGetGroupIdentifier(std::move(message), [promise__](mozilla::Maybe<RawBytes>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PMLSTransactionChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PMLSTransactionChild::OnMessageReceived(const Message& msg__) -> PMLSTransactionChild::Result
{
switch (msg__.type()) {
case PMLSTransaction::Reply_RequestStateDelete__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestStateDelete", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupStateDelete__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupStateDelete", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGenerateIdentityKeypair__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateIdentityKeypair", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGenerateCredentialBasic__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateCredentialBasic", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGenerateKeyPackage__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGenerateKeyPackage", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupCreate__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupCreate", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupJoin__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupJoin", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupAdd__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupAdd", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupProposeAdd__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupProposeAdd", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupRemove__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupRemove", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupProposeRemove__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupProposeRemove", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupClose__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupClose", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGroupDetails__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGroupDetails", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestReceive__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestReceive", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestApplyPendingCommit__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestApplyPendingCommit", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestSend__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestSend", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestExportSecret__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestExportSecret", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PMLSTransaction::Reply_RequestGetGroupIdentifier__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMLSTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMLSTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMLSTransaction::Msg_RequestGetGroupIdentifier", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
default:
return MsgNotKnown;
case SHMEM_CREATED_MESSAGE_TYPE:
{
if (!ShmemCreated(msg__)) {
return MsgPayloadError;
}
return MsgProcessed;
}
case SHMEM_DESTROYED_MESSAGE_TYPE:
{
if (!ShmemDestroyed(msg__)) {
return MsgPayloadError;
}
return MsgProcessed;
}
}
}
auto PMLSTransactionChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PMLSTransactionChild::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PMLSTransactionChild*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::dom::PMLSTransactionChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PMLSTransaction", PMLSTransactionMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::PMLSTransactionChild*>(actor.ref());
}
return {};
}
} // namespace IPC