Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PMFCDM_h
#define PMFCDM_h
#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"
// Headers for typedefs
#include "MediaData.h"
#include "mozilla/KeySystemConfig.h"
#include "mozilla/dom/MediaKeyMessageEventBinding.h"
#include "mozilla/dom/MediaKeyStatusMapBinding.h"
#include "mozilla/ipc/IPDLStructMember.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMKeyMessage|
//
namespace mozilla {
class MFCDMKeyMessage final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::dom::MediaKeyMessageType MediaKeyMessageType;
typedef ::uint8_t uint8_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMKeyMessage() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMKeyMessage(
const nsString& _sessionId,
const MediaKeyMessageType& _type,
const nsTArray<uint8_t>& _message) :
sessionId_(_sessionId),
type_(_type),
message_(_message)
{
}
MOZ_IMPLICIT MFCDMKeyMessage(
nsString&& _sessionId,
MediaKeyMessageType&& _type,
nsTArray<uint8_t>&& _message) :
sessionId_(std::move(_sessionId)),
type_(std::move(_type)),
message_(std::move(_message))
{
}
nsString&
sessionId()
{
return sessionId_;
}
const nsString&
sessionId() const
{
return sessionId_;
}
MediaKeyMessageType&
type()
{
return type_;
}
const MediaKeyMessageType&
type() const
{
return type_;
}
nsTArray<uint8_t>&
message()
{
return message_;
}
const nsTArray<uint8_t>&
message() const
{
return message_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
::mozilla::ipc::IPDLStructMember<MediaKeyMessageType> type_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> message_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMKeyMessage>
{
typedef ::mozilla::MFCDMKeyMessage paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMKeyInformation|
//
namespace mozilla {
class MFCDMKeyInformation final
{
private:
typedef ::uint8_t uint8_t;
typedef ::mozilla::dom::MediaKeyStatus MediaKeyStatus;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMKeyInformation() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMKeyInformation(
const nsTArray<uint8_t>& _keyId,
const MediaKeyStatus& _status) :
keyId_(_keyId),
status_(_status)
{
}
MOZ_IMPLICIT MFCDMKeyInformation(
nsTArray<uint8_t>&& _keyId,
MediaKeyStatus&& _status) :
keyId_(std::move(_keyId)),
status_(std::move(_status))
{
}
nsTArray<uint8_t>&
keyId()
{
return keyId_;
}
const nsTArray<uint8_t>&
keyId() const
{
return keyId_;
}
MediaKeyStatus&
status()
{
return status_;
}
const MediaKeyStatus&
status() const
{
return status_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> keyId_;
::mozilla::ipc::IPDLStructMember<MediaKeyStatus> status_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMKeyInformation>
{
typedef ::mozilla::MFCDMKeyInformation paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMKeyStatusChange|
//
namespace mozilla {
class MFCDMKeyStatusChange final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::MFCDMKeyInformation MFCDMKeyInformation;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMKeyStatusChange() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMKeyStatusChange(
const nsString& _sessionId,
const nsTArray<MFCDMKeyInformation>& _keyInfo) :
sessionId_(_sessionId),
keyInfo_(_keyInfo)
{
}
MOZ_IMPLICIT MFCDMKeyStatusChange(
nsString&& _sessionId,
nsTArray<MFCDMKeyInformation>&& _keyInfo) :
sessionId_(std::move(_sessionId)),
keyInfo_(std::move(_keyInfo))
{
}
nsString&
sessionId()
{
return sessionId_;
}
const nsString&
sessionId() const
{
return sessionId_;
}
nsTArray<MFCDMKeyInformation>&
keyInfo()
{
return keyInfo_;
}
const nsTArray<MFCDMKeyInformation>&
keyInfo() const
{
return keyInfo_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<MFCDMKeyInformation>> keyInfo_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMKeyStatusChange>
{
typedef ::mozilla::MFCDMKeyStatusChange paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMKeyExpiration|
//
namespace mozilla {
class MFCDMKeyExpiration final
{
private:
typedef ::nsString nsString;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMKeyExpiration() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMKeyExpiration(
const nsString& _sessionId,
const double& _expiredTimeMilliSecondsSinceEpoch) :
sessionId_(_sessionId),
expiredTimeMilliSecondsSinceEpoch_(_expiredTimeMilliSecondsSinceEpoch)
{
}
MOZ_IMPLICIT MFCDMKeyExpiration(
nsString&& _sessionId,
double&& _expiredTimeMilliSecondsSinceEpoch) :
sessionId_(std::move(_sessionId)),
expiredTimeMilliSecondsSinceEpoch_(std::move(_expiredTimeMilliSecondsSinceEpoch))
{
}
nsString&
sessionId()
{
return sessionId_;
}
const nsString&
sessionId() const
{
return sessionId_;
}
double&
expiredTimeMilliSecondsSinceEpoch()
{
return expiredTimeMilliSecondsSinceEpoch_;
}
const double&
expiredTimeMilliSecondsSinceEpoch() const
{
return expiredTimeMilliSecondsSinceEpoch_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
::mozilla::ipc::IPDLStructMember<double> expiredTimeMilliSecondsSinceEpoch_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMKeyExpiration>
{
typedef ::mozilla::MFCDMKeyExpiration paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMMediaCapability|
//
namespace mozilla {
class MFCDMMediaCapability final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::CryptoScheme CryptoScheme;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMMediaCapability() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMMediaCapability(
const nsString& _contentType,
const nsTArray<CryptoScheme>& _encryptionSchemes,
const nsString& _robustness) :
contentType_(_contentType),
encryptionSchemes_(_encryptionSchemes),
robustness_(_robustness)
{
}
MOZ_IMPLICIT MFCDMMediaCapability(
nsString&& _contentType,
nsTArray<CryptoScheme>&& _encryptionSchemes,
nsString&& _robustness) :
contentType_(std::move(_contentType)),
encryptionSchemes_(std::move(_encryptionSchemes)),
robustness_(std::move(_robustness))
{
}
nsString&
contentType()
{
return contentType_;
}
const nsString&
contentType() const
{
return contentType_;
}
nsTArray<CryptoScheme>&
encryptionSchemes()
{
return encryptionSchemes_;
}
const nsTArray<CryptoScheme>&
encryptionSchemes() const
{
return encryptionSchemes_;
}
nsString&
robustness()
{
return robustness_;
}
const nsString&
robustness() const
{
return robustness_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> contentType_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<CryptoScheme>> encryptionSchemes_;
::mozilla::ipc::IPDLStructMember<nsString> robustness_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMMediaCapability>
{
typedef ::mozilla::MFCDMMediaCapability paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMCapabilitiesIPDL|
//
namespace mozilla {
class MFCDMCapabilitiesIPDL final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::MFCDMMediaCapability MFCDMMediaCapability;
typedef ::mozilla::KeySystemConfig::SessionType SessionType;
typedef ::mozilla::KeySystemConfig::Requirement Requirement;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMCapabilitiesIPDL() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMCapabilitiesIPDL(
const nsString& _keySystem,
const nsTArray<nsString>& _initDataTypes,
const nsTArray<MFCDMMediaCapability>& _audioCapabilities,
const nsTArray<MFCDMMediaCapability>& _videoCapabilities,
const nsTArray<SessionType>& _sessionTypes,
const Requirement& _distinctiveID,
const Requirement& _persistentState,
const mozilla::Maybe<bool>& _isHDCP22Compatible,
const bool& _isHardwareDecryption) :
keySystem_(_keySystem),
initDataTypes_(_initDataTypes),
audioCapabilities_(_audioCapabilities),
videoCapabilities_(_videoCapabilities),
sessionTypes_(_sessionTypes),
distinctiveID_(_distinctiveID),
persistentState_(_persistentState),
isHDCP22Compatible_(_isHDCP22Compatible),
isHardwareDecryption_(_isHardwareDecryption)
{
}
MOZ_IMPLICIT MFCDMCapabilitiesIPDL(
nsString&& _keySystem,
nsTArray<nsString>&& _initDataTypes,
nsTArray<MFCDMMediaCapability>&& _audioCapabilities,
nsTArray<MFCDMMediaCapability>&& _videoCapabilities,
nsTArray<SessionType>&& _sessionTypes,
Requirement&& _distinctiveID,
Requirement&& _persistentState,
mozilla::Maybe<bool>&& _isHDCP22Compatible,
bool&& _isHardwareDecryption) :
keySystem_(std::move(_keySystem)),
initDataTypes_(std::move(_initDataTypes)),
audioCapabilities_(std::move(_audioCapabilities)),
videoCapabilities_(std::move(_videoCapabilities)),
sessionTypes_(std::move(_sessionTypes)),
distinctiveID_(std::move(_distinctiveID)),
persistentState_(std::move(_persistentState)),
isHDCP22Compatible_(std::move(_isHDCP22Compatible)),
isHardwareDecryption_(std::move(_isHardwareDecryption))
{
}
nsString&
keySystem()
{
return keySystem_;
}
const nsString&
keySystem() const
{
return keySystem_;
}
nsTArray<nsString>&
initDataTypes()
{
return initDataTypes_;
}
const nsTArray<nsString>&
initDataTypes() const
{
return initDataTypes_;
}
nsTArray<MFCDMMediaCapability>&
audioCapabilities()
{
return audioCapabilities_;
}
const nsTArray<MFCDMMediaCapability>&
audioCapabilities() const
{
return audioCapabilities_;
}
nsTArray<MFCDMMediaCapability>&
videoCapabilities()
{
return videoCapabilities_;
}
const nsTArray<MFCDMMediaCapability>&
videoCapabilities() const
{
return videoCapabilities_;
}
nsTArray<SessionType>&
sessionTypes()
{
return sessionTypes_;
}
const nsTArray<SessionType>&
sessionTypes() const
{
return sessionTypes_;
}
Requirement&
distinctiveID()
{
return distinctiveID_;
}
const Requirement&
distinctiveID() const
{
return distinctiveID_;
}
Requirement&
persistentState()
{
return persistentState_;
}
const Requirement&
persistentState() const
{
return persistentState_;
}
mozilla::Maybe<bool>&
isHDCP22Compatible()
{
return isHDCP22Compatible_;
}
const mozilla::Maybe<bool>&
isHDCP22Compatible() const
{
return isHDCP22Compatible_;
}
bool&
isHardwareDecryption()
{
return isHardwareDecryption_;
}
const bool&
isHardwareDecryption() const
{
return isHardwareDecryption_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> keySystem_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<nsString>> initDataTypes_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<MFCDMMediaCapability>> audioCapabilities_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<MFCDMMediaCapability>> videoCapabilities_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<SessionType>> sessionTypes_;
::mozilla::ipc::IPDLStructMember<Requirement> distinctiveID_;
::mozilla::ipc::IPDLStructMember<Requirement> persistentState_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<bool>> isHDCP22Compatible_;
::mozilla::ipc::IPDLStructMember<bool> isHardwareDecryption_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMCapabilitiesIPDL>
{
typedef ::mozilla::MFCDMCapabilitiesIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union MFCDMCapabilitiesResult|
//
namespace mozilla {
class MFCDMCapabilitiesResult final
{
public:
enum Type {
T__None,
Tnsresult = 1,
TMFCDMCapabilitiesIPDL,
T__Last = TMFCDMCapabilitiesIPDL
};
private:
typedef ::nsresult nsresult;
typedef ::mozilla::MFCDMCapabilitiesIPDL MFCDMCapabilitiesIPDL;
typedef nsresult nsresult__tdef;
typedef MFCDMCapabilitiesIPDL MFCDMCapabilitiesIPDL__tdef;
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
MFCDMCapabilitiesIPDL*
ptr_MFCDMCapabilitiesIPDL()
{
return (&(mVMFCDMCapabilitiesIPDL));
}
const MFCDMCapabilitiesIPDL*
constptr_MFCDMCapabilitiesIPDL() const
{
return (&(mVMFCDMCapabilitiesIPDL));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT MFCDMCapabilitiesResult() :
mType(T__None)
{
}
MOZ_IMPLICIT MFCDMCapabilitiesResult(const nsresult& aOther);
MOZ_IMPLICIT MFCDMCapabilitiesResult(nsresult&& aOther);
MOZ_IMPLICIT MFCDMCapabilitiesResult(const MFCDMCapabilitiesIPDL& aOther);
MOZ_IMPLICIT MFCDMCapabilitiesResult(MFCDMCapabilitiesIPDL&& aOther);
MOZ_IMPLICIT MFCDMCapabilitiesResult(const MFCDMCapabilitiesResult& aOther);
MOZ_IMPLICIT MFCDMCapabilitiesResult(MFCDMCapabilitiesResult&& aOther);
~MFCDMCapabilitiesResult();
Type
type() const
{
return mType;
}
MFCDMCapabilitiesResult&
operator=(const nsresult& aRhs);
MFCDMCapabilitiesResult&
operator=(nsresult&& aRhs);
MFCDMCapabilitiesResult&
operator=(const MFCDMCapabilitiesIPDL& aRhs);
MFCDMCapabilitiesResult&
operator=(MFCDMCapabilitiesIPDL&& aRhs);
MFCDMCapabilitiesResult&
operator=(const MFCDMCapabilitiesResult& aRhs);
MFCDMCapabilitiesResult&
operator=(MFCDMCapabilitiesResult&& aRhs);
nsresult&
get_nsresult()
{
AssertSanity(Tnsresult);
return (*(ptr_nsresult()));
}
const nsresult&
get_nsresult() const
{
AssertSanity(Tnsresult);
return (*(constptr_nsresult()));
}
operator nsresult&()
{
return get_nsresult();
}
operator const nsresult&() const
{
return get_nsresult();
}
MFCDMCapabilitiesIPDL&
get_MFCDMCapabilitiesIPDL()
{
AssertSanity(TMFCDMCapabilitiesIPDL);
return (*(ptr_MFCDMCapabilitiesIPDL()));
}
const MFCDMCapabilitiesIPDL&
get_MFCDMCapabilitiesIPDL() const
{
AssertSanity(TMFCDMCapabilitiesIPDL);
return (*(constptr_MFCDMCapabilitiesIPDL()));
}
operator MFCDMCapabilitiesIPDL&()
{
return get_MFCDMCapabilitiesIPDL();
}
operator const MFCDMCapabilitiesIPDL&() const
{
return get_MFCDMCapabilitiesIPDL();
}
private:
union {
nsresult mVnsresult;
MFCDMCapabilitiesIPDL mVMFCDMCapabilitiesIPDL;
};
Type mType;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMCapabilitiesResult>
{
typedef ::mozilla::MFCDMCapabilitiesResult paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMInitParamsIPDL|
//
namespace mozilla {
class MFCDMInitParamsIPDL final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::KeySystemConfig::Requirement Requirement;
typedef ::mozilla::MFCDMMediaCapability MFCDMMediaCapability;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMInitParamsIPDL() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMInitParamsIPDL(
const nsString& _origin,
const nsTArray<nsString>& _initDataTypes,
const Requirement& _distinctiveID,
const Requirement& _persistentState,
const nsTArray<MFCDMMediaCapability>& _audioCapabilities,
const nsTArray<MFCDMMediaCapability>& _videoCapabilities) :
origin_(_origin),
initDataTypes_(_initDataTypes),
distinctiveID_(_distinctiveID),
persistentState_(_persistentState),
audioCapabilities_(_audioCapabilities),
videoCapabilities_(_videoCapabilities)
{
}
MOZ_IMPLICIT MFCDMInitParamsIPDL(
nsString&& _origin,
nsTArray<nsString>&& _initDataTypes,
Requirement&& _distinctiveID,
Requirement&& _persistentState,
nsTArray<MFCDMMediaCapability>&& _audioCapabilities,
nsTArray<MFCDMMediaCapability>&& _videoCapabilities) :
origin_(std::move(_origin)),
initDataTypes_(std::move(_initDataTypes)),
distinctiveID_(std::move(_distinctiveID)),
persistentState_(std::move(_persistentState)),
audioCapabilities_(std::move(_audioCapabilities)),
videoCapabilities_(std::move(_videoCapabilities))
{
}
nsString&
origin()
{
return origin_;
}
const nsString&
origin() const
{
return origin_;
}
nsTArray<nsString>&
initDataTypes()
{
return initDataTypes_;
}
const nsTArray<nsString>&
initDataTypes() const
{
return initDataTypes_;
}
Requirement&
distinctiveID()
{
return distinctiveID_;
}
const Requirement&
distinctiveID() const
{
return distinctiveID_;
}
Requirement&
persistentState()
{
return persistentState_;
}
const Requirement&
persistentState() const
{
return persistentState_;
}
nsTArray<MFCDMMediaCapability>&
audioCapabilities()
{
return audioCapabilities_;
}
const nsTArray<MFCDMMediaCapability>&
audioCapabilities() const
{
return audioCapabilities_;
}
nsTArray<MFCDMMediaCapability>&
videoCapabilities()
{
return videoCapabilities_;
}
const nsTArray<MFCDMMediaCapability>&
videoCapabilities() const
{
return videoCapabilities_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> origin_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<nsString>> initDataTypes_;
::mozilla::ipc::IPDLStructMember<Requirement> distinctiveID_;
::mozilla::ipc::IPDLStructMember<Requirement> persistentState_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<MFCDMMediaCapability>> audioCapabilities_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<MFCDMMediaCapability>> videoCapabilities_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMInitParamsIPDL>
{
typedef ::mozilla::MFCDMInitParamsIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMInitIPDL|
//
namespace mozilla {
class MFCDMInitIPDL final
{
private:
typedef ::uint64_t uint64_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMInitIPDL() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMInitIPDL(const uint64_t& _id) :
id_(_id)
{
}
MOZ_IMPLICIT MFCDMInitIPDL(uint64_t&& _id) :
id_(std::move(_id))
{
}
uint64_t&
id()
{
return id_;
}
const uint64_t&
id() const
{
return id_;
}
private:
::mozilla::ipc::IPDLStructMember<uint64_t> id_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMInitIPDL>
{
typedef ::mozilla::MFCDMInitIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union MFCDMInitResult|
//
namespace mozilla {
class MFCDMInitResult final
{
public:
enum Type {
T__None,
Tnsresult = 1,
TMFCDMInitIPDL,
T__Last = TMFCDMInitIPDL
};
private:
typedef ::nsresult nsresult;
typedef ::mozilla::MFCDMInitIPDL MFCDMInitIPDL;
typedef nsresult nsresult__tdef;
typedef MFCDMInitIPDL MFCDMInitIPDL__tdef;
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
MFCDMInitIPDL*
ptr_MFCDMInitIPDL()
{
return (&(mVMFCDMInitIPDL));
}
const MFCDMInitIPDL*
constptr_MFCDMInitIPDL() const
{
return (&(mVMFCDMInitIPDL));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT MFCDMInitResult() :
mType(T__None)
{
}
MOZ_IMPLICIT MFCDMInitResult(const nsresult& aOther);
MOZ_IMPLICIT MFCDMInitResult(nsresult&& aOther);
MOZ_IMPLICIT MFCDMInitResult(const MFCDMInitIPDL& aOther);
MOZ_IMPLICIT MFCDMInitResult(MFCDMInitIPDL&& aOther);
MOZ_IMPLICIT MFCDMInitResult(const MFCDMInitResult& aOther);
MOZ_IMPLICIT MFCDMInitResult(MFCDMInitResult&& aOther);
~MFCDMInitResult();
Type
type() const
{
return mType;
}
MFCDMInitResult&
operator=(const nsresult& aRhs);
MFCDMInitResult&
operator=(nsresult&& aRhs);
MFCDMInitResult&
operator=(const MFCDMInitIPDL& aRhs);
MFCDMInitResult&
operator=(MFCDMInitIPDL&& aRhs);
MFCDMInitResult&
operator=(const MFCDMInitResult& aRhs);
MFCDMInitResult&
operator=(MFCDMInitResult&& aRhs);
nsresult&
get_nsresult()
{
AssertSanity(Tnsresult);
return (*(ptr_nsresult()));
}
const nsresult&
get_nsresult() const
{
AssertSanity(Tnsresult);
return (*(constptr_nsresult()));
}
operator nsresult&()
{
return get_nsresult();
}
operator const nsresult&() const
{
return get_nsresult();
}
MFCDMInitIPDL&
get_MFCDMInitIPDL()
{
AssertSanity(TMFCDMInitIPDL);
return (*(ptr_MFCDMInitIPDL()));
}
const MFCDMInitIPDL&
get_MFCDMInitIPDL() const
{
AssertSanity(TMFCDMInitIPDL);
return (*(constptr_MFCDMInitIPDL()));
}
operator MFCDMInitIPDL&()
{
return get_MFCDMInitIPDL();
}
operator const MFCDMInitIPDL&() const
{
return get_MFCDMInitIPDL();
}
private:
union {
nsresult mVnsresult;
MFCDMInitIPDL mVMFCDMInitIPDL;
};
Type mType;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMInitResult>
{
typedef ::mozilla::MFCDMInitResult paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMCreateSessionParamsIPDL|
//
namespace mozilla {
class MFCDMCreateSessionParamsIPDL final
{
private:
typedef ::mozilla::KeySystemConfig::SessionType SessionType;
typedef ::nsString nsString;
typedef ::uint8_t uint8_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMCreateSessionParamsIPDL() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMCreateSessionParamsIPDL(
const SessionType& _sessionType,
const nsString& _initDataType,
const nsTArray<uint8_t>& _initData) :
sessionType_(_sessionType),
initDataType_(_initDataType),
initData_(_initData)
{
}
MOZ_IMPLICIT MFCDMCreateSessionParamsIPDL(
SessionType&& _sessionType,
nsString&& _initDataType,
nsTArray<uint8_t>&& _initData) :
sessionType_(std::move(_sessionType)),
initDataType_(std::move(_initDataType)),
initData_(std::move(_initData))
{
}
SessionType&
sessionType()
{
return sessionType_;
}
const SessionType&
sessionType() const
{
return sessionType_;
}
nsString&
initDataType()
{
return initDataType_;
}
const nsString&
initDataType() const
{
return initDataType_;
}
nsTArray<uint8_t>&
initData()
{
return initData_;
}
const nsTArray<uint8_t>&
initData() const
{
return initData_;
}
private:
::mozilla::ipc::IPDLStructMember<SessionType> sessionType_;
::mozilla::ipc::IPDLStructMember<nsString> initDataType_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> initData_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMCreateSessionParamsIPDL>
{
typedef ::mozilla::MFCDMCreateSessionParamsIPDL paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union MFCDMSessionResult|
//
namespace mozilla {
class MFCDMSessionResult final
{
public:
enum Type {
T__None,
TnsString = 1,
Tnsresult,
T__Last = Tnsresult
};
private:
typedef ::nsString nsString;
typedef ::nsresult nsresult;
typedef nsString nsString__tdef;
typedef nsresult nsresult__tdef;
nsString*
ptr_nsString()
{
return (&(mVnsString));
}
const nsString*
constptr_nsString() const
{
return (&(mVnsString));
}
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT MFCDMSessionResult() :
mType(T__None)
{
}
MOZ_IMPLICIT MFCDMSessionResult(const nsString& aOther);
MOZ_IMPLICIT MFCDMSessionResult(nsString&& aOther);
MOZ_IMPLICIT MFCDMSessionResult(const nsresult& aOther);
MOZ_IMPLICIT MFCDMSessionResult(nsresult&& aOther);
MOZ_IMPLICIT MFCDMSessionResult(const MFCDMSessionResult& aOther);
MOZ_IMPLICIT MFCDMSessionResult(MFCDMSessionResult&& aOther);
~MFCDMSessionResult();
Type
type() const
{
return mType;
}
MFCDMSessionResult&
operator=(const nsString& aRhs);
MFCDMSessionResult&
operator=(nsString&& aRhs);
MFCDMSessionResult&
operator=(const nsresult& aRhs);
MFCDMSessionResult&
operator=(nsresult&& aRhs);
MFCDMSessionResult&
operator=(const MFCDMSessionResult& aRhs);
MFCDMSessionResult&
operator=(MFCDMSessionResult&& aRhs);
nsString&
get_nsString()
{
AssertSanity(TnsString);
return (*(ptr_nsString()));
}
const nsString&
get_nsString() const
{
AssertSanity(TnsString);
return (*(constptr_nsString()));
}
operator nsString&()
{
return get_nsString();
}
operator const nsString&() const
{
return get_nsString();
}
nsresult&
get_nsresult()
{
AssertSanity(Tnsresult);
return (*(ptr_nsresult()));
}
const nsresult&
get_nsresult() const
{
AssertSanity(Tnsresult);
return (*(constptr_nsresult()));
}
operator nsresult&()
{
return get_nsresult();
}
operator const nsresult&() const
{
return get_nsresult();
}
private:
union {
nsString mVnsString;
nsresult mVnsresult;
};
Type mType;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMSessionResult>
{
typedef ::mozilla::MFCDMSessionResult paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MFCDMCapabilitiesRequest|
//
namespace mozilla {
class MFCDMCapabilitiesRequest final
{
private:
typedef ::nsString nsString;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MFCDMCapabilitiesRequest() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MFCDMCapabilitiesRequest(
const nsString& _keySystem,
const bool& _isHardwareDecryption,
const bool& _isPrivateBrowsing) :
keySystem_(_keySystem),
isHardwareDecryption_(_isHardwareDecryption),
isPrivateBrowsing_(_isPrivateBrowsing)
{
}
MOZ_IMPLICIT MFCDMCapabilitiesRequest(
nsString&& _keySystem,
bool&& _isHardwareDecryption,
bool&& _isPrivateBrowsing) :
keySystem_(std::move(_keySystem)),
isHardwareDecryption_(std::move(_isHardwareDecryption)),
isPrivateBrowsing_(std::move(_isPrivateBrowsing))
{
}
nsString&
keySystem()
{
return keySystem_;
}
const nsString&
keySystem() const
{
return keySystem_;
}
bool&
isHardwareDecryption()
{
return isHardwareDecryption_;
}
const bool&
isHardwareDecryption() const
{
return isHardwareDecryption_;
}
bool&
isPrivateBrowsing()
{
return isPrivateBrowsing_;
}
const bool&
isPrivateBrowsing() const
{
return isPrivateBrowsing_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> keySystem_;
::mozilla::ipc::IPDLStructMember<bool> isHardwareDecryption_;
::mozilla::ipc::IPDLStructMember<bool> isPrivateBrowsing_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::MFCDMCapabilitiesRequest>
{
typedef ::mozilla::MFCDMCapabilitiesRequest paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
class PMFCDMParent;
} // namespace mozilla
namespace mozilla {
class PMFCDMChild;
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PMFCDMChild and PMFCDMParent
//
namespace mozilla {
namespace PMFCDM {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::PMFCDMParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::PMFCDMChild>* aChild);
enum MessageType {
PMFCDMStart = PMFCDMMsgStart << 16,
Msg_GetCapabilities__ID,
Reply_GetCapabilities__ID,
Msg_Init__ID,
Reply_Init__ID,
Msg_CreateSessionAndGenerateRequest__ID,
Reply_CreateSessionAndGenerateRequest__ID,
Msg_LoadSession__ID,
Reply_LoadSession__ID,
Msg_UpdateSession__ID,
Reply_UpdateSession__ID,
Msg_CloseSession__ID,
Reply_CloseSession__ID,
Msg_RemoveSession__ID,
Reply_RemoveSession__ID,
Msg_SetServerCertificate__ID,
Reply_SetServerCertificate__ID,
Msg_GetStatusForPolicy__ID,
Reply_GetStatusForPolicy__ID,
Msg___delete____ID,
Reply___delete____ID,
Msg_OnSessionKeyMessage__ID,
Msg_OnSessionKeyStatusesChanged__ID,
Msg_OnSessionKeyExpiration__ID,
PMFCDMEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_GetCapabilities(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetCapabilities(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_Init(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Init(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_CreateSessionAndGenerateRequest(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CreateSessionAndGenerateRequest(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_LoadSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_LoadSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_UpdateSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_UpdateSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_CloseSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CloseSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_RemoveSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_RemoveSession(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_SetServerCertificate(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_SetServerCertificate(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_GetStatusForPolicy(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetStatusForPolicy(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg___delete__(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyMessage(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyStatusesChanged(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyExpiration(int32_t routingId);
} // namespace PMFCDM
} // namespace mozilla
#endif // ifndef PMFCDM_h