Generated file

Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/bitsdownload/nsIBits.idl
*/
#ifndef __gen_nsIBits_h__
#define __gen_nsIBits_h__
#include "nsIRequest.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 nsIRequest; /* forward declaration */
class nsIRequestObserver; /* forward declaration */
class nsIBitsRequest; /* forward declaration */
class nsIBitsNewRequestCallback; /* forward declaration */
class nsIBitsCallback; /* forward declaration */
typedef int32_t nsProxyUsage;
typedef int32_t nsBitsErrorType;
typedef int32_t nsBitsErrorAction;
typedef int32_t nsBitsErrorStage;
/* starting interface: nsIBits */
#define NS_IBITS_IID_STR "495d6f3d-9748-4d30-8ce5-0290c0001edf"
#define NS_IBITS_IID \
{0x495d6f3d, 0x9748, 0x4d30, \
{ 0x8c, 0xe5, 0x02, 0x90, 0xc0, 0x00, 0x1e, 0xdf }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIBits) nsIBits : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IBITS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBits;
enum {
ERROR_TYPE_SUCCESS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_SUCCESS) = 0,
ERROR_TYPE_UNKNOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_UNKNOWN) = 1,
ERROR_TYPE_METHOD_THREW MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_METHOD_THREW) = 2,
ERROR_TYPE_METHOD_TIMEOUT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_METHOD_TIMEOUT) = 3,
ERROR_TYPE_NULL_ARGUMENT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_NULL_ARGUMENT) = 4,
ERROR_TYPE_INVALID_ARGUMENT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_INVALID_ARGUMENT) = 5,
ERROR_TYPE_NOT_INITIALIZED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_NOT_INITIALIZED) = 6,
ERROR_TYPE_NO_UTF8_CONVERSION MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_NO_UTF8_CONVERSION) = 7,
ERROR_TYPE_INVALID_GUID MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_INVALID_GUID) = 8,
ERROR_TYPE_PIPE_NOT_CONNECTED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_PIPE_NOT_CONNECTED) = 9,
ERROR_TYPE_PIPE_TIMEOUT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_PIPE_TIMEOUT) = 10,
ERROR_TYPE_PIPE_BAD_WRITE_COUNT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_PIPE_BAD_WRITE_COUNT) = 11,
ERROR_TYPE_PIPE_API_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_PIPE_API_ERROR) = 12,
ERROR_TYPE_FAILED_TO_CREATE_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_CREATE_BITS_JOB) = 13,
ERROR_TYPE_FAILED_TO_ADD_FILE_TO_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_ADD_FILE_TO_JOB) = 14,
ERROR_TYPE_FAILED_TO_APPLY_BITS_JOB_SETTINGS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_APPLY_BITS_JOB_SETTINGS) = 15,
ERROR_TYPE_FAILED_TO_RESUME_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_RESUME_BITS_JOB) = 16,
ERROR_TYPE_OTHER_BITS_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_OTHER_BITS_ERROR) = 17,
ERROR_TYPE_OTHER_BITS_CLIENT_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_OTHER_BITS_CLIENT_ERROR) = 18,
ERROR_TYPE_BITS_JOB_NOT_FOUND MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_JOB_NOT_FOUND) = 19,
ERROR_TYPE_FAILED_TO_GET_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_GET_BITS_JOB) = 20,
ERROR_TYPE_FAILED_TO_SUSPEND_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_SUSPEND_BITS_JOB) = 21,
ERROR_TYPE_FAILED_TO_COMPLETE_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_COMPLETE_BITS_JOB) = 22,
ERROR_TYPE_PARTIALLY_COMPLETED_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_PARTIALLY_COMPLETED_BITS_JOB) = 23,
ERROR_TYPE_FAILED_TO_CANCEL_BITS_JOB MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_CANCEL_BITS_JOB) = 24,
ERROR_TYPE_MISSING_RESULT_DATA MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_RESULT_DATA) = 25,
ERROR_TYPE_MISSING_CALLBACK MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_CALLBACK) = 26,
ERROR_TYPE_CALLBACK_ON_WRONG_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_CALLBACK_ON_WRONG_THREAD) = 27,
ERROR_TYPE_MISSING_BITS_SERVICE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_BITS_SERVICE) = 28,
ERROR_TYPE_BITS_SERVICE_ON_WRONG_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_SERVICE_ON_WRONG_THREAD) = 29,
ERROR_TYPE_MISSING_BITS_REQUEST MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_BITS_REQUEST) = 30,
ERROR_TYPE_BITS_REQUEST_ON_WRONG_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_REQUEST_ON_WRONG_THREAD) = 31,
ERROR_TYPE_MISSING_OBSERVER MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_OBSERVER) = 32,
ERROR_TYPE_OBSERVER_ON_WRONG_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_OBSERVER_ON_WRONG_THREAD) = 33,
ERROR_TYPE_MISSING_CONTEXT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_CONTEXT) = 34,
ERROR_TYPE_CONTEXT_ON_WRONG_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_CONTEXT_ON_WRONG_THREAD) = 35,
ERROR_TYPE_FAILED_TO_START_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_START_THREAD) = 36,
ERROR_TYPE_FAILED_TO_CONSTRUCT_TASK_RUNNABLE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_CONSTRUCT_TASK_RUNNABLE) = 37,
ERROR_TYPE_FAILED_TO_DISPATCH_RUNNABLE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_DISPATCH_RUNNABLE) = 38,
ERROR_TYPE_TRANSFER_ALREADY_COMPLETE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_TRANSFER_ALREADY_COMPLETE) = 39,
ERROR_TYPE_OPERATION_ALREADY_IN_PROGRESS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_OPERATION_ALREADY_IN_PROGRESS) = 40,
ERROR_TYPE_MISSING_BITS_CLIENT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_MISSING_BITS_CLIENT) = 41,
ERROR_TYPE_FAILED_TO_GET_JOB_STATUS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_GET_JOB_STATUS) = 42,
ERROR_TYPE_BITS_STATE_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_STATE_ERROR) = 43,
ERROR_TYPE_BITS_STATE_TRANSIENT_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_STATE_TRANSIENT_ERROR) = 44,
ERROR_TYPE_BITS_STATE_CANCELLED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_STATE_CANCELLED) = 45,
ERROR_TYPE_BITS_STATE_UNEXPECTED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BITS_STATE_UNEXPECTED) = 46,
ERROR_TYPE_VERIFICATION_FAILURE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_VERIFICATION_FAILURE) = 47,
ERROR_TYPE_ACCESS_DENIED_EXPECTED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_ACCESS_DENIED_EXPECTED) = 48,
ERROR_TYPE_FAILED_TO_CONNECT_TO_BCM MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_FAILED_TO_CONNECT_TO_BCM) = 49,
ERROR_TYPE_USE_AFTER_REQUEST_SHUTDOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_USE_AFTER_REQUEST_SHUTDOWN) = 50,
ERROR_TYPE_BROWSER_SHUTTING_DOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_TYPE_BROWSER_SHUTTING_DOWN) = 51,
ERROR_ACTION_UNKNOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_UNKNOWN) = 1,
ERROR_ACTION_NONE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_NONE) = 2,
ERROR_ACTION_START_DOWNLOAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_START_DOWNLOAD) = 3,
ERROR_ACTION_MONITOR_DOWNLOAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_MONITOR_DOWNLOAD) = 4,
ERROR_ACTION_CHANGE_MONITOR_INTERVAL MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_CHANGE_MONITOR_INTERVAL) = 5,
ERROR_ACTION_CANCEL MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_CANCEL) = 6,
ERROR_ACTION_SET_PRIORITY MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_SET_PRIORITY) = 7,
ERROR_ACTION_COMPLETE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_COMPLETE) = 8,
ERROR_ACTION_SUSPEND MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_SUSPEND) = 9,
ERROR_ACTION_RESUME MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_RESUME) = 10,
ERROR_ACTION_SET_NO_PROGRESS_TIMEOUT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_ACTION_SET_NO_PROGRESS_TIMEOUT) = 11,
ERROR_STAGE_UNKNOWN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_UNKNOWN) = 1,
ERROR_STAGE_PRETASK MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_PRETASK) = 2,
ERROR_STAGE_COMMAND_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_COMMAND_THREAD) = 3,
ERROR_STAGE_AGENT_COMMUNICATION MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_AGENT_COMMUNICATION) = 4,
ERROR_STAGE_BITS_CLIENT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_BITS_CLIENT) = 5,
ERROR_STAGE_MAIN_THREAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_MAIN_THREAD) = 6,
ERROR_STAGE_MONITOR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_MONITOR) = 7,
ERROR_STAGE_VERIFICATION MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_STAGE_VERIFICATION) = 8,
ERROR_CODE_TYPE_NONE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_CODE_TYPE_NONE) = 1,
ERROR_CODE_TYPE_NSRESULT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_CODE_TYPE_NSRESULT) = 2,
ERROR_CODE_TYPE_HRESULT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_CODE_TYPE_HRESULT) = 3,
ERROR_CODE_TYPE_STRING MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_CODE_TYPE_STRING) = 4,
ERROR_CODE_TYPE_EXCEPTION MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_ERROR_CODE_TYPE_EXCEPTION) = 5
};
/* readonly attribute boolean initialized; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBits_initialized)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetInitialized(bool *aInitialized) = 0;
/* void init (in AUTF8String jobName, in AUTF8String savePathPrefix, in unsigned long monitorTimeoutMs); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_init)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Init(const nsACString& jobName, const nsACString& savePathPrefix, uint32_t monitorTimeoutMs) = 0;
/* void startDownload (in AUTF8String downloadURL, in AUTF8String saveRelativePath, in nsProxyUsage proxy, in unsigned long noProgressTimeoutSecs, in unsigned long monitorIntervalMs, in AUTF8String customHeaders, in nsIRequestObserver observer, in nsISupports context, in nsIBitsNewRequestCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_startDownload)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StartDownload(const nsACString& downloadURL, const nsACString& saveRelativePath, nsProxyUsage proxy, uint32_t noProgressTimeoutSecs, uint32_t monitorIntervalMs, const nsACString& customHeaders, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) = 0;
enum {
PROXY_NONE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_PROXY_NONE) = 1,
PROXY_PRECONFIG MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_PROXY_PRECONFIG) = 2,
PROXY_AUTODETECT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBits_PROXY_AUTODETECT) = 3
};
/* void monitorDownload (in AUTF8String id, in unsigned long monitorIntervalMs, in nsIRequestObserver observer, in nsISupports context, in nsIBitsNewRequestCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_monitorDownload)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MonitorDownload(const nsACString& id, uint32_t monitorIntervalMs, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBITS \
NS_IMETHOD GetInitialized(bool *aInitialized) override; \
NS_IMETHOD Init(const nsACString& jobName, const nsACString& savePathPrefix, uint32_t monitorTimeoutMs) override; \
NS_IMETHOD StartDownload(const nsACString& downloadURL, const nsACString& saveRelativePath, nsProxyUsage proxy, uint32_t noProgressTimeoutSecs, uint32_t monitorIntervalMs, const nsACString& customHeaders, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) override; \
NS_IMETHOD MonitorDownload(const nsACString& id, uint32_t monitorIntervalMs, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) 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_NSIBITS \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBits_initialized)\
nsresult GetInitialized(bool *aInitialized); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_init)\
nsresult Init(const nsACString& jobName, const nsACString& savePathPrefix, uint32_t monitorTimeoutMs); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_startDownload)\
nsresult StartDownload(const nsACString& downloadURL, const nsACString& saveRelativePath, nsProxyUsage proxy, uint32_t noProgressTimeoutSecs, uint32_t monitorIntervalMs, const nsACString& customHeaders, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBits_monitorDownload)\
nsresult MonitorDownload(const nsACString& id, uint32_t monitorIntervalMs, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBITS(_to) \
NS_IMETHOD GetInitialized(bool *aInitialized) override { return _to GetInitialized(aInitialized); } \
NS_IMETHOD Init(const nsACString& jobName, const nsACString& savePathPrefix, uint32_t monitorTimeoutMs) override { return _to Init(jobName, savePathPrefix, monitorTimeoutMs); } \
NS_IMETHOD StartDownload(const nsACString& downloadURL, const nsACString& saveRelativePath, nsProxyUsage proxy, uint32_t noProgressTimeoutSecs, uint32_t monitorIntervalMs, const nsACString& customHeaders, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) override { return _to StartDownload(downloadURL, saveRelativePath, proxy, noProgressTimeoutSecs, monitorIntervalMs, customHeaders, observer, context, callback); } \
NS_IMETHOD MonitorDownload(const nsACString& id, uint32_t monitorIntervalMs, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) override { return _to MonitorDownload(id, monitorIntervalMs, observer, context, callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBITS(_to) \
NS_IMETHOD GetInitialized(bool *aInitialized) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInitialized(aInitialized); } \
NS_IMETHOD Init(const nsACString& jobName, const nsACString& savePathPrefix, uint32_t monitorTimeoutMs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(jobName, savePathPrefix, monitorTimeoutMs); } \
NS_IMETHOD StartDownload(const nsACString& downloadURL, const nsACString& saveRelativePath, nsProxyUsage proxy, uint32_t noProgressTimeoutSecs, uint32_t monitorIntervalMs, const nsACString& customHeaders, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDownload(downloadURL, saveRelativePath, proxy, noProgressTimeoutSecs, monitorIntervalMs, customHeaders, observer, context, callback); } \
NS_IMETHOD MonitorDownload(const nsACString& id, uint32_t monitorIntervalMs, nsIRequestObserver *observer, nsISupports *context, nsIBitsNewRequestCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MonitorDownload(id, monitorIntervalMs, observer, context, callback); }
/* starting interface: nsIBitsNewRequestCallback */
#define NS_IBITSNEWREQUESTCALLBACK_IID_STR "aa12e433-5b9f-452d-b5c9-840a9541328b"
#define NS_IBITSNEWREQUESTCALLBACK_IID \
{0xaa12e433, 0x5b9f, 0x452d, \
{ 0xb5, 0xc9, 0x84, 0x0a, 0x95, 0x41, 0x32, 0x8b }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIBitsNewRequestCallback) nsIBitsNewRequestCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IBITSNEWREQUESTCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBitsNewRequestCallback;
/* void success (in nsIBitsRequest request); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_success)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Success(nsIBitsRequest *request) = 0;
/* void failure (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failure)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) = 0;
/* void failureNsresult (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in nsresult errorCode); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureNsresult)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) = 0;
/* void failureHresult (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in long errorCode); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureHresult)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) = 0;
/* void failureString (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in AUTF8String errorMessage); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureString)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBITSNEWREQUESTCALLBACK \
NS_IMETHOD Success(nsIBitsRequest *request) override; \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override; \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override; \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override; \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) 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_NSIBITSNEWREQUESTCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_success)\
nsresult Success(nsIBitsRequest *request); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failure)\
nsresult Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureNsresult)\
nsresult FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureHresult)\
nsresult FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsNewRequestCallback_failureString)\
nsresult FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBITSNEWREQUESTCALLBACK(_to) \
NS_IMETHOD Success(nsIBitsRequest *request) override { return _to Success(request); } \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override { return _to Failure(errorType, errorAction, errorStage); } \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override { return _to FailureNsresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override { return _to FailureHresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) override { return _to FailureString(errorType, errorAction, errorStage, errorMessage); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBITSNEWREQUESTCALLBACK(_to) \
NS_IMETHOD Success(nsIBitsRequest *request) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Success(request); } \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Failure(errorType, errorAction, errorStage); } \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureNsresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureHresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureString(errorType, errorAction, errorStage, errorMessage); }
/* starting interface: nsIBitsRequest */
#define NS_IBITSREQUEST_IID_STR "ab9da0e9-06bf-4e73-bb1b-c0f2ea9ecc3e"
#define NS_IBITSREQUEST_IID \
{0xab9da0e9, 0x06bf, 0x4e73, \
{ 0xbb, 0x1b, 0xc0, 0xf2, 0xea, 0x9e, 0xcc, 0x3e }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIBitsRequest) nsIBitsRequest : public nsIRequest {
public:
NS_INLINE_DECL_STATIC_IID(NS_IBITSREQUEST_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBitsRequest;
/* readonly attribute AUTF8String bitsId; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_bitsId)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBitsId(nsACString& aBitsId) = 0;
/* readonly attribute nsBitsErrorType transferError; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_transferError)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTransferError(nsBitsErrorType *aTransferError) = 0;
/* readonly attribute long transferErrorCode; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_transferErrorCode)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTransferErrorCode(int32_t *aTransferErrorCode) = 0;
/* void changeMonitorInterval (in unsigned long monitorIntervalMs, in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_changeMonitorInterval)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ChangeMonitorInterval(uint32_t monitorIntervalMs, nsIBitsCallback *callback) = 0;
/* void cancelAsync (in nsresult status, in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_cancelAsync)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CancelAsync(nsresult status, nsIBitsCallback *callback) = 0;
/* void setPriorityHigh (in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setPriorityHigh)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPriorityHigh(nsIBitsCallback *callback) = 0;
/* void setPriorityLow (in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setPriorityLow)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPriorityLow(nsIBitsCallback *callback) = 0;
/* void setNoProgressTimeout (in unsigned long timeoutSecs, in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setNoProgressTimeout)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetNoProgressTimeout(uint32_t timeoutSecs, nsIBitsCallback *callback) = 0;
/* void complete (in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_complete)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Complete(nsIBitsCallback *callback) = 0;
/* void suspendAsync (in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_suspendAsync)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SuspendAsync(nsIBitsCallback *callback) = 0;
/* void resumeAsync (in nsIBitsCallback callback); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_resumeAsync)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResumeAsync(nsIBitsCallback *callback) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBITSREQUEST \
NS_IMETHOD GetBitsId(nsACString& aBitsId) override; \
NS_IMETHOD GetTransferError(nsBitsErrorType *aTransferError) override; \
NS_IMETHOD GetTransferErrorCode(int32_t *aTransferErrorCode) override; \
NS_IMETHOD ChangeMonitorInterval(uint32_t monitorIntervalMs, nsIBitsCallback *callback) override; \
NS_IMETHOD CancelAsync(nsresult status, nsIBitsCallback *callback) override; \
NS_IMETHOD SetPriorityHigh(nsIBitsCallback *callback) override; \
NS_IMETHOD SetPriorityLow(nsIBitsCallback *callback) override; \
NS_IMETHOD SetNoProgressTimeout(uint32_t timeoutSecs, nsIBitsCallback *callback) override; \
NS_IMETHOD Complete(nsIBitsCallback *callback) override; \
NS_IMETHOD SuspendAsync(nsIBitsCallback *callback) override; \
NS_IMETHOD ResumeAsync(nsIBitsCallback *callback) 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_NSIBITSREQUEST \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_bitsId)\
nsresult GetBitsId(nsACString& aBitsId); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_transferError)\
nsresult GetTransferError(nsBitsErrorType *aTransferError); \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBitsRequest_transferErrorCode)\
nsresult GetTransferErrorCode(int32_t *aTransferErrorCode); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_changeMonitorInterval)\
nsresult ChangeMonitorInterval(uint32_t monitorIntervalMs, nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_cancelAsync)\
nsresult CancelAsync(nsresult status, nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setPriorityHigh)\
nsresult SetPriorityHigh(nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setPriorityLow)\
nsresult SetPriorityLow(nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_setNoProgressTimeout)\
nsresult SetNoProgressTimeout(uint32_t timeoutSecs, nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_complete)\
nsresult Complete(nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_suspendAsync)\
nsresult SuspendAsync(nsIBitsCallback *callback); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsRequest_resumeAsync)\
nsresult ResumeAsync(nsIBitsCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBITSREQUEST(_to) \
NS_IMETHOD GetBitsId(nsACString& aBitsId) override { return _to GetBitsId(aBitsId); } \
NS_IMETHOD GetTransferError(nsBitsErrorType *aTransferError) override { return _to GetTransferError(aTransferError); } \
NS_IMETHOD GetTransferErrorCode(int32_t *aTransferErrorCode) override { return _to GetTransferErrorCode(aTransferErrorCode); } \
NS_IMETHOD ChangeMonitorInterval(uint32_t monitorIntervalMs, nsIBitsCallback *callback) override { return _to ChangeMonitorInterval(monitorIntervalMs, callback); } \
NS_IMETHOD CancelAsync(nsresult status, nsIBitsCallback *callback) override { return _to CancelAsync(status, callback); } \
NS_IMETHOD SetPriorityHigh(nsIBitsCallback *callback) override { return _to SetPriorityHigh(callback); } \
NS_IMETHOD SetPriorityLow(nsIBitsCallback *callback) override { return _to SetPriorityLow(callback); } \
NS_IMETHOD SetNoProgressTimeout(uint32_t timeoutSecs, nsIBitsCallback *callback) override { return _to SetNoProgressTimeout(timeoutSecs, callback); } \
NS_IMETHOD Complete(nsIBitsCallback *callback) override { return _to Complete(callback); } \
NS_IMETHOD SuspendAsync(nsIBitsCallback *callback) override { return _to SuspendAsync(callback); } \
NS_IMETHOD ResumeAsync(nsIBitsCallback *callback) override { return _to ResumeAsync(callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBITSREQUEST(_to) \
NS_IMETHOD GetBitsId(nsACString& aBitsId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBitsId(aBitsId); } \
NS_IMETHOD GetTransferError(nsBitsErrorType *aTransferError) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransferError(aTransferError); } \
NS_IMETHOD GetTransferErrorCode(int32_t *aTransferErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransferErrorCode(aTransferErrorCode); } \
NS_IMETHOD ChangeMonitorInterval(uint32_t monitorIntervalMs, nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChangeMonitorInterval(monitorIntervalMs, callback); } \
NS_IMETHOD CancelAsync(nsresult status, nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelAsync(status, callback); } \
NS_IMETHOD SetPriorityHigh(nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPriorityHigh(callback); } \
NS_IMETHOD SetPriorityLow(nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPriorityLow(callback); } \
NS_IMETHOD SetNoProgressTimeout(uint32_t timeoutSecs, nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNoProgressTimeout(timeoutSecs, callback); } \
NS_IMETHOD Complete(nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Complete(callback); } \
NS_IMETHOD SuspendAsync(nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SuspendAsync(callback); } \
NS_IMETHOD ResumeAsync(nsIBitsCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeAsync(callback); }
/* starting interface: nsIBitsCallback */
#define NS_IBITSCALLBACK_IID_STR "ea657e66-6bad-4e41-84d9-c6d107e9799d"
#define NS_IBITSCALLBACK_IID \
{0xea657e66, 0x6bad, 0x4e41, \
{ 0x84, 0xd9, 0xc6, 0xd1, 0x07, 0xe9, 0x79, 0x9d }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIBitsCallback) nsIBitsCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IBITSCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBitsCallback;
/* void success (); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_success)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Success(void) = 0;
/* void failure (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failure)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) = 0;
/* void failureNsresult (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in nsresult errorCode); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureNsresult)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) = 0;
/* void failureHresult (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in long errorCode); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureHresult)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) = 0;
/* void failureString (in nsBitsErrorType errorType, in nsBitsErrorAction errorAction, in nsBitsErrorStage errorStage, in AUTF8String errorMessage); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureString)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBITSCALLBACK \
NS_IMETHOD Success(void) override; \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override; \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override; \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override; \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) 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_NSIBITSCALLBACK \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_success)\
nsresult Success(void); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failure)\
nsresult Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureNsresult)\
nsresult FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureHresult)\
nsresult FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBitsCallback_failureString)\
nsresult FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBITSCALLBACK(_to) \
NS_IMETHOD Success(void) override { return _to Success(); } \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override { return _to Failure(errorType, errorAction, errorStage); } \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override { return _to FailureNsresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override { return _to FailureHresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) override { return _to FailureString(errorType, errorAction, errorStage, errorMessage); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBITSCALLBACK(_to) \
NS_IMETHOD Success(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Success(); } \
NS_IMETHOD Failure(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Failure(errorType, errorAction, errorStage); } \
NS_IMETHOD FailureNsresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, nsresult errorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureNsresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureHresult(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, int32_t errorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureHresult(errorType, errorAction, errorStage, errorCode); } \
NS_IMETHOD FailureString(nsBitsErrorType errorType, nsBitsErrorAction errorAction, nsBitsErrorStage errorStage, const nsACString& errorMessage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FailureString(errorType, errorAction, errorStage, errorMessage); }
#endif /* __gen_nsIBits_h__ */