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 mozIExtensionServiceWorkerInfo : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZIEXTENSIONSERVICEWORKERINFO_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionServiceWorkerInfo;
/* readonly attribute nsIPrincipal principal; */
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) = 0;
/* readonly attribute AString scriptURL; */
NS_IMETHOD GetScriptURL(nsAString& aScriptURL) = 0;
/* readonly attribute AString clientInfoId; */
NS_IMETHOD GetClientInfoId(nsAString& aClientInfoId) = 0;
/* readonly attribute unsigned long long descriptorId; */
NS_IMETHOD GetDescriptorId(uint64_t *aDescriptorId) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionServiceWorkerInfo, MOZIEXTENSIONSERVICEWORKERINFO_IID)
/* 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 \
nsresult GetPrincipal(nsIPrincipal **aPrincipal); \
nsresult GetScriptURL(nsAString& aScriptURL); \
nsresult GetClientInfoId(nsAString& aClientInfoId); \
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 mozIExtensionListenerCallOptions : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZIEXTENSIONLISTENERCALLOPTIONS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionListenerCallOptions;
enum APIObjectType : uint8_t {
NONE = 0,
RUNTIME_PORT = 1,
};
/* readonly attribute mozIExtensionListenerCallOptions_APIObjectType apiObjectType; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType) = 0;
/* readonly attribute jsval apiObjectDescriptor; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor) = 0;
/* readonly attribute boolean apiObjectPrepended; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetApiObjectPrepended(bool *aApiObjectPrepended) = 0;
enum CallbackType : uint8_t {
CALLBACK_NONE = 0,
CALLBACK_SEND_RESPONSE = 1,
};
/* attribute mozIExtensionListenerCallOptions_CallbackType callbackType; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType) = 0;
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetCallbackType(mozIExtensionListenerCallOptions::CallbackType aCallbackType) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionListenerCallOptions, MOZIEXTENSIONLISTENERCALLOPTIONS_IID)
/* 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 \
nsresult GetApiObjectType(mozIExtensionListenerCallOptions::APIObjectType *aApiObjectType); \
nsresult GetApiObjectDescriptor(JS::MutableHandle<JS::Value> aApiObjectDescriptor); \
nsresult GetApiObjectPrepended(bool *aApiObjectPrepended); \
nsresult GetCallbackType(mozIExtensionListenerCallOptions::CallbackType *aCallbackType); \
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 mozIExtensionEventListener : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(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_CAN_RUN_SCRIPT NS_IMETHOD CallListener(const nsTArray<JS::Value >& args, mozIExtensionListenerCallOptions *listenerCallOptions, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionEventListener, MOZIEXTENSIONEVENTLISTENER_IID)
/* 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_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 mozIExtensionAPIRequest : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZIEXTENSIONAPIREQUEST_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionAPIRequest;
/* AUTF8String toString (); */
NS_IMETHOD ToString(nsACString& _retval) = 0;
enum RequestType : uint8_t {
CALL_FUNCTION = 0,
CALL_FUNCTION_NO_RETURN = 1,
CALL_FUNCTION_ASYNC = 2,
ADD_LISTENER = 3,
REMOVE_LISTENER = 4,
GET_PROPERTY = 5,
};
/* readonly attribute AUTF8String requestType; */
NS_IMETHOD GetRequestType(nsACString& aRequestType) = 0;
/* readonly attribute AUTF8String apiNamespace; */
NS_IMETHOD GetApiNamespace(nsACString& aApiNamespace) = 0;
/* readonly attribute AUTF8String apiName; */
NS_IMETHOD GetApiName(nsACString& aApiName) = 0;
/* readonly attribute AUTF8String apiObjectType; */
NS_IMETHOD GetApiObjectType(nsACString& aApiObjectType) = 0;
/* readonly attribute AUTF8String apiObjectId; */
NS_IMETHOD GetApiObjectId(nsACString& aApiObjectId) = 0;
/* [implicit_jscontext] readonly attribute jsval args; */
NS_IMETHOD GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs) = 0;
/* [implicit_jscontext] attribute jsval normalizedArgs; */
NS_IMETHOD GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs) = 0;
NS_IMETHOD SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs) = 0;
/* [implicit_jscontext] readonly attribute jsval callerSavedFrame; */
NS_IMETHOD GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame) = 0;
/* readonly attribute mozIExtensionServiceWorkerInfo serviceWorkerInfo; */
NS_IMETHOD GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo) = 0;
/* readonly attribute mozIExtensionEventListener eventListener; */
NS_IMETHOD GetEventListener(mozIExtensionEventListener **aEventListener) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionAPIRequest, MOZIEXTENSIONAPIREQUEST_IID)
/* 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 \
nsresult ToString(nsACString& _retval); \
nsresult GetRequestType(nsACString& aRequestType); \
nsresult GetApiNamespace(nsACString& aApiNamespace); \
nsresult GetApiName(nsACString& aApiName); \
nsresult GetApiObjectType(nsACString& aApiObjectType); \
nsresult GetApiObjectId(nsACString& aApiObjectId); \
nsresult GetArgs(JSContext* cx, JS::MutableHandle<JS::Value> aArgs); \
nsresult GetNormalizedArgs(JSContext* cx, JS::MutableHandle<JS::Value> aNormalizedArgs); \
nsresult SetNormalizedArgs(JSContext* cx, JS::Handle<JS::Value> aNormalizedArgs); \
nsresult GetCallerSavedFrame(JSContext* cx, JS::MutableHandle<JS::Value> aCallerSavedFrame); \
nsresult GetServiceWorkerInfo(mozIExtensionServiceWorkerInfo **aServiceWorkerInfo); \
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 mozIExtensionAPIRequestResult : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZIEXTENSIONAPIREQUESTRESULT_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozIExtensionAPIRequestResult;
enum ResultType : uint8_t {
RETURN_VALUE = 0,
EXTENSION_ERROR = 1,
};
/* readonly attribute mozIExtensionAPIRequestResult_ResultType type; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetType(mozIExtensionAPIRequestResult::ResultType *aType) = 0;
/* readonly attribute jsval value; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(JS::MutableHandle<JS::Value> aValue) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionAPIRequestResult, MOZIEXTENSIONAPIREQUESTRESULT_IID)
/* 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 \
nsresult GetType(mozIExtensionAPIRequestResult::ResultType *aType); \
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 mozIExtensionAPIRequestHandler : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(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); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr) = 0;
/* void initExtensionWorker (in nsISupports extension, in mozIExtensionServiceWorkerInfo serviceWorkerInfo); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo) = 0;
/* void onExtensionWorkerLoaded (in nsISupports extension, in unsigned long long serviceWorkerDescriptorId); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId) = 0;
/* void onExtensionWorkerDestroyed (in nsISupports extension, in unsigned long long serviceWorkerDescriptorId); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnExtensionWorkerDestroyed(nsISupports *extension, uint64_t serviceWorkerDescriptorId) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(mozIExtensionAPIRequestHandler, MOZIEXTENSIONAPIREQUESTHANDLER_IID)
/* 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 \
nsresult HandleAPIRequest(nsISupports *extension, mozIExtensionAPIRequest *apiRequest, mozIExtensionAPIRequestResult **apiRequestResult = nullptr); \
nsresult InitExtensionWorker(nsISupports *extension, mozIExtensionServiceWorkerInfo *serviceWorkerInfo); \
nsresult OnExtensionWorkerLoaded(nsISupports *extension, uint64_t serviceWorkerDescriptorId); \
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__ */