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

#ifndef PDocAccessibleChild_h
#define PDocAccessibleChild_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 PBrowserChild;
} // namespace dom
} // namespace mozilla
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 PBrowserBridgeChild;
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace a11y {


class PDocAccessibleChild :
    public mozilla::ipc::IProtocol
{
private:
    friend class ::mozilla::dom::PBrowserChild;
    friend class ::mozilla::dom::PBrowserBridgeChild;
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
    Recv__delete__();
    virtual mozilla::ipc::IPCResult
    RecvRestoreFocus() = 0;
    virtual mozilla::ipc::IPCResult
    RecvScrollTo(
            const uint64_t& aID,
            const uint32_t& aScrollType) = 0;
    virtual mozilla::ipc::IPCResult
    RecvScrollToPoint(
            const uint64_t& aID,
            const uint32_t& aScrollType,
            const int32_t& aX,
            const int32_t& aY) = 0;
    virtual mozilla::ipc::IPCResult
    RecvAnnounce(
            const uint64_t& aID,
            const nsAString& aAnnouncement,
            const uint16_t& aPriority) = 0;
    virtual mozilla::ipc::IPCResult
    RecvSetTextSelection(
            const uint64_t& aStartID,
            const int32_t& aStartOffset,
            const uint64_t& aEndID,
            const int32_t& aEndOffset,
            const int32_t& aSelectionNum,
            const bool& aSetFocus) = 0;
    virtual mozilla::ipc::IPCResult
    RecvRemoveTextSelection(
            const uint64_t& aID,
            const int32_t& aSelectionNum) = 0;
    virtual mozilla::ipc::IPCResult
    RecvScrollTextLeafRangeIntoView(
            const uint64_t& aStartID,
            const int32_t& aStartOffset,
            const uint64_t& aEndID,
            const int32_t& aEndOffset,
            const uint32_t& aScrollType) = 0;
    virtual mozilla::ipc::IPCResult
    RecvScrollSubstringToPoint(
            const uint64_t& aID,
            const int32_t& aStartOffset,
            const int32_t& aEndOffset,
            const uint32_t& aCoordinateType,
            const int32_t& aX,
            const int32_t& aY) = 0;
    virtual mozilla::ipc::IPCResult
    RecvReplaceText(
            const uint64_t& aID,
            const nsAString& aText) = 0;
    virtual mozilla::ipc::IPCResult
    RecvInsertText(
            const uint64_t& aID,
            const nsAString& aText,
            const int32_t& aPosition) = 0;
    virtual mozilla::ipc::IPCResult
    RecvCopyText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos) = 0;
    virtual mozilla::ipc::IPCResult
    RecvCutText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos) = 0;
    virtual mozilla::ipc::IPCResult
    RecvDeleteText(
            const uint64_t& aID,
            const int32_t& aStartPos,
            const int32_t& aEndPos) = 0;
    virtual mozilla::ipc::IPCResult
    RecvPasteText(
            const uint64_t& aID,
            const int32_t& aPosition) = 0;
    virtual mozilla::ipc::IPCResult
    RecvTakeSelection(const uint64_t& aID) = 0;
    virtual mozilla::ipc::IPCResult
    RecvSetSelected(
            const uint64_t& aID,
            const bool& aSelected) = 0;
    virtual mozilla::ipc::IPCResult
    RecvDoActionAsync(
            const uint64_t& aID,
            const uint8_t& aIndex) = 0;
    virtual mozilla::ipc::IPCResult
    RecvSetCurValue(
            const uint64_t& aID,
            const double& aValue) = 0;
    virtual mozilla::ipc::IPCResult
    RecvTakeFocus(const uint64_t& aID) = 0;
    virtual mozilla::ipc::IPCResult
    RecvVerifyCache(
            const uint64_t& aID,
            const uint64_t& aCacheDomain,
            AccAttributes* aFields) = 0;
    virtual mozilla::ipc::IPCResult
    RecvAckMutationEvents() = 0;
public:
    typedef mozilla::ipc::IProtocol IProtocol;
    typedef IPC::Message Message;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;

public:
    MOZ_IMPLICIT PDocAccessibleChild();

    virtual ~PDocAccessibleChild();

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

    PBrowserChild*
    Manager() const;

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

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

    bool
    SendShutdown();

    bool
    SendEvent(
            const uint64_t& aID,
            const uint32_t& type);

    bool
    SendStateChangeEvent(
            const uint64_t& aID,
            const uint64_t& aState,
            const bool& aEnabled);

    bool
    SendCaretMoveEvent(
            const uint64_t& aID,
            const LayoutDeviceIntRect& aCaretRect,
            const int32_t& aOffset,
            const bool& aIsSelectionCollapsed,
            const bool& aIsAtEndOfLine,
            const int32_t& aGranularity,
            const bool& aFromUser);

    bool
    SendMutationEvents(mozilla::Span<MutationEventData const> aData);

    bool
    SendRequestAckMutationEvents();

    bool
    SendSelectionEvent(
            const uint64_t& aID,
            const uint64_t& aWidgetID,
            const uint32_t& aType);

    bool
    SendRoleChangedEvent(
            const role& aRole,
            const uint8_t& aRoleMapEntryIndex);

    bool
    SendFocusEvent(
            const uint64_t& aID,
            const LayoutDeviceIntRect& aCaretRect);

    bool
    SendScrollingEvent(
            const uint64_t& aID,
            const uint64_t& aType,
            const uint32_t& aScrollX,
            const uint32_t& aScrollY,
            const uint32_t& aMaxScrollX,
            const uint32_t& aMaxScrollY);

    bool
    SendAnnouncementEvent(
            const uint64_t& aID,
            const nsAString& aAnnouncement,
            const uint16_t& aPriority);

    bool
    SendTextSelectionChangeEvent(
            const uint64_t& aID,
            mozilla::Span<TextRangeData const> aSelection);

    bool
    SendBindChildDoc(
            mozilla::NotNull<PDocAccessibleChild*> aChildDoc,
            const uint64_t& aID);

    bool
    SendCache(
            const CacheUpdateType& aUpdateType,
            mozilla::Span<CacheData const> aData);

    bool
    SendSelectedAccessiblesChanged(
            mozilla::Span<uint64_t const> aSelectedIDs,
            mozilla::Span<uint64_t const> aUnselectedIDs);

    bool
    SendAccessiblesWillMove(mozilla::Span<uint64_t const> aIDs);

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

#endif // ifndef PDocAccessibleChild_h
