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

#ifndef IPCStream_h
#define IPCStream_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/ipc/IPDLStructMember.h"
#include "mozilla/ipc/InputStreamParams.h"
#include "mozilla/ipc/ProtocolTypes.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct IPCStream|
//
namespace mozilla {
namespace ipc {
class IPCStream final
{
private:
    typedef ::mozilla::ipc::InputStreamParams InputStreamParams;

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

    MOZ_IMPLICIT IPCStream(const InputStreamParams& _stream) :
        stream_(_stream)
    {
    }

    MOZ_IMPLICIT IPCStream(InputStreamParams&& _stream) :
        stream_(std::move(_stream))
    {
    }

    InputStreamParams&
    stream()
    {
        return stream_;
    }
    const InputStreamParams&
    stream() const
    {
        return stream_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<InputStreamParams> stream_;
};
} // namespace ipc
} // namespace mozilla

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

#endif // ifndef IPCStream_h
