Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "MFCDMSerializers.h"
#include "mozilla/PRemoteDecoderManagerParent.h"
#include "mozilla/PRemoteDecoderManagerChild.h"
#include "mozilla/PMFCDM.h"
#include "mozilla/PMFCDMParent.h"
#include "mozilla/PMFCDMChild.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 PMFCDM {
nsresult
CreateEndpoints(
base::ProcessId aParentDestPid,
base::ProcessId aChildDestPid,
mozilla::ipc::Endpoint<::mozilla::PMFCDMParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::PMFCDMChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestPid, aChildDestPid, aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_GetCapabilities(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_GetCapabilities__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_GetCapabilities(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_GetCapabilities__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_Init(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_Init__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_Init(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_Init__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_CreateSessionAndGenerateRequest(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_CreateSessionAndGenerateRequest__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_CreateSessionAndGenerateRequest(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_CreateSessionAndGenerateRequest__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_LoadSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_LoadSession__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_LoadSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_LoadSession__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_UpdateSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_UpdateSession__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_UpdateSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_UpdateSession__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_CloseSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_CloseSession__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_CloseSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_CloseSession__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_RemoveSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_RemoveSession__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_RemoveSession(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_RemoveSession__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_SetServerCertificate(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_SetServerCertificate__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_SetServerCertificate(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_SetServerCertificate__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_GetStatusForPolicy(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_GetStatusForPolicy__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_GetStatusForPolicy(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply_GetStatusForPolicy__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___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyMessage(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyMessage__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyStatusesChanged(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyStatusesChanged__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyExpiration(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyExpiration__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
} // namespace PMFCDM
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMKeyMessage|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMKeyMessage>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).sessionId());
// Sentinel = 'sessionId'
(aWriter)->WriteSentinel(320603058);
IPC::WriteParam(aWriter, (aVar).type());
// Sentinel = 'type'
(aWriter)->WriteSentinel(75760067);
IPC::WriteParam(aWriter, (aVar).message());
// Sentinel = 'message'
(aWriter)->WriteSentinel(197198566);
}
auto ParamTraits<::mozilla::MFCDMKeyMessage>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
if (!maybe___sessionId) {
aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyMessage'");
return {};
}
auto& _sessionId = *maybe___sessionId;
// Sentinel = 'sessionId'
if ((!((aReader)->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyMessage'");
return {};
}
auto maybe___type = IPC::ReadParam<::mozilla::dom::MediaKeyMessageType>(aReader);
if (!maybe___type) {
aReader->FatalError("Error deserializing 'type' (MediaKeyMessageType) member of 'MFCDMKeyMessage'");
return {};
}
auto& _type = *maybe___type;
// Sentinel = 'type'
if ((!((aReader)->ReadSentinel(75760067)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'type' (MediaKeyMessageType) member of 'MFCDMKeyMessage'");
return {};
}
auto maybe___message = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
if (!maybe___message) {
aReader->FatalError("Error deserializing 'message' (uint8_t[]) member of 'MFCDMKeyMessage'");
return {};
}
auto& _message = *maybe___message;
// Sentinel = 'message'
if ((!((aReader)->ReadSentinel(197198566)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'message' (uint8_t[]) member of 'MFCDMKeyMessage'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_sessionId),
std::move(_type),
std::move(_message)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMKeyInformation|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMKeyInformation>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).keyId());
// Sentinel = 'keyId'
(aWriter)->WriteSentinel(101777911);
IPC::WriteParam(aWriter, (aVar).status());
// Sentinel = 'status'
(aWriter)->WriteSentinel(154731173);
}
auto ParamTraits<::mozilla::MFCDMKeyInformation>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___keyId = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
if (!maybe___keyId) {
aReader->FatalError("Error deserializing 'keyId' (uint8_t[]) member of 'MFCDMKeyInformation'");
return {};
}
auto& _keyId = *maybe___keyId;
// Sentinel = 'keyId'
if ((!((aReader)->ReadSentinel(101777911)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'keyId' (uint8_t[]) member of 'MFCDMKeyInformation'");
return {};
}
auto maybe___status = IPC::ReadParam<::mozilla::dom::MediaKeyStatus>(aReader);
if (!maybe___status) {
aReader->FatalError("Error deserializing 'status' (MediaKeyStatus) member of 'MFCDMKeyInformation'");
return {};
}
auto& _status = *maybe___status;
// Sentinel = 'status'
if ((!((aReader)->ReadSentinel(154731173)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'status' (MediaKeyStatus) member of 'MFCDMKeyInformation'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_keyId),
std::move(_status)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMKeyStatusChange|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMKeyStatusChange>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).sessionId());
// Sentinel = 'sessionId'
(aWriter)->WriteSentinel(320603058);
IPC::WriteParam(aWriter, (aVar).keyInfo());
// Sentinel = 'keyInfo'
(aWriter)->WriteSentinel(190317270);
}
auto ParamTraits<::mozilla::MFCDMKeyStatusChange>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
if (!maybe___sessionId) {
aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyStatusChange'");
return {};
}
auto& _sessionId = *maybe___sessionId;
// Sentinel = 'sessionId'
if ((!((aReader)->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyStatusChange'");
return {};
}
auto maybe___keyInfo = IPC::ReadParam<nsTArray<::mozilla::MFCDMKeyInformation>>(aReader);
if (!maybe___keyInfo) {
aReader->FatalError("Error deserializing 'keyInfo' (MFCDMKeyInformation[]) member of 'MFCDMKeyStatusChange'");
return {};
}
auto& _keyInfo = *maybe___keyInfo;
// Sentinel = 'keyInfo'
if ((!((aReader)->ReadSentinel(190317270)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'keyInfo' (MFCDMKeyInformation[]) member of 'MFCDMKeyStatusChange'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_sessionId),
std::move(_keyInfo)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMKeyExpiration|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMKeyExpiration>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).sessionId());
// Sentinel = 'sessionId'
(aWriter)->WriteSentinel(320603058);
(aWriter)->WriteBytes((&((aVar).expiredTimeMilliSecondsSinceEpoch())), 8);
// Sentinel = 'expiredTimeMilliSecondsSinceEpoch'
(aWriter)->WriteSentinel(3784969512);
}
auto ParamTraits<::mozilla::MFCDMKeyExpiration>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
if (!maybe___sessionId) {
aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyExpiration'");
return {};
}
auto& _sessionId = *maybe___sessionId;
// Sentinel = 'sessionId'
if ((!((aReader)->ReadSentinel(320603058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'MFCDMKeyExpiration'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_sessionId),
double{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->expiredTimeMilliSecondsSinceEpoch())), 8)))) {
aReader->FatalError("Error bulk reading fields from double");
return {};
}
// Sentinel = 'expiredTimeMilliSecondsSinceEpoch'
if ((!((aReader)->ReadSentinel(3784969512)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from double");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMMediaCapability|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMMediaCapability>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).contentType());
// Sentinel = 'contentType'
(aWriter)->WriteSentinel(465241246);
IPC::WriteParam(aWriter, (aVar).robustness());
// Sentinel = 'robustness'
(aWriter)->WriteSentinel(400426073);
}
auto ParamTraits<::mozilla::MFCDMMediaCapability>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___contentType = IPC::ReadParam<::nsString>(aReader);
if (!maybe___contentType) {
aReader->FatalError("Error deserializing 'contentType' (nsString) member of 'MFCDMMediaCapability'");
return {};
}
auto& _contentType = *maybe___contentType;
// Sentinel = 'contentType'
if ((!((aReader)->ReadSentinel(465241246)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'contentType' (nsString) member of 'MFCDMMediaCapability'");
return {};
}
auto maybe___robustness = IPC::ReadParam<::nsString>(aReader);
if (!maybe___robustness) {
aReader->FatalError("Error deserializing 'robustness' (nsString) member of 'MFCDMMediaCapability'");
return {};
}
auto& _robustness = *maybe___robustness;
// Sentinel = 'robustness'
if ((!((aReader)->ReadSentinel(400426073)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'robustness' (nsString) member of 'MFCDMMediaCapability'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_contentType),
std::move(_robustness)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMCapabilitiesIPDL|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMCapabilitiesIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).keySystem());
// Sentinel = 'keySystem'
(aWriter)->WriteSentinel(317785039);
IPC::WriteParam(aWriter, (aVar).initDataTypes());
// Sentinel = 'initDataTypes'
(aWriter)->WriteSentinel(612894020);
IPC::WriteParam(aWriter, (aVar).audioCapabilities());
// Sentinel = 'audioCapabilities'
(aWriter)->WriteSentinel(1022559965);
IPC::WriteParam(aWriter, (aVar).videoCapabilities());
// Sentinel = 'videoCapabilities'
(aWriter)->WriteSentinel(1029703394);
IPC::WriteParam(aWriter, (aVar).sessionTypes());
// Sentinel = 'sessionTypes'
(aWriter)->WriteSentinel(558499098);
IPC::WriteParam(aWriter, (aVar).encryptionSchemes());
// Sentinel = 'encryptionSchemes'
(aWriter)->WriteSentinel(1077413652);
IPC::WriteParam(aWriter, (aVar).distinctiveID());
// Sentinel = 'distinctiveID'
(aWriter)->WriteSentinel(637404468);
IPC::WriteParam(aWriter, (aVar).persistentState());
// Sentinel = 'persistentState'
(aWriter)->WriteSentinel(858326611);
IPC::WriteParam(aWriter, (aVar).isHDCP22Compatible());
// Sentinel = 'isHDCP22Compatible'
(aWriter)->WriteSentinel(962135648);
IPC::WriteParam(aWriter, (aVar).isHardwareDecryption());
// Sentinel = 'isHardwareDecryption'
(aWriter)->WriteSentinel(1412696108);
}
auto ParamTraits<::mozilla::MFCDMCapabilitiesIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___keySystem = IPC::ReadParam<::nsString>(aReader);
if (!maybe___keySystem) {
aReader->FatalError("Error deserializing 'keySystem' (nsString) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _keySystem = *maybe___keySystem;
// Sentinel = 'keySystem'
if ((!((aReader)->ReadSentinel(317785039)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'keySystem' (nsString) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___initDataTypes = IPC::ReadParam<nsTArray<::nsString>>(aReader);
if (!maybe___initDataTypes) {
aReader->FatalError("Error deserializing 'initDataTypes' (nsString[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _initDataTypes = *maybe___initDataTypes;
// Sentinel = 'initDataTypes'
if ((!((aReader)->ReadSentinel(612894020)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'initDataTypes' (nsString[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___audioCapabilities = IPC::ReadParam<nsTArray<::mozilla::MFCDMMediaCapability>>(aReader);
if (!maybe___audioCapabilities) {
aReader->FatalError("Error deserializing 'audioCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _audioCapabilities = *maybe___audioCapabilities;
// Sentinel = 'audioCapabilities'
if ((!((aReader)->ReadSentinel(1022559965)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'audioCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___videoCapabilities = IPC::ReadParam<nsTArray<::mozilla::MFCDMMediaCapability>>(aReader);
if (!maybe___videoCapabilities) {
aReader->FatalError("Error deserializing 'videoCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _videoCapabilities = *maybe___videoCapabilities;
// Sentinel = 'videoCapabilities'
if ((!((aReader)->ReadSentinel(1029703394)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'videoCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___sessionTypes = IPC::ReadParam<nsTArray<::mozilla::KeySystemConfig::SessionType>>(aReader);
if (!maybe___sessionTypes) {
aReader->FatalError("Error deserializing 'sessionTypes' (SessionType[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _sessionTypes = *maybe___sessionTypes;
// Sentinel = 'sessionTypes'
if ((!((aReader)->ReadSentinel(558499098)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'sessionTypes' (SessionType[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___encryptionSchemes = IPC::ReadParam<nsTArray<::mozilla::CryptoScheme>>(aReader);
if (!maybe___encryptionSchemes) {
aReader->FatalError("Error deserializing 'encryptionSchemes' (CryptoScheme[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _encryptionSchemes = *maybe___encryptionSchemes;
// Sentinel = 'encryptionSchemes'
if ((!((aReader)->ReadSentinel(1077413652)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'encryptionSchemes' (CryptoScheme[]) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___distinctiveID = IPC::ReadParam<::mozilla::KeySystemConfig::Requirement>(aReader);
if (!maybe___distinctiveID) {
aReader->FatalError("Error deserializing 'distinctiveID' (Requirement) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _distinctiveID = *maybe___distinctiveID;
// Sentinel = 'distinctiveID'
if ((!((aReader)->ReadSentinel(637404468)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'distinctiveID' (Requirement) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___persistentState = IPC::ReadParam<::mozilla::KeySystemConfig::Requirement>(aReader);
if (!maybe___persistentState) {
aReader->FatalError("Error deserializing 'persistentState' (Requirement) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _persistentState = *maybe___persistentState;
// Sentinel = 'persistentState'
if ((!((aReader)->ReadSentinel(858326611)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'persistentState' (Requirement) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___isHDCP22Compatible = IPC::ReadParam<mozilla::Maybe<bool>>(aReader);
if (!maybe___isHDCP22Compatible) {
aReader->FatalError("Error deserializing 'isHDCP22Compatible' (bool?) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _isHDCP22Compatible = *maybe___isHDCP22Compatible;
// Sentinel = 'isHDCP22Compatible'
if ((!((aReader)->ReadSentinel(962135648)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'isHDCP22Compatible' (bool?) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto maybe___isHardwareDecryption = IPC::ReadParam<bool>(aReader);
if (!maybe___isHardwareDecryption) {
aReader->FatalError("Error deserializing 'isHardwareDecryption' (bool) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
auto& _isHardwareDecryption = *maybe___isHardwareDecryption;
// Sentinel = 'isHardwareDecryption'
if ((!((aReader)->ReadSentinel(1412696108)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'isHardwareDecryption' (bool) member of 'MFCDMCapabilitiesIPDL'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_keySystem),
std::move(_initDataTypes),
std::move(_audioCapabilities),
std::move(_videoCapabilities),
std::move(_sessionTypes),
std::move(_encryptionSchemes),
std::move(_distinctiveID),
std::move(_persistentState),
std::move(_isHDCP22Compatible),
std::move(_isHardwareDecryption)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union MFCDMCapabilitiesResult|
//
namespace mozilla {
auto MFCDMCapabilitiesResult::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TMFCDMCapabilitiesIPDL:
{
(ptr_MFCDMCapabilitiesIPDL())->~MFCDMCapabilitiesIPDL__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(const MFCDMCapabilitiesIPDL& aOther)
{
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(aOther);
mType = TMFCDMCapabilitiesIPDL;
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(MFCDMCapabilitiesIPDL&& aOther)
{
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(std::move(aOther));
mType = TMFCDMCapabilitiesIPDL;
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(const MFCDMCapabilitiesResult& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TMFCDMCapabilitiesIPDL:
{
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL((aOther).get_MFCDMCapabilitiesIPDL());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT MFCDMCapabilitiesResult::MFCDMCapabilitiesResult(MFCDMCapabilitiesResult&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case TMFCDMCapabilitiesIPDL:
{
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(std::move((aOther).get_MFCDMCapabilitiesIPDL()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
MFCDMCapabilitiesResult::~MFCDMCapabilitiesResult()
{
MaybeDestroy();
}
auto MFCDMCapabilitiesResult::operator=(const nsresult& aRhs) -> MFCDMCapabilitiesResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto MFCDMCapabilitiesResult::operator=(nsresult&& aRhs) -> MFCDMCapabilitiesResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto MFCDMCapabilitiesResult::operator=(const MFCDMCapabilitiesIPDL& aRhs) -> MFCDMCapabilitiesResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(aRhs);
mType = TMFCDMCapabilitiesIPDL;
return (*(this));
}
auto MFCDMCapabilitiesResult::operator=(MFCDMCapabilitiesIPDL&& aRhs) -> MFCDMCapabilitiesResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(std::move(aRhs));
mType = TMFCDMCapabilitiesIPDL;
return (*(this));
}
auto MFCDMCapabilitiesResult::operator=(const MFCDMCapabilitiesResult& aRhs) -> MFCDMCapabilitiesResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TMFCDMCapabilitiesIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL((aRhs).get_MFCDMCapabilitiesIPDL());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto MFCDMCapabilitiesResult::operator=(MFCDMCapabilitiesResult&& aRhs) -> MFCDMCapabilitiesResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case TMFCDMCapabilitiesIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMCapabilitiesIPDL()) MFCDMCapabilitiesIPDL(std::move((aRhs).get_MFCDMCapabilitiesIPDL()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMCapabilitiesResult>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::MFCDMCapabilitiesResult union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'MFCDMCapabilitiesResult'
(aWriter)->WriteSentinel(1619527857);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TMFCDMCapabilitiesIPDL:
{
IPC::WriteParam(aWriter, (aVar).get_MFCDMCapabilitiesIPDL());
// Sentinel = 'TMFCDMCapabilitiesIPDL'
(aWriter)->WriteSentinel(1441335215);
return;
}
default:
{
aWriter->FatalError("unknown variant of union MFCDMCapabilitiesResult");
return;
}
}
}
auto ParamTraits<::mozilla::MFCDMCapabilitiesResult>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::MFCDMCapabilitiesResult union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union MFCDMCapabilitiesResult");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'MFCDMCapabilitiesResult'
if ((!((aReader)->ReadSentinel(1619527857)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union MFCDMCapabilitiesResult");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union MFCDMCapabilitiesResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union MFCDMCapabilitiesResult");
return {};
}
return std::move(tmp);
}
case union__::TMFCDMCapabilitiesIPDL:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::MFCDMCapabilitiesIPDL>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMFCDMCapabilitiesIPDL of union MFCDMCapabilitiesResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMFCDMCapabilitiesIPDL'
if ((!((aReader)->ReadSentinel(1441335215)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMFCDMCapabilitiesIPDL of union MFCDMCapabilitiesResult");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union MFCDMCapabilitiesResult");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMInitParamsIPDL|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMInitParamsIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).origin());
// Sentinel = 'origin'
(aWriter)->WriteSentinel(150143625);
IPC::WriteParam(aWriter, (aVar).initDataTypes());
// Sentinel = 'initDataTypes'
(aWriter)->WriteSentinel(612894020);
IPC::WriteParam(aWriter, (aVar).distinctiveID());
// Sentinel = 'distinctiveID'
(aWriter)->WriteSentinel(637404468);
IPC::WriteParam(aWriter, (aVar).persistentState());
// Sentinel = 'persistentState'
(aWriter)->WriteSentinel(858326611);
IPC::WriteParam(aWriter, (aVar).audioCapabilities());
// Sentinel = 'audioCapabilities'
(aWriter)->WriteSentinel(1022559965);
IPC::WriteParam(aWriter, (aVar).videoCapabilities());
// Sentinel = 'videoCapabilities'
(aWriter)->WriteSentinel(1029703394);
}
auto ParamTraits<::mozilla::MFCDMInitParamsIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___origin = IPC::ReadParam<::nsString>(aReader);
if (!maybe___origin) {
aReader->FatalError("Error deserializing 'origin' (nsString) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _origin = *maybe___origin;
// Sentinel = 'origin'
if ((!((aReader)->ReadSentinel(150143625)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'origin' (nsString) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto maybe___initDataTypes = IPC::ReadParam<nsTArray<::nsString>>(aReader);
if (!maybe___initDataTypes) {
aReader->FatalError("Error deserializing 'initDataTypes' (nsString[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _initDataTypes = *maybe___initDataTypes;
// Sentinel = 'initDataTypes'
if ((!((aReader)->ReadSentinel(612894020)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'initDataTypes' (nsString[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto maybe___distinctiveID = IPC::ReadParam<::mozilla::KeySystemConfig::Requirement>(aReader);
if (!maybe___distinctiveID) {
aReader->FatalError("Error deserializing 'distinctiveID' (Requirement) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _distinctiveID = *maybe___distinctiveID;
// Sentinel = 'distinctiveID'
if ((!((aReader)->ReadSentinel(637404468)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'distinctiveID' (Requirement) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto maybe___persistentState = IPC::ReadParam<::mozilla::KeySystemConfig::Requirement>(aReader);
if (!maybe___persistentState) {
aReader->FatalError("Error deserializing 'persistentState' (Requirement) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _persistentState = *maybe___persistentState;
// Sentinel = 'persistentState'
if ((!((aReader)->ReadSentinel(858326611)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'persistentState' (Requirement) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto maybe___audioCapabilities = IPC::ReadParam<nsTArray<::mozilla::MFCDMMediaCapability>>(aReader);
if (!maybe___audioCapabilities) {
aReader->FatalError("Error deserializing 'audioCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _audioCapabilities = *maybe___audioCapabilities;
// Sentinel = 'audioCapabilities'
if ((!((aReader)->ReadSentinel(1022559965)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'audioCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto maybe___videoCapabilities = IPC::ReadParam<nsTArray<::mozilla::MFCDMMediaCapability>>(aReader);
if (!maybe___videoCapabilities) {
aReader->FatalError("Error deserializing 'videoCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
auto& _videoCapabilities = *maybe___videoCapabilities;
// Sentinel = 'videoCapabilities'
if ((!((aReader)->ReadSentinel(1029703394)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'videoCapabilities' (MFCDMMediaCapability[]) member of 'MFCDMInitParamsIPDL'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_origin),
std::move(_initDataTypes),
std::move(_distinctiveID),
std::move(_persistentState),
std::move(_audioCapabilities),
std::move(_videoCapabilities)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMInitIPDL|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMInitIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
(aWriter)->WriteBytes((&((aVar).id())), 8);
// Sentinel = 'id'
(aWriter)->WriteSentinel(20447438);
}
auto ParamTraits<::mozilla::MFCDMInitIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->id())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'id'
if ((!((aReader)->ReadSentinel(20447438)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union MFCDMInitResult|
//
namespace mozilla {
auto MFCDMInitResult::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TMFCDMInitIPDL:
{
(ptr_MFCDMInitIPDL())->~MFCDMInitIPDL__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(const MFCDMInitIPDL& aOther)
{
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(aOther);
mType = TMFCDMInitIPDL;
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(MFCDMInitIPDL&& aOther)
{
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(std::move(aOther));
mType = TMFCDMInitIPDL;
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(const MFCDMInitResult& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TMFCDMInitIPDL:
{
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL((aOther).get_MFCDMInitIPDL());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT MFCDMInitResult::MFCDMInitResult(MFCDMInitResult&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case TMFCDMInitIPDL:
{
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(std::move((aOther).get_MFCDMInitIPDL()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
MFCDMInitResult::~MFCDMInitResult()
{
MaybeDestroy();
}
auto MFCDMInitResult::operator=(const nsresult& aRhs) -> MFCDMInitResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto MFCDMInitResult::operator=(nsresult&& aRhs) -> MFCDMInitResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto MFCDMInitResult::operator=(const MFCDMInitIPDL& aRhs) -> MFCDMInitResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(aRhs);
mType = TMFCDMInitIPDL;
return (*(this));
}
auto MFCDMInitResult::operator=(MFCDMInitIPDL&& aRhs) -> MFCDMInitResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(std::move(aRhs));
mType = TMFCDMInitIPDL;
return (*(this));
}
auto MFCDMInitResult::operator=(const MFCDMInitResult& aRhs) -> MFCDMInitResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TMFCDMInitIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL((aRhs).get_MFCDMInitIPDL());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto MFCDMInitResult::operator=(MFCDMInitResult&& aRhs) -> MFCDMInitResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case TMFCDMInitIPDL:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_MFCDMInitIPDL()) MFCDMInitIPDL(std::move((aRhs).get_MFCDMInitIPDL()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMInitResult>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::MFCDMInitResult union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'MFCDMInitResult'
(aWriter)->WriteSentinel(668206459);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TMFCDMInitIPDL:
{
IPC::WriteParam(aWriter, (aVar).get_MFCDMInitIPDL());
// Sentinel = 'TMFCDMInitIPDL'
(aWriter)->WriteSentinel(553714809);
return;
}
default:
{
aWriter->FatalError("unknown variant of union MFCDMInitResult");
return;
}
}
}
auto ParamTraits<::mozilla::MFCDMInitResult>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::MFCDMInitResult union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union MFCDMInitResult");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'MFCDMInitResult'
if ((!((aReader)->ReadSentinel(668206459)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union MFCDMInitResult");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union MFCDMInitResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union MFCDMInitResult");
return {};
}
return std::move(tmp);
}
case union__::TMFCDMInitIPDL:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::MFCDMInitIPDL>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TMFCDMInitIPDL of union MFCDMInitResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TMFCDMInitIPDL'
if ((!((aReader)->ReadSentinel(553714809)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TMFCDMInitIPDL of union MFCDMInitResult");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union MFCDMInitResult");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMCreateSessionParamsIPDL|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMCreateSessionParamsIPDL>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).sessionType());
// Sentinel = 'sessionType'
(aWriter)->WriteSentinel(472908967);
IPC::WriteParam(aWriter, (aVar).initDataType());
// Sentinel = 'initDataType'
(aWriter)->WriteSentinel(524551377);
IPC::WriteParam(aWriter, (aVar).initData());
// Sentinel = 'initData'
(aWriter)->WriteSentinel(243794735);
}
auto ParamTraits<::mozilla::MFCDMCreateSessionParamsIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___sessionType = IPC::ReadParam<::mozilla::KeySystemConfig::SessionType>(aReader);
if (!maybe___sessionType) {
aReader->FatalError("Error deserializing 'sessionType' (SessionType) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
auto& _sessionType = *maybe___sessionType;
// Sentinel = 'sessionType'
if ((!((aReader)->ReadSentinel(472908967)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'sessionType' (SessionType) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
auto maybe___initDataType = IPC::ReadParam<::nsString>(aReader);
if (!maybe___initDataType) {
aReader->FatalError("Error deserializing 'initDataType' (nsString) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
auto& _initDataType = *maybe___initDataType;
// Sentinel = 'initDataType'
if ((!((aReader)->ReadSentinel(524551377)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'initDataType' (nsString) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
auto maybe___initData = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
if (!maybe___initData) {
aReader->FatalError("Error deserializing 'initData' (uint8_t[]) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
auto& _initData = *maybe___initData;
// Sentinel = 'initData'
if ((!((aReader)->ReadSentinel(243794735)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'initData' (uint8_t[]) member of 'MFCDMCreateSessionParamsIPDL'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_sessionType),
std::move(_initDataType),
std::move(_initData)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union MFCDMSessionResult|
//
namespace mozilla {
auto MFCDMSessionResult::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TnsString:
{
(ptr_nsString())->~nsString__tdef();
break;
}
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(const nsString& aOther)
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(aOther);
mType = TnsString;
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(nsString&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move(aOther));
mType = TnsString;
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(const MFCDMSessionResult& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TnsString:
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString((aOther).get_nsString());
break;
}
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT MFCDMSessionResult::MFCDMSessionResult(MFCDMSessionResult&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TnsString:
{
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move((aOther).get_nsString()));
(aOther).MaybeDestroy();
break;
}
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
MFCDMSessionResult::~MFCDMSessionResult()
{
MaybeDestroy();
}
auto MFCDMSessionResult::operator=(const nsString& aRhs) -> MFCDMSessionResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(aRhs);
mType = TnsString;
return (*(this));
}
auto MFCDMSessionResult::operator=(nsString&& aRhs) -> MFCDMSessionResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move(aRhs));
mType = TnsString;
return (*(this));
}
auto MFCDMSessionResult::operator=(const nsresult& aRhs) -> MFCDMSessionResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto MFCDMSessionResult::operator=(nsresult&& aRhs) -> MFCDMSessionResult&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto MFCDMSessionResult::operator=(const MFCDMSessionResult& aRhs) -> MFCDMSessionResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TnsString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString((aRhs).get_nsString());
break;
}
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto MFCDMSessionResult::operator=(MFCDMSessionResult&& aRhs) -> MFCDMSessionResult&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TnsString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsString()) nsString(std::move((aRhs).get_nsString()));
(aRhs).MaybeDestroy();
break;
}
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMSessionResult>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::MFCDMSessionResult union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'MFCDMSessionResult'
(aWriter)->WriteSentinel(997000907);
switch (type) {
case union__::TnsString:
{
IPC::WriteParam(aWriter, (aVar).get_nsString());
// Sentinel = 'TnsString'
(aWriter)->WriteSentinel(302908333);
return;
}
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
default:
{
aWriter->FatalError("unknown variant of union MFCDMSessionResult");
return;
}
}
}
auto ParamTraits<::mozilla::MFCDMSessionResult>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::MFCDMSessionResult union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union MFCDMSessionResult");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'MFCDMSessionResult'
if ((!((aReader)->ReadSentinel(997000907)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union MFCDMSessionResult");
return {};
}
switch (type) {
case union__::TnsString:
{
auto maybe__tmp = IPC::ReadParam<::nsString>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TnsString of union MFCDMSessionResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TnsString'
if ((!((aReader)->ReadSentinel(302908333)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TnsString of union MFCDMSessionResult");
return {};
}
return std::move(tmp);
}
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union MFCDMSessionResult");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union MFCDMSessionResult");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union MFCDMSessionResult");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct MFCDMCapabilitiesRequest|
//
namespace mozilla {
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::MFCDMCapabilitiesRequest>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).keySystem());
// Sentinel = 'keySystem'
(aWriter)->WriteSentinel(317785039);
IPC::WriteParam(aWriter, (aVar).isHardwareDecryption());
// Sentinel = 'isHardwareDecryption'
(aWriter)->WriteSentinel(1412696108);
}
auto ParamTraits<::mozilla::MFCDMCapabilitiesRequest>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___keySystem = IPC::ReadParam<::nsString>(aReader);
if (!maybe___keySystem) {
aReader->FatalError("Error deserializing 'keySystem' (nsString) member of 'MFCDMCapabilitiesRequest'");
return {};
}
auto& _keySystem = *maybe___keySystem;
// Sentinel = 'keySystem'
if ((!((aReader)->ReadSentinel(317785039)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'keySystem' (nsString) member of 'MFCDMCapabilitiesRequest'");
return {};
}
auto maybe___isHardwareDecryption = IPC::ReadParam<bool>(aReader);
if (!maybe___isHardwareDecryption) {
aReader->FatalError("Error deserializing 'isHardwareDecryption' (bool) member of 'MFCDMCapabilitiesRequest'");
return {};
}
auto& _isHardwareDecryption = *maybe___isHardwareDecryption;
// Sentinel = 'isHardwareDecryption'
if ((!((aReader)->ReadSentinel(1412696108)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'isHardwareDecryption' (bool) member of 'MFCDMCapabilitiesRequest'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_keySystem),
std::move(_isHardwareDecryption)};
return result__;
}
} // namespace IPC