Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/PMFCDMParent.h"
#include "MFCDMSerializers.h"
#include "mozilla/MFCDMParent.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/PRemoteDecoderManagerParent.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 {
auto PMFCDMParent::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
MOZ_IMPLICIT PMFCDMParent::PMFCDMParent() :
mozilla::ipc::IProtocol(PMFCDMMsgStart, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PMFCDMParent);
}
PMFCDMParent::~PMFCDMParent()
{
MOZ_COUNT_DTOR(PMFCDMParent);
}
auto PMFCDMParent::ActorAlloc() -> void
{
}
auto PMFCDMParent::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(PMFCDMMsgStart, this);
}
}
auto PMFCDMParent::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PMFCDMParent::Manager() const -> PRemoteDecoderManagerParent*
{
return static_cast<PRemoteDecoderManagerParent*>(IProtocol::Manager());
}
auto PMFCDMParent::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PMFCDMParent::SendOnSessionKeyMessage(const MFCDMKeyMessage& message) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFCDM::Msg_OnSessionKeyMessage(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), message);
// Sentinel = 'message'
((&(writer__)))->WriteSentinel(197198566);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_OnSessionKeyMessage", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFCDMParent::SendOnSessionKeyStatusesChanged(const MFCDMKeyStatusChange& keystatuses) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFCDM::Msg_OnSessionKeyStatusesChanged(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), keystatuses);
// Sentinel = 'keystatuses'
((&(writer__)))->WriteSentinel(479134918);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_OnSessionKeyStatusesChanged", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFCDMParent::SendOnSessionKeyExpiration(const MFCDMKeyExpiration& expiration) -> bool
{
UniquePtr<IPC::Message> msg__ = PMFCDM::Msg_OnSessionKeyExpiration(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), expiration);
// Sentinel = 'expiration'
((&(writer__)))->WriteSentinel(393937988);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_OnSessionKeyExpiration", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PMFCDMParent::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PMFCDMParent::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PMFCDMParent::OnMessageReceived(const Message& msg__) -> PMFCDMParent::Result
{
switch (msg__.type()) {
case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
return MsgProcessed;
}
case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
this->ActorDisconnected(ManagedEndpointDropped);
return MsgProcessed;
}
case PMFCDM::Msg_GetCapabilities__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_GetCapabilities", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__request = IPC::ReadParam<MFCDMCapabilitiesRequest>((&(reader__)));
if (!maybe__request) {
FatalError("Error deserializing 'MFCDMCapabilitiesRequest'");
return MsgValueError;
}
auto& request = *maybe__request;
// Sentinel = 'request'
if ((!(((&(reader__)))->ReadSentinel(202703626)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MFCDMCapabilitiesRequest'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_GetCapabilities(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
GetCapabilitiesResolver resolver = [resolver__ = std::move(resolver__)](const MFCDMCapabilitiesResult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvGetCapabilities(std::move(request), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_Init__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_Init", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__params = IPC::ReadParam<MFCDMInitParamsIPDL>((&(reader__)));
if (!maybe__params) {
FatalError("Error deserializing 'MFCDMInitParamsIPDL'");
return MsgValueError;
}
auto& params = *maybe__params;
// Sentinel = 'params'
if ((!(((&(reader__)))->ReadSentinel(146997893)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MFCDMInitParamsIPDL'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_Init(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
InitResolver resolver = [resolver__ = std::move(resolver__)](const MFCDMInitResult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvInit(std::move(params), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_CreateSessionAndGenerateRequest__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_CreateSessionAndGenerateRequest", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__type = IPC::ReadParam<MFCDMCreateSessionParamsIPDL>((&(reader__)));
if (!maybe__type) {
FatalError("Error deserializing 'MFCDMCreateSessionParamsIPDL'");
return MsgValueError;
}
auto& type = *maybe__type;
// Sentinel = 'type'
if ((!(((&(reader__)))->ReadSentinel(75760067)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'MFCDMCreateSessionParamsIPDL'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_CreateSessionAndGenerateRequest(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
CreateSessionAndGenerateRequestResolver resolver = [resolver__ = std::move(resolver__)](const MFCDMSessionResult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvCreateSessionAndGenerateRequest(std::move(type), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_LoadSession__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_LoadSession", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__sessionType = IPC::ReadParam<SessionType>((&(reader__)));
if (!maybe__sessionType) {
FatalError("Error deserializing 'SessionType'");
return MsgValueError;
}
auto& sessionType = *maybe__sessionType;
// Sentinel = 'sessionType'
if ((!(((&(reader__)))->ReadSentinel(472908967)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'SessionType'");
return MsgValueError;
}
auto maybe__sessionId = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__sessionId) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& sessionId = *maybe__sessionId;
// Sentinel = 'sessionId'
if ((!(((&(reader__)))->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_LoadSession(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
LoadSessionResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvLoadSession(std::move(sessionType), std::move(sessionId), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_UpdateSession__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_UpdateSession", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__sessionId = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__sessionId) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& sessionId = *maybe__sessionId;
// Sentinel = 'sessionId'
if ((!(((&(reader__)))->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
auto maybe__response = IPC::ReadParam<nsTArray<uint8_t>>((&(reader__)));
if (!maybe__response) {
FatalError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto& response = *maybe__response;
// Sentinel = 'response'
if ((!(((&(reader__)))->ReadSentinel(260965232)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_UpdateSession(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
UpdateSessionResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvUpdateSession(std::move(sessionId), std::move(response), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_CloseSession__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_CloseSession", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__sessionId = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__sessionId) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& sessionId = *maybe__sessionId;
// Sentinel = 'sessionId'
if ((!(((&(reader__)))->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_CloseSession(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
CloseSessionResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvCloseSession(std::move(sessionId), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_RemoveSession__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_RemoveSession", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__sessionId = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__sessionId) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& sessionId = *maybe__sessionId;
// Sentinel = 'sessionId'
if ((!(((&(reader__)))->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_RemoveSession(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
RemoveSessionResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvRemoveSession(std::move(sessionId), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_SetServerCertificate__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_SetServerCertificate", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__certificate = IPC::ReadParam<nsTArray<uint8_t>>((&(reader__)));
if (!maybe__certificate) {
FatalError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
auto& certificate = *maybe__certificate;
// Sentinel = 'certificate'
if ((!(((&(reader__)))->ReadSentinel(455869572)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t[]'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_SetServerCertificate(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
SetServerCertificateResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvSetServerCertificate(std::move(certificate), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg_GetStatusForPolicy__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg_GetStatusForPolicy", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__minHdcpVersion = IPC::ReadParam<HDCPVersion>((&(reader__)));
if (!maybe__minHdcpVersion) {
FatalError("Error deserializing 'HDCPVersion'");
return MsgValueError;
}
auto& minHdcpVersion = *maybe__minHdcpVersion;
// Sentinel = 'minHdcpVersion'
if ((!(((&(reader__)))->ReadSentinel(700515754)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'HDCPVersion'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PMFCDM::Reply_GetStatusForPolicy(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
GetStatusForPolicyResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->RecvGetStatusForPolicy(std::move(minHdcpVersion), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PMFCDM::Msg___delete____ID:
{
if (mozilla::ipc::LoggingEnabledFor("PMFCDM", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PMFCDMParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PMFCDM::Msg___delete__", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<MFCDMParent*>(this))->Recv__delete__();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
this->ActorDisconnected(Deletion);
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PMFCDMParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PMFCDMParent::Result
{
return MsgNotKnown;
}
auto PMFCDMParent::DoomSubtree() -> void
{
SetDoomed();
}
auto PMFCDMParent::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::PMFCDMParent*>::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::PMFCDMParent*>::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, "PMFCDM", PMFCDMMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::PMFCDMParent*>(actor.ref());
}
return {};
}
} // namespace IPC