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

#ifndef PMLSTransactionChild_h
#define PMLSTransactionChild_h

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

#include "mozilla/Tainting.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
namespace mozilla {
namespace ipc {
class PBackgroundChild;
} // namespace ipc
} // namespace mozilla
namespace mozilla {
namespace ipc {
class PBackgroundParent;
} // namespace ipc
} // namespace mozilla

namespace mozilla {
namespace security {
namespace mls {
struct GkGroupIdEpoch;
} // namespace mls
} // namespace security
} // namespace mozilla

namespace mozilla {
namespace security {
namespace mls {
struct GkMlsCommitOutput;
} // namespace mls
} // namespace security
} // namespace mozilla

namespace mozilla {
namespace security {
namespace mls {
struct GkGroupDetails;
} // namespace mls
} // namespace security
} // namespace mozilla

namespace mozilla {
namespace security {
namespace mls {
struct GkExporterOutput;
} // namespace mls
} // namespace security
} // namespace mozilla

namespace mozilla {
namespace security {
namespace mls {
struct GkReceived;
} // namespace mls
} // namespace security
} // namespace mozilla

namespace mozilla {
namespace dom {


class PMLSTransactionChild :
    public mozilla::ipc::IToplevelProtocol
{
private:
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PMLSTransactionMsgStart;
protected:
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::security::mls::GkExporterOutput GkExporterOutput;
    typedef ::mozilla::security::mls::GkGroupDetails GkGroupDetails;
    typedef ::mozilla::security::mls::GkGroupIdEpoch GkGroupIdEpoch;
    typedef ::mozilla::security::mls::GkMlsCommitOutput GkMlsCommitOutput;
    typedef ::mozilla::security::mls::GkReceived GkReceived;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::ipc::PBackgroundChild PBackgroundChild;
    typedef ::mozilla::ipc::PBackgroundParent PBackgroundParent;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::mozilla::dom::RawBytes RawBytes;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::mozilla::ipc::Shmem Shmem;
    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 ::uint16_t uint16_t;
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;
    typedef ::uint8_t uint8_t;
    typedef ::uintptr_t uintptr_t;

public:
    typedef MozPromise<bool, ResponseRejectReason, true> RequestStateDeletePromise;
    typedef MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true> RequestGroupStateDeletePromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGenerateIdentityKeypairPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGenerateCredentialBasicPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGenerateKeyPackagePromise;
    typedef MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true> RequestGroupCreatePromise;
    typedef MozPromise<mozilla::Maybe<GkGroupIdEpoch>, ResponseRejectReason, true> RequestGroupJoinPromise;
    typedef MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true> RequestGroupAddPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGroupProposeAddPromise;
    typedef MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true> RequestGroupRemovePromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGroupProposeRemovePromise;
    typedef MozPromise<mozilla::Maybe<GkMlsCommitOutput>, ResponseRejectReason, true> RequestGroupClosePromise;
    typedef MozPromise<mozilla::Maybe<GkGroupDetails>, ResponseRejectReason, true> RequestGroupDetailsPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestSendPromise;
    typedef MozPromise<GkReceived, ResponseRejectReason, true> RequestReceivePromise;
    typedef MozPromise<bool, ResponseRejectReason, true> RequestHasPendingProposalsPromise;
    typedef MozPromise<bool, ResponseRejectReason, true> RequestClearPendingProposalsPromise;
    typedef MozPromise<bool, ResponseRejectReason, true> RequestHasPendingCommitPromise;
    typedef MozPromise<bool, ResponseRejectReason, true> RequestClearPendingCommitPromise;
    typedef MozPromise<GkReceived, ResponseRejectReason, true> RequestApplyPendingCommitPromise;
    typedef MozPromise<mozilla::Maybe<GkExporterOutput>, ResponseRejectReason, true> RequestExportSecretPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGetGroupIdentifierPromise;
    typedef MozPromise<mozilla::Maybe<RawBytes>, ResponseRejectReason, true> RequestGetGroupEpochPromise;

protected:
    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 PMLSTransactionChild();

    virtual ~PMLSTransactionChild();

protected:
    void
    ActorAlloc() final;
    void
    ActorDealloc() final;
public:
    mozilla::Span<mozilla::ipc::ProtocolId const>
    ManagedProtocolIds() const final;

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

    void
    RejectPendingResponses(ResponseRejectReason aReason) final;

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

    RefPtr<RequestStateDeletePromise>
    SendRequestStateDelete();

    void
    SendRequestGroupStateDelete(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupStateDeletePromise>
    SendRequestGroupStateDelete(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestGenerateIdentityKeypair(
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGenerateIdentityKeypairPromise>
    SendRequestGenerateIdentityKeypair();

    void
    SendRequestGenerateCredentialBasic(
            mozilla::Span<uint8_t const> credName,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGenerateCredentialBasicPromise>
    SendRequestGenerateCredentialBasic(mozilla::Span<uint8_t const> credName);

    void
    SendRequestGenerateKeyPackage(
            mozilla::Span<uint8_t const> identity,
            mozilla::Span<uint8_t const> credential,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGenerateKeyPackagePromise>
    SendRequestGenerateKeyPackage(
            mozilla::Span<uint8_t const> identity,
            mozilla::Span<uint8_t const> credential);

    void
    SendRequestGroupCreate(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> credential,
            mozilla::Span<uint8_t const> inOptGroupIdentifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupCreatePromise>
    SendRequestGroupCreate(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> credential,
            mozilla::Span<uint8_t const> inOptGroupIdentifier);

    void
    SendRequestGroupJoin(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> welcome,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupIdEpoch>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupJoinPromise>
    SendRequestGroupJoin(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> welcome);

    void
    SendRequestGroupAdd(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> keyPackage,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupAddPromise>
    SendRequestGroupAdd(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> keyPackage);

    void
    SendRequestGroupProposeAdd(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> keyPackage,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupProposeAddPromise>
    SendRequestGroupProposeAdd(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> keyPackage);

    void
    SendRequestGroupRemove(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> remIdentifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupRemovePromise>
    SendRequestGroupRemove(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> remIdentifier);

    void
    SendRequestGroupProposeRemove(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> remIdentifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupProposeRemovePromise>
    SendRequestGroupProposeRemove(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> remIdentifier);

    void
    SendRequestGroupClose(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkMlsCommitOutput>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupClosePromise>
    SendRequestGroupClose(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestGroupDetails(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkGroupDetails>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGroupDetailsPromise>
    SendRequestGroupDetails(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestSend(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> message,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestSendPromise>
    SendRequestSend(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> message);

    void
    SendRequestReceive(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> message,
            mozilla::ipc::ResolveCallback<GkReceived>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestReceivePromise>
    SendRequestReceive(
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> message);

    void
    SendRequestHasPendingProposals(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<bool>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestHasPendingProposalsPromise>
    SendRequestHasPendingProposals(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestClearPendingProposals(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<bool>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestClearPendingProposalsPromise>
    SendRequestClearPendingProposals(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestHasPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<bool>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestHasPendingCommitPromise>
    SendRequestHasPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestClearPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<bool>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestClearPendingCommitPromise>
    SendRequestClearPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestApplyPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::ipc::ResolveCallback<GkReceived>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestApplyPendingCommitPromise>
    SendRequestApplyPendingCommit(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier);

    void
    SendRequestExportSecret(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> label,
            mozilla::Span<uint8_t const> content,
            const uint64_t& len,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<GkExporterOutput>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestExportSecretPromise>
    SendRequestExportSecret(
            mozilla::Span<uint8_t const> groupIdentifier,
            mozilla::Span<uint8_t const> identifier,
            mozilla::Span<uint8_t const> label,
            mozilla::Span<uint8_t const> content,
            const uint64_t& len);

    void
    SendRequestGetGroupIdentifier(
            mozilla::Span<uint8_t const> message,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGetGroupIdentifierPromise>
    SendRequestGetGroupIdentifier(mozilla::Span<uint8_t const> message);

    void
    SendRequestGetGroupEpoch(
            mozilla::Span<uint8_t const> message,
            mozilla::ipc::ResolveCallback<mozilla::Maybe<RawBytes>>&& aResolve,
            mozilla::ipc::RejectCallback&& aReject);

    RefPtr<RequestGetGroupEpochPromise>
    SendRequestGetGroupEpoch(mozilla::Span<uint8_t const> message);

    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;

};


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

#endif // ifndef PMLSTransactionChild_h
