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

#ifndef PMediaDecoderParams_h
#define PMediaDecoderParams_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 "TimeUnits.h"
#include "mozilla/ipc/IPDLStructMember.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MediaDataIPDL|
//
namespace mozilla {
class MediaDataIPDL final
{
private:
    typedef ::int64_t int64_t;
    typedef ::mozilla::media::TimeUnit TimeUnit;

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

    MOZ_IMPLICIT MediaDataIPDL(
            const int64_t& _offset,
            const TimeUnit& _time,
            const TimeUnit& _timecode,
            const TimeUnit& _duration,
            const bool& _keyframe) :
        time_(_time),
        timecode_(_timecode),
        duration_(_duration),
        keyframe_(_keyframe),
        offset_(_offset)
    {
    }

    MOZ_IMPLICIT MediaDataIPDL(
            int64_t&& _offset,
            TimeUnit&& _time,
            TimeUnit&& _timecode,
            TimeUnit&& _duration,
            bool&& _keyframe) :
        time_(std::move(_time)),
        timecode_(std::move(_timecode)),
        duration_(std::move(_duration)),
        keyframe_(std::move(_keyframe)),
        offset_(std::move(_offset))
    {
    }

    int64_t&
    offset()
    {
        return offset_;
    }
    const int64_t&
    offset() const
    {
        return offset_;
    }

    TimeUnit&
    time()
    {
        return time_;
    }
    const TimeUnit&
    time() const
    {
        return time_;
    }

    TimeUnit&
    timecode()
    {
        return timecode_;
    }
    const TimeUnit&
    timecode() const
    {
        return timecode_;
    }

    TimeUnit&
    duration()
    {
        return duration_;
    }
    const TimeUnit&
    duration() const
    {
        return duration_;
    }

    bool&
    keyframe()
    {
        return keyframe_;
    }
    const bool&
    keyframe() const
    {
        return keyframe_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<TimeUnit> time_;
    ::mozilla::ipc::IPDLStructMember<TimeUnit> timecode_;
    ::mozilla::ipc::IPDLStructMember<TimeUnit> duration_;
    ::mozilla::ipc::IPDLStructMember<bool> keyframe_;
    ::mozilla::ipc::IPDLStructMember<int64_t> offset_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::MediaDataIPDL>
{
    typedef ::mozilla::MediaDataIPDL 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 CryptoInfo|
//
namespace mozilla {
class CryptoInfo final
{
private:
    typedef ::mozilla::CryptoScheme CryptoScheme;
    typedef ::uint8_t uint8_t;
    typedef ::uint32_t uint32_t;

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

    MOZ_IMPLICIT CryptoInfo(
            const CryptoScheme& _mEncryptionScheme,
            const nsTArray<uint8_t>& _mIV,
            const nsTArray<uint8_t>& _mConstantIV,
            const nsTArray<uint8_t>& _mKeyId,
            const nsTArray<uint32_t>& _mClearBytes,
            const nsTArray<uint32_t>& _mCipherBytes,
            const uint8_t& _mCryptByteBlock,
            const uint8_t& _mSkipByteBlock) :
        mEncryptionScheme_(_mEncryptionScheme),
        mIV_(_mIV),
        mConstantIV_(_mConstantIV),
        mKeyId_(_mKeyId),
        mClearBytes_(_mClearBytes),
        mCipherBytes_(_mCipherBytes),
        mCryptByteBlock_(_mCryptByteBlock),
        mSkipByteBlock_(_mSkipByteBlock)
    {
    }

    MOZ_IMPLICIT CryptoInfo(
            CryptoScheme&& _mEncryptionScheme,
            nsTArray<uint8_t>&& _mIV,
            nsTArray<uint8_t>&& _mConstantIV,
            nsTArray<uint8_t>&& _mKeyId,
            nsTArray<uint32_t>&& _mClearBytes,
            nsTArray<uint32_t>&& _mCipherBytes,
            uint8_t&& _mCryptByteBlock,
            uint8_t&& _mSkipByteBlock) :
        mEncryptionScheme_(std::move(_mEncryptionScheme)),
        mIV_(std::move(_mIV)),
        mConstantIV_(std::move(_mConstantIV)),
        mKeyId_(std::move(_mKeyId)),
        mClearBytes_(std::move(_mClearBytes)),
        mCipherBytes_(std::move(_mCipherBytes)),
        mCryptByteBlock_(std::move(_mCryptByteBlock)),
        mSkipByteBlock_(std::move(_mSkipByteBlock))
    {
    }

    CryptoScheme&
    mEncryptionScheme()
    {
        return mEncryptionScheme_;
    }
    const CryptoScheme&
    mEncryptionScheme() const
    {
        return mEncryptionScheme_;
    }

    nsTArray<uint8_t>&
    mIV()
    {
        return mIV_;
    }
    const nsTArray<uint8_t>&
    mIV() const
    {
        return mIV_;
    }

    nsTArray<uint8_t>&
    mConstantIV()
    {
        return mConstantIV_;
    }
    const nsTArray<uint8_t>&
    mConstantIV() const
    {
        return mConstantIV_;
    }

    nsTArray<uint8_t>&
    mKeyId()
    {
        return mKeyId_;
    }
    const nsTArray<uint8_t>&
    mKeyId() const
    {
        return mKeyId_;
    }

    nsTArray<uint32_t>&
    mClearBytes()
    {
        return mClearBytes_;
    }
    const nsTArray<uint32_t>&
    mClearBytes() const
    {
        return mClearBytes_;
    }

    nsTArray<uint32_t>&
    mCipherBytes()
    {
        return mCipherBytes_;
    }
    const nsTArray<uint32_t>&
    mCipherBytes() const
    {
        return mCipherBytes_;
    }

    uint8_t&
    mCryptByteBlock()
    {
        return mCryptByteBlock_;
    }
    const uint8_t&
    mCryptByteBlock() const
    {
        return mCryptByteBlock_;
    }

    uint8_t&
    mSkipByteBlock()
    {
        return mSkipByteBlock_;
    }
    const uint8_t&
    mSkipByteBlock() const
    {
        return mSkipByteBlock_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<CryptoScheme> mEncryptionScheme_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> mIV_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> mConstantIV_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> mKeyId_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> mClearBytes_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint32_t>> mCipherBytes_;
    ::mozilla::ipc::IPDLStructMember<uint8_t> mCryptByteBlock_;
    ::mozilla::ipc::IPDLStructMember<uint8_t> mSkipByteBlock_;
};
} // namespace mozilla

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

#endif // ifndef PMediaDecoderParams_h
