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

#ifndef PFetchChild_h
#define PFetchChild_h

#include "mozilla/dom/PFetch.h"
#ifdef DEBUG
#include "prenv.h"
#endif  // DEBUG

#include "mozilla/Tainting.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
// Headers for things that cannot be forward declared
#include "mozilla/ErrorResult.h"
#include "mozilla/StorageAccess.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ClientBinding.h"
#include "mozilla/dom/ClientsBinding.h"
#include "mozilla/dom/DocumentBinding.h"
#include "mozilla/dom/FeaturePolicy.h"
#include "mozilla/dom/FetchDriver.h"
#include "mozilla/dom/HeadersBinding.h"
#include "mozilla/dom/IntegrityPolicy.h"
#include "mozilla/dom/LoadURIOptionsBinding.h"
#include "mozilla/dom/PerformanceTimingIPCUtils.h"
#include "mozilla/dom/ReferrerPolicyBinding.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/ResponseBinding.h"
#include "mozilla/dom/ServiceWorkerBinding.h"
#include "mozilla/dom/UserNavigationInvolvement.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "mozilla/net/PHttpChannelParams.h"
#include "nsDOMNavigationTiming.h"
#include "nsICacheInfoChannel.h"
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsILoadInfo.h"
#include "nsNetUtil.h"
#include "nsRFPService.h"

namespace mozilla {
namespace ipc {
class PBackgroundChild;
} // namespace ipc
} // namespace mozilla
namespace mozilla {
namespace ipc {
class PBackgroundParent;
} // namespace ipc
} // namespace mozilla

namespace mozilla {
namespace ipc {
class PBackgroundChild;
} // namespace ipc
} // namespace mozilla

struct nsID;

namespace mozilla {
class RemoteLazyInputStream;
} // namespace mozilla

class nsITransportSecurityInfo;

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 void_t;
} // namespace mozilla

namespace mozilla {
class TimeStamp;
} // namespace mozilla

namespace mozilla {
namespace dom {


class PFetchChild :
    public mozilla::ipc::IRefCountedProtocol
{
private:
    friend class ::mozilla::ipc::PBackgroundChild;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PFetchMsgStart;
protected:
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::nsITimedChannel::BodyInfoAccess BodyInfoAccess;
    typedef ::mozilla::dom::BodyStreamVariant BodyStreamVariant;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::ipc::CSPInfo CSPInfo;
    typedef ::mozilla::dom::CallerType CallerType;
    typedef ::mozilla::net::ChildLoadInfoForwarderArgs ChildLoadInfoForwarderArgs;
    typedef ::mozilla::dom::ChildToParentInternalResponse ChildToParentInternalResponse;
    typedef ::mozilla::dom::ChildToParentStream ChildToParentStream;
    typedef ::mozilla::dom::ClientClaimArgs ClientClaimArgs;
    typedef ::mozilla::dom::ClientControlledArgs ClientControlledArgs;
    typedef ::mozilla::dom::ClientEvictBFCacheArgs ClientEvictBFCacheArgs;
    typedef ::mozilla::dom::ClientFocusArgs ClientFocusArgs;
    typedef ::mozilla::dom::ClientGetInfoAndStateArgs ClientGetInfoAndStateArgs;
    typedef ::mozilla::dom::ClientInfoAndState ClientInfoAndState;
    typedef ::mozilla::dom::ClientList ClientList;
    typedef ::mozilla::dom::ClientMatchAllArgs ClientMatchAllArgs;
    typedef ::mozilla::dom::ClientNavigateArgs ClientNavigateArgs;
    typedef ::mozilla::dom::ClientNavigateOpConstructorArgs ClientNavigateOpConstructorArgs;
    typedef ::mozilla::dom::ClientOpConstructorArgs ClientOpConstructorArgs;
    typedef ::mozilla::dom::ClientOpResult ClientOpResult;
    typedef ::mozilla::dom::ClientOpenWindowArgs ClientOpenWindowArgs;
    typedef ::mozilla::dom::ClientPostMessageArgs ClientPostMessageArgs;
    typedef ::mozilla::dom::ClientSourceConstructorArgs ClientSourceConstructorArgs;
    typedef ::mozilla::dom::ClientSourceExecutionReadyArgs ClientSourceExecutionReadyArgs;
    typedef ::mozilla::dom::ClientType ClientType;
    typedef ::mozilla::net::ConsoleReportCollected ConsoleReportCollected;
    typedef ::mozilla::ipc::ContentPrincipalInfo ContentPrincipalInfo;
    typedef ::mozilla::ipc::ContentSecurityPolicy ContentSecurityPolicy;
    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::CopyableErrorResult CopyableErrorResult;
    typedef ::mozilla::net::CorsPreflightArgs CorsPreflightArgs;
    typedef ::nsILoadInfo::CrossOriginEmbedderPolicy CrossOriginEmbedderPolicy;
    typedef ::DOMHighResTimeStamp DOMHighResTimeStamp;
    typedef ::mozilla::dom::IntegrityPolicy::Destinations Destinations;
    typedef ::mozilla::net::DocumentChannelCreationArgs DocumentChannelCreationArgs;
    typedef ::mozilla::net::DocumentChannelElementCreationArgs DocumentChannelElementCreationArgs;
    typedef ::mozilla::net::DocumentCreationArgs DocumentCreationArgs;
    typedef ::mozilla::net::EarlyHintConnectArgs EarlyHintConnectArgs;
    typedef ::mozilla::dom::FetchDriverObserver::EndReason EndReason;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::ipc::ExpandedPrincipalInfo ExpandedPrincipalInfo;
    typedef ::mozilla::dom::FeaturePolicyInfo FeaturePolicyInfo;
    typedef ::mozilla::dom::FetchOpArgs FetchOpArgs;
    typedef ::mozilla::net::FileChannelInfo FileChannelInfo;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::dom::ForceMediaDocument ForceMediaDocument;
    typedef ::mozilla::dom::FrameType FrameType;
    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::dom::HeadersEntry HeadersEntry;
    typedef ::mozilla::dom::HeadersGuardEnum HeadersGuardEnum;
    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 ::nsILoadInfo::IPAddressSpace IPAddressSpace;
    typedef ::mozilla::dom::IPCClientInfo IPCClientInfo;
    typedef ::mozilla::dom::IPCClientState IPCClientState;
    typedef ::mozilla::dom::IPCClientWindowState IPCClientWindowState;
    typedef ::mozilla::dom::IPCClientWorkerState IPCClientWorkerState;
    typedef ::mozilla::dom::IPCInternalRequest IPCInternalRequest;
    typedef ::mozilla::dom::IPCPerformanceTimingData IPCPerformanceTimingData;
    typedef ::mozilla::dom::IPCServerTiming IPCServerTiming;
    typedef ::mozilla::dom::IPCServiceWorkerDescriptor IPCServiceWorkerDescriptor;
    typedef ::mozilla::ipc::IntegrityPolicyArgs IntegrityPolicyArgs;
    typedef ::mozilla::ipc::IntegrityPolicyEntry IntegrityPolicyEntry;
    typedef ::mozilla::net::InterceptionInfoArg InterceptionInfoArg;
    typedef ::mozilla::dom::InternalResponseMetadata InternalResponseMetadata;
    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::ipc::NullPrincipalInfo NullPrincipalInfo;
    typedef ::mozilla::net::ObjectCreationArgs ObjectCreationArgs;
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::mozilla::ipc::PBackgroundChild PBackgroundChild;
    typedef ::mozilla::ipc::PBackgroundParent PBackgroundParent;
    typedef ::mozilla::net::ParentLoadInfoForwarderArgs ParentLoadInfoForwarderArgs;
    typedef ::mozilla::dom::ParentToChildInternalResponse ParentToChildInternalResponse;
    typedef ::mozilla::dom::ParentToChildStream ParentToChildStream;
    typedef ::mozilla::dom::ParentToParentInternalResponse ParentToParentInternalResponse;
    typedef ::mozilla::dom::ParentToParentStream ParentToParentStream;
    typedef ::mozilla::ipc::PolicyContainerArgs PolicyContainerArgs;
    typedef ::mozilla::dom::PostMessageSource PostMessageSource;
    typedef ::mozilla::net::PreferredAlternativeDataDeliveryTypeIPC PreferredAlternativeDataDeliveryTypeIPC;
    typedef ::mozilla::net::PreferredAlternativeDataTypeParams PreferredAlternativeDataTypeParams;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;
    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::dom::ReferrerPolicy ReferrerPolicy;
    typedef ::mozilla::RemoteLazyInputStream RemoteLazyInputStream;
    typedef ::mozilla::net::RemoteStreamInfo RemoteStreamInfo;
    typedef ::mozilla::dom::RequestCache RequestCache;
    typedef ::mozilla::dom::RequestCredentials RequestCredentials;
    typedef ::mozilla::net::RequestHeaderTuples RequestHeaderTuples;
    typedef ::mozilla::dom::RequestMode RequestMode;
    typedef ::mozilla::dom::RequestPriority RequestPriority;
    typedef ::mozilla::dom::RequestRedirect RequestRedirect;
    typedef ::nsIContentSecurityPolicy::RequireTrustedTypesForDirectiveState RequireTrustedTypesForDirectiveState;
    typedef ::mozilla::net::ResourceTimingStructArgs ResourceTimingStructArgs;
    typedef ::mozilla::dom::ResponseEndArgs ResponseEndArgs;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::dom::ResponseTiming ResponseTiming;
    typedef ::mozilla::dom::ResponseType ResponseType;
    typedef ::nsILoadInfo::SchemelessInputType SchemelessInputType;
    typedef ::mozilla::dom::ServiceWorkerState ServiceWorkerState;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::dom::IntegrityPolicy::Sources Sources;
    typedef ::mozilla::net::SpeculativeConnectionOverriderArgs SpeculativeConnectionOverriderArgs;
    typedef ::mozilla::StorageAccess StorageAccess;
    typedef ::nsILoadInfo::StoragePermissionState StoragePermissionState;
    typedef ::mozilla::ipc::SystemPrincipalInfo SystemPrincipalInfo;
    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 ::mozilla::dom::VisibilityState VisibilityState;
    typedef ::mozilla::ipc::WebTransportHash WebTransportHash;
    typedef ::mozilla::dom::WorkerType WorkerType;
    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 ::nsITransportSecurityInfo nsITransportSecurityInfo;
    typedef ::nsString nsString;
    typedef ::nsresult nsresult;
    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;

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

public:
    MOZ_IMPLICIT PFetchChild();

    virtual ~PFetchChild();

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

    PBackgroundChild*
    Manager() const;

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

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

    bool
    SendFetchOp(const FetchOpArgs& aArgs);

    bool
    SendAbortFetchOp(const bool& aForceAbort);

    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:
    bool mAwaitingManagedEndpointBind = false;

};


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

#endif // ifndef PFetchChild_h
