Generated file
Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/modelcontext/nsIModelContextService.idl
*/
#ifndef __gen_nsIModelContextService_h__
#define __gen_nsIModelContextService_h__
#include "nsISupports.h"
#include "js/Value.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsIModelContextService */
#define NS_IMODELCONTEXTSERVICE_IID_STR "746da1ff-52ce-46be-9256-78b83c9a0523"
#define NS_IMODELCONTEXTSERVICE_IID \
{0x746da1ff, 0x52ce, 0x46be, \
{ 0x92, 0x56, 0x78, 0xb8, 0x3c, 0x9a, 0x05, 0x23 }}
class NS_NO_VTABLE nsIModelContextService : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IMODELCONTEXTSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIModelContextService;
/* [implicit_jscontext] Promise getToolsForWindow (in unsigned long long innerWindowId); */
NS_IMETHOD GetToolsForWindow(uint64_t innerWindowId, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise invokeTool (in unsigned long long innerWindowId, in ACString toolName, [optional] in jsval input); */
NS_IMETHOD InvokeTool(uint64_t innerWindowId, const nsACString& toolName, JS::Handle<JS::Value> input, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMODELCONTEXTSERVICE \
NS_IMETHOD GetToolsForWindow(uint64_t innerWindowId, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD InvokeTool(uint64_t innerWindowId, const nsACString& toolName, JS::Handle<JS::Value> input, 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_NSIMODELCONTEXTSERVICE \
nsresult GetToolsForWindow(uint64_t innerWindowId, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult InvokeTool(uint64_t innerWindowId, const nsACString& toolName, JS::Handle<JS::Value> input, 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_NSIMODELCONTEXTSERVICE(_to) \
NS_IMETHOD GetToolsForWindow(uint64_t innerWindowId, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to GetToolsForWindow(innerWindowId, cx, _retval); } \
NS_IMETHOD InvokeTool(uint64_t innerWindowId, const nsACString& toolName, JS::Handle<JS::Value> input, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to InvokeTool(innerWindowId, toolName, input, 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_NSIMODELCONTEXTSERVICE(_to) \
NS_IMETHOD GetToolsForWindow(uint64_t innerWindowId, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetToolsForWindow(innerWindowId, cx, _retval); } \
NS_IMETHOD InvokeTool(uint64_t innerWindowId, const nsACString& toolName, JS::Handle<JS::Value> input, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InvokeTool(innerWindowId, toolName, input, cx, _retval); }
#endif /* __gen_nsIModelContextService_h__ */