/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/glean/xpcom/nsIGleanPing.idl */ #ifndef __gen_nsIGleanPing_h__ #define __gen_nsIGleanPing_h__ #include "nsISupports.h" #include "js/Value.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: nsIGleanPingTestCallback */ #define NS_IGLEANPINGTESTCALLBACK_IID_STR "e5447f62-4b03-497c-81e9-6ab683d20380" #define NS_IGLEANPINGTESTCALLBACK_IID \ {0xe5447f62, 0x4b03, 0x497c, \ { 0x81, 0xe9, 0x6a, 0xb6, 0x83, 0xd2, 0x03, 0x80 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIGleanPingTestCallback) nsIGleanPingTestCallback : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IGLEANPINGTESTCALLBACK_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIGleanPingTestCallback; /* void call (in ACString aReason); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPingTestCallback_call) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Call(const nsACString& aReason) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIGLEANPINGTESTCALLBACK \ NS_IMETHOD Call(const nsACString& aReason) 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_NSIGLEANPINGTESTCALLBACK \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPingTestCallback_call)\ nsresult Call(const nsACString& aReason); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIGLEANPINGTESTCALLBACK(_to) \ NS_IMETHOD Call(const nsACString& aReason) override { return _to Call(aReason); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIGLEANPINGTESTCALLBACK(_to) \ NS_IMETHOD Call(const nsACString& aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Call(aReason); } /* starting interface: nsIGleanPingSubmitCallback */ #define NS_IGLEANPINGSUBMITCALLBACK_IID_STR "576baf9b-3f90-48aa-b35b-89a9638cc823" #define NS_IGLEANPINGSUBMITCALLBACK_IID \ {0x576baf9b, 0x3f90, 0x48aa, \ { 0xb3, 0x5b, 0x89, 0xa9, 0x63, 0x8c, 0xc8, 0x23 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIGleanPingSubmitCallback) nsIGleanPingSubmitCallback : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IGLEANPINGSUBMITCALLBACK_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIGleanPingSubmitCallback; /* Promise call (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPingSubmitCallback_call) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Call(::mozilla::dom::Promise * * _retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIGLEANPINGSUBMITCALLBACK \ NS_IMETHOD Call(::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_NSIGLEANPINGSUBMITCALLBACK \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPingSubmitCallback_call)\ nsresult Call(::mozilla::dom::Promise * * _retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIGLEANPINGSUBMITCALLBACK(_to) \ NS_IMETHOD Call(::mozilla::dom::Promise * * _retval) override { return _to Call(_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_NSIGLEANPINGSUBMITCALLBACK(_to) \ NS_IMETHOD Call(::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Call(_retval); } /* starting interface: nsIGleanPing */ #define NS_IGLEANPING_IID_STR "5223a48b-687d-47ff-a629-fd4a72d1ecfa" #define NS_IGLEANPING_IID \ {0x5223a48b, 0x687d, 0x47ff, \ { 0xa6, 0x29, 0xfd, 0x4a, 0x72, 0xd1, 0xec, 0xfa }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIGleanPing) nsIGleanPing : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IGLEANPING_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIGleanPing; /* void submit ([optional] in ACString aReason); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_submit) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Submit(const nsACString& aReason) = 0; /* void testBeforeNextSubmit (in nsIGleanPingTestCallback aCallback); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_testBeforeNextSubmit) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestBeforeNextSubmit(nsIGleanPingTestCallback *aCallback) = 0; /* void setEnabled (in boolean aValue); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_setEnabled) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetEnabled(bool aValue) = 0; /* [implicit_jscontext] Promise testSubmission (in nsIGleanPingTestCallback aTestCallback, in nsIGleanPingSubmitCallback aSubmitCallback, [optional] in unsigned long aSubmitTimeoutMs); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_testSubmission) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestSubmission(nsIGleanPingTestCallback *aTestCallback, nsIGleanPingSubmitCallback *aSubmitCallback, uint32_t aSubmitTimeoutMs, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIGLEANPING \ NS_IMETHOD Submit(const nsACString& aReason) override; \ NS_IMETHOD TestBeforeNextSubmit(nsIGleanPingTestCallback *aCallback) override; \ NS_IMETHOD SetEnabled(bool aValue) override; \ NS_IMETHOD TestSubmission(nsIGleanPingTestCallback *aTestCallback, nsIGleanPingSubmitCallback *aSubmitCallback, uint32_t aSubmitTimeoutMs, 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_NSIGLEANPING \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_submit)\ nsresult Submit(const nsACString& aReason); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_testBeforeNextSubmit)\ nsresult TestBeforeNextSubmit(nsIGleanPingTestCallback *aCallback); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_setEnabled)\ nsresult SetEnabled(bool aValue); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGleanPing_testSubmission)\ nsresult TestSubmission(nsIGleanPingTestCallback *aTestCallback, nsIGleanPingSubmitCallback *aSubmitCallback, uint32_t aSubmitTimeoutMs, 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_NSIGLEANPING(_to) \ NS_IMETHOD Submit(const nsACString& aReason) override { return _to Submit(aReason); } \ NS_IMETHOD TestBeforeNextSubmit(nsIGleanPingTestCallback *aCallback) override { return _to TestBeforeNextSubmit(aCallback); } \ NS_IMETHOD SetEnabled(bool aValue) override { return _to SetEnabled(aValue); } \ NS_IMETHOD TestSubmission(nsIGleanPingTestCallback *aTestCallback, nsIGleanPingSubmitCallback *aSubmitCallback, uint32_t aSubmitTimeoutMs, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to TestSubmission(aTestCallback, aSubmitCallback, aSubmitTimeoutMs, 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_NSIGLEANPING(_to) \ NS_IMETHOD Submit(const nsACString& aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Submit(aReason); } \ NS_IMETHOD TestBeforeNextSubmit(nsIGleanPingTestCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestBeforeNextSubmit(aCallback); } \ NS_IMETHOD SetEnabled(bool aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEnabled(aValue); } \ NS_IMETHOD TestSubmission(nsIGleanPingTestCallback *aTestCallback, nsIGleanPingSubmitCallback *aSubmitCallback, uint32_t aSubmitTimeoutMs, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestSubmission(aTestCallback, aSubmitCallback, aSubmitTimeoutMs, cx, _retval); } #endif /* __gen_nsIGleanPing_h__ */