DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

nsIGZFileWriter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIGZFileWriter.idl
 */

#ifndef __gen_nsIGZFileWriter_h__
#define __gen_nsIGZFileWriter_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include "nsDependentString.h"
#include <stdio.h>
class nsIFile; /* forward declaration */


/* starting interface:    nsIGZFileWriter */
#define NS_IGZFILEWRITER_IID_STR "6bd5642c-1b90-4499-ba4b-199f27efaba5"

#define NS_IGZFILEWRITER_IID \
  {0x6bd5642c, 0x1b90, 0x4499, \
    { 0xba, 0x4b, 0x19, 0x9f, 0x27, 0xef, 0xab, 0xa5 }}

class nsIGZFileWriter : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGZFILEWRITER_IID)

  /* [must_use] void init (in nsIFile file); */
  MOZ_MUST_USE NS_IMETHOD Init(nsIFile *file) = 0;

  /* [must_use,noscript] void initANSIFileDesc (in FILE file); */
  MOZ_MUST_USE NS_IMETHOD InitANSIFileDesc(FILE *file) = 0;

  /* [must_use] void write (in AUTF8String str); */
  MOZ_MUST_USE NS_IMETHOD Write(const nsACString & str) = 0;

   /**
   * Write the given char* to the file (not including the null-terminator).
   */
  MOZ_MUST_USE nsresult Write(const char* str)
  {
    return Write(str, strlen(str));
  }
  /**
   * Write |length| bytes of |str| to the file.
   */
  MOZ_MUST_USE nsresult Write(const char* str, uint32_t len)
  {
    return Write(nsDependentCString(str, len));
  }
    /* void finish (); */
  NS_IMETHOD Finish(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIGZFileWriter, NS_IGZFILEWRITER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIGZFILEWRITER \
  MOZ_MUST_USE NS_IMETHOD Init(nsIFile *file) override; \
  MOZ_MUST_USE NS_IMETHOD InitANSIFileDesc(FILE *file) override; \
  MOZ_MUST_USE NS_IMETHOD Write(const nsACString & str) override; \
  NS_IMETHOD Finish(void) 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_NSIGZFILEWRITER \
  MOZ_MUST_USE nsresult Init(nsIFile *file); \
  MOZ_MUST_USE nsresult InitANSIFileDesc(FILE *file); \
  MOZ_MUST_USE nsresult Write(const nsACString & str); \
  nsresult Finish(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIGZFILEWRITER(_to) \
  MOZ_MUST_USE NS_IMETHOD Init(nsIFile *file) override { return _to Init(file); } \
  MOZ_MUST_USE NS_IMETHOD InitANSIFileDesc(FILE *file) override { return _to InitANSIFileDesc(file); } \
  MOZ_MUST_USE NS_IMETHOD Write(const nsACString & str) override { return _to Write(str); } \
  NS_IMETHOD Finish(void) override { return _to Finish(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIGZFILEWRITER(_to) \
  MOZ_MUST_USE NS_IMETHOD Init(nsIFile *file) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file); } \
  MOZ_MUST_USE NS_IMETHOD InitANSIFileDesc(FILE *file) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitANSIFileDesc(file); } \
  MOZ_MUST_USE NS_IMETHOD Write(const nsACString & str) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(str); } \
  NS_IMETHOD Finish(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Finish(); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsGZFileWriter : public nsIGZFileWriter
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIGZFILEWRITER

  nsGZFileWriter();

private:
  ~nsGZFileWriter();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsGZFileWriter, nsIGZFileWriter)

nsGZFileWriter::nsGZFileWriter()
{
  /* member initializers and constructor code */
}

nsGZFileWriter::~nsGZFileWriter()
{
  /* destructor code */
}

/* [must_use] void init (in nsIFile file); */
MOZ_MUST_USE NS_IMETHODIMP nsGZFileWriter::Init(nsIFile *file)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [must_use,noscript] void initANSIFileDesc (in FILE file); */
MOZ_MUST_USE NS_IMETHODIMP nsGZFileWriter::InitANSIFileDesc(FILE *file)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [must_use] void write (in AUTF8String str); */
MOZ_MUST_USE NS_IMETHODIMP nsGZFileWriter::Write(const nsACString & str)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void finish (); */
NS_IMETHODIMP nsGZFileWriter::Finish()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIGZFileWriter_h__ */