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

#ifndef PCompositorBridgeTypes_h
#define PCompositorBridgeTypes_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 "mozilla/TimeStamp.h"
#include "mozilla/ipc/BigBuffer.h"
#include "mozilla/ipc/IPDLStructMember.h"


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

    MOZ_IMPLICIT RecordedFrameData(
            const TimeStamp& _timeOffset,
            const uint32_t& _length) :
        timeOffset_(_timeOffset),
        length_(_length)
    {
    }

    MOZ_IMPLICIT RecordedFrameData(
            TimeStamp&& _timeOffset,
            uint32_t&& _length) :
        timeOffset_(std::move(_timeOffset)),
        length_(std::move(_length))
    {
    }

    TimeStamp&
    timeOffset()
    {
        return timeOffset_;
    }
    const TimeStamp&
    timeOffset() const
    {
        return timeOffset_;
    }

    uint32_t&
    length()
    {
        return length_;
    }
    const uint32_t&
    length() const
    {
        return length_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<TimeStamp> timeOffset_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> length_;
};
} // namespace layers
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::layers::RecordedFrameData>
{
    typedef ::mozilla::layers::RecordedFrameData 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 FrameRecording|
//
namespace mozilla {
namespace layers {
class FrameRecording final
{
private:
    typedef ::mozilla::TimeStamp TimeStamp;
    typedef ::mozilla::layers::RecordedFrameData RecordedFrameData;
    typedef ::mozilla::ipc::BigBuffer BigBuffer;

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

    MOZ_IMPLICIT FrameRecording(
            const TimeStamp& _startTime,
            const nsTArray<RecordedFrameData>& _frames,
            BigBuffer&& _bytes) :
        startTime_(_startTime),
        frames_(_frames),
        bytes_(std::move(_bytes))
    {
    }

    MOZ_IMPLICIT FrameRecording(
            TimeStamp&& _startTime,
            nsTArray<RecordedFrameData>&& _frames,
            BigBuffer&& _bytes) :
        startTime_(std::move(_startTime)),
        frames_(std::move(_frames)),
        bytes_(std::move(_bytes))
    {
    }

    TimeStamp&
    startTime()
    {
        return startTime_;
    }
    const TimeStamp&
    startTime() const
    {
        return startTime_;
    }

    nsTArray<RecordedFrameData>&
    frames()
    {
        return frames_;
    }
    const nsTArray<RecordedFrameData>&
    frames() const
    {
        return frames_;
    }

    BigBuffer&
    bytes()
    {
        return bytes_;
    }
    const BigBuffer&
    bytes() const
    {
        return bytes_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<TimeStamp> startTime_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<RecordedFrameData>> frames_;
    ::mozilla::ipc::IPDLStructMember<BigBuffer> bytes_;
};
} // namespace layers
} // namespace mozilla

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

#endif // ifndef PCompositorBridgeTypes_h
