Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/mozapps/defaultagent/nsIDefaultAgent.idl
*/
#ifndef __gen_nsIDefaultAgent_h__
#define __gen_nsIDefaultAgent_h__
#include "nsISupports.h"
#include "nsTArray.h"
#include "js/Value.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: nsIDefaultAgent */
#define NS_IDEFAULTAGENT_IID_STR "edc38cb5-b6f6-4aeb-bd45-7be8e00fc364"
#define NS_IDEFAULTAGENT_IID \
{0xedc38cb5, 0xb6f6, 0x4aeb, \
{ 0xbd, 0x45, 0x7b, 0xe8, 0xe0, 0x0f, 0xc3, 0x64 }}
class NS_NO_VTABLE nsIDefaultAgent : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEFAULTAGENT_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIDefaultAgent;
/* void registerTask (in AString aUniqueToken); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterTask(const nsAString& aUniqueToken) = 0;
/* void updateTask (in AString aUniqueToken); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UpdateTask(const nsAString& aUniqueToken) = 0;
/* void unregisterTask (in AString aUniqueToken); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnregisterTask(const nsAString& aUniqueToken) = 0;
/* void uninstall (in AString aUniqueToken); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Uninstall(const nsAString& aUniqueToken) = 0;
/* long long secondsSinceLastAppRun (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SecondsSinceLastAppRun(int64_t *_retval) = 0;
/* AString getDefaultBrowser (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultBrowser(nsAString& _retval) = 0;
/* AString getReplacePreviousDefaultBrowser (in AString aCurrentBrowser); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetReplacePreviousDefaultBrowser(const nsAString& aCurrentBrowser, nsAString& _retval) = 0;
/* AString getDefaultPdfHandler (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultPdfHandler(nsAString& _retval) = 0;
/* void sendPing (in AString aCurrentBrowser, in AString aPreviousBrowser, in AString aPdfHandler, in AString aNotificationShown, in AString aNotificationAction, in unsigned long daysSinceLastAppLaunch); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SendPing(const nsAString& aCurrentBrowser, const nsAString& aPreviousBrowser, const nsAString& aPdfHandler, const nsAString& aNotificationShown, const nsAString& aNotificationAction, uint32_t daysSinceLastAppLaunch) = 0;
/* void setDefaultBrowserUserChoice (in AString aAumid, in Array<AString> aExtraFileExtensions); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDefaultBrowserUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions) = 0;
/* [implicit_jscontext] Promise setDefaultBrowserUserChoiceAsync (in AString aAumid, in Array<AString> aExtraFileExtensions); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDefaultBrowserUserChoiceAsync(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* void setDefaultExtensionHandlersUserChoice (in AString aAumid, in Array<AString> aFileExtensions); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDefaultExtensionHandlersUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aFileExtensions) = 0;
/* boolean agentDisabled (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AgentDisabled(bool *_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDefaultAgent, NS_IDEFAULTAGENT_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDEFAULTAGENT \
NS_IMETHOD RegisterTask(const nsAString& aUniqueToken) override; \
NS_IMETHOD UpdateTask(const nsAString& aUniqueToken) override; \
NS_IMETHOD UnregisterTask(const nsAString& aUniqueToken) override; \
NS_IMETHOD Uninstall(const nsAString& aUniqueToken) override; \
NS_IMETHOD SecondsSinceLastAppRun(int64_t *_retval) override; \
NS_IMETHOD GetDefaultBrowser(nsAString& _retval) override; \
NS_IMETHOD GetReplacePreviousDefaultBrowser(const nsAString& aCurrentBrowser, nsAString& _retval) override; \
NS_IMETHOD GetDefaultPdfHandler(nsAString& _retval) override; \
NS_IMETHOD SendPing(const nsAString& aCurrentBrowser, const nsAString& aPreviousBrowser, const nsAString& aPdfHandler, const nsAString& aNotificationShown, const nsAString& aNotificationAction, uint32_t daysSinceLastAppLaunch) override; \
NS_IMETHOD SetDefaultBrowserUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions) override; \
NS_IMETHOD SetDefaultBrowserUserChoiceAsync(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD SetDefaultExtensionHandlersUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aFileExtensions) override; \
NS_IMETHOD AgentDisabled(bool *_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_NSIDEFAULTAGENT \
nsresult RegisterTask(const nsAString& aUniqueToken); \
nsresult UpdateTask(const nsAString& aUniqueToken); \
nsresult UnregisterTask(const nsAString& aUniqueToken); \
nsresult Uninstall(const nsAString& aUniqueToken); \
nsresult SecondsSinceLastAppRun(int64_t *_retval); \
nsresult GetDefaultBrowser(nsAString& _retval); \
nsresult GetReplacePreviousDefaultBrowser(const nsAString& aCurrentBrowser, nsAString& _retval); \
nsresult GetDefaultPdfHandler(nsAString& _retval); \
nsresult SendPing(const nsAString& aCurrentBrowser, const nsAString& aPreviousBrowser, const nsAString& aPdfHandler, const nsAString& aNotificationShown, const nsAString& aNotificationAction, uint32_t daysSinceLastAppLaunch); \
nsresult SetDefaultBrowserUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions); \
nsresult SetDefaultBrowserUserChoiceAsync(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult SetDefaultExtensionHandlersUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aFileExtensions); \
nsresult AgentDisabled(bool *_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDEFAULTAGENT(_to) \
NS_IMETHOD RegisterTask(const nsAString& aUniqueToken) override { return _to RegisterTask(aUniqueToken); } \
NS_IMETHOD UpdateTask(const nsAString& aUniqueToken) override { return _to UpdateTask(aUniqueToken); } \
NS_IMETHOD UnregisterTask(const nsAString& aUniqueToken) override { return _to UnregisterTask(aUniqueToken); } \
NS_IMETHOD Uninstall(const nsAString& aUniqueToken) override { return _to Uninstall(aUniqueToken); } \
NS_IMETHOD SecondsSinceLastAppRun(int64_t *_retval) override { return _to SecondsSinceLastAppRun(_retval); } \
NS_IMETHOD GetDefaultBrowser(nsAString& _retval) override { return _to GetDefaultBrowser(_retval); } \
NS_IMETHOD GetReplacePreviousDefaultBrowser(const nsAString& aCurrentBrowser, nsAString& _retval) override { return _to GetReplacePreviousDefaultBrowser(aCurrentBrowser, _retval); } \
NS_IMETHOD GetDefaultPdfHandler(nsAString& _retval) override { return _to GetDefaultPdfHandler(_retval); } \
NS_IMETHOD SendPing(const nsAString& aCurrentBrowser, const nsAString& aPreviousBrowser, const nsAString& aPdfHandler, const nsAString& aNotificationShown, const nsAString& aNotificationAction, uint32_t daysSinceLastAppLaunch) override { return _to SendPing(aCurrentBrowser, aPreviousBrowser, aPdfHandler, aNotificationShown, aNotificationAction, daysSinceLastAppLaunch); } \
NS_IMETHOD SetDefaultBrowserUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions) override { return _to SetDefaultBrowserUserChoice(aAumid, aExtraFileExtensions); } \
NS_IMETHOD SetDefaultBrowserUserChoiceAsync(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to SetDefaultBrowserUserChoiceAsync(aAumid, aExtraFileExtensions, cx, _retval); } \
NS_IMETHOD SetDefaultExtensionHandlersUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aFileExtensions) override { return _to SetDefaultExtensionHandlersUserChoice(aAumid, aFileExtensions); } \
NS_IMETHOD AgentDisabled(bool *_retval) override { return _to AgentDisabled(_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_NSIDEFAULTAGENT(_to) \
NS_IMETHOD RegisterTask(const nsAString& aUniqueToken) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterTask(aUniqueToken); } \
NS_IMETHOD UpdateTask(const nsAString& aUniqueToken) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateTask(aUniqueToken); } \
NS_IMETHOD UnregisterTask(const nsAString& aUniqueToken) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterTask(aUniqueToken); } \
NS_IMETHOD Uninstall(const nsAString& aUniqueToken) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Uninstall(aUniqueToken); } \
NS_IMETHOD SecondsSinceLastAppRun(int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SecondsSinceLastAppRun(_retval); } \
NS_IMETHOD GetDefaultBrowser(nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultBrowser(_retval); } \
NS_IMETHOD GetReplacePreviousDefaultBrowser(const nsAString& aCurrentBrowser, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReplacePreviousDefaultBrowser(aCurrentBrowser, _retval); } \
NS_IMETHOD GetDefaultPdfHandler(nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultPdfHandler(_retval); } \
NS_IMETHOD SendPing(const nsAString& aCurrentBrowser, const nsAString& aPreviousBrowser, const nsAString& aPdfHandler, const nsAString& aNotificationShown, const nsAString& aNotificationAction, uint32_t daysSinceLastAppLaunch) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendPing(aCurrentBrowser, aPreviousBrowser, aPdfHandler, aNotificationShown, aNotificationAction, daysSinceLastAppLaunch); } \
NS_IMETHOD SetDefaultBrowserUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultBrowserUserChoice(aAumid, aExtraFileExtensions); } \
NS_IMETHOD SetDefaultBrowserUserChoiceAsync(const nsAString& aAumid, const nsTArray<nsString >& aExtraFileExtensions, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultBrowserUserChoiceAsync(aAumid, aExtraFileExtensions, cx, _retval); } \
NS_IMETHOD SetDefaultExtensionHandlersUserChoice(const nsAString& aAumid, const nsTArray<nsString >& aFileExtensions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultExtensionHandlersUserChoice(aAumid, aFileExtensions); } \
NS_IMETHOD AgentDisabled(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AgentDisabled(_retval); }
#endif /* __gen_nsIDefaultAgent_h__ */