/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/webauthn/nsIWebAuthnService.idl */ #ifndef __gen_nsIWebAuthnService_h__ #define __gen_nsIWebAuthnService_h__ #include "nsISupports.h" #include "nsIWebAuthnArgs.h" #include "nsIWebAuthnPromise.h" #include "nsTArray.h" #include "js/GCAnnotations.h" /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsICredentialParameters */ #define NS_ICREDENTIALPARAMETERS_IID_STR "6c4ecd9f-57c0-4d7d-8080-bf6e4d499f8f" #define NS_ICREDENTIALPARAMETERS_IID \ {0x6c4ecd9f, 0x57c0, 0x4d7d, \ { 0x80, 0x80, 0xbf, 0x6e, 0x4d, 0x49, 0x9f, 0x8f }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsICredentialParameters) nsICredentialParameters : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_ICREDENTIALPARAMETERS_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsICredentialParameters; /* readonly attribute ACString credentialId; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_credentialId) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCredentialId(nsACString& aCredentialId) = 0; /* readonly attribute boolean isResidentCredential; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_isResidentCredential) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsResidentCredential(bool *aIsResidentCredential) = 0; /* readonly attribute ACString rpId; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_rpId) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetRpId(nsACString& aRpId) = 0; /* readonly attribute ACString privateKey; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_privateKey) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrivateKey(nsACString& aPrivateKey) = 0; /* readonly attribute ACString userHandle; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_userHandle) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserHandle(nsACString& aUserHandle) = 0; /* readonly attribute uint32_t signCount; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_signCount) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSignCount(uint32_t *aSignCount) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSICREDENTIALPARAMETERS \ NS_IMETHOD GetCredentialId(nsACString& aCredentialId) override; \ NS_IMETHOD GetIsResidentCredential(bool *aIsResidentCredential) override; \ NS_IMETHOD GetRpId(nsACString& aRpId) override; \ NS_IMETHOD GetPrivateKey(nsACString& aPrivateKey) override; \ NS_IMETHOD GetUserHandle(nsACString& aUserHandle) override; \ NS_IMETHOD GetSignCount(uint32_t *aSignCount) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSICREDENTIALPARAMETERS \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_credentialId)\ nsresult GetCredentialId(nsACString& aCredentialId); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_isResidentCredential)\ nsresult GetIsResidentCredential(bool *aIsResidentCredential); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_rpId)\ nsresult GetRpId(nsACString& aRpId); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_privateKey)\ nsresult GetPrivateKey(nsACString& aPrivateKey); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_userHandle)\ nsresult GetUserHandle(nsACString& aUserHandle); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsICredentialParameters_signCount)\ nsresult GetSignCount(uint32_t *aSignCount); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSICREDENTIALPARAMETERS(_to) \ NS_IMETHOD GetCredentialId(nsACString& aCredentialId) override { return _to GetCredentialId(aCredentialId); } \ NS_IMETHOD GetIsResidentCredential(bool *aIsResidentCredential) override { return _to GetIsResidentCredential(aIsResidentCredential); } \ NS_IMETHOD GetRpId(nsACString& aRpId) override { return _to GetRpId(aRpId); } \ NS_IMETHOD GetPrivateKey(nsACString& aPrivateKey) override { return _to GetPrivateKey(aPrivateKey); } \ NS_IMETHOD GetUserHandle(nsACString& aUserHandle) override { return _to GetUserHandle(aUserHandle); } \ NS_IMETHOD GetSignCount(uint32_t *aSignCount) override { return _to GetSignCount(aSignCount); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSICREDENTIALPARAMETERS(_to) \ NS_IMETHOD GetCredentialId(nsACString& aCredentialId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCredentialId(aCredentialId); } \ NS_IMETHOD GetIsResidentCredential(bool *aIsResidentCredential) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsResidentCredential(aIsResidentCredential); } \ NS_IMETHOD GetRpId(nsACString& aRpId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRpId(aRpId); } \ NS_IMETHOD GetPrivateKey(nsACString& aPrivateKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrivateKey(aPrivateKey); } \ NS_IMETHOD GetUserHandle(nsACString& aUserHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserHandle(aUserHandle); } \ NS_IMETHOD GetSignCount(uint32_t *aSignCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSignCount(aSignCount); } /* starting interface: nsIWebAuthnAutoFillEntry */ #define NS_IWEBAUTHNAUTOFILLENTRY_IID_STR "686d552e-a39d-4ba2-8127-faca54274039" #define NS_IWEBAUTHNAUTOFILLENTRY_IID \ {0x686d552e, 0xa39d, 0x4ba2, \ { 0x81, 0x27, 0xfa, 0xca, 0x54, 0x27, 0x40, 0x39 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebAuthnAutoFillEntry) nsIWebAuthnAutoFillEntry : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBAUTHNAUTOFILLENTRY_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebAuthnAutoFillEntry; enum { PROVIDER_UNKNOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebAuthnAutoFillEntry_PROVIDER_UNKNOWN) = 0U, PROVIDER_TEST_TOKEN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebAuthnAutoFillEntry_PROVIDER_TEST_TOKEN) = 1U, PROVIDER_PLATFORM_WINDOWS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebAuthnAutoFillEntry_PROVIDER_PLATFORM_WINDOWS) = 2U, PROVIDER_PLATFORM_MACOS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebAuthnAutoFillEntry_PROVIDER_PLATFORM_MACOS) = 3U, PROVIDER_PLATFORM_ANDROID MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebAuthnAutoFillEntry_PROVIDER_PLATFORM_ANDROID) = 4U }; /* readonly attribute octet provider; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_provider) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetProvider(uint8_t *aProvider) = 0; /* readonly attribute AString userName; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_userName) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserName(nsAString& aUserName) = 0; /* readonly attribute AString rpId; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_rpId) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetRpId(nsAString& aRpId) = 0; /* readonly attribute Array credentialId; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_credentialId) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCredentialId(nsTArray& aCredentialId) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBAUTHNAUTOFILLENTRY \ NS_IMETHOD GetProvider(uint8_t *aProvider) override; \ NS_IMETHOD GetUserName(nsAString& aUserName) override; \ NS_IMETHOD GetRpId(nsAString& aRpId) override; \ NS_IMETHOD GetCredentialId(nsTArray& aCredentialId) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBAUTHNAUTOFILLENTRY \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_provider)\ nsresult GetProvider(uint8_t *aProvider); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_userName)\ nsresult GetUserName(nsAString& aUserName); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_rpId)\ nsresult GetRpId(nsAString& aRpId); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnAutoFillEntry_credentialId)\ nsresult GetCredentialId(nsTArray& aCredentialId); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBAUTHNAUTOFILLENTRY(_to) \ NS_IMETHOD GetProvider(uint8_t *aProvider) override { return _to GetProvider(aProvider); } \ NS_IMETHOD GetUserName(nsAString& aUserName) override { return _to GetUserName(aUserName); } \ NS_IMETHOD GetRpId(nsAString& aRpId) override { return _to GetRpId(aRpId); } \ NS_IMETHOD GetCredentialId(nsTArray& aCredentialId) override { return _to GetCredentialId(aCredentialId); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBAUTHNAUTOFILLENTRY(_to) \ NS_IMETHOD GetProvider(uint8_t *aProvider) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProvider(aProvider); } \ NS_IMETHOD GetUserName(nsAString& aUserName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserName(aUserName); } \ NS_IMETHOD GetRpId(nsAString& aRpId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRpId(aRpId); } \ NS_IMETHOD GetCredentialId(nsTArray& aCredentialId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCredentialId(aCredentialId); } /* starting interface: nsIWebAuthnService */ #define NS_IWEBAUTHNSERVICE_IID_STR "3dde2d1b-bef6-40e1-a781-a058eb50c570" #define NS_IWEBAUTHNSERVICE_IID \ {0x3dde2d1b, 0xbef6, 0x40e1, \ { 0xa7, 0x81, 0xa0, 0x58, 0xeb, 0x50, 0xc5, 0x70 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebAuthnService) nsIWebAuthnService : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBAUTHNSERVICE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebAuthnService; /* readonly attribute boolean isUVPAA; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnService_isUVPAA) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsUVPAA(bool *aIsUVPAA) = 0; /* [noscript] void makeCredential (in uint64_t aTransactionId, in uint64_t browsingContextId, in nsIWebAuthnRegisterArgs args, in nsIWebAuthnRegisterPromise promise); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_makeCredential) NS_IMETHOD MakeCredential(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnRegisterArgs *args, nsIWebAuthnRegisterPromise *promise) = 0; /* [noscript] void getAssertion (in uint64_t aTransactionId, in uint64_t browsingContextId, in nsIWebAuthnSignArgs args, in nsIWebAuthnSignPromise promise); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAssertion) NS_IMETHOD GetAssertion(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnSignArgs *args, nsIWebAuthnSignPromise *promise) = 0; /* [noscript] void reset (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_reset) NS_IMETHOD Reset(void) = 0; /* void cancel (in uint64_t aTransactionId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_cancel) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Cancel(uint64_t aTransactionId) = 0; /* uint64_t hasPendingConditionalGet (in uint64_t aBrowsingContextId, in AString aOrigin); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_hasPendingConditionalGet) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasPendingConditionalGet(uint64_t aBrowsingContextId, const nsAString& aOrigin, uint64_t *_retval) = 0; /* void getAutoFillEntries (in uint64_t aTransactionId, in nsIWebAuthnAutoFillEntriesCallback aCallback); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAutoFillEntries) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAutoFillEntries(uint64_t aTransactionId, nsIWebAuthnAutoFillEntriesCallback *aCallback) = 0; /* [noscript] void getAutoFillEntriesForRpId (in AString aRpId, in Array> aAllowList, in nsIWebAuthnAutoFillEntriesCallback aCallback); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAutoFillEntriesForRpId) NS_IMETHOD GetAutoFillEntriesForRpId(const nsAString& aRpId, const nsTArray>& aAllowList, nsIWebAuthnAutoFillEntriesCallback *aCallback) = 0; /* void selectAutoFillEntry (in uint64_t aTransactionId, in Array aCredentialId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_selectAutoFillEntry) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SelectAutoFillEntry(uint64_t aTransactionId, const nsTArray& aCredentialId) = 0; /* void resumeConditionalGet (in uint64_t aTransactionId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_resumeConditionalGet) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResumeConditionalGet(uint64_t aTransactionId) = 0; /* void pinCallback (in uint64_t aTransactionId, in AUTF8String aPin); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_pinCallback) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD PinCallback(uint64_t aTransactionId, const nsACString& aPin) = 0; /* void setHasAttestationConsent (in uint64_t aTransactionId, in boolean aHasConsent); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_setHasAttestationConsent) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetHasAttestationConsent(uint64_t aTransactionId, bool aHasConsent) = 0; /* void selectionCallback (in uint64_t aTransactionId, in uint64_t aIndex); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_selectionCallback) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SelectionCallback(uint64_t aTransactionId, uint64_t aIndex) = 0; /* ACString addVirtualAuthenticator (in ACString protocol, in ACString transport, in boolean hasResidentKey, in boolean hasUserVerification, in boolean isUserConsenting, in boolean isUserVerified); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_addVirtualAuthenticator) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddVirtualAuthenticator(const nsACString& protocol, const nsACString& transport, bool hasResidentKey, bool hasUserVerification, bool isUserConsenting, bool isUserVerified, nsACString& _retval) = 0; /* boolean hasVirtualAuthenticator (in ACString authenticatorId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_hasVirtualAuthenticator) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasVirtualAuthenticator(const nsACString& authenticatorId, bool *_retval) = 0; /* void removeVirtualAuthenticator (in ACString authenticatorId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeVirtualAuthenticator) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveVirtualAuthenticator(const nsACString& authenticatorId) = 0; /* void addCredential (in ACString authenticatorId, in ACString credentialId, in boolean isResidentCredential, in ACString rpId, in ACString privateKey, in ACString userHandle, in uint32_t signCount); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_addCredential) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddCredential(const nsACString& authenticatorId, const nsACString& credentialId, bool isResidentCredential, const nsACString& rpId, const nsACString& privateKey, const nsACString& userHandle, uint32_t signCount) = 0; /* Array getCredentials (in ACString authenticatorId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getCredentials) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCredentials(const nsACString& authenticatorId, nsTArray>& _retval) = 0; /* void removeCredential (in ACString authenticatorId, in ACString credentialId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeCredential) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveCredential(const nsACString& authenticatorId, const nsACString& credentialId) = 0; /* void removeAllCredentials (in ACString authenticatorId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeAllCredentials) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveAllCredentials(const nsACString& authenticatorId) = 0; /* void setUserVerified (in ACString authenticatorId, in boolean isUserVerified); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_setUserVerified) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUserVerified(const nsACString& authenticatorId, bool isUserVerified) = 0; /* void listen (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_listen) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Listen(void) = 0; /* void runCommand (in ACString aCommand); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_runCommand) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RunCommand(const nsACString& aCommand) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBAUTHNSERVICE \ NS_IMETHOD GetIsUVPAA(bool *aIsUVPAA) override; \ NS_IMETHOD MakeCredential(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnRegisterArgs *args, nsIWebAuthnRegisterPromise *promise) override; \ NS_IMETHOD GetAssertion(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnSignArgs *args, nsIWebAuthnSignPromise *promise) override; \ NS_IMETHOD Reset(void) override; \ NS_IMETHOD Cancel(uint64_t aTransactionId) override; \ NS_IMETHOD HasPendingConditionalGet(uint64_t aBrowsingContextId, const nsAString& aOrigin, uint64_t *_retval) override; \ NS_IMETHOD GetAutoFillEntries(uint64_t aTransactionId, nsIWebAuthnAutoFillEntriesCallback *aCallback) override; \ NS_IMETHOD GetAutoFillEntriesForRpId(const nsAString& aRpId, const nsTArray>& aAllowList, nsIWebAuthnAutoFillEntriesCallback *aCallback) override; \ NS_IMETHOD SelectAutoFillEntry(uint64_t aTransactionId, const nsTArray& aCredentialId) override; \ NS_IMETHOD ResumeConditionalGet(uint64_t aTransactionId) override; \ NS_IMETHOD PinCallback(uint64_t aTransactionId, const nsACString& aPin) override; \ NS_IMETHOD SetHasAttestationConsent(uint64_t aTransactionId, bool aHasConsent) override; \ NS_IMETHOD SelectionCallback(uint64_t aTransactionId, uint64_t aIndex) override; \ NS_IMETHOD AddVirtualAuthenticator(const nsACString& protocol, const nsACString& transport, bool hasResidentKey, bool hasUserVerification, bool isUserConsenting, bool isUserVerified, nsACString& _retval) override; \ NS_IMETHOD HasVirtualAuthenticator(const nsACString& authenticatorId, bool *_retval) override; \ NS_IMETHOD RemoveVirtualAuthenticator(const nsACString& authenticatorId) override; \ NS_IMETHOD AddCredential(const nsACString& authenticatorId, const nsACString& credentialId, bool isResidentCredential, const nsACString& rpId, const nsACString& privateKey, const nsACString& userHandle, uint32_t signCount) override; \ NS_IMETHOD GetCredentials(const nsACString& authenticatorId, nsTArray>& _retval) override; \ NS_IMETHOD RemoveCredential(const nsACString& authenticatorId, const nsACString& credentialId) override; \ NS_IMETHOD RemoveAllCredentials(const nsACString& authenticatorId) override; \ NS_IMETHOD SetUserVerified(const nsACString& authenticatorId, bool isUserVerified) override; \ NS_IMETHOD Listen(void) override; \ NS_IMETHOD RunCommand(const nsACString& aCommand) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBAUTHNSERVICE \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebAuthnService_isUVPAA)\ nsresult GetIsUVPAA(bool *aIsUVPAA); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_makeCredential)\ nsresult MakeCredential(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnRegisterArgs *args, nsIWebAuthnRegisterPromise *promise); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAssertion)\ nsresult GetAssertion(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnSignArgs *args, nsIWebAuthnSignPromise *promise); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_reset)\ nsresult Reset(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_cancel)\ nsresult Cancel(uint64_t aTransactionId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_hasPendingConditionalGet)\ nsresult HasPendingConditionalGet(uint64_t aBrowsingContextId, const nsAString& aOrigin, uint64_t *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAutoFillEntries)\ nsresult GetAutoFillEntries(uint64_t aTransactionId, nsIWebAuthnAutoFillEntriesCallback *aCallback); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getAutoFillEntriesForRpId)\ nsresult GetAutoFillEntriesForRpId(const nsAString& aRpId, const nsTArray>& aAllowList, nsIWebAuthnAutoFillEntriesCallback *aCallback); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_selectAutoFillEntry)\ nsresult SelectAutoFillEntry(uint64_t aTransactionId, const nsTArray& aCredentialId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_resumeConditionalGet)\ nsresult ResumeConditionalGet(uint64_t aTransactionId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_pinCallback)\ nsresult PinCallback(uint64_t aTransactionId, const nsACString& aPin); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_setHasAttestationConsent)\ nsresult SetHasAttestationConsent(uint64_t aTransactionId, bool aHasConsent); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_selectionCallback)\ nsresult SelectionCallback(uint64_t aTransactionId, uint64_t aIndex); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_addVirtualAuthenticator)\ nsresult AddVirtualAuthenticator(const nsACString& protocol, const nsACString& transport, bool hasResidentKey, bool hasUserVerification, bool isUserConsenting, bool isUserVerified, nsACString& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_hasVirtualAuthenticator)\ nsresult HasVirtualAuthenticator(const nsACString& authenticatorId, bool *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeVirtualAuthenticator)\ nsresult RemoveVirtualAuthenticator(const nsACString& authenticatorId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_addCredential)\ nsresult AddCredential(const nsACString& authenticatorId, const nsACString& credentialId, bool isResidentCredential, const nsACString& rpId, const nsACString& privateKey, const nsACString& userHandle, uint32_t signCount); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_getCredentials)\ nsresult GetCredentials(const nsACString& authenticatorId, nsTArray>& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeCredential)\ nsresult RemoveCredential(const nsACString& authenticatorId, const nsACString& credentialId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_removeAllCredentials)\ nsresult RemoveAllCredentials(const nsACString& authenticatorId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_setUserVerified)\ nsresult SetUserVerified(const nsACString& authenticatorId, bool isUserVerified); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_listen)\ nsresult Listen(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebAuthnService_runCommand)\ nsresult RunCommand(const nsACString& aCommand); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBAUTHNSERVICE(_to) \ NS_IMETHOD GetIsUVPAA(bool *aIsUVPAA) override { return _to GetIsUVPAA(aIsUVPAA); } \ NS_IMETHOD MakeCredential(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnRegisterArgs *args, nsIWebAuthnRegisterPromise *promise) override { return _to MakeCredential(aTransactionId, browsingContextId, args, promise); } \ NS_IMETHOD GetAssertion(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnSignArgs *args, nsIWebAuthnSignPromise *promise) override { return _to GetAssertion(aTransactionId, browsingContextId, args, promise); } \ NS_IMETHOD Reset(void) override { return _to Reset(); } \ NS_IMETHOD Cancel(uint64_t aTransactionId) override { return _to Cancel(aTransactionId); } \ NS_IMETHOD HasPendingConditionalGet(uint64_t aBrowsingContextId, const nsAString& aOrigin, uint64_t *_retval) override { return _to HasPendingConditionalGet(aBrowsingContextId, aOrigin, _retval); } \ NS_IMETHOD GetAutoFillEntries(uint64_t aTransactionId, nsIWebAuthnAutoFillEntriesCallback *aCallback) override { return _to GetAutoFillEntries(aTransactionId, aCallback); } \ NS_IMETHOD GetAutoFillEntriesForRpId(const nsAString& aRpId, const nsTArray>& aAllowList, nsIWebAuthnAutoFillEntriesCallback *aCallback) override { return _to GetAutoFillEntriesForRpId(aRpId, aAllowList, aCallback); } \ NS_IMETHOD SelectAutoFillEntry(uint64_t aTransactionId, const nsTArray& aCredentialId) override { return _to SelectAutoFillEntry(aTransactionId, aCredentialId); } \ NS_IMETHOD ResumeConditionalGet(uint64_t aTransactionId) override { return _to ResumeConditionalGet(aTransactionId); } \ NS_IMETHOD PinCallback(uint64_t aTransactionId, const nsACString& aPin) override { return _to PinCallback(aTransactionId, aPin); } \ NS_IMETHOD SetHasAttestationConsent(uint64_t aTransactionId, bool aHasConsent) override { return _to SetHasAttestationConsent(aTransactionId, aHasConsent); } \ NS_IMETHOD SelectionCallback(uint64_t aTransactionId, uint64_t aIndex) override { return _to SelectionCallback(aTransactionId, aIndex); } \ NS_IMETHOD AddVirtualAuthenticator(const nsACString& protocol, const nsACString& transport, bool hasResidentKey, bool hasUserVerification, bool isUserConsenting, bool isUserVerified, nsACString& _retval) override { return _to AddVirtualAuthenticator(protocol, transport, hasResidentKey, hasUserVerification, isUserConsenting, isUserVerified, _retval); } \ NS_IMETHOD HasVirtualAuthenticator(const nsACString& authenticatorId, bool *_retval) override { return _to HasVirtualAuthenticator(authenticatorId, _retval); } \ NS_IMETHOD RemoveVirtualAuthenticator(const nsACString& authenticatorId) override { return _to RemoveVirtualAuthenticator(authenticatorId); } \ NS_IMETHOD AddCredential(const nsACString& authenticatorId, const nsACString& credentialId, bool isResidentCredential, const nsACString& rpId, const nsACString& privateKey, const nsACString& userHandle, uint32_t signCount) override { return _to AddCredential(authenticatorId, credentialId, isResidentCredential, rpId, privateKey, userHandle, signCount); } \ NS_IMETHOD GetCredentials(const nsACString& authenticatorId, nsTArray>& _retval) override { return _to GetCredentials(authenticatorId, _retval); } \ NS_IMETHOD RemoveCredential(const nsACString& authenticatorId, const nsACString& credentialId) override { return _to RemoveCredential(authenticatorId, credentialId); } \ NS_IMETHOD RemoveAllCredentials(const nsACString& authenticatorId) override { return _to RemoveAllCredentials(authenticatorId); } \ NS_IMETHOD SetUserVerified(const nsACString& authenticatorId, bool isUserVerified) override { return _to SetUserVerified(authenticatorId, isUserVerified); } \ NS_IMETHOD Listen(void) override { return _to Listen(); } \ NS_IMETHOD RunCommand(const nsACString& aCommand) override { return _to RunCommand(aCommand); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBAUTHNSERVICE(_to) \ NS_IMETHOD GetIsUVPAA(bool *aIsUVPAA) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsUVPAA(aIsUVPAA); } \ NS_IMETHOD MakeCredential(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnRegisterArgs *args, nsIWebAuthnRegisterPromise *promise) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeCredential(aTransactionId, browsingContextId, args, promise); } \ NS_IMETHOD GetAssertion(uint64_t aTransactionId, uint64_t browsingContextId, nsIWebAuthnSignArgs *args, nsIWebAuthnSignPromise *promise) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAssertion(aTransactionId, browsingContextId, args, promise); } \ NS_IMETHOD Reset(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reset(); } \ NS_IMETHOD Cancel(uint64_t aTransactionId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(aTransactionId); } \ NS_IMETHOD HasPendingConditionalGet(uint64_t aBrowsingContextId, const nsAString& aOrigin, uint64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasPendingConditionalGet(aBrowsingContextId, aOrigin, _retval); } \ NS_IMETHOD GetAutoFillEntries(uint64_t aTransactionId, nsIWebAuthnAutoFillEntriesCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoFillEntries(aTransactionId, aCallback); } \ NS_IMETHOD GetAutoFillEntriesForRpId(const nsAString& aRpId, const nsTArray>& aAllowList, nsIWebAuthnAutoFillEntriesCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoFillEntriesForRpId(aRpId, aAllowList, aCallback); } \ NS_IMETHOD SelectAutoFillEntry(uint64_t aTransactionId, const nsTArray& aCredentialId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAutoFillEntry(aTransactionId, aCredentialId); } \ NS_IMETHOD ResumeConditionalGet(uint64_t aTransactionId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeConditionalGet(aTransactionId); } \ NS_IMETHOD PinCallback(uint64_t aTransactionId, const nsACString& aPin) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PinCallback(aTransactionId, aPin); } \ NS_IMETHOD SetHasAttestationConsent(uint64_t aTransactionId, bool aHasConsent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHasAttestationConsent(aTransactionId, aHasConsent); } \ NS_IMETHOD SelectionCallback(uint64_t aTransactionId, uint64_t aIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectionCallback(aTransactionId, aIndex); } \ NS_IMETHOD AddVirtualAuthenticator(const nsACString& protocol, const nsACString& transport, bool hasResidentKey, bool hasUserVerification, bool isUserConsenting, bool isUserVerified, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddVirtualAuthenticator(protocol, transport, hasResidentKey, hasUserVerification, isUserConsenting, isUserVerified, _retval); } \ NS_IMETHOD HasVirtualAuthenticator(const nsACString& authenticatorId, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasVirtualAuthenticator(authenticatorId, _retval); } \ NS_IMETHOD RemoveVirtualAuthenticator(const nsACString& authenticatorId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveVirtualAuthenticator(authenticatorId); } \ NS_IMETHOD AddCredential(const nsACString& authenticatorId, const nsACString& credentialId, bool isResidentCredential, const nsACString& rpId, const nsACString& privateKey, const nsACString& userHandle, uint32_t signCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddCredential(authenticatorId, credentialId, isResidentCredential, rpId, privateKey, userHandle, signCount); } \ NS_IMETHOD GetCredentials(const nsACString& authenticatorId, nsTArray>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCredentials(authenticatorId, _retval); } \ NS_IMETHOD RemoveCredential(const nsACString& authenticatorId, const nsACString& credentialId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveCredential(authenticatorId, credentialId); } \ NS_IMETHOD RemoveAllCredentials(const nsACString& authenticatorId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllCredentials(authenticatorId); } \ NS_IMETHOD SetUserVerified(const nsACString& authenticatorId, bool isUserVerified) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserVerified(authenticatorId, isUserVerified); } \ NS_IMETHOD Listen(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Listen(); } \ NS_IMETHOD RunCommand(const nsACString& aCommand) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RunCommand(aCommand); } #endif /* __gen_nsIWebAuthnService_h__ */