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

#ifndef ProtocolTypes_h
#define ProtocolTypes_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"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct ProtocolFdMapping|
//
namespace mozilla {
namespace ipc {
class ProtocolFdMapping final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;

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

    MOZ_IMPLICIT ProtocolFdMapping(
            const uint32_t& _protocolId,
            const FileDescriptor& _fd) :
        fd_(_fd),
        protocolId_(_protocolId)
    {
    }

    MOZ_IMPLICIT ProtocolFdMapping(
            uint32_t&& _protocolId,
            FileDescriptor&& _fd) :
        fd_(std::move(_fd)),
        protocolId_(std::move(_protocolId))
    {
    }

    uint32_t&
    protocolId()
    {
        return protocolId_;
    }
    const uint32_t&
    protocolId() const
    {
        return protocolId_;
    }

    FileDescriptor&
    fd()
    {
        return fd_;
    }
    const FileDescriptor&
    fd() const
    {
        return fd_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<FileDescriptor> fd_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> protocolId_;
};
} // namespace ipc
} // namespace mozilla

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

#endif // ifndef ProtocolTypes_h
