/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/ml/nsIMLModelHub.idl
*/
#ifndef __gen_nsIMLModelHub_h__
#define __gen_nsIMLModelHub_h__
#include "nsISupports.h"
#include "nsTArray.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
class nsIMLModelDownloadProgressCallback; /* forward declaration */
class nsIMLModelDownloadCompletionCallback; /* forward declaration */
/* starting interface: nsIMLModelDownloadProgressCallback */
#define NS_IMLMODELDOWNLOADPROGRESSCALLBACK_IID_STR "e7f880f7-ee8a-445e-87a8-5657d8c47bd9"
#define NS_IMLMODELDOWNLOADPROGRESSCALLBACK_IID \
{0xe7f880f7, 0xee8a, 0x445e, \
{ 0x87, 0xa8, 0x56, 0x57, 0xd8, 0xc4, 0x7b, 0xd9 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIMLModelDownloadProgressCallback) nsIMLModelDownloadProgressCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IMLMODELDOWNLOADPROGRESSCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIMLModelDownloadProgressCallback;
/* void onProgress (in long aProgress, in long long aCurrentLoaded, in long long aTotalLoaded, in long long aTotal); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadProgressCallback_onProgress)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnProgress(int32_t aProgress, int64_t aCurrentLoaded, int64_t aTotalLoaded, int64_t aTotal) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMLMODELDOWNLOADPROGRESSCALLBACK \
NS_IMETHOD OnProgress(int32_t aProgress, int64_t aCurrentLoaded, int64_t aTotalLoaded, int64_t aTotal) 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_NSIMLMODELDOWNLOADPROGRESSCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadProgressCallback_onProgress)\
nsresult OnProgress(int32_t aProgress, int64_t aCurrentLoaded, int64_t aTotalLoaded, int64_t aTotal);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMLMODELDOWNLOADPROGRESSCALLBACK(_to) \
NS_IMETHOD OnProgress(int32_t aProgress, int64_t aCurrentLoaded, int64_t aTotalLoaded, int64_t aTotal) override { return _to OnProgress(aProgress, aCurrentLoaded, aTotalLoaded, aTotal); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMLMODELDOWNLOADPROGRESSCALLBACK(_to) \
NS_IMETHOD OnProgress(int32_t aProgress, int64_t aCurrentLoaded, int64_t aTotalLoaded, int64_t aTotal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgress(aProgress, aCurrentLoaded, aTotalLoaded, aTotal); }
/* starting interface: nsIMLModelDownloadCompletionCallback */
#define NS_IMLMODELDOWNLOADCOMPLETIONCALLBACK_IID_STR "9c0d1e2f-5678-4321-9012-3456789abcde"
#define NS_IMLMODELDOWNLOADCOMPLETIONCALLBACK_IID \
{0x9c0d1e2f, 0x5678, 0x4321, \
{ 0x90, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIMLModelDownloadCompletionCallback) nsIMLModelDownloadCompletionCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IMLMODELDOWNLOADCOMPLETIONCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIMLModelDownloadCompletionCallback;
/* void onSuccess (in AString aModel, in AString aRevision); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadCompletionCallback_onSuccess)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSuccess(const nsAString& aModel, const nsAString& aRevision) = 0;
/* void onError (in AString aError); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadCompletionCallback_onError)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnError(const nsAString& aError) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMLMODELDOWNLOADCOMPLETIONCALLBACK \
NS_IMETHOD OnSuccess(const nsAString& aModel, const nsAString& aRevision) override; \
NS_IMETHOD OnError(const nsAString& aError) 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_NSIMLMODELDOWNLOADCOMPLETIONCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadCompletionCallback_onSuccess)\
nsresult OnSuccess(const nsAString& aModel, const nsAString& aRevision); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelDownloadCompletionCallback_onError)\
nsresult OnError(const nsAString& aError);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMLMODELDOWNLOADCOMPLETIONCALLBACK(_to) \
NS_IMETHOD OnSuccess(const nsAString& aModel, const nsAString& aRevision) override { return _to OnSuccess(aModel, aRevision); } \
NS_IMETHOD OnError(const nsAString& aError) override { return _to OnError(aError); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMLMODELDOWNLOADCOMPLETIONCALLBACK(_to) \
NS_IMETHOD OnSuccess(const nsAString& aModel, const nsAString& aRevision) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSuccess(aModel, aRevision); } \
NS_IMETHOD OnError(const nsAString& aError) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnError(aError); }
/* starting interface: nsIMLModelHub */
#define NS_IMLMODELHUB_IID_STR "e381b167-cb68-429c-9d57-35acf9054505"
#define NS_IMLMODELHUB_IID \
{0xe381b167, 0xcb68, 0x429c, \
{ 0x9d, 0x57, 0x35, 0xac, 0xf9, 0x05, 0x45, 0x05 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIMLModelHub) nsIMLModelHub : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IMLMODELHUB_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIMLModelHub;
/* Promise isModelAvailable (in AUTF8String aEngineId, in AUTF8String aModel, in AUTF8String aRevision, in AUTF8String aFilename); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_isModelAvailable)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsModelAvailable(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) = 0;
/* Promise isModelInstalled (in AUTF8String aEngineId, in AUTF8String aModel, in AUTF8String aRevision, in AUTF8String aFilename); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_isModelInstalled)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD IsModelInstalled(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) = 0;
/* AString downloadModel (in AUTF8String aEngineId, in AUTF8String aTaskName, in AUTF8String aModel, in AUTF8String aRevision, in Array<AUTF8String> aFiles, in AString aProgressToken, in nsIMLModelDownloadProgressCallback aProgressCallback, in nsIMLModelDownloadCompletionCallback aCompletionCallback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_downloadModel)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DownloadModel(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsTArray<nsCString >& aFiles, const nsAString& aProgressToken, nsIMLModelDownloadProgressCallback *aProgressCallback, nsIMLModelDownloadCompletionCallback *aCompletionCallback, nsAString& _retval) = 0;
/* void cancelDownload (in AString aProgressToken); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_cancelDownload)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CancelDownload(const nsAString& aProgressToken) = 0;
/* Promise getModelBlob (in AUTF8String aEngineId, in AUTF8String aTaskName, in AUTF8String aModel, in AUTF8String aRevision, in AUTF8String aFile); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_getModelBlob)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetModelBlob(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFile, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMLMODELHUB \
NS_IMETHOD IsModelAvailable(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD IsModelInstalled(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD DownloadModel(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsTArray<nsCString >& aFiles, const nsAString& aProgressToken, nsIMLModelDownloadProgressCallback *aProgressCallback, nsIMLModelDownloadCompletionCallback *aCompletionCallback, nsAString& _retval) override; \
NS_IMETHOD CancelDownload(const nsAString& aProgressToken) override; \
NS_IMETHOD GetModelBlob(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFile, ::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_NSIMLMODELHUB \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_isModelAvailable)\
nsresult IsModelAvailable(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_isModelInstalled)\
nsresult IsModelInstalled(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_downloadModel)\
nsresult DownloadModel(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsTArray<nsCString >& aFiles, const nsAString& aProgressToken, nsIMLModelDownloadProgressCallback *aProgressCallback, nsIMLModelDownloadCompletionCallback *aCompletionCallback, nsAString& _retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_cancelDownload)\
nsresult CancelDownload(const nsAString& aProgressToken); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIMLModelHub_getModelBlob)\
nsresult GetModelBlob(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFile, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMLMODELHUB(_to) \
NS_IMETHOD IsModelAvailable(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override { return _to IsModelAvailable(aEngineId, aModel, aRevision, aFilename, _retval); } \
NS_IMETHOD IsModelInstalled(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override { return _to IsModelInstalled(aEngineId, aModel, aRevision, aFilename, _retval); } \
NS_IMETHOD DownloadModel(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsTArray<nsCString >& aFiles, const nsAString& aProgressToken, nsIMLModelDownloadProgressCallback *aProgressCallback, nsIMLModelDownloadCompletionCallback *aCompletionCallback, nsAString& _retval) override { return _to DownloadModel(aEngineId, aTaskName, aModel, aRevision, aFiles, aProgressToken, aProgressCallback, aCompletionCallback, _retval); } \
NS_IMETHOD CancelDownload(const nsAString& aProgressToken) override { return _to CancelDownload(aProgressToken); } \
NS_IMETHOD GetModelBlob(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFile, ::mozilla::dom::Promise * * _retval) override { return _to GetModelBlob(aEngineId, aTaskName, aModel, aRevision, aFile, _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_NSIMLMODELHUB(_to) \
NS_IMETHOD IsModelAvailable(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsModelAvailable(aEngineId, aModel, aRevision, aFilename, _retval); } \
NS_IMETHOD IsModelInstalled(const nsACString& aEngineId, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFilename, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsModelInstalled(aEngineId, aModel, aRevision, aFilename, _retval); } \
NS_IMETHOD DownloadModel(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsTArray<nsCString >& aFiles, const nsAString& aProgressToken, nsIMLModelDownloadProgressCallback *aProgressCallback, nsIMLModelDownloadCompletionCallback *aCompletionCallback, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DownloadModel(aEngineId, aTaskName, aModel, aRevision, aFiles, aProgressToken, aProgressCallback, aCompletionCallback, _retval); } \
NS_IMETHOD CancelDownload(const nsAString& aProgressToken) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelDownload(aProgressToken); } \
NS_IMETHOD GetModelBlob(const nsACString& aEngineId, const nsACString& aTaskName, const nsACString& aModel, const nsACString& aRevision, const nsACString& aFile, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetModelBlob(aEngineId, aTaskName, aModel, aRevision, aFile, _retval); }
#endif /* __gen_nsIMLModelHub_h__ */