Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/security/manager/ssl/nsIClientAuthDialogService.idl
*/
#ifndef __gen_nsIClientAuthDialogService_h__
#define __gen_nsIClientAuthDialogService_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
class nsILoadContext; /* forward declaration */
class nsIX509Cert; /* forward declaration */
/* starting interface: nsIClientAuthDialogCallback */
#define NS_ICLIENTAUTHDIALOGCALLBACK_IID_STR "6b00d96d-fb8a-4c9f-9632-c9e1235befce"
#define NS_ICLIENTAUTHDIALOGCALLBACK_IID \
{0x6b00d96d, 0xfb8a, 0x4c9f, \
{ 0x96, 0x32, 0xc9, 0xe1, 0x23, 0x5b, 0xef, 0xce }}
class NS_NO_VTABLE nsIClientAuthDialogCallback : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICLIENTAUTHDIALOGCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIClientAuthDialogCallback;
/* void certificateChosen (in nsIX509Cert cert, in boolean rememberDecision); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CertificateChosen(nsIX509Cert *cert, bool rememberDecision) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIClientAuthDialogCallback, NS_ICLIENTAUTHDIALOGCALLBACK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICLIENTAUTHDIALOGCALLBACK \
NS_IMETHOD CertificateChosen(nsIX509Cert *cert, bool rememberDecision) 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_NSICLIENTAUTHDIALOGCALLBACK \
nsresult CertificateChosen(nsIX509Cert *cert, bool rememberDecision);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICLIENTAUTHDIALOGCALLBACK(_to) \
NS_IMETHOD CertificateChosen(nsIX509Cert *cert, bool rememberDecision) override { return _to CertificateChosen(cert, rememberDecision); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICLIENTAUTHDIALOGCALLBACK(_to) \
NS_IMETHOD CertificateChosen(nsIX509Cert *cert, bool rememberDecision) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CertificateChosen(cert, rememberDecision); }
/* starting interface: nsIClientAuthDialogService */
#define NS_ICLIENTAUTHDIALOGSERVICE_IID_STR "fa4c7520-1433-11d5-ba24-00108303b117"
#define NS_ICLIENTAUTHDIALOGSERVICE_IID \
{0xfa4c7520, 0x1433, 0x11d5, \
{ 0xba, 0x24, 0x00, 0x10, 0x83, 0x03, 0xb1, 0x17 }}
class NS_NO_VTABLE nsIClientAuthDialogService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICLIENTAUTHDIALOGSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIClientAuthDialogService;
/* [must_use] void chooseCertificate (in AUTF8String hostname, in Array<nsIX509Cert> certArray, in nsILoadContext loadContext, in nsIClientAuthDialogCallback callback); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD ChooseCertificate(const nsACString& hostname, const nsTArray<RefPtr<nsIX509Cert>>& certArray, nsILoadContext *loadContext, nsIClientAuthDialogCallback *callback) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIClientAuthDialogService, NS_ICLIENTAUTHDIALOGSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICLIENTAUTHDIALOGSERVICE \
[[nodiscard]] NS_IMETHOD ChooseCertificate(const nsACString& hostname, const nsTArray<RefPtr<nsIX509Cert>>& certArray, nsILoadContext *loadContext, nsIClientAuthDialogCallback *callback) 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_NSICLIENTAUTHDIALOGSERVICE \
[[nodiscard]] nsresult ChooseCertificate(const nsACString& hostname, const nsTArray<RefPtr<nsIX509Cert>>& certArray, nsILoadContext *loadContext, nsIClientAuthDialogCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICLIENTAUTHDIALOGSERVICE(_to) \
[[nodiscard]] NS_IMETHOD ChooseCertificate(const nsACString& hostname, const nsTArray<RefPtr<nsIX509Cert>>& certArray, nsILoadContext *loadContext, nsIClientAuthDialogCallback *callback) override { return _to ChooseCertificate(hostname, certArray, loadContext, callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICLIENTAUTHDIALOGSERVICE(_to) \
[[nodiscard]] NS_IMETHOD ChooseCertificate(const nsACString& hostname, const nsTArray<RefPtr<nsIX509Cert>>& certArray, nsILoadContext *loadContext, nsIClientAuthDialogCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChooseCertificate(hostname, certArray, loadContext, callback); }
#define NS_CLIENTAUTHDIALOGSERVICE_CONTRACTID "@mozilla.org/security/ClientAuthDialogService;1"
#endif /* __gen_nsIClientAuthDialogService_h__ */