Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/base/nsISupports.idl
*/
#ifndef __gen_nsISupports_h__
#define __gen_nsISupports_h__
#include "nsrootidl.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
/* starting interface: nsISupports */
#define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046"
#define NS_ISUPPORTS_IID \
{0x00000000, 0x0000, 0x0000, \
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
class NS_NO_VTABLE nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsISupports;
/* void QueryInterface (in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aInstancePtr); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD QueryInterface(const nsIID & aIID, void * * aInstancePtr) = 0;
/* [noscript,notxpcom] MozExternalRefCountType AddRef (); */
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) = 0;
/* [noscript,notxpcom] MozExternalRefCountType Release (); */
NS_IMETHOD_(MozExternalRefCountType) Release(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsISupports, NS_ISUPPORTS_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISUPPORTS \
NS_IMETHOD QueryInterface(const nsIID & aIID, void * * aInstancePtr) override; \
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \
NS_IMETHOD_(MozExternalRefCountType) Release(void) 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_NSISUPPORTS \
nsresult QueryInterface(const nsIID & aIID, void * * aInstancePtr); \
nsresult_(MozExternalRefCountType) AddRef(void); \
nsresult_(MozExternalRefCountType) Release(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISUPPORTS(_to) \
NS_IMETHOD QueryInterface(const nsIID & aIID, void * * aInstancePtr) override { return _to QueryInterface(aIID, aInstancePtr); } \
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override { return _to AddRef(); } \
NS_IMETHOD_(MozExternalRefCountType) Release(void) override { return _to Release(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISUPPORTS(_to) \
NS_IMETHOD QueryInterface(const nsIID & aIID, void * * aInstancePtr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(aIID, aInstancePtr); } \
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \
NS_IMETHOD_(MozExternalRefCountType) Release(void) override;
#include "nsISupportsUtils.h"
#endif /* __gen_nsISupports_h__ */