/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/netwerk/base/nsIIncrementalDownload.idl
 */

#ifndef __gen_nsIIncrementalDownload_h__
#define __gen_nsIIncrementalDownload_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 nsIURI; /* forward declaration */

class nsIFile; /* forward declaration */

class nsIRequestObserver; /* forward declaration */


/* starting interface:    nsIIncrementalDownload */
#define NS_IINCREMENTALDOWNLOAD_IID_STR "6687823f-56c4-461d-93a1-7f6cb7dfbfba"

#define NS_IINCREMENTALDOWNLOAD_IID \
  {0x6687823f, 0x56c4, 0x461d, \
    { 0x93, 0xa1, 0x7f, 0x6c, 0xb7, 0xdf, 0xbf, 0xba }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIIncrementalDownload) nsIIncrementalDownload : public nsIRequest {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IINCREMENTALDOWNLOAD_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsIIncrementalDownload;

  /* void init (in nsIURI uri, in nsIFile destination, in long chunkSize, in long intervalInSeconds, in ACString extraHeaders); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIIncrementalDownload_init)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Init(nsIURI *uri, nsIFile *destination, int32_t chunkSize, int32_t intervalInSeconds, const nsACString& extraHeaders) = 0;

  /* readonly attribute nsIURI URI; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_URI)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetURI(nsIURI **aURI) = 0;

  /* readonly attribute nsIURI finalURI; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_finalURI)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFinalURI(nsIURI **aFinalURI) = 0;

  /* readonly attribute nsIFile destination; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_destination)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDestination(nsIFile **aDestination) = 0;

  /* readonly attribute long long totalSize; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_totalSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTotalSize(int64_t *aTotalSize) = 0;

  /* readonly attribute long long currentSize; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_currentSize)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCurrentSize(int64_t *aCurrentSize) = 0;

  /* void start (in nsIRequestObserver observer, in nsISupports ctxt); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIIncrementalDownload_start)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Start(nsIRequestObserver *observer, nsISupports *ctxt) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIINCREMENTALDOWNLOAD \
  NS_IMETHOD Init(nsIURI *uri, nsIFile *destination, int32_t chunkSize, int32_t intervalInSeconds, const nsACString& extraHeaders) override; \
  NS_IMETHOD GetURI(nsIURI **aURI) override; \
  NS_IMETHOD GetFinalURI(nsIURI **aFinalURI) override; \
  NS_IMETHOD GetDestination(nsIFile **aDestination) override; \
  NS_IMETHOD GetTotalSize(int64_t *aTotalSize) override; \
  NS_IMETHOD GetCurrentSize(int64_t *aCurrentSize) override; \
  NS_IMETHOD Start(nsIRequestObserver *observer, nsISupports *ctxt) 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_NSIINCREMENTALDOWNLOAD \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIIncrementalDownload_init)\
  nsresult Init(nsIURI *uri, nsIFile *destination, int32_t chunkSize, int32_t intervalInSeconds, const nsACString& extraHeaders); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_URI)\
  nsresult GetURI(nsIURI **aURI); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_finalURI)\
  nsresult GetFinalURI(nsIURI **aFinalURI); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_destination)\
  nsresult GetDestination(nsIFile **aDestination); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_totalSize)\
  nsresult GetTotalSize(int64_t *aTotalSize); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIIncrementalDownload_currentSize)\
  nsresult GetCurrentSize(int64_t *aCurrentSize); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIIncrementalDownload_start)\
  nsresult Start(nsIRequestObserver *observer, nsISupports *ctxt); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIINCREMENTALDOWNLOAD(_to) \
  NS_IMETHOD Init(nsIURI *uri, nsIFile *destination, int32_t chunkSize, int32_t intervalInSeconds, const nsACString& extraHeaders) override { return _to Init(uri, destination, chunkSize, intervalInSeconds, extraHeaders); } \
  NS_IMETHOD GetURI(nsIURI **aURI) override { return _to GetURI(aURI); } \
  NS_IMETHOD GetFinalURI(nsIURI **aFinalURI) override { return _to GetFinalURI(aFinalURI); } \
  NS_IMETHOD GetDestination(nsIFile **aDestination) override { return _to GetDestination(aDestination); } \
  NS_IMETHOD GetTotalSize(int64_t *aTotalSize) override { return _to GetTotalSize(aTotalSize); } \
  NS_IMETHOD GetCurrentSize(int64_t *aCurrentSize) override { return _to GetCurrentSize(aCurrentSize); } \
  NS_IMETHOD Start(nsIRequestObserver *observer, nsISupports *ctxt) override { return _to Start(observer, ctxt); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIINCREMENTALDOWNLOAD(_to) \
  NS_IMETHOD Init(nsIURI *uri, nsIFile *destination, int32_t chunkSize, int32_t intervalInSeconds, const nsACString& extraHeaders) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(uri, destination, chunkSize, intervalInSeconds, extraHeaders); } \
  NS_IMETHOD GetURI(nsIURI **aURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURI(aURI); } \
  NS_IMETHOD GetFinalURI(nsIURI **aFinalURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFinalURI(aFinalURI); } \
  NS_IMETHOD GetDestination(nsIFile **aDestination) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDestination(aDestination); } \
  NS_IMETHOD GetTotalSize(int64_t *aTotalSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalSize(aTotalSize); } \
  NS_IMETHOD GetCurrentSize(int64_t *aCurrentSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentSize(aCurrentSize); } \
  NS_IMETHOD Start(nsIRequestObserver *observer, nsISupports *ctxt) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(observer, ctxt); } 


#endif /* __gen_nsIIncrementalDownload_h__ */
