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

#ifndef PHttpTransaction_h
#define PHttpTransaction_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/net/DNS.h"
#include "nsIRequest.h"
#include "nsITRRSkipReason.h"
#include "mozilla/ipc/IPCStream.h"
#include "mozilla/net/NeckoChannelParams.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct NetworkAddressArg|
//
namespace mozilla {
namespace net {
class NetworkAddressArg final
{
private:
    typedef ::mozilla::net::NetAddr NetAddr;
    typedef ::nsIRequest::TRRMode TRRMode;
    typedef ::mozilla::net::TRRSkippedReason TRRSkippedReason;

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

    MOZ_IMPLICIT NetworkAddressArg(
            const NetAddr& _selfAddr,
            const NetAddr& _peerAddr,
            const bool& _resolvedByTRR,
            const TRRMode& _mode,
            const TRRSkippedReason& _trrSkipReason,
            const bool& _echConfigUsed) :
        selfAddr_(_selfAddr),
        peerAddr_(_peerAddr),
        resolvedByTRR_(_resolvedByTRR),
        mode_(_mode),
        trrSkipReason_(_trrSkipReason),
        echConfigUsed_(_echConfigUsed)
    {
    }

    MOZ_IMPLICIT NetworkAddressArg(
            NetAddr&& _selfAddr,
            NetAddr&& _peerAddr,
            bool&& _resolvedByTRR,
            TRRMode&& _mode,
            TRRSkippedReason&& _trrSkipReason,
            bool&& _echConfigUsed) :
        selfAddr_(std::move(_selfAddr)),
        peerAddr_(std::move(_peerAddr)),
        resolvedByTRR_(std::move(_resolvedByTRR)),
        mode_(std::move(_mode)),
        trrSkipReason_(std::move(_trrSkipReason)),
        echConfigUsed_(std::move(_echConfigUsed))
    {
    }

    NetAddr&
    selfAddr()
    {
        return selfAddr_;
    }
    const NetAddr&
    selfAddr() const
    {
        return selfAddr_;
    }

    NetAddr&
    peerAddr()
    {
        return peerAddr_;
    }
    const NetAddr&
    peerAddr() const
    {
        return peerAddr_;
    }

    bool&
    resolvedByTRR()
    {
        return resolvedByTRR_;
    }
    const bool&
    resolvedByTRR() const
    {
        return resolvedByTRR_;
    }

    TRRMode&
    mode()
    {
        return mode_;
    }
    const TRRMode&
    mode() const
    {
        return mode_;
    }

    TRRSkippedReason&
    trrSkipReason()
    {
        return trrSkipReason_;
    }
    const TRRSkippedReason&
    trrSkipReason() const
    {
        return trrSkipReason_;
    }

    bool&
    echConfigUsed()
    {
        return echConfigUsed_;
    }
    const bool&
    echConfigUsed() const
    {
        return echConfigUsed_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<NetAddr> selfAddr_;
    ::mozilla::ipc::IPDLStructMember<NetAddr> peerAddr_;
    ::mozilla::ipc::IPDLStructMember<bool> resolvedByTRR_;
    ::mozilla::ipc::IPDLStructMember<TRRMode> mode_;
    ::mozilla::ipc::IPDLStructMember<TRRSkippedReason> trrSkipReason_;
    ::mozilla::ipc::IPDLStructMember<bool> echConfigUsed_;
};
} // namespace net
} // namespace mozilla

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

namespace mozilla {
namespace net {
class PHttpTransactionParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PHttpTransactionChild;
} // namespace net
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PHttpTransactionChild and PHttpTransactionParent
//
namespace mozilla {
namespace net {
namespace PHttpTransaction {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::net::PHttpTransactionParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::net::PHttpTransactionChild>* aChild);

enum MessageType {
    PHttpTransactionStart = PHttpTransactionMsgStart << 16,
    Msg_OnStartRequest__ID,
    Msg_OnTransportStatus__ID,
    Msg_OnDataAvailable__ID,
    Msg_OnStopRequest__ID,
    Msg_OnInitFailed__ID,
    Msg_EarlyHint__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    Msg_Init__ID,
    Msg_CancelPump__ID,
    Msg_SuspendPump__ID,
    Msg_ResumePump__ID,
    Msg_SetDNSWasRefreshed__ID,
    Msg_DontReuseConnection__ID,
    Msg_SetH2WSConnRefTaken__ID,
    PHttpTransactionEnd
};

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

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

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

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

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

mozilla::UniquePtr<IPC::Message>
Msg_EarlyHint(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_Init(IPC::Message::routeid_t routingId);

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

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

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

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

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

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



} // namespace PHttpTransaction
} // namespace net
} // namespace mozilla

#endif // ifndef PHttpTransaction_h
