/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/modules/libjar/zipwriter/nsIZipWriter.idl
 */

#ifndef __gen_nsIZipWriter_h__
#define __gen_nsIZipWriter_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
class nsIChannel; /* forward declaration */

class nsIInputStream; /* forward declaration */

class nsIRequestObserver; /* forward declaration */

class nsIFile; /* forward declaration */

class nsIZipEntry; /* forward declaration */


/* starting interface:    nsIZipWriter */
#define NS_IZIPWRITER_IID_STR "3ca10750-797e-4a22-bcfe-66170b5e96dd"

#define NS_IZIPWRITER_IID \
  {0x3ca10750, 0x797e, 0x4a22, \
    { 0xbc, 0xfe, 0x66, 0x17, 0x0b, 0x5e, 0x96, 0xdd }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIZipWriter) nsIZipWriter : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IZIPWRITER_IID)

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

  enum {
    COMPRESSION_NONE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIZipWriter_COMPRESSION_NONE) = 0U,
    COMPRESSION_FASTEST MOZ_BINDING(binding_to, idl, const, XPIDL_nsIZipWriter_COMPRESSION_FASTEST) = 1U,
    COMPRESSION_DEFAULT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIZipWriter_COMPRESSION_DEFAULT) = 6U,
    COMPRESSION_BEST MOZ_BINDING(binding_to, idl, const, XPIDL_nsIZipWriter_COMPRESSION_BEST) = 9U
  };

  /* attribute ACString comment; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_comment)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetComment(nsACString& aComment) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIZipWriter_comment)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetComment(const nsACString& aComment) = 0;

  /* readonly attribute boolean inQueue; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_inQueue)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetInQueue(bool *aInQueue) = 0;

  /* readonly attribute nsIFile file; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_file)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFile(nsIFile **aFile) = 0;

  /* void open (in nsIFile aFile, in int32_t aIoFlags); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_open)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Open(nsIFile *aFile, int32_t aIoFlags) = 0;

  /* nsIZipEntry getEntry (in AUTF8String aZipEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_getEntry)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEntry(const nsACString& aZipEntry, nsIZipEntry **_retval) = 0;

  /* boolean hasEntry (in AUTF8String aZipEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_hasEntry)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasEntry(const nsACString& aZipEntry, bool *_retval) = 0;

  /* void addEntryDirectory (in AUTF8String aZipEntry, in PRTime aModTime, in boolean aQueue); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryDirectory)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEntryDirectory(const nsACString& aZipEntry, PRTime aModTime, bool aQueue) = 0;

  /* void addEntryFile (in AUTF8String aZipEntry, in int32_t aCompression, in nsIFile aFile, in boolean aQueue); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryFile)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEntryFile(const nsACString& aZipEntry, int32_t aCompression, nsIFile *aFile, bool aQueue) = 0;

  /* void addEntryChannel (in AUTF8String aZipEntry, in PRTime aModTime, in int32_t aCompression, in nsIChannel aChannel, in boolean aQueue); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryChannel)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEntryChannel(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIChannel *aChannel, bool aQueue) = 0;

  /* void addEntryStream (in AUTF8String aZipEntry, in PRTime aModTime, in int32_t aCompression, in nsIInputStream aStream, in boolean aQueue); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryStream)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddEntryStream(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIInputStream *aStream, bool aQueue) = 0;

  /* void removeEntry (in AUTF8String aZipEntry, in boolean aQueue); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_removeEntry)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveEntry(const nsACString& aZipEntry, bool aQueue) = 0;

  /* void processQueue (in nsIRequestObserver aObserver, in nsISupports aContext); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_processQueue)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ProcessQueue(nsIRequestObserver *aObserver, nsISupports *aContext) = 0;

  /* void close (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_close)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Close(void) = 0;

  /* void alignStoredFiles (in uint16_t aAlignSize); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_alignStoredFiles)
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AlignStoredFiles(uint16_t aAlignSize) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIZIPWRITER \
  NS_IMETHOD GetComment(nsACString& aComment) override; \
  NS_IMETHOD SetComment(const nsACString& aComment) override; \
  NS_IMETHOD GetInQueue(bool *aInQueue) override; \
  NS_IMETHOD GetFile(nsIFile **aFile) override; \
  NS_IMETHOD Open(nsIFile *aFile, int32_t aIoFlags) override; \
  NS_IMETHOD GetEntry(const nsACString& aZipEntry, nsIZipEntry **_retval) override; \
  NS_IMETHOD HasEntry(const nsACString& aZipEntry, bool *_retval) override; \
  NS_IMETHOD AddEntryDirectory(const nsACString& aZipEntry, PRTime aModTime, bool aQueue) override; \
  NS_IMETHOD AddEntryFile(const nsACString& aZipEntry, int32_t aCompression, nsIFile *aFile, bool aQueue) override; \
  NS_IMETHOD AddEntryChannel(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIChannel *aChannel, bool aQueue) override; \
  NS_IMETHOD AddEntryStream(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIInputStream *aStream, bool aQueue) override; \
  NS_IMETHOD RemoveEntry(const nsACString& aZipEntry, bool aQueue) override; \
  NS_IMETHOD ProcessQueue(nsIRequestObserver *aObserver, nsISupports *aContext) override; \
  NS_IMETHOD Close(void) override; \
  NS_IMETHOD AlignStoredFiles(uint16_t aAlignSize) 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_NSIZIPWRITER \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_comment)\
  nsresult GetComment(nsACString& aComment); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIZipWriter_comment)\
  nsresult SetComment(const nsACString& aComment); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_inQueue)\
  nsresult GetInQueue(bool *aInQueue); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIZipWriter_file)\
  nsresult GetFile(nsIFile **aFile); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_open)\
  nsresult Open(nsIFile *aFile, int32_t aIoFlags); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_getEntry)\
  nsresult GetEntry(const nsACString& aZipEntry, nsIZipEntry **_retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_hasEntry)\
  nsresult HasEntry(const nsACString& aZipEntry, bool *_retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryDirectory)\
  nsresult AddEntryDirectory(const nsACString& aZipEntry, PRTime aModTime, bool aQueue); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryFile)\
  nsresult AddEntryFile(const nsACString& aZipEntry, int32_t aCompression, nsIFile *aFile, bool aQueue); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryChannel)\
  nsresult AddEntryChannel(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIChannel *aChannel, bool aQueue); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_addEntryStream)\
  nsresult AddEntryStream(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIInputStream *aStream, bool aQueue); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_removeEntry)\
  nsresult RemoveEntry(const nsACString& aZipEntry, bool aQueue); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_processQueue)\
  nsresult ProcessQueue(nsIRequestObserver *aObserver, nsISupports *aContext); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_close)\
  nsresult Close(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIZipWriter_alignStoredFiles)\
  nsresult AlignStoredFiles(uint16_t aAlignSize); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIZIPWRITER(_to) \
  NS_IMETHOD GetComment(nsACString& aComment) override { return _to GetComment(aComment); } \
  NS_IMETHOD SetComment(const nsACString& aComment) override { return _to SetComment(aComment); } \
  NS_IMETHOD GetInQueue(bool *aInQueue) override { return _to GetInQueue(aInQueue); } \
  NS_IMETHOD GetFile(nsIFile **aFile) override { return _to GetFile(aFile); } \
  NS_IMETHOD Open(nsIFile *aFile, int32_t aIoFlags) override { return _to Open(aFile, aIoFlags); } \
  NS_IMETHOD GetEntry(const nsACString& aZipEntry, nsIZipEntry **_retval) override { return _to GetEntry(aZipEntry, _retval); } \
  NS_IMETHOD HasEntry(const nsACString& aZipEntry, bool *_retval) override { return _to HasEntry(aZipEntry, _retval); } \
  NS_IMETHOD AddEntryDirectory(const nsACString& aZipEntry, PRTime aModTime, bool aQueue) override { return _to AddEntryDirectory(aZipEntry, aModTime, aQueue); } \
  NS_IMETHOD AddEntryFile(const nsACString& aZipEntry, int32_t aCompression, nsIFile *aFile, bool aQueue) override { return _to AddEntryFile(aZipEntry, aCompression, aFile, aQueue); } \
  NS_IMETHOD AddEntryChannel(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIChannel *aChannel, bool aQueue) override { return _to AddEntryChannel(aZipEntry, aModTime, aCompression, aChannel, aQueue); } \
  NS_IMETHOD AddEntryStream(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIInputStream *aStream, bool aQueue) override { return _to AddEntryStream(aZipEntry, aModTime, aCompression, aStream, aQueue); } \
  NS_IMETHOD RemoveEntry(const nsACString& aZipEntry, bool aQueue) override { return _to RemoveEntry(aZipEntry, aQueue); } \
  NS_IMETHOD ProcessQueue(nsIRequestObserver *aObserver, nsISupports *aContext) override { return _to ProcessQueue(aObserver, aContext); } \
  NS_IMETHOD Close(void) override { return _to Close(); } \
  NS_IMETHOD AlignStoredFiles(uint16_t aAlignSize) override { return _to AlignStoredFiles(aAlignSize); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIZIPWRITER(_to) \
  NS_IMETHOD GetComment(nsACString& aComment) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComment(aComment); } \
  NS_IMETHOD SetComment(const nsACString& aComment) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetComment(aComment); } \
  NS_IMETHOD GetInQueue(bool *aInQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInQueue(aInQueue); } \
  NS_IMETHOD GetFile(nsIFile **aFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  NS_IMETHOD Open(nsIFile *aFile, int32_t aIoFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(aFile, aIoFlags); } \
  NS_IMETHOD GetEntry(const nsACString& aZipEntry, nsIZipEntry **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntry(aZipEntry, _retval); } \
  NS_IMETHOD HasEntry(const nsACString& aZipEntry, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasEntry(aZipEntry, _retval); } \
  NS_IMETHOD AddEntryDirectory(const nsACString& aZipEntry, PRTime aModTime, bool aQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntryDirectory(aZipEntry, aModTime, aQueue); } \
  NS_IMETHOD AddEntryFile(const nsACString& aZipEntry, int32_t aCompression, nsIFile *aFile, bool aQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntryFile(aZipEntry, aCompression, aFile, aQueue); } \
  NS_IMETHOD AddEntryChannel(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIChannel *aChannel, bool aQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntryChannel(aZipEntry, aModTime, aCompression, aChannel, aQueue); } \
  NS_IMETHOD AddEntryStream(const nsACString& aZipEntry, PRTime aModTime, int32_t aCompression, nsIInputStream *aStream, bool aQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntryStream(aZipEntry, aModTime, aCompression, aStream, aQueue); } \
  NS_IMETHOD RemoveEntry(const nsACString& aZipEntry, bool aQueue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEntry(aZipEntry, aQueue); } \
  NS_IMETHOD ProcessQueue(nsIRequestObserver *aObserver, nsISupports *aContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessQueue(aObserver, aContext); } \
  NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  NS_IMETHOD AlignStoredFiles(uint16_t aAlignSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AlignStoredFiles(aAlignSize); } 


#endif /* __gen_nsIZipWriter_h__ */
