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

#ifndef PBoundStorageKeyParent_h
#define PBoundStorageKeyParent_h

#include "mozilla/dom/cache/PBoundStorageKey.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 "mozilla/dom/IntegrityPolicy.h"
#include "mozilla/dom/cache/Types.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "nsIContentSecurityPolicy.h"

namespace mozilla {
namespace dom {
namespace cache {
class PCacheParent;
} // namespace cache
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
namespace cache {
class PCacheChild;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {
class PCacheStorageParent;
} // namespace cache
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
namespace cache {
class PCacheStorageChild;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {
class PCacheStreamControlParent;
} // namespace cache
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
namespace cache {
class PCacheStreamControlChild;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {
class PCacheParent;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {
class PCacheStorageParent;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {
class PCacheStreamControlParent;
} // namespace cache
} // namespace dom
} // namespace mozilla

namespace mozilla {
struct void_t;
} // namespace mozilla

namespace mozilla {
namespace dom {
namespace cache {


class PBoundStorageKeyParent :
    public mozilla::ipc::IToplevelProtocol
{
private:
    friend class ::mozilla::dom::cache::PCacheParent;
    friend class ::mozilla::dom::cache::PCacheStorageParent;
    friend class ::mozilla::dom::cache::PCacheStreamControlParent;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PBoundStorageKeyMsgStart;
protected:
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::ipc::CSPInfo CSPInfo;
    typedef ::mozilla::ipc::ContentPrincipalInfo ContentPrincipalInfo;
    typedef ::mozilla::ipc::ContentSecurityPolicy ContentSecurityPolicy;
    typedef ::mozilla::dom::IntegrityPolicy::Destinations Destinations;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::ipc::ExpandedPrincipalInfo ExpandedPrincipalInfo;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::ipc::IntegrityPolicyArgs IntegrityPolicyArgs;
    typedef ::mozilla::ipc::IntegrityPolicyEntry IntegrityPolicyEntry;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::dom::cache::Namespace Namespace;
    typedef ::mozilla::ipc::NullPrincipalInfo NullPrincipalInfo;
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::mozilla::dom::cache::PCacheChild PCacheChild;
    typedef ::mozilla::dom::cache::PCacheParent PCacheParent;
    typedef ::mozilla::dom::cache::PCacheStorageChild PCacheStorageChild;
    typedef ::mozilla::dom::cache::PCacheStorageParent PCacheStorageParent;
    typedef ::mozilla::dom::cache::PCacheStreamControlChild PCacheStreamControlChild;
    typedef ::mozilla::dom::cache::PCacheStreamControlParent PCacheStreamControlParent;
    typedef ::mozilla::ipc::PolicyContainerArgs PolicyContainerArgs;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::nsIContentSecurityPolicy::RequireTrustedTypesForDirectiveState RequireTrustedTypesForDirectiveState;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::dom::IntegrityPolicy::Sources Sources;
    typedef ::mozilla::ipc::SystemPrincipalInfo SystemPrincipalInfo;
    template<class T> using UniquePtr = mozilla::UniquePtr<T>;
    typedef ::mozilla::ipc::WebTransportHash WebTransportHash;
    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 ::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:
    virtual mozilla::ipc::IPCResult
    RecvPCacheStorageConstructor(
            PCacheStorageParent* actor,
            const Namespace& aNamespace,
            const PrincipalInfo& aPrincipalInfo);
    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 PBoundStorageKeyParent();

    virtual ~PBoundStorageKeyParent();

protected:
    void
    ActorAlloc() final;
    void
    ActorDealloc() final;
public:
    void
    ManagedPCacheStorageParent(nsTArray<PCacheStorageParent*>& aArr) const;
    const ManagedContainer<PCacheStorageParent>&
    ManagedPCacheStorageParent() const;

    void
    ManagedPCacheParent(nsTArray<PCacheParent*>& aArr) const;
    const ManagedContainer<PCacheParent>&
    ManagedPCacheParent() const;

    void
    ManagedPCacheStreamControlParent(nsTArray<PCacheStreamControlParent*>& aArr) const;
    const ManagedContainer<PCacheStreamControlParent>&
    ManagedPCacheStreamControlParent() const;

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

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

    ManagedEndpoint<PCacheStorageChild>
    OpenPCacheStorageEndpoint(PCacheStorageParent* aActor);
    bool
    BindPCacheStorageEndpoint(
            ManagedEndpoint<PCacheStorageParent> aEndpoint,
            PCacheStorageParent* aActor);

    ManagedEndpoint<PCacheChild>
    OpenPCacheEndpoint(PCacheParent* aActor);
    bool
    BindPCacheEndpoint(
            ManagedEndpoint<PCacheParent> aEndpoint,
            PCacheParent* aActor);

    ManagedEndpoint<PCacheStreamControlChild>
    OpenPCacheStreamControlEndpoint(PCacheStreamControlParent* aActor);
    bool
    BindPCacheStreamControlEndpoint(
            ManagedEndpoint<PCacheStreamControlParent> aEndpoint,
            PCacheStreamControlParent* aActor);

    [[nodiscard]] PCacheParent*
    SendPCacheConstructor(PCacheParent* actor);

    [[nodiscard]] PCacheStreamControlParent*
    SendPCacheStreamControlConstructor(PCacheStreamControlParent* actor);

    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:
    ManagedContainer<PCacheStorageParent> mManagedPCacheStorageParent;
    ManagedContainer<PCacheParent> mManagedPCacheParent;
    ManagedContainer<PCacheStreamControlParent> mManagedPCacheStreamControlParent;
};


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

#endif // ifndef PBoundStorageKeyParent_h
