/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/ml/nsIMLModelResolver.idl */ #ifndef __gen_nsIMLModelResolver_h__ #define __gen_nsIMLModelResolver_h__ #include "nsISupports.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 namespace mozilla { namespace dom { class WindowGlobalParent; /* webidl WindowGlobalParent */ } // namespace dom } // namespace mozilla /* starting interface: nsIMLModelDownloadAuthorizationCallback */ #define NS_IMLMODELDOWNLOADAUTHORIZATIONCALLBACK_IID_STR "d8e9208e-4ffb-4da4-b19d-8923ea59934a" #define NS_IMLMODELDOWNLOADAUTHORIZATIONCALLBACK_IID \ {0xd8e9208e, 0x4ffb, 0x4da4, \ { 0xb1, 0x9d, 0x89, 0x23, 0xea, 0x59, 0x93, 0x4a }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIMLModelDownloadAuthorizationCallback) nsIMLModelDownloadAuthorizationCallback : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IMLMODELDOWNLOADAUTHORIZATIONCALLBACK_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIMLModelDownloadAuthorizationCallback; /* void resolve (in boolean aAllow); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadAuthorizationCallback_resolve) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(bool aAllow) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIMLMODELDOWNLOADAUTHORIZATIONCALLBACK \ NS_IMETHOD Resolve(bool aAllow) 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_NSIMLMODELDOWNLOADAUTHORIZATIONCALLBACK \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadAuthorizationCallback_resolve)\ nsresult Resolve(bool aAllow); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIMLMODELDOWNLOADAUTHORIZATIONCALLBACK(_to) \ NS_IMETHOD Resolve(bool aAllow) override { return _to Resolve(aAllow); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIMLMODELDOWNLOADAUTHORIZATIONCALLBACK(_to) \ NS_IMETHOD Resolve(bool aAllow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(aAllow); } /* starting interface: nsIMLModelResolver */ #define NS_IMLMODELRESOLVER_IID_STR "f3be56e2-aa39-4335-87c2-9b353db5d3cd" #define NS_IMLMODELRESOLVER_IID \ {0xf3be56e2, 0xaa39, 0x4335, \ { 0x87, 0xc2, 0x9b, 0x35, 0x3d, 0xb5, 0xd3, 0xcd }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIMLModelResolver) nsIMLModelResolver : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IMLMODELRESOLVER_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIMLModelResolver; /* void resolve (in AUTF8String aId, out AUTF8String aEngine, out AUTF8String aModel, out AUTF8String aRevision, out AUTF8String aFilename); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelResolver_resolve) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Resolve(const nsACString& aId, nsACString& aEngine, nsACString& aModel, nsACString& aRevision, nsACString& aFilename) = 0; /* void authorizeDownload (in AUTF8String aModel, in AUTF8String aRevision, in AUTF8String aFilename, in WindowGlobalParent aWindow, in AString aProgressToken, in nsIMLModelDownloadAuthorizationCallback aCallback); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelResolver_authorizeDownload) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AuthorizeDownload(const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, mozilla::dom::WindowGlobalParent *aWindow, const nsAString& aProgressToken, nsIMLModelDownloadAuthorizationCallback *aCallback) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIMLMODELRESOLVER \ NS_IMETHOD Resolve(const nsACString& aId, nsACString& aEngine, nsACString& aModel, nsACString& aRevision, nsACString& aFilename) override; \ NS_IMETHOD AuthorizeDownload(const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, mozilla::dom::WindowGlobalParent *aWindow, const nsAString& aProgressToken, nsIMLModelDownloadAuthorizationCallback *aCallback) 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_NSIMLMODELRESOLVER \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelResolver_resolve)\ nsresult Resolve(const nsACString& aId, nsACString& aEngine, nsACString& aModel, nsACString& aRevision, nsACString& aFilename); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelResolver_authorizeDownload)\ nsresult AuthorizeDownload(const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, mozilla::dom::WindowGlobalParent *aWindow, const nsAString& aProgressToken, nsIMLModelDownloadAuthorizationCallback *aCallback); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIMLMODELRESOLVER(_to) \ NS_IMETHOD Resolve(const nsACString& aId, nsACString& aEngine, nsACString& aModel, nsACString& aRevision, nsACString& aFilename) override { return _to Resolve(aId, aEngine, aModel, aRevision, aFilename); } \ NS_IMETHOD AuthorizeDownload(const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, mozilla::dom::WindowGlobalParent *aWindow, const nsAString& aProgressToken, nsIMLModelDownloadAuthorizationCallback *aCallback) override { return _to AuthorizeDownload(aModel, aRevision, aFilename, aWindow, aProgressToken, aCallback); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIMLMODELRESOLVER(_to) \ NS_IMETHOD Resolve(const nsACString& aId, nsACString& aEngine, nsACString& aModel, nsACString& aRevision, nsACString& aFilename) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(aId, aEngine, aModel, aRevision, aFilename); } \ NS_IMETHOD AuthorizeDownload(const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, mozilla::dom::WindowGlobalParent *aWindow, const nsAString& aProgressToken, nsIMLModelDownloadAuthorizationCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AuthorizeDownload(aModel, aRevision, aFilename, aWindow, aProgressToken, aCallback); } #endif /* __gen_nsIMLModelResolver_h__ */