Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/credentialmanagement/nsICredentialChooserService.idl
*/
#ifndef __gen_nsICredentialChooserService_h__
#define __gen_nsICredentialChooserService_h__
#include "nsISupports.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
namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class CredentialChooserOption; /* webidl CredentialChooserOption */
} // namespace dom
} // namespace mozilla
class mozIDOMWindow; /* forward declaration */
class nsICredentialChosenCallback; /* forward declaration */
class nsIURI; /* forward declaration */
/* starting interface: nsICredentialChooserService */
#define NS_ICREDENTIALCHOOSERSERVICE_IID_STR "673ddc19-03e2-4b30-a868-06297e8fed89"
#define NS_ICREDENTIALCHOOSERSERVICE_IID \
{0x673ddc19, 0x03e2, 0x4b30, \
{ 0xa8, 0x68, 0x06, 0x29, 0x7e, 0x8f, 0xed, 0x89 }}
class NS_NO_VTABLE nsICredentialChooserService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICREDENTIALCHOOSERSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICredentialChooserService;
/* void showCredentialChooser (in BrowsingContext browsingContext, in Array<jsval> credentials, in nsICredentialChosenCallback callback); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ShowCredentialChooser(mozilla::dom::BrowsingContext *browsingContext, const nsTArray<JS::Value >& credentials, nsICredentialChosenCallback *callback) = 0;
/* void cancelCredentialChooser (in BrowsingContext browsingContext); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CancelCredentialChooser(mozilla::dom::BrowsingContext *browsingContext) = 0;
/* Promise fetchImageToDataURI (in mozIDOMWindow window, in nsIURI uri); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FetchImageToDataURI(mozIDOMWindow *window, nsIURI *uri, ::mozilla::dom::Promise * * _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICredentialChooserService, NS_ICREDENTIALCHOOSERSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICREDENTIALCHOOSERSERVICE \
NS_IMETHOD ShowCredentialChooser(mozilla::dom::BrowsingContext *browsingContext, const nsTArray<JS::Value >& credentials, nsICredentialChosenCallback *callback) override; \
NS_IMETHOD CancelCredentialChooser(mozilla::dom::BrowsingContext *browsingContext) override; \
NS_IMETHOD FetchImageToDataURI(mozIDOMWindow *window, nsIURI *uri, ::mozilla::dom::Promise * * _retval) 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_NSICREDENTIALCHOOSERSERVICE \
nsresult ShowCredentialChooser(mozilla::dom::BrowsingContext *browsingContext, const nsTArray<JS::Value >& credentials, nsICredentialChosenCallback *callback); \
nsresult CancelCredentialChooser(mozilla::dom::BrowsingContext *browsingContext); \
nsresult FetchImageToDataURI(mozIDOMWindow *window, nsIURI *uri, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICREDENTIALCHOOSERSERVICE(_to) \
NS_IMETHOD ShowCredentialChooser(mozilla::dom::BrowsingContext *browsingContext, const nsTArray<JS::Value >& credentials, nsICredentialChosenCallback *callback) override { return _to ShowCredentialChooser(browsingContext, credentials, callback); } \
NS_IMETHOD CancelCredentialChooser(mozilla::dom::BrowsingContext *browsingContext) override { return _to CancelCredentialChooser(browsingContext); } \
NS_IMETHOD FetchImageToDataURI(mozIDOMWindow *window, nsIURI *uri, ::mozilla::dom::Promise * * _retval) override { return _to FetchImageToDataURI(window, uri, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICREDENTIALCHOOSERSERVICE(_to) \
NS_IMETHOD ShowCredentialChooser(mozilla::dom::BrowsingContext *browsingContext, const nsTArray<JS::Value >& credentials, nsICredentialChosenCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowCredentialChooser(browsingContext, credentials, callback); } \
NS_IMETHOD CancelCredentialChooser(mozilla::dom::BrowsingContext *browsingContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelCredentialChooser(browsingContext); } \
NS_IMETHOD FetchImageToDataURI(mozIDOMWindow *window, nsIURI *uri, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FetchImageToDataURI(window, uri, _retval); }
#endif /* __gen_nsICredentialChooserService_h__ */