//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PRemoteCDM_h
#define PRemoteCDM_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 "MediaResult.h"
#include "mozilla/CDMProxy.h"
#include "mozilla/dom/MediaKeyMessageEventBinding.h"
#include "mozilla/dom/MediaKeysBinding.h"
#include "mozilla/ipc/IPDLStructMember.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct RemoteCDMKeyMessageIPDL|
//
namespace mozilla {
class RemoteCDMKeyMessageIPDL 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
    RemoteCDMKeyMessageIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMKeyMessageIPDL(
            const nsString& _sessionId,
            const MediaKeyMessageType& _type,
            const nsTArray<uint8_t>& _message) :
        sessionId_(_sessionId),
        type_(_type),
        message_(_message)
    {
    }

    MOZ_IMPLICIT RemoteCDMKeyMessageIPDL(
            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::RemoteCDMKeyMessageIPDL>
{
    typedef ::mozilla::RemoteCDMKeyMessageIPDL 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 RemoteCDMKeyStatusIPDL|
//
namespace mozilla {
class RemoteCDMKeyStatusIPDL final
{
private:
    typedef ::nsString nsString;
    typedef ::mozilla::CDMKeyInfo CDMKeyInfo;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    RemoteCDMKeyStatusIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMKeyStatusIPDL(
            const nsString& _sessionId,
            const nsTArray<CDMKeyInfo>& _keyInfo) :
        sessionId_(_sessionId),
        keyInfo_(_keyInfo)
    {
    }

    MOZ_IMPLICIT RemoteCDMKeyStatusIPDL(
            nsString&& _sessionId,
            nsTArray<CDMKeyInfo>&& _keyInfo) :
        sessionId_(std::move(_sessionId)),
        keyInfo_(std::move(_keyInfo))
    {
    }

    nsString&
    sessionId()
    {
        return sessionId_;
    }
    const nsString&
    sessionId() const
    {
        return sessionId_;
    }

    nsTArray<CDMKeyInfo>&
    keyInfo()
    {
        return keyInfo_;
    }
    const nsTArray<CDMKeyInfo>&
    keyInfo() const
    {
        return keyInfo_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<CDMKeyInfo>> keyInfo_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMKeyStatusIPDL>
{
    typedef ::mozilla::RemoteCDMKeyStatusIPDL 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 RemoteCDMKeyExpirationIPDL|
//
namespace mozilla {
class RemoteCDMKeyExpirationIPDL 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
    RemoteCDMKeyExpirationIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMKeyExpirationIPDL(
            const nsString& _sessionId,
            const double& _expiredTimeMilliSecondsSinceEpoch) :
        sessionId_(_sessionId),
        expiredTimeMilliSecondsSinceEpoch_(_expiredTimeMilliSecondsSinceEpoch)
    {
    }

    MOZ_IMPLICIT RemoteCDMKeyExpirationIPDL(
            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::RemoteCDMKeyExpirationIPDL>
{
    typedef ::mozilla::RemoteCDMKeyExpirationIPDL 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 RemoteCDMInitRequestIPDL|
//
namespace mozilla {
class RemoteCDMInitRequestIPDL final
{
private:

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    RemoteCDMInitRequestIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMInitRequestIPDL(
            const bool& _allowDistinctiveIdentifier,
            const bool& _allowPersistentState) :
        allowDistinctiveIdentifier_(_allowDistinctiveIdentifier),
        allowPersistentState_(_allowPersistentState)
    {
    }

    MOZ_IMPLICIT RemoteCDMInitRequestIPDL(
            bool&& _allowDistinctiveIdentifier,
            bool&& _allowPersistentState) :
        allowDistinctiveIdentifier_(std::move(_allowDistinctiveIdentifier)),
        allowPersistentState_(std::move(_allowPersistentState))
    {
    }

    bool&
    allowDistinctiveIdentifier()
    {
        return allowDistinctiveIdentifier_;
    }
    const bool&
    allowDistinctiveIdentifier() const
    {
        return allowDistinctiveIdentifier_;
    }

    bool&
    allowPersistentState()
    {
        return allowPersistentState_;
    }
    const bool&
    allowPersistentState() const
    {
        return allowPersistentState_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<bool> allowDistinctiveIdentifier_;
    ::mozilla::ipc::IPDLStructMember<bool> allowPersistentState_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMInitRequestIPDL>
{
    typedef ::mozilla::RemoteCDMInitRequestIPDL 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 RemoteCDMCreateSessionRequestIPDL|
//
namespace mozilla {
class RemoteCDMCreateSessionRequestIPDL final
{
private:
    typedef ::mozilla::dom::MediaKeySessionType MediaKeySessionType;
    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
    RemoteCDMCreateSessionRequestIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMCreateSessionRequestIPDL(
            const MediaKeySessionType& _sessionType,
            const nsString& _initDataType,
            const nsTArray<uint8_t>& _initData) :
        sessionType_(_sessionType),
        initDataType_(_initDataType),
        initData_(_initData)
    {
    }

    MOZ_IMPLICIT RemoteCDMCreateSessionRequestIPDL(
            MediaKeySessionType&& _sessionType,
            nsString&& _initDataType,
            nsTArray<uint8_t>&& _initData) :
        sessionType_(std::move(_sessionType)),
        initDataType_(std::move(_initDataType)),
        initData_(std::move(_initData))
    {
    }

    MediaKeySessionType&
    sessionType()
    {
        return sessionType_;
    }
    const MediaKeySessionType&
    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<MediaKeySessionType> sessionType_;
    ::mozilla::ipc::IPDLStructMember<nsString> initDataType_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> initData_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMCreateSessionRequestIPDL>
{
    typedef ::mozilla::RemoteCDMCreateSessionRequestIPDL 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 RemoteCDMLoadSessionRequestIPDL|
//
namespace mozilla {
class RemoteCDMLoadSessionRequestIPDL final
{
private:
    typedef ::mozilla::dom::MediaKeySessionType MediaKeySessionType;
    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
    RemoteCDMLoadSessionRequestIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMLoadSessionRequestIPDL(
            const MediaKeySessionType& _sessionType,
            const nsString& _sessionId) :
        sessionType_(_sessionType),
        sessionId_(_sessionId)
    {
    }

    MOZ_IMPLICIT RemoteCDMLoadSessionRequestIPDL(
            MediaKeySessionType&& _sessionType,
            nsString&& _sessionId) :
        sessionType_(std::move(_sessionType)),
        sessionId_(std::move(_sessionId))
    {
    }

    MediaKeySessionType&
    sessionType()
    {
        return sessionType_;
    }
    const MediaKeySessionType&
    sessionType() const
    {
        return sessionType_;
    }

    nsString&
    sessionId()
    {
        return sessionId_;
    }
    const nsString&
    sessionId() const
    {
        return sessionId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<MediaKeySessionType> sessionType_;
    ::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMLoadSessionRequestIPDL>
{
    typedef ::mozilla::RemoteCDMLoadSessionRequestIPDL 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 RemoteCDMUpdateSessionRequestIPDL|
//
namespace mozilla {
class RemoteCDMUpdateSessionRequestIPDL final
{
private:
    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
    RemoteCDMUpdateSessionRequestIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMUpdateSessionRequestIPDL(
            const nsString& _sessionId,
            const nsTArray<uint8_t>& _response) :
        sessionId_(_sessionId),
        response_(_response)
    {
    }

    MOZ_IMPLICIT RemoteCDMUpdateSessionRequestIPDL(
            nsString&& _sessionId,
            nsTArray<uint8_t>&& _response) :
        sessionId_(std::move(_sessionId)),
        response_(std::move(_response))
    {
    }

    nsString&
    sessionId()
    {
        return sessionId_;
    }
    const nsString&
    sessionId() const
    {
        return sessionId_;
    }

    nsTArray<uint8_t>&
    response()
    {
        return response_;
    }
    const nsTArray<uint8_t>&
    response() const
    {
        return response_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> sessionId_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> response_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMUpdateSessionRequestIPDL>
{
    typedef ::mozilla::RemoteCDMUpdateSessionRequestIPDL 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 RemoteCDMSessionResponseIPDL|
//
namespace mozilla {
class RemoteCDMSessionResponseIPDL final
{
public:
    enum Type {
        T__None,
        TMediaResult = 1,
        TRemoteCDMKeyMessageIPDL,
        T__Last = TRemoteCDMKeyMessageIPDL
    };

private:
    typedef ::mozilla::MediaResult MediaResult;
    typedef ::mozilla::RemoteCDMKeyMessageIPDL RemoteCDMKeyMessageIPDL;
    typedef MediaResult MediaResult__tdef;
    typedef RemoteCDMKeyMessageIPDL RemoteCDMKeyMessageIPDL__tdef;

    MediaResult*
    ptr_MediaResult()
    {
        return (&(mVMediaResult));
    }
    const MediaResult*
    constptr_MediaResult() const
    {
        return (&(mVMediaResult));
    }
    RemoteCDMKeyMessageIPDL*
    ptr_RemoteCDMKeyMessageIPDL()
    {
        return (&(mVRemoteCDMKeyMessageIPDL));
    }
    const RemoteCDMKeyMessageIPDL*
    constptr_RemoteCDMKeyMessageIPDL() const
    {
        return (&(mVRemoteCDMKeyMessageIPDL));
    }

    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 RemoteCDMSessionResponseIPDL() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(const MediaResult& aOther);

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(MediaResult&& aOther);

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(const RemoteCDMKeyMessageIPDL& aOther);

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(RemoteCDMKeyMessageIPDL&& aOther);

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(const RemoteCDMSessionResponseIPDL& aOther);

    MOZ_IMPLICIT RemoteCDMSessionResponseIPDL(RemoteCDMSessionResponseIPDL&& aOther);

    ~RemoteCDMSessionResponseIPDL();

    Type
    type() const
    {
        return mType;
    }

    RemoteCDMSessionResponseIPDL&
    operator=(const MediaResult& aRhs);

    RemoteCDMSessionResponseIPDL&
    operator=(MediaResult&& aRhs);

    RemoteCDMSessionResponseIPDL&
    operator=(const RemoteCDMKeyMessageIPDL& aRhs);

    RemoteCDMSessionResponseIPDL&
    operator=(RemoteCDMKeyMessageIPDL&& aRhs);

    RemoteCDMSessionResponseIPDL&
    operator=(const RemoteCDMSessionResponseIPDL& aRhs);

    RemoteCDMSessionResponseIPDL&
    operator=(RemoteCDMSessionResponseIPDL&& aRhs);

    MediaResult&
    get_MediaResult()
    {
        AssertSanity(TMediaResult);
        return (*(ptr_MediaResult()));
    }
    const MediaResult&
    get_MediaResult() const
    {
        AssertSanity(TMediaResult);
        return (*(constptr_MediaResult()));
    }
    operator MediaResult&()
    {
        return get_MediaResult();
    }
    operator const MediaResult&() const
    {
        return get_MediaResult();
    }

    RemoteCDMKeyMessageIPDL&
    get_RemoteCDMKeyMessageIPDL()
    {
        AssertSanity(TRemoteCDMKeyMessageIPDL);
        return (*(ptr_RemoteCDMKeyMessageIPDL()));
    }
    const RemoteCDMKeyMessageIPDL&
    get_RemoteCDMKeyMessageIPDL() const
    {
        AssertSanity(TRemoteCDMKeyMessageIPDL);
        return (*(constptr_RemoteCDMKeyMessageIPDL()));
    }
    operator RemoteCDMKeyMessageIPDL&()
    {
        return get_RemoteCDMKeyMessageIPDL();
    }
    operator const RemoteCDMKeyMessageIPDL&() const
    {
        return get_RemoteCDMKeyMessageIPDL();
    }

private:
    union {
        MediaResult mVMediaResult;
        RemoteCDMKeyMessageIPDL mVRemoteCDMKeyMessageIPDL;
    };
    Type mType;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMSessionResponseIPDL>
{
    typedef ::mozilla::RemoteCDMSessionResponseIPDL 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 RemoteCDMProvisionRequestIPDL|
//
namespace mozilla {
class RemoteCDMProvisionRequestIPDL final
{
private:
    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
    RemoteCDMProvisionRequestIPDL() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT RemoteCDMProvisionRequestIPDL(
            const nsString& _serverUrl,
            const nsTArray<uint8_t>& _request) :
        serverUrl_(_serverUrl),
        request_(_request)
    {
    }

    MOZ_IMPLICIT RemoteCDMProvisionRequestIPDL(
            nsString&& _serverUrl,
            nsTArray<uint8_t>&& _request) :
        serverUrl_(std::move(_serverUrl)),
        request_(std::move(_request))
    {
    }

    nsString&
    serverUrl()
    {
        return serverUrl_;
    }
    const nsString&
    serverUrl() const
    {
        return serverUrl_;
    }

    nsTArray<uint8_t>&
    request()
    {
        return request_;
    }
    const nsTArray<uint8_t>&
    request() const
    {
        return request_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> serverUrl_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> request_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMProvisionRequestIPDL>
{
    typedef ::mozilla::RemoteCDMProvisionRequestIPDL 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 RemoteCDMProvisionResponseIPDL|
//
namespace mozilla {
class RemoteCDMProvisionResponseIPDL final
{
public:
    enum Type {
        T__None,
        TMediaResult = 1,
        TArrayOfuint8_t,
        T__Last = TArrayOfuint8_t
    };

private:
    typedef ::mozilla::MediaResult MediaResult;
    typedef ::uint8_t uint8_t;
    typedef MediaResult MediaResult__tdef;
    typedef nsTArray<uint8_t> ArrayOfuint8_t__tdef;

    MediaResult*
    ptr_MediaResult()
    {
        return (&(mVMediaResult));
    }
    const MediaResult*
    constptr_MediaResult() const
    {
        return (&(mVMediaResult));
    }
    nsTArray<uint8_t>*
    ptr_ArrayOfuint8_t()
    {
        return (&(mVArrayOfuint8_t));
    }
    const nsTArray<uint8_t>*
    constptr_ArrayOfuint8_t() const
    {
        return (&(mVArrayOfuint8_t));
    }

    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 RemoteCDMProvisionResponseIPDL() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(const MediaResult& aOther);

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(MediaResult&& aOther);

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(const nsTArray<uint8_t>& aOther);

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(nsTArray<uint8_t>&& aOther);

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(const RemoteCDMProvisionResponseIPDL& aOther);

    MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL(RemoteCDMProvisionResponseIPDL&& aOther);

    ~RemoteCDMProvisionResponseIPDL();

    Type
    type() const
    {
        return mType;
    }

    RemoteCDMProvisionResponseIPDL&
    operator=(const MediaResult& aRhs);

    RemoteCDMProvisionResponseIPDL&
    operator=(MediaResult&& aRhs);

    RemoteCDMProvisionResponseIPDL&
    operator=(const nsTArray<uint8_t>& aRhs);

    RemoteCDMProvisionResponseIPDL&
    operator=(nsTArray<uint8_t>&& aRhs);

    RemoteCDMProvisionResponseIPDL&
    operator=(const RemoteCDMProvisionResponseIPDL& aRhs);

    RemoteCDMProvisionResponseIPDL&
    operator=(RemoteCDMProvisionResponseIPDL&& aRhs);

    MediaResult&
    get_MediaResult()
    {
        AssertSanity(TMediaResult);
        return (*(ptr_MediaResult()));
    }
    const MediaResult&
    get_MediaResult() const
    {
        AssertSanity(TMediaResult);
        return (*(constptr_MediaResult()));
    }
    operator MediaResult&()
    {
        return get_MediaResult();
    }
    operator const MediaResult&() const
    {
        return get_MediaResult();
    }

    nsTArray<uint8_t>&
    get_ArrayOfuint8_t()
    {
        AssertSanity(TArrayOfuint8_t);
        return (*(ptr_ArrayOfuint8_t()));
    }
    const nsTArray<uint8_t>&
    get_ArrayOfuint8_t() const
    {
        AssertSanity(TArrayOfuint8_t);
        return (*(constptr_ArrayOfuint8_t()));
    }
    operator nsTArray<uint8_t>&()
    {
        return get_ArrayOfuint8_t();
    }
    operator const nsTArray<uint8_t>&() const
    {
        return get_ArrayOfuint8_t();
    }

private:
    union {
        MediaResult mVMediaResult;
        nsTArray<uint8_t> mVArrayOfuint8_t;
    };
    Type mType;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteCDMProvisionResponseIPDL>
{
    typedef ::mozilla::RemoteCDMProvisionResponseIPDL paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

namespace mozilla {
class PRemoteCDMParent;
} // namespace mozilla
namespace mozilla {
class PRemoteCDMChild;
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PRemoteCDMChild and PRemoteCDMParent
//
namespace mozilla {
namespace PRemoteCDM {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::PRemoteCDMParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PRemoteCDMChild>* aChild);

enum MessageType {
    PRemoteCDMStart = PRemoteCDMMsgStart << 16,
    Msg_Init__ID,
    Reply_Init__ID,
    Msg_CreateSession__ID,
    Reply_CreateSession__ID,
    Msg_LoadSession__ID,
    Reply_LoadSession__ID,
    Msg_UpdateSession__ID,
    Reply_UpdateSession__ID,
    Msg_RemoveSession__ID,
    Reply_RemoveSession__ID,
    Msg_CloseSession__ID,
    Reply_CloseSession__ID,
    Msg_SetServerCertificate__ID,
    Reply_SetServerCertificate__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    Msg_Provision__ID,
    Reply_Provision__ID,
    Msg_OnSessionKeyStatus__ID,
    Msg_OnSessionKeyExpiration__ID,
    Msg_OnSessionKeyMessage__ID,
    PRemoteCDMEnd
};

mozilla::UniquePtr<IPC::Message>
Msg_Init(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Init(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_CreateSession(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CreateSession(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_LoadSession(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_LoadSession(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_UpdateSession(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_UpdateSession(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_RemoveSession(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_RemoveSession(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_CloseSession(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CloseSession(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_SetServerCertificate(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_SetServerCertificate(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg___delete__(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Provision(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Provision(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyStatus(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyExpiration(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyMessage(IPC::Message::routeid_t routingId);



} // namespace PRemoteCDM
} // namespace mozilla

#endif // ifndef PRemoteCDM_h
