/*
 * 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 MOZ_BINDING(binding_to, idl, class, XPIDL_nsINativeMessagingPortal) nsINativeMessagingPortal : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_INATIVEMESSAGINGPORTAL_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsINativeMessagingPortal;

  /* boolean shouldUse (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_shouldUse)
  NS_IMETHOD ShouldUse(bool *_retval) = 0;

  /* [implicit_jscontext] readonly attribute Promise available; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsINativeMessagingPortal_available)
  NS_IMETHOD GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable) = 0;

  /* [implicit_jscontext] Promise createSession (in ACString aApplication); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_createSession)
  NS_IMETHOD CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;

  /* [implicit_jscontext] Promise closeSession (in ACString aHandle); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_closeSession)
  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); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_getManifest)
  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); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_start)
  NS_IMETHOD Start(const nsACString& aHandle, 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_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 \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_shouldUse)\
  nsresult ShouldUse(bool *_retval); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsINativeMessagingPortal_available)\
  nsresult GetAvailable(JSContext* cx, ::mozilla::dom::Promise * * aAvailable); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_createSession)\
  nsresult CreateSession(const nsACString& aApplication, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_closeSession)\
  nsresult CloseSession(const nsACString& aHandle, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_getManifest)\
  nsresult GetManifest(const nsACString& aHandle, const nsACString& aName, const nsACString& aExtension, JSContext* cx, ::mozilla::dom::Promise * * _retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsINativeMessagingPortal_start)\
  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__ */
