/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/extensions/nsINativeMessagingProxy.idl
*/
#ifndef __gen_nsINativeMessagingProxy_h__
#define __gen_nsINativeMessagingProxy_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: nsINativeMessagingProxy */
#define NS_INATIVEMESSAGINGPROXY_IID_STR "a89af240-f53f-48c4-8468-168136a628d4"
#define NS_INATIVEMESSAGINGPROXY_IID \
{0xa89af240, 0xf53f, 0x48c4, \
{ 0x84, 0x68, 0x16, 0x81, 0x36, 0xa6, 0x28, 0xd4 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsINativeMessagingProxy) nsINativeMessagingProxy : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_INATIVEMESSAGINGPROXY_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINativeMessagingProxy;
/* boolean shouldUse (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_shouldUse)
NS_IMETHOD ShouldUse(bool *_retval) = 0;
/* [implicit_jscontext] readonly attribute Promise available; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsINativeMessagingProxy_available)
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) = 0;
/* [implicit_jscontext] Promise closeSession (in ACString aHandle); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_closeSession)
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise getManifest (in ACString aName, in ACString aExtension); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_getManifest)
NS_IMETHOD GetManifest(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise start (in ACString aName, in ACString aExtension); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_start)
NS_IMETHOD Start(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINATIVEMESSAGINGPROXY \
NS_IMETHOD ShouldUse(bool *_retval) override; \
NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) override; \
NS_IMETHOD CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD GetManifest(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD Start(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_NSINATIVEMESSAGINGPROXY \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_shouldUse)\
nsresult ShouldUse(bool *_retval); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsINativeMessagingProxy_available)\
nsresult GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_closeSession)\
nsresult CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_getManifest)\
nsresult GetManifest(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingProxy_start)\
nsresult Start(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_NSINATIVEMESSAGINGPROXY(_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 CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to CloseSession(aHandle, cx, _retval); } \
NS_IMETHOD GetManifest(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to GetManifest(aName, aExtension, cx, _retval); } \
NS_IMETHOD Start(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to Start(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_NSINATIVEMESSAGINGPROXY(_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 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& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManifest(aName, aExtension, cx, _retval); } \
NS_IMETHOD Start(const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(aName, aExtension, cx, _retval); }
#endif /* __gen_nsINativeMessagingProxy_h__ */