Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/extensions/nsINativeMessagingPortal.idl
*/
#ifndef __gen_nsINativeMessagingPortal_h__
#define __gen_nsINativeMessagingPortal_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: nsINativeMessagingPortal */
#define NS_INATIVEMESSAGINGPORTAL_IID_STR "7c3003e8-6d10-46cc-b754-70cd889871e7"
#define NS_INATIVEMESSAGINGPORTAL_IID \
{0x7c3003e8, 0x6d10, 0x46cc, \
{ 0xb7, 0x54, 0x70, 0xcd, 0x88, 0x98, 0x71, 0xe7 }}
class NS_NO_VTABLE nsINativeMessagingPortal : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INATIVEMESSAGINGPORTAL_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINativeMessagingPortal;
/* boolean shouldUse (); */
NS_IMETHOD ShouldUse(bool *_retval) = 0;
/* [implicit_jscontext] readonly attribute Promise available; */
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) = 0;
/* [implicit_jscontext] Promise createSession (in ACString aApplication); */
NS_IMETHOD CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise closeSession (in ACString aHandle); */
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise getManifest (in ACString aHandle, in ACString aName, in ACString aExtension); */
NS_IMETHOD GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise start (in ACString aHandle, in ACString aName, in ACString aExtension); */
NS_IMETHOD Start(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINativeMessagingPortal, NS_INATIVEMESSAGINGPORTAL_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINATIVEMESSAGINGPORTAL \
NS_IMETHOD ShouldUse(bool *_retval) override; \
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) override; \
NS_IMETHOD CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD Start(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, 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_NSINATIVEMESSAGINGPORTAL \
nsresult ShouldUse(bool *_retval); \
nsresult GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable); \
nsresult CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult Start(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, 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_NSINATIVEMESSAGINGPORTAL(_to) \
NS_IMETHOD ShouldUse(bool *_retval) override { return _to ShouldUse(_retval); } \
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) override { return _to GetAvailable(cx, aAvailable); } \
NS_IMETHOD CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to CreateSession(aApplication, cx, _retval); } \
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to CloseSession(aHandle, cx, _retval); } \
NS_IMETHOD GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to GetManifest(aHandle, aName, aExtension, cx, _retval); } \
NS_IMETHOD Start(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to Start(aHandle, aName, aExtension, 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_NSINATIVEMESSAGINGPORTAL(_to) \
NS_IMETHOD ShouldUse(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShouldUse(_retval); } \
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAvailable(cx, aAvailable); } \
NS_IMETHOD CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSession(aApplication, cx, _retval); } \
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseSession(aHandle, cx, _retval); } \
NS_IMETHOD GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManifest(aHandle, aName, aExtension, cx, _retval); } \
NS_IMETHOD Start(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(aHandle, aName, aExtension, cx, _retval); }
#endif /* __gen_nsINativeMessagingPortal_h__ */