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

#ifndef PSocketProcessParent_h
#define PSocketProcessParent_h

#include "mozilla/net/PSocketProcess.h"
#ifdef DEBUG
#include "prenv.h"
#endif  // DEBUG

#include "mozilla/Tainting.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
class nsIFile;

// Headers for things that cannot be forward declared
#include "base/process.h"
#include "mozilla/TelemetryComms.h"
#include "mozilla/dom/FeaturePolicy.h"
#include "mozilla/dom/LoadURIOptionsBinding.h"
#include "mozilla/dom/NativeThreadId.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/UserNavigationInvolvement.h"
#include "mozilla/dom/ipc/IdType.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "mozilla/net/DNS.h"
#include "mozilla/net/DashboardTypes.h"
#include "mozilla/net/PHttpChannelParams.h"
#include "nsICacheInfoChannel.h"
#include "nsIContentPolicy.h"
#include "nsIDNSService.h"
#include "nsILoadInfo.h"
#include "nsNetUtil.h"
#include "nsRFPService.h"
#include "prtime.h"

namespace mozilla {
namespace net {
class PDNSRequestParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PDNSRequestChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PSocketProcessBridgeParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PSocketProcessBridgeChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
class PProfilerParent;
} // namespace mozilla
namespace mozilla {
class PProfilerChild;
} // namespace mozilla

namespace mozilla {
namespace net {
class PWebrtcTCPSocketParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PWebrtcTCPSocketChild;
} // namespace net
} // namespace mozilla

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

namespace mozilla {
namespace net {
class PHttpConnectionMgrParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PHttpConnectionMgrChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PInputChannelThrottleQueueParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PInputChannelThrottleQueueChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PAltServiceParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PAltServiceChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PAltSvcTransactionParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PAltSvcTransactionChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PTRRServiceParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PTRRServiceChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PProxyConfigLookupParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PProxyConfigLookupChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PNativeDNSResolverOverrideParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PNativeDNSResolverOverrideChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PProxyAutoConfigParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PProxyAutoConfigChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PSocketProcessBackgroundParent;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PSocketProcessBackgroundChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PAltServiceParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PAltSvcTransactionParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PDNSRequestParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PHttpConnectionMgrParent;
} // namespace net
} // namespace mozilla

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

namespace mozilla {
namespace net {
class PInputChannelThrottleQueueParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PNativeDNSResolverOverrideParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PProxyConfigLookupParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PTRRServiceParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {
class PWebrtcTCPSocketParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
struct void_t;
} // namespace mozilla

struct nsHttpAtom;

namespace mozilla {
namespace net {
class nsHttpResponseHead;
} // namespace net
} // namespace mozilla

namespace mozilla {
class TimeStamp;
} // namespace mozilla

class nsIPropertyBag2;

class nsDOMNavigationTiming;

class nsDocShellLoadState;

namespace mozilla {
namespace dom {
struct LoadingSessionHistoryInfo;
} // namespace dom
} // namespace mozilla

namespace mozilla {
struct null_t;
} // namespace mozilla

class nsIURI;

struct nsID;

namespace mozilla {
namespace net {


class PSocketProcessParent :
    public mozilla::ipc::IToplevelProtocol
{
private:
    friend class ::mozilla::net::PAltServiceParent;
    friend class ::mozilla::net::PAltSvcTransactionParent;
    friend class ::mozilla::net::PDNSRequestParent;
    friend class ::mozilla::net::PHttpConnectionMgrParent;
    friend class ::mozilla::net::PHttpTransactionParent;
    friend class ::mozilla::net::PInputChannelThrottleQueueParent;
    friend class ::mozilla::net::PNativeDNSResolverOverrideParent;
    friend class ::mozilla::net::PProxyConfigLookupParent;
    friend class ::mozilla::net::PTRRServiceParent;
    friend class ::mozilla::net::PWebrtcTCPSocketParent;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PSocketProcessMsgStart;
protected:
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::Telemetry::ChildEventData ChildEventData;
    typedef ::mozilla::net::ChildLoadInfoForwarderArgs ChildLoadInfoForwarderArgs;
    typedef ::mozilla::net::ConsoleReportCollected ConsoleReportCollected;
    typedef ::mozilla::net::CookieChange CookieChange;
    typedef ::mozilla::net::CookieJarSettingsArgs CookieJarSettingsArgs;
    typedef ::mozilla::net::CookiePermissionData CookiePermissionData;
    typedef ::mozilla::net::CookieStruct CookieStruct;
    typedef ::mozilla::net::CookieStructTable CookieStructTable;
    typedef ::mozilla::net::CorsPreflightArgs CorsPreflightArgs;
    typedef ::CrashReporter::CrashReporterInitArgs CrashReporterInitArgs;
    typedef ::nsILoadInfo::CrossOriginEmbedderPolicy CrossOriginEmbedderPolicy;
    typedef ::mozilla::net::DNSCacheEntries DNSCacheEntries;
    typedef ::nsIDNSService::DNSFlags DNSFlags;
    typedef ::mozilla::Telemetry::DiscardedData DiscardedData;
    typedef ::mozilla::net::DocumentChannelCreationArgs DocumentChannelCreationArgs;
    typedef ::mozilla::net::DocumentChannelElementCreationArgs DocumentChannelElementCreationArgs;
    typedef ::mozilla::net::DocumentCreationArgs DocumentCreationArgs;
    typedef ::mozilla::net::EarlyHintConnectArgs EarlyHintConnectArgs;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::dom::FeaturePolicyInfo FeaturePolicyInfo;
    typedef ::mozilla::net::FileChannelInfo FileChannelInfo;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::dom::ForceMediaDocument ForceMediaDocument;
    typedef ::mozilla::net::GIOChannelConnectArgs GIOChannelConnectArgs;
    typedef ::mozilla::net::GIOChannelCreationArgs GIOChannelCreationArgs;
    typedef ::mozilla::net::GIOChannelOpenArgs GIOChannelOpenArgs;
    typedef ::mozilla::net::GeckoViewContentChannelArgs GeckoViewContentChannelArgs;
    typedef ::mozilla::net::GeckoViewContentChannelConnectArgs GeckoViewContentChannelConnectArgs;
    typedef ::mozilla::net::GeckoViewContentChannelOpenArgs GeckoViewContentChannelOpenArgs;
    typedef ::nsILoadInfo::HTTPSUpgradeTelemetryType HTTPSUpgradeTelemetryType;
    typedef ::mozilla::Telemetry::HistogramAccumulation HistogramAccumulation;
    typedef ::mozilla::net::Http3ConnectionStatsParams Http3ConnectionStatsParams;
    typedef ::mozilla::net::HttpActivity HttpActivity;
    typedef ::mozilla::net::HttpActivityArgs HttpActivityArgs;
    typedef ::mozilla::net::HttpChannelConnectArgs HttpChannelConnectArgs;
    typedef ::mozilla::net::HttpChannelCreationArgs HttpChannelCreationArgs;
    typedef ::mozilla::net::HttpChannelOpenArgs HttpChannelOpenArgs;
    typedef ::mozilla::net::HttpConnectionActivity HttpConnectionActivity;
    typedef ::mozilla::net::HttpConnectionInfoCloneArgs HttpConnectionInfoCloneArgs;
    typedef ::mozilla::net::HttpHandlerInitArgs HttpHandlerInitArgs;
    typedef ::mozilla::net::HttpRetParams HttpRetParams;
    typedef ::nsILoadInfo::IPAddressSpace IPAddressSpace;
    typedef ::mozilla::net::InterceptionInfoArg InterceptionInfoArg;
    typedef ::mozilla::Telemetry::KeyedHistogramAccumulation KeyedHistogramAccumulation;
    typedef ::mozilla::Telemetry::KeyedScalarAction KeyedScalarAction;
    typedef ::mozilla::net::LinkHeader LinkHeader;
    typedef ::mozilla::net::LoadInfoArgs LoadInfoArgs;
    typedef ::mozilla::dom::LoadingSessionHistoryInfo LoadingSessionHistoryInfo;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::dom::MemoryReport MemoryReport;
    typedef ::mozilla::dom::NativeThreadId NativeThreadId;
    typedef ::mozilla::net::NetAddr NetAddr;
    typedef ::mozilla::net::ObjectCreationArgs ObjectCreationArgs;
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::mozilla::net::PAltServiceChild PAltServiceChild;
    typedef ::mozilla::net::PAltServiceParent PAltServiceParent;
    typedef ::mozilla::net::PAltSvcTransactionChild PAltSvcTransactionChild;
    typedef ::mozilla::net::PAltSvcTransactionParent PAltSvcTransactionParent;
    typedef ::mozilla::net::PDNSRequestChild PDNSRequestChild;
    typedef ::mozilla::net::PDNSRequestParent PDNSRequestParent;
    typedef ::mozilla::net::PHttpConnectionMgrChild PHttpConnectionMgrChild;
    typedef ::mozilla::net::PHttpConnectionMgrParent PHttpConnectionMgrParent;
    typedef ::mozilla::net::PHttpTransactionChild PHttpTransactionChild;
    typedef ::mozilla::net::PHttpTransactionParent PHttpTransactionParent;
    typedef ::mozilla::net::PInputChannelThrottleQueueChild PInputChannelThrottleQueueChild;
    typedef ::mozilla::net::PInputChannelThrottleQueueParent PInputChannelThrottleQueueParent;
    typedef ::mozilla::net::PNativeDNSResolverOverrideChild PNativeDNSResolverOverrideChild;
    typedef ::mozilla::net::PNativeDNSResolverOverrideParent PNativeDNSResolverOverrideParent;
    typedef ::mozilla::PProfilerChild PProfilerChild;
    typedef ::mozilla::PProfilerParent PProfilerParent;
    typedef ::mozilla::net::PProxyAutoConfigChild PProxyAutoConfigChild;
    typedef ::mozilla::net::PProxyAutoConfigParent PProxyAutoConfigParent;
    typedef ::mozilla::net::PProxyConfigLookupChild PProxyConfigLookupChild;
    typedef ::mozilla::net::PProxyConfigLookupParent PProxyConfigLookupParent;
    typedef ::PRTime PRTime;
    typedef ::mozilla::net::PSocketProcessBackgroundChild PSocketProcessBackgroundChild;
    typedef ::mozilla::net::PSocketProcessBackgroundParent PSocketProcessBackgroundParent;
    typedef ::mozilla::net::PSocketProcessBridgeChild PSocketProcessBridgeChild;
    typedef ::mozilla::net::PSocketProcessBridgeParent PSocketProcessBridgeParent;
    typedef ::mozilla::net::PTRRServiceChild PTRRServiceChild;
    typedef ::mozilla::net::PTRRServiceParent PTRRServiceParent;
    typedef ::mozilla::net::PWebrtcTCPSocketChild PWebrtcTCPSocketChild;
    typedef ::mozilla::net::PWebrtcTCPSocketParent PWebrtcTCPSocketParent;
    typedef ::mozilla::net::ParentLoadInfoForwarderArgs ParentLoadInfoForwarderArgs;
    typedef ::mozilla::dom::Pref Pref;
    typedef ::mozilla::dom::PrefValue PrefValue;
    typedef ::mozilla::net::PreferredAlternativeDataDeliveryTypeIPC PreferredAlternativeDataDeliveryTypeIPC;
    typedef ::mozilla::net::PreferredAlternativeDataTypeParams PreferredAlternativeDataTypeParams;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::mozilla::net::ProxyInfoCloneArgs ProxyInfoCloneArgs;
    typedef ::mozilla::RFPTargetSet RFPTargetSet;
    typedef ::mozilla::net::RedirectHistoryEntryInfo RedirectHistoryEntryInfo;
    typedef ::mozilla::net::RedirectToRealChannelArgs RedirectToRealChannelArgs;
    typedef ::mozilla::net::RemoteStreamInfo RemoteStreamInfo;
    typedef ::mozilla::net::RequestHeaderTuples RequestHeaderTuples;
    typedef ::mozilla::dom::RequestMode RequestMode;
    typedef ::mozilla::net::ResourceTimingStructArgs ResourceTimingStructArgs;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::Telemetry::ScalarAction ScalarAction;
    typedef ::nsILoadInfo::SchemelessInputType SchemelessInputType;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::net::SocketDataArgs SocketDataArgs;
    typedef ::mozilla::net::SocketInfo SocketInfo;
    typedef ::mozilla::net::SocketPorcessInitAttributes SocketPorcessInitAttributes;
    typedef ::mozilla::net::SpeculativeConnectionOverriderArgs SpeculativeConnectionOverriderArgs;
    typedef ::nsILoadInfo::StoragePermissionState StoragePermissionState;
    typedef ::mozilla::dom::TabId TabId;
    typedef ::mozilla::TimeStamp TimeStamp;
    typedef ::mozilla::net::TimingStructArgs TimingStructArgs;
    typedef ::mozilla::net::TransactionObserverResult TransactionObserverResult;
    template<class T> using UniquePtr = mozilla::UniquePtr<T>;
    typedef ::mozilla::dom::UserNavigationInvolvement UserNavigationInvolvement;
    typedef ::int16_t int16_t;
    typedef ::int32_t int32_t;
    typedef ::int64_t int64_t;
    typedef ::int8_t int8_t;
    typedef ::intptr_t intptr_t;
    typedef ::nsCString nsCString;
    typedef ::nsContentPolicyType nsContentPolicyType;
    typedef ::nsDOMNavigationTiming nsDOMNavigationTiming;
    typedef ::nsDocShellLoadState nsDocShellLoadState;
    typedef ::nsHttpAtom nsHttpAtom;
    typedef ::mozilla::net::nsHttpResponseHead nsHttpResponseHead;
    typedef ::nsID nsID;
    typedef ::nsIPropertyBag2 nsIPropertyBag2;
    typedef ::nsIURI nsIURI;
    typedef ::nsString nsString;
    typedef ::nsresult nsresult;
    typedef ::mozilla::null_t null_t;
    typedef ::uint16_t uint16_t;
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;
    typedef ::uint8_t uint8_t;
    typedef ::uintptr_t uintptr_t;
    typedef ::mozilla::void_t void_t;

public:
    typedef MozPromise<uint32_t, ResponseRejectReason, true> RequestMemoryReportPromise;
    typedef MozPromise<void_t, ResponseRejectReason, true> ClearSessionCachePromise;
    typedef MozPromise<SocketDataArgs, ResponseRejectReason, true> GetSocketDataPromise;
    typedef MozPromise<nsTArray<DNSCacheEntries>, ResponseRejectReason, true> GetDNSCacheEntriesPromise;
    typedef MozPromise<nsTArray<HttpRetParams>, ResponseRejectReason, true> GetHttpConnectionDataPromise;
    typedef MozPromise<nsTArray<Http3ConnectionStatsParams>, ResponseRejectReason, true> GetHttp3ConnectionStatsDataPromise;
    typedef MozPromise<ByteBuf, ResponseRejectReason, true> FlushFOGDataPromise;
    typedef MozPromise<bool, ResponseRejectReason, true> TestTriggerMetricsPromise;

protected:
    virtual mozilla::ipc::IPCResult
    RecvPWebrtcTCPSocketConstructor(
            PWebrtcTCPSocketParent* actor,
            const mozilla::Maybe<TabId>& tabId);
    virtual mozilla::ipc::IPCResult
    RecvPAltServiceConstructor(PAltServiceParent* actor);
    virtual mozilla::ipc::IPCResult
    RecvPProxyConfigLookupConstructor(
            PProxyConfigLookupParent* actor,
            nsIURI* aUri,
            const uint32_t& aFlags);
    virtual mozilla::ipc::IPCResult
    RecvPDNSRequestConstructor(
            PDNSRequestParent* actor,
            const nsACString& hostName,
            const nsACString& trrServer,
            const int32_t& port,
            const uint16_t& type,
            const OriginAttributes& originAttributes,
            const DNSFlags& flags);
    void
    ProcessingError(
            Result aCode,
            const char* aReason) override;
    bool
    ShouldContinueFromReplyTimeout() override;

public:
    typedef mozilla::ipc::IProtocol IProtocol;
    typedef IPC::Message Message;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;

public:
    MOZ_IMPLICIT PSocketProcessParent();

    virtual ~PSocketProcessParent();

protected:
    void
    ActorAlloc() final;
    void
    ActorDealloc() final;
public:
    ::base::ProcessId
    OtherPid() const;
    ::GeckoChildID
    OtherChildID() const;
    ::mozilla::ipc::EndpointProcInfo
    OtherEndpointProcInfo() const;

    void
    ManagedPDNSRequestParent(nsTArray<PDNSRequestParent*>& aArr) const;
    const ManagedContainer<PDNSRequestParent>&
    ManagedPDNSRequestParent() const;

    void
    ManagedPWebrtcTCPSocketParent(nsTArray<PWebrtcTCPSocketParent*>& aArr) const;
    const ManagedContainer<PWebrtcTCPSocketParent>&
    ManagedPWebrtcTCPSocketParent() const;

    void
    ManagedPHttpTransactionParent(nsTArray<PHttpTransactionParent*>& aArr) const;
    const ManagedContainer<PHttpTransactionParent>&
    ManagedPHttpTransactionParent() const;

    void
    ManagedPHttpConnectionMgrParent(nsTArray<PHttpConnectionMgrParent*>& aArr) const;
    const ManagedContainer<PHttpConnectionMgrParent>&
    ManagedPHttpConnectionMgrParent() const;

    void
    ManagedPInputChannelThrottleQueueParent(nsTArray<PInputChannelThrottleQueueParent*>& aArr) const;
    const ManagedContainer<PInputChannelThrottleQueueParent>&
    ManagedPInputChannelThrottleQueueParent() const;

    void
    ManagedPAltServiceParent(nsTArray<PAltServiceParent*>& aArr) const;
    const ManagedContainer<PAltServiceParent>&
    ManagedPAltServiceParent() const;

    void
    ManagedPAltSvcTransactionParent(nsTArray<PAltSvcTransactionParent*>& aArr) const;
    const ManagedContainer<PAltSvcTransactionParent>&
    ManagedPAltSvcTransactionParent() const;

    void
    ManagedPTRRServiceParent(nsTArray<PTRRServiceParent*>& aArr) const;
    const ManagedContainer<PTRRServiceParent>&
    ManagedPTRRServiceParent() const;

    void
    ManagedPProxyConfigLookupParent(nsTArray<PProxyConfigLookupParent*>& aArr) const;
    const ManagedContainer<PProxyConfigLookupParent>&
    ManagedPProxyConfigLookupParent() const;

    void
    ManagedPNativeDNSResolverOverrideParent(nsTArray<PNativeDNSResolverOverrideParent*>& aArr) const;
    const ManagedContainer<PNativeDNSResolverOverrideParent>&
    ManagedPNativeDNSResolverOverrideParent() const;

    mozilla::Span<mozilla::ipc::ProtocolId const>
    ManagedProtocolIds() const final;

    UntypedManagedContainer*
    GetManagedActors(mozilla::ipc::ProtocolId aProtocol) final;

    void
    RejectPendingResponses(ResponseRejectReason aReason) final;

    ManagedEndpoint<PDNSRequestChild>
    OpenPDNSRequestEndpoint(PDNSRequestParent* aActor);
    bool
    BindPDNSRequestEndpoint(
            ManagedEndpoint<PDNSRequestParent> aEndpoint,
            PDNSRequestParent* aActor);

    ManagedEndpoint<PWebrtcTCPSocketChild>
    OpenPWebrtcTCPSocketEndpoint(PWebrtcTCPSocketParent* aActor);
    bool
    BindPWebrtcTCPSocketEndpoint(
            ManagedEndpoint<PWebrtcTCPSocketParent> aEndpoint,
            PWebrtcTCPSocketParent* aActor);

    ManagedEndpoint<PHttpTransactionChild>
    OpenPHttpTransactionEndpoint(PHttpTransactionParent* aActor);
    bool
    BindPHttpTransactionEndpoint(
            ManagedEndpoint<PHttpTransactionParent> aEndpoint,
            PHttpTransactionParent* aActor);

    ManagedEndpoint<PHttpConnectionMgrChild>
    OpenPHttpConnectionMgrEndpoint(PHttpConnectionMgrParent* aActor);
    bool
    BindPHttpConnectionMgrEndpoint(
            ManagedEndpoint<PHttpConnectionMgrParent> aEndpoint,
            PHttpConnectionMgrParent* aActor);

    ManagedEndpoint<PInputChannelThrottleQueueChild>
    OpenPInputChannelThrottleQueueEndpoint(PInputChannelThrottleQueueParent* aActor);
    bool
    BindPInputChannelThrottleQueueEndpoint(
            ManagedEndpoint<PInputChannelThrottleQueueParent> aEndpoint,
            PInputChannelThrottleQueueParent* aActor);

    ManagedEndpoint<PAltServiceChild>
    OpenPAltServiceEndpoint(PAltServiceParent* aActor);
    bool
    BindPAltServiceEndpoint(
            ManagedEndpoint<PAltServiceParent> aEndpoint,
            PAltServiceParent* aActor);

    ManagedEndpoint<PAltSvcTransactionChild>
    OpenPAltSvcTransactionEndpoint(PAltSvcTransactionParent* aActor);
    bool
    BindPAltSvcTransactionEndpoint(
            ManagedEndpoint<PAltSvcTransactionParent> aEndpoint,
            PAltSvcTransactionParent* aActor);

    ManagedEndpoint<PTRRServiceChild>
    OpenPTRRServiceEndpoint(PTRRServiceParent* aActor);
    bool
    BindPTRRServiceEndpoint(
            ManagedEndpoint<PTRRServiceParent> aEndpoint,
            PTRRServiceParent* aActor);

    ManagedEndpoint<PProxyConfigLookupChild>
    OpenPProxyConfigLookupEndpoint(PProxyConfigLookupParent* aActor);
    bool
    BindPProxyConfigLookupEndpoint(
            ManagedEndpoint<PProxyConfigLookupParent> aEndpoint,
            PProxyConfigLookupParent* aActor);

    ManagedEndpoint<PNativeDNSResolverOverrideChild>
    OpenPNativeDNSResolverOverrideEndpoint(PNativeDNSResolverOverrideParent* aActor);
    bool
    BindPNativeDNSResolverOverrideEndpoint(
            ManagedEndpoint<PNativeDNSResolverOverrideParent> aEndpoint,
            PNativeDNSResolverOverrideParent* aActor);

    [[nodiscard]] bool
    SendInit(const SocketPorcessInitAttributes& aAttributes);

    [[nodiscard]] bool
    SendPreferenceUpdate(const Pref& pref);

    void
    SendRequestMemoryReport(
            const uint32_t& generation,
            const bool& anonymize,
            const bool& minimizeMemoryUsage,
            const mozilla::Maybe<FileDescriptor>& DMDFile,
            mozilla::ipc::ResolveCallback<uint32_t>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<RequestMemoryReportPromise>
    SendRequestMemoryReport(
            const uint32_t& generation,
            const bool& anonymize,
            const bool& minimizeMemoryUsage,
            const mozilla::Maybe<FileDescriptor>& DMDFile);

    [[nodiscard]] bool
    SendSetOffline(const bool& offline);

    [[nodiscard]] bool
    SendSetConnectivity(const bool& connectivity);

    [[nodiscard]] bool
    SendInitLinuxSandbox(const mozilla::Maybe<FileDescriptor>& sandboxBroker);

    [[nodiscard]] bool
    SendInitSocketProcessBridgeParent(
            const ProcessId& processId,
            Endpoint<::mozilla::net::PSocketProcessBridgeParent>&& endpoint);

    [[nodiscard]] bool
    SendInitProfiler(Endpoint<::mozilla::PProfilerChild>&& aEndpoint);

    [[nodiscard]] bool
    SendSocketProcessTelemetryPing();

    [[nodiscard]] PHttpTransactionParent*
    SendPHttpTransactionConstructor(PHttpTransactionParent* actor);

    [[nodiscard]] PHttpConnectionMgrParent*
    SendPHttpConnectionMgrConstructor(
            PHttpConnectionMgrParent* actor,
            const HttpHandlerInitArgs& aArgs);

    [[nodiscard]] bool
    SendUpdateDeviceModelId(const nsACString& aModelId);

    [[nodiscard]] bool
    SendOnHttpActivityDistributorActivated(const bool& aIsActivated);

    [[nodiscard]] bool
    SendOnHttpActivityDistributorObserveProxyResponse(const bool& aIsEnabled);

    [[nodiscard]] bool
    SendOnHttpActivityDistributorObserveConnection(const bool& aIsEnabled);

    [[nodiscard]] PInputChannelThrottleQueueParent*
    SendPInputChannelThrottleQueueConstructor(
            PInputChannelThrottleQueueParent* actor,
            const uint32_t& meanBytesPerSecond,
            const uint32_t& maxBytesPerSecond);

    [[nodiscard]] PAltSvcTransactionParent*
    SendPAltSvcTransactionConstructor(
            PAltSvcTransactionParent* actor,
            const HttpConnectionInfoCloneArgs& aConnInfo,
            const uint32_t& aCaps);

    void
    SendClearSessionCache(
            mozilla::ipc::ResolveCallback<void_t>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<ClearSessionCachePromise>
    SendClearSessionCache();

    [[nodiscard]] PTRRServiceParent*
    SendPTRRServiceConstructor(
            PTRRServiceParent* actor,
            const bool& aCaptiveIsPassed,
            const bool& aParentalControlEnabled,
            mozilla::Span<nsCString const> aDNSSuffixList);

    [[nodiscard]] PNativeDNSResolverOverrideParent*
    SendPNativeDNSResolverOverrideConstructor(PNativeDNSResolverOverrideParent* actor);

    [[nodiscard]] bool
    SendNotifyObserver(
            const nsACString& aTopic,
            const nsAString& aData);

    void
    SendGetSocketData(
            mozilla::ipc::ResolveCallback<SocketDataArgs>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<GetSocketDataPromise>
    SendGetSocketData();

    void
    SendGetDNSCacheEntries(
            mozilla::ipc::ResolveCallback<nsTArray<DNSCacheEntries>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<GetDNSCacheEntriesPromise>
    SendGetDNSCacheEntries();

    void
    SendGetHttpConnectionData(
            mozilla::ipc::ResolveCallback<nsTArray<HttpRetParams>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<GetHttpConnectionDataPromise>
    SendGetHttpConnectionData();

    void
    SendGetHttp3ConnectionStatsData(
            mozilla::ipc::ResolveCallback<nsTArray<Http3ConnectionStatsParams>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<GetHttp3ConnectionStatsDataPromise>
    SendGetHttp3ConnectionStatsData();

    [[nodiscard]] bool
    SendInitProxyAutoConfigChild(Endpoint<::mozilla::net::PProxyAutoConfigChild>&& endpoint);

    [[nodiscard]] bool
    SendRecheckIPConnectivity();

    [[nodiscard]] bool
    SendRecheckDNS();

    void
    SendFlushFOGData(
            mozilla::ipc::ResolveCallback<ByteBuf>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<FlushFOGDataPromise>
    SendFlushFOGData();

    void
    SendTestTriggerMetrics(
            mozilla::ipc::ResolveCallback<bool>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    [[nodiscard]] RefPtr<TestTriggerMetricsPromise>
    SendTestTriggerMetrics();

    [[nodiscard]] bool
    SendAddNetAddrOverride(
            const NetAddr& aFrom,
            const NetAddr& aTo);

    [[nodiscard]] bool
    SendClearNetAddrOverrides();

    [[nodiscard]] PDNSRequestParent*
    SendPDNSRequestConstructor(
            PDNSRequestParent* actor,
            const nsACString& hostName,
            const nsACString& trrServer,
            const int32_t& port,
            const uint16_t& type,
            const OriginAttributes& originAttributes,
            const DNSFlags& flags);

    void
    DeallocManagee(
            mozilla::ipc::ProtocolId aProtocolId,
            IProtocol* aListener) override;

    Result
    OnMessageReceived(const Message& msg__) override;

    Result
    OnMessageReceived(
            const Message& msg__,
            UniquePtr<Message>& reply__) override;

private:
    mozilla::ipc::IPDLAsyncReturnsCallbacks mAsyncCallbacks;

    ManagedContainer<PDNSRequestParent> mManagedPDNSRequestParent;
    ManagedContainer<PWebrtcTCPSocketParent> mManagedPWebrtcTCPSocketParent;
    ManagedContainer<PHttpTransactionParent> mManagedPHttpTransactionParent;
    ManagedContainer<PHttpConnectionMgrParent> mManagedPHttpConnectionMgrParent;
    ManagedContainer<PInputChannelThrottleQueueParent> mManagedPInputChannelThrottleQueueParent;
    ManagedContainer<PAltServiceParent> mManagedPAltServiceParent;
    ManagedContainer<PAltSvcTransactionParent> mManagedPAltSvcTransactionParent;
    ManagedContainer<PTRRServiceParent> mManagedPTRRServiceParent;
    ManagedContainer<PProxyConfigLookupParent> mManagedPProxyConfigLookupParent;
    ManagedContainer<PNativeDNSResolverOverrideParent> mManagedPNativeDNSResolverOverrideParent;
};


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

#endif // ifndef PSocketProcessParent_h
