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

#ifndef PDocAccessibleParent_h
#define PDocAccessibleParent_h

#include "mozilla/a11y/PDocAccessible.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 "Units.h"
#include "mozilla/a11y/IPCTypes.h"
#include "mozilla/gfx/Matrix.h"

namespace mozilla {
namespace dom {
class PBrowserParent;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class PBrowserChild;
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
class PBrowserParent;
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
class PBrowserBridgeParent;
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace a11y {


class PDocAccessibleParent :
    public mozilla::ipc::IProtocol
{
private:
    friend class ::mozilla::dom::PBrowserParent;
    friend class ::mozilla::dom::PBrowserBridgeParent;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PDocAccessibleMsgStart;
protected:
    typedef ::mozilla::a11y::AccAttributes AccAttributes;
    typedef ::mozilla::a11y::AccGenericType AccGenericType;
    typedef ::mozilla::a11y::AccType AccType;
    typedef ::mozilla::a11y::AccessibleData AccessibleData;
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::a11y::CacheData CacheData;
    typedef ::mozilla::a11y::CacheEventData CacheEventData;
    typedef ::mozilla::a11y::CacheUpdateType CacheUpdateType;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::a11y::HideEventData HideEventData;
    typedef ::mozilla::LayoutDeviceIntPoint LayoutDeviceIntPoint;
    typedef ::mozilla::LayoutDeviceIntRect LayoutDeviceIntRect;
    typedef ::mozilla::LayoutDeviceIntSize LayoutDeviceIntSize;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::gfx::Matrix4x4 Matrix4x4;
    typedef ::mozilla::a11y::MutationEventData MutationEventData;
    typedef ::mozilla::dom::PBrowserChild PBrowserChild;
    typedef ::mozilla::dom::PBrowserParent PBrowserParent;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::mozilla::a11y::ReorderEventData ReorderEventData;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::a11y::ShowEventData ShowEventData;
    typedef ::mozilla::a11y::TextChangeEventData TextChangeEventData;
    typedef ::mozilla::a11y::TextRangeData TextRangeData;
    template<class T> using UniquePtr = mozilla::UniquePtr<T>;
    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 ::mozilla::a11y::role role;
    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;

protected:
    virtual mozilla::ipc::IPCResult
    RecvShutdown() = 0;
    virtual mozilla::ipc::IPCResult
    RecvEvent(
            const uint64_t& aID,
            const uint32_t& type) = 0;
    virtual mozilla::ipc::IPCResult
    RecvStateChangeEvent(
            const uint64_t& aID,
            const uint64_t& aState,
            const bool& aEnabled) = 0;
    virtual mozilla::ipc::IPCResult
    RecvCaretMoveEvent(
            const uint64_t& aID,
            const LayoutDeviceIntRect& aCaretRect,
            const int32_t& aOffset,
            const bool& aIsSelectionCollapsed,
            const bool& aIsAtEndOfLine,
            const int32_t& aGranularity,
            const bool& aFromUser) = 0;
    virtual mozilla::ipc::IPCResult
    RecvMutationEvents(nsTArray<MutationEventData>&& aData) = 0;
    virtual mozilla::ipc::IPCResult
    RecvRequestAckMutationEvents() = 0;
    virtual mozilla::ipc::IPCResult
    RecvSelectionEvent(
            const uint64_t& aID,
            const uint64_t& aWidgetID,
            const uint32_t& aType) = 0;
    virtual mozilla::ipc::IPCResult
    RecvRoleChangedEvent(
            const role& aRole,
            const uint8_t& aRoleMapEntryIndex) = 0;
    virtual mozilla::ipc::IPCResult
    RecvFocusEvent(
            const uint64_t& aID,
            const LayoutDeviceIntRect& aCaretRect) = 0;
    virtual mozilla::ipc::IPCResult
    RecvScrollingEvent(
            const uint64_t& aID,
            const uint64_t& aType,
            const uint32_t& aScrollX,
            const uint32_t& aScrollY,
            const uint32_t& aMaxScrollX,
            const uint32_t& aMaxScrollY) = 0;
    virtual mozilla::ipc::IPCResult
    RecvAnnouncementEvent(
            const uint64_t& aID,
            const nsAString& aAnnouncement,
            const uint16_t& aPriority) = 0;
    virtual mozilla::ipc::IPCResult
    RecvTextSelectionChangeEvent(
            const uint64_t& aID,
            nsTArray<TextRangeData>&& aSelection) = 0;
    virtual mozilla::ipc::IPCResult
    RecvBindChildDoc(
            mozilla::NotNull<PDocAccessibleParent*> aChildDoc,
            const uint64_t& aID) = 0;
    virtual mozilla::ipc::IPCResult
    RecvCache(
            const CacheUpdateType& aUpdateType,
            nsTArray<CacheData>&& aData) = 0;
    virtual mozilla::ipc::IPCResult
    RecvSelectedAccessiblesChanged(
            nsTArray<uint64_t>&& aSelectedIDs,
            nsTArray<uint64_t>&& aUnselectedIDs) = 0;
    virtual mozilla::ipc::IPCResult
    RecvAccessiblesWillMove(nsTArray<uint64_t>&& aIDs) = 0;
public:
    typedef mozilla::ipc::IProtocol IProtocol;
    typedef IPC::Message Message;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;

public:
    MOZ_IMPLICIT PDocAccessibleParent();

    virtual ~PDocAccessibleParent();

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

    PBrowserParent*
    Manager() const;

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

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

    [[nodiscard]] static bool
    Send__delete__(PDocAccessibleParent* actor);

    [[nodiscard]] bool
    SendRestoreFocus();

    [[nodiscard]] bool
    SendScrollTo(
            const uint64_t& aID,
            const uint32_t& aScrollType);

    [[nodiscard]] bool
    SendScrollToPoint(
            const uint64_t& aID,
            const uint32_t& aScrollType,
            const int32_t& aX,
            const int32_t& aY);

    [[nodiscard]] bool
    SendAnnounce(
            const uint64_t& aID,
            const nsAString& aAnnouncement,
            const uint16_t& aPriority);

    [[nodiscard]] bool
    SendSetTextSelection(
            const uint64_t& aStartID,
            const int32_t& aStartOffset,
            const uint64_t& aEndID,
            const int32_t& aEndOffset,
            const int32_t& aSelectionNum,
            const bool& aSetFocus);

    [[nodiscard]] bool
    SendRemoveTextSelection(
            const uint64_t& aID,
            const int32_t& aSelectionNum);

    [[nodiscard]] bool
    SendScrollTextLeafRangeIntoView(
            const uint64_t& aStartID,
            const int32_t& aStartOffset,
            const uint64_t& aEndID,
            const int32_t& aEndOffset,
            const uint32_t& aScrollType);

    [[nodiscard]] bool
    SendScrollSubstringToPoint(
            const uint64_t& aID,
            const int32_t& aStartOffset,
            const int32_t& aEndOffset,
            const uint32_t& aCoordinateType,
            const int32_t& aX,
            const int32_t& aY);

    [[nodiscard]] bool
    SendReplaceText(
            const uint64_t& aID,
            const nsAString& aText);

    [[nodiscard]] bool
    SendInsertText(
            const uint64_t& aID,
            const nsAString& aText,
            const int32_t& aPosition);

    [[nodiscard]] bool
    SendCopyText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos);

    [[nodiscard]] bool
    SendCutText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos);

    [[nodiscard]] bool
    SendDeleteText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos);

    [[nodiscard]] bool
    SendPasteText(
            const uint64_t& aID,
            const int32_t& aPosition);

    [[nodiscard]] bool
    SendTakeSelection(const uint64_t& aID);

    [[nodiscard]] bool
    SendSetSelected(
            const uint64_t& aID,
            const bool& aSelected);

    [[nodiscard]] bool
    SendDoActionAsync(
            const uint64_t& aID,
            const uint8_t& aIndex);

    [[nodiscard]] bool
    SendSetCurValue(
            const uint64_t& aID,
            const double& aValue);

    [[nodiscard]] bool
    SendTakeFocus(const uint64_t& aID);

    [[nodiscard]] bool
    SendVerifyCache(
            const uint64_t& aID,
            const uint64_t& aCacheDomain,
            AccAttributes* aFields);

    [[nodiscard]] bool
    SendAckMutationEvents();

    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 a11y
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::a11y::PDocAccessibleParent*>
{
    typedef ::mozilla::a11y::PDocAccessibleParent* paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef PDocAccessibleParent_h
