Generated file

Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/extensions/mozIExtensionAPIRequestHandling.idl
*/
#ifndef __gen_mozIExtensionAPIRequestHandling_h__
#define __gen_mozIExtensionAPIRequestHandling_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
class nsIPrincipal; /* forward declaration */
/* starting interface: mozIExtensionServiceWorkerInfo */
#define MOZIEXTENSIONSERVICEWORKERINFO_IID_STR "e6862533-8844-4207-a6ab-04748a29d859"
#define MOZIEXTENSIONSERVICEWORKERINFO_IID \
{0xe6862533, 0x8844, 0x4207, \
{ 0xa6, 0xab, 0x04, 0x74, 0x8a, 0x29, 0xd8, 0x59 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionServiceWorkerInfo) mozIExtensionServiceWorkerInfo : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONSERVICEWORKERINFO_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionServiceWorkerInfo;
/* readonly attribute nsIPrincipal principal; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_principal)
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) = 0;
/* readonly attribute AString scriptURL; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_scriptURL)
NS_IMETHOD GetScriptURL(nsAString& aScriptURL) = 0;
/* readonly attribute AString clientInfoId; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_clientInfoId)
NS_IMETHOD GetClientInfoId(nsAString& aClientInfoId) = 0;
/* readonly attribute unsigned long long descriptorId; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_descriptorId)
NS_IMETHOD GetDescriptorId(uint64_t *aDescriptorId) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONSERVICEWORKERINFO \
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) override; \
NS_IMETHOD GetScriptURL(nsAString& aScriptURL) override; \
NS_IMETHOD GetClientInfoId(nsAString& aClientInfoId) override; \
NS_IMETHOD GetDescriptorId(uint64_t *aDescriptorId) 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_MOZIEXTENSIONSERVICEWORKERINFO \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_principal)\
nsresult GetPrincipal(nsIPrincipal **aPrincipal); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_scriptURL)\
nsresult GetScriptURL(nsAString& aScriptURL); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_clientInfoId)\
nsresult GetClientInfoId(nsAString& aClientInfoId); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionServiceWorkerInfo_descriptorId)\
nsresult GetDescriptorId(uint64_t *aDescriptorId);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONSERVICEWORKERINFO(_to) \
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) override { return _to GetPrincipal(aPrincipal); } \
NS_IMETHOD GetScriptURL(nsAString& aScriptURL) override { return _to GetScriptURL(aScriptURL); } \
NS_IMETHOD GetClientInfoId(nsAString& aClientInfoId) override { return _to GetClientInfoId(aClientInfoId); } \
NS_IMETHOD GetDescriptorId(uint64_t *aDescriptorId) override { return _to GetDescriptorId(aDescriptorId); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIEXTENSIONSERVICEWORKERINFO(_to) \
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrincipal(aPrincipal); } \
NS_IMETHOD GetScriptURL(nsAString& aScriptURL) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptURL(aScriptURL); } \
NS_IMETHOD GetClientInfoId(nsAString& aClientInfoId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClientInfoId(aClientInfoId); } \
NS_IMETHOD GetDescriptorId(uint64_t *aDescriptorId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescriptorId(aDescriptorId); }
/* starting interface: mozIExtensionListenerCallOptions */
#define MOZIEXTENSIONLISTENERCALLOPTIONS_IID_STR "876d45db-5c1b-4c9b-9148-1c86b33d120b"
#define MOZIEXTENSIONLISTENERCALLOPTIONS_IID \
{0x876d45db, 0x5c1b, 0x4c9b, \
{ 0x91, 0x48, 0x1c, 0x86, 0xb3, 0x3d, 0x12, 0x0b }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionListenerCallOptions) mozIExtensionListenerCallOptions : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONLISTENERCALLOPTIONS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionListenerCallOptions;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionListenerCallOptions_APIObjectType) APIObjectType : uint8_t {
NONE MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionListenerCallOptions_APIObjectType_NONE) = 0,
RUNTIME_PORT MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionListenerCallOptions_APIObjectType_RUNTIME_PORT) = 1,
};
/* readonly attribute mozIExtensionListenerCallOptions_APIObjectType apiObjectType; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectType)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType) = 0;
/* readonly attribute jsval apiObjectDescriptor; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectDescriptor)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor) = 0;
/* readonly attribute boolean apiObjectPrepended; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectPrepended)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectPrepended(bool *aApiObjectPrepended) = 0;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionListenerCallOptions_CallbackType) CallbackType : uint8_t {
CALLBACK_NONE MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionListenerCallOptions_CallbackType_CALLBACK_NONE) = 0,
CALLBACK_SEND_RESPONSE MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionListenerCallOptions_CallbackType_CALLBACK_SEND_RESPONSE) = 1,
};
/* attribute mozIExtensionListenerCallOptions_CallbackType callbackType; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_callbackType)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType) = 0;
MOZ_BINDING(binding_to, idl, setter, XPIDL_mozIExtensionListenerCallOptions_callbackType)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONLISTENERCALLOPTIONS \
NS_IMETHOD GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType) override; \
NS_IMETHOD GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor) override; \
NS_IMETHOD GetApiObjectPrepended(bool *aApiObjectPrepended) override; \
NS_IMETHOD GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType) override; \
NS_IMETHOD SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType) 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_MOZIEXTENSIONLISTENERCALLOPTIONS \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectType)\
nsresult GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectDescriptor)\
nsresult GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_apiObjectPrepended)\
nsresult GetApiObjectPrepended(bool *aApiObjectPrepended); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionListenerCallOptions_callbackType)\
nsresult GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType); \
MOZ_BINDING(binding_to, idl, setter, XPIDL_mozIExtensionListenerCallOptions_callbackType)\
nsresult SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONLISTENERCALLOPTIONS(_to) \
NS_IMETHOD GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType) override { return _to GetApiObjectType(aApiObjectType); } \
NS_IMETHOD GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor) override { return _to GetApiObjectDescriptor(aApiObjectDescriptor); } \
NS_IMETHOD GetApiObjectPrepended(bool *aApiObjectPrepended) override { return _to GetApiObjectPrepended(aApiObjectPrepended); } \
NS_IMETHOD GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType) override { return _to GetCallbackType(aCallbackType); } \
NS_IMETHOD SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType) override { return _to SetCallbackType(aCallbackType); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIEXTENSIONLISTENERCALLOPTIONS(_to) \
NS_IMETHOD GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiObjectType(aApiObjectType); } \
NS_IMETHOD GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiObjectDescriptor(aApiObjectDescriptor); } \
NS_IMETHOD GetApiObjectPrepended(bool *aApiObjectPrepended) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiObjectPrepended(aApiObjectPrepended); } \
NS_IMETHOD GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCallbackType(aCallbackType); } \
NS_IMETHOD SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCallbackType(aCallbackType); }
/* starting interface: mozIExtensionEventListener */
#define MOZIEXTENSIONEVENTLISTENER_IID_STR "e68e3c19-1b35-4112-8faa-5c5b84086a5b"
#define MOZIEXTENSIONEVENTLISTENER_IID \
{0xe68e3c19, 0x1b35, 0x4112, \
{ 0x8f, 0xaa, 0x5c, 0x5b, 0x84, 0x08, 0x6a, 0x5b }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionEventListener) mozIExtensionEventListener : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONEVENTLISTENER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionEventListener;
/* [can_run_script,implicit_jscontext] Promise callListener (in Array<jsval> args, [optional] in mozIExtensionListenerCallOptions listenerCallOptions); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionEventListener_callListener)
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONEVENTLISTENER \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::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_MOZIEXTENSIONEVENTLISTENER \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionEventListener_callListener)\
MOZ_CAN_RUN_SCRIPT nsresult CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONEVENTLISTENER(_to) \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to CallListener(args, listenerCallOptions, cx, _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_MOZIEXTENSIONEVENTLISTENER(_to) \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListener(args, listenerCallOptions, cx, _retval); }
/* starting interface: mozIExtensionAPIRequest */
#define MOZIEXTENSIONAPIREQUEST_IID_STR "0fee1c8f-e363-46a6-bd0c-d3c3338e2534"
#define MOZIEXTENSIONAPIREQUEST_IID \
{0x0fee1c8f, 0xe363, 0x46a6, \
{ 0xbd, 0x0c, 0xd3, 0xc3, 0x33, 0x8e, 0x25, 0x34 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionAPIRequest) mozIExtensionAPIRequest : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONAPIREQUEST_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionAPIRequest;
/* AUTF8String toString (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequest_toString)
NS_IMETHOD ToString(nsACString& _retval) = 0;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionAPIRequest_RequestType) RequestType : uint8_t {
CALL_FUNCTION MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_CALL_FUNCTION) = 0,
CALL_FUNCTION_NO_RETURN MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_CALL_FUNCTION_NO_RETURN) = 1,
CALL_FUNCTION_ASYNC MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_CALL_FUNCTION_ASYNC) = 2,
ADD_LISTENER MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_ADD_LISTENER) = 3,
REMOVE_LISTENER MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_REMOVE_LISTENER) = 4,
GET_PROPERTY MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequest_RequestType_GET_PROPERTY) = 5,
};
/* readonly attribute AUTF8String requestType; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_requestType)
NS_IMETHOD GetRequestType(nsACString& aRequestType) = 0;
/* readonly attribute AUTF8String apiNamespace; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiNamespace)
NS_IMETHOD GetApiNamespace(nsACString& aApiNamespace) = 0;
/* readonly attribute AUTF8String apiName; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiName)
NS_IMETHOD GetApiName(nsACString& aApiName) = 0;
/* readonly attribute AUTF8String apiObjectType; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiObjectType)
NS_IMETHOD GetApiObjectType(nsACString& aApiObjectType) = 0;
/* readonly attribute AUTF8String apiObjectId; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiObjectId)
NS_IMETHOD GetApiObjectId(nsACString& aApiObjectId) = 0;
/* [implicit_jscontext] readonly attribute jsval args; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_args)
NS_IMETHOD GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs) = 0;
/* [implicit_jscontext] attribute jsval normalizedArgs; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_normalizedArgs)
NS_IMETHOD GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs) = 0;
MOZ_BINDING(binding_to, idl, setter, XPIDL_mozIExtensionAPIRequest_normalizedArgs)
NS_IMETHOD SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs) = 0;
/* [implicit_jscontext] readonly attribute jsval callerSavedFrame; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_callerSavedFrame)
NS_IMETHOD GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame) = 0;
/* readonly attribute mozIExtensionServiceWorkerInfo serviceWorkerInfo; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_serviceWorkerInfo)
NS_IMETHOD GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo) = 0;
/* readonly attribute mozIExtensionEventListener eventListener; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_eventListener)
NS_IMETHOD GetEventListener(mozIExtensionEventListener **aEventListener) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONAPIREQUEST \
NS_IMETHOD ToString(nsACString& _retval) override; \
NS_IMETHOD GetRequestType(nsACString& aRequestType) override; \
NS_IMETHOD GetApiNamespace(nsACString& aApiNamespace) override; \
NS_IMETHOD GetApiName(nsACString& aApiName) override; \
NS_IMETHOD GetApiObjectType(nsACString& aApiObjectType) override; \
NS_IMETHOD GetApiObjectId(nsACString& aApiObjectId) override; \
NS_IMETHOD GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs) override; \
NS_IMETHOD GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs) override; \
NS_IMETHOD SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs) override; \
NS_IMETHOD GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame) override; \
NS_IMETHOD GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo) override; \
NS_IMETHOD GetEventListener(mozIExtensionEventListener **aEventListener) 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_MOZIEXTENSIONAPIREQUEST \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequest_toString)\
nsresult ToString(nsACString& _retval); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_requestType)\
nsresult GetRequestType(nsACString& aRequestType); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiNamespace)\
nsresult GetApiNamespace(nsACString& aApiNamespace); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiName)\
nsresult GetApiName(nsACString& aApiName); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiObjectType)\
nsresult GetApiObjectType(nsACString& aApiObjectType); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_apiObjectId)\
nsresult GetApiObjectId(nsACString& aApiObjectId); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_args)\
nsresult GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_normalizedArgs)\
nsresult GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs); \
MOZ_BINDING(binding_to, idl, setter, XPIDL_mozIExtensionAPIRequest_normalizedArgs)\
nsresult SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_callerSavedFrame)\
nsresult GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_serviceWorkerInfo)\
nsresult GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequest_eventListener)\
nsresult GetEventListener(mozIExtensionEventListener **aEventListener);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONAPIREQUEST(_to) \
NS_IMETHOD ToString(nsACString& _retval) override { return _to ToString(_retval); } \
NS_IMETHOD GetRequestType(nsACString& aRequestType) override { return _to GetRequestType(aRequestType); } \
NS_IMETHOD GetApiNamespace(nsACString& aApiNamespace) override { return _to GetApiNamespace(aApiNamespace); } \
NS_IMETHOD GetApiName(nsACString& aApiName) override { return _to GetApiName(aApiName); } \
NS_IMETHOD GetApiObjectType(nsACString& aApiObjectType) override { return _to GetApiObjectType(aApiObjectType); } \
NS_IMETHOD GetApiObjectId(nsACString& aApiObjectId) override { return _to GetApiObjectId(aApiObjectId); } \
NS_IMETHOD GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs) override { return _to GetArgs(cx, aArgs); } \
NS_IMETHOD GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs) override { return _to GetNormalizedArgs(cx, aNormalizedArgs); } \
NS_IMETHOD SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs) override { return _to SetNormalizedArgs(cx, aNormalizedArgs); } \
NS_IMETHOD GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame) override { return _to GetCallerSavedFrame(cx, aCallerSavedFrame); } \
NS_IMETHOD GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo) override { return _to GetServiceWorkerInfo(aServiceWorkerInfo); } \
NS_IMETHOD GetEventListener(mozIExtensionEventListener **aEventListener) override { return _to GetEventListener(aEventListener); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIEXTENSIONAPIREQUEST(_to) \
NS_IMETHOD ToString(nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \
NS_IMETHOD GetRequestType(nsACString& aRequestType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestType(aRequestType); } \
NS_IMETHOD GetApiNamespace(nsACString& aApiNamespace) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiNamespace(aApiNamespace); } \
NS_IMETHOD GetApiName(nsACString& aApiName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiName(aApiName); } \
NS_IMETHOD GetApiObjectType(nsACString& aApiObjectType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiObjectType(aApiObjectType); } \
NS_IMETHOD GetApiObjectId(nsACString& aApiObjectId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApiObjectId(aApiObjectId); } \
NS_IMETHOD GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetArgs(cx, aArgs); } \
NS_IMETHOD GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNormalizedArgs(cx, aNormalizedArgs); } \
NS_IMETHOD SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNormalizedArgs(cx, aNormalizedArgs); } \
NS_IMETHOD GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCallerSavedFrame(cx, aCallerSavedFrame); } \
NS_IMETHOD GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceWorkerInfo(aServiceWorkerInfo); } \
NS_IMETHOD GetEventListener(mozIExtensionEventListener **aEventListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEventListener(aEventListener); }
/* starting interface: mozIExtensionAPIRequestResult */
#define MOZIEXTENSIONAPIREQUESTRESULT_IID_STR "59fd4097-d88e-40fd-8664-fedd8ab67ab6"
#define MOZIEXTENSIONAPIREQUESTRESULT_IID \
{0x59fd4097, 0xd88e, 0x40fd, \
{ 0x86, 0x64, 0xfe, 0xdd, 0x8a, 0xb6, 0x7a, 0xb6 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionAPIRequestResult) mozIExtensionAPIRequestResult : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONAPIREQUESTRESULT_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionAPIRequestResult;
enum MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionAPIRequestResult_ResultType) ResultType : uint8_t {
RETURN_VALUE MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequestResult_ResultType_RETURN_VALUE) = 0,
EXTENSION_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_mozIExtensionAPIRequestResult_ResultType_EXTENSION_ERROR) = 1,
};
/* readonly attribute mozIExtensionAPIRequestResult_ResultType type; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequestResult_type)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetType(mozIExtensionAPIRequestResult::ResultType *aType) = 0;
/* readonly attribute jsval value; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequestResult_value)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(JS::MutableHandle<JS::Value> aValue) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONAPIREQUESTRESULT \
NS_IMETHOD GetType(mozIExtensionAPIRequestResult::ResultType *aType) override; \
NS_IMETHOD GetValue(JS::MutableHandle<JS::Value> aValue) 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_MOZIEXTENSIONAPIREQUESTRESULT \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequestResult_type)\
nsresult GetType(mozIExtensionAPIRequestResult::ResultType *aType); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_mozIExtensionAPIRequestResult_value)\
nsresult GetValue(JS::MutableHandle<JS::Value> aValue);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONAPIREQUESTRESULT(_to) \
NS_IMETHOD GetType(mozIExtensionAPIRequestResult::ResultType *aType) override { return _to GetType(aType); } \
NS_IMETHOD GetValue(JS::MutableHandle<JS::Value> aValue) override { return _to GetValue(aValue); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIEXTENSIONAPIREQUESTRESULT(_to) \
NS_IMETHOD GetType(mozIExtensionAPIRequestResult::ResultType *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
NS_IMETHOD GetValue(JS::MutableHandle<JS::Value> aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); }
/* starting interface: mozIExtensionAPIRequestHandler */
#define MOZIEXTENSIONAPIREQUESTHANDLER_IID_STR "0c61bd33-0557-43a2-9497-96c449f39e33"
#define MOZIEXTENSIONAPIREQUESTHANDLER_IID \
{0x0c61bd33, 0x0557, 0x43a2, \
{ 0x94, 0x97, 0x96, 0xc4, 0x49, 0xf3, 0x9e, 0x33 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_mozIExtensionAPIRequestHandler) mozIExtensionAPIRequestHandler : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZIEXTENSIONAPIREQUESTHANDLER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionAPIRequestHandler;
/* void handleAPIRequest (in nsISupports extension, in mozIExtensionAPIRequest apiRequest, [retval, optional] out mozIExtensionAPIRequestResult apiRequestResult); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_handleAPIRequest)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr) = 0;
/* void initExtensionWorker (in nsISupports extension, in mozIExtensionServiceWorkerInfo serviceWorkerInfo); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_initExtensionWorker)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo) = 0;
/* void onExtensionWorkerLoaded (in nsISupports extension, in unsigned long long serviceWorkerDescriptorId); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_onExtensionWorkerLoaded)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId) = 0;
/* void onExtensionWorkerDestroyed (in nsISupports extension, in unsigned long long serviceWorkerDescriptorId); */
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_onExtensionWorkerDestroyed)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIEXTENSIONAPIREQUESTHANDLER \
NS_IMETHOD HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr) override; \
NS_IMETHOD InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo) override; \
NS_IMETHOD OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId) override; \
NS_IMETHOD OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId) 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_MOZIEXTENSIONAPIREQUESTHANDLER \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_handleAPIRequest)\
nsresult HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr); \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_initExtensionWorker)\
nsresult InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo); \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_onExtensionWorkerLoaded)\
nsresult OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId); \
MOZ_BINDING(binding_to, idl, method, XPIDL_mozIExtensionAPIRequestHandler_onExtensionWorkerDestroyed)\
nsresult OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIEXTENSIONAPIREQUESTHANDLER(_to) \
NS_IMETHOD HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr) override { return _to HandleAPIRequest(extension, apiRequest, apiRequestResult); } \
NS_IMETHOD InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo) override { return _to InitExtensionWorker(extension, serviceWorkerInfo); } \
NS_IMETHOD OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId) override { return _to OnExtensionWorkerLoaded(extension, serviceWorkerDescriptorId); } \
NS_IMETHOD OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId) override { return _to OnExtensionWorkerDestroyed(extension, serviceWorkerDescriptorId); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIEXTENSIONAPIREQUESTHANDLER(_to) \
NS_IMETHOD HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleAPIRequest(extension, apiRequest, apiRequestResult); } \
NS_IMETHOD InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitExtensionWorker(extension, serviceWorkerInfo); } \
NS_IMETHOD OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnExtensionWorkerLoaded(extension, serviceWorkerDescriptorId); } \
NS_IMETHOD OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnExtensionWorkerDestroyed(extension, serviceWorkerDescriptorId); }
#endif /* __gen_mozIExtensionAPIRequestHandling_h__ */