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

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 154 155 156 157 158 159 160
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mozilla/xpcom/io/nsIBinaryOutputStream.idl
 */

#ifndef __gen_nsIBinaryOutputStream_h__
#define __gen_nsIBinaryOutputStream_h__


#ifndef __gen_nsIOutputStream_h__
#include "nsIOutputStream.h"
#endif

#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

/* starting interface:    nsIBinaryOutputStream */
#define NS_IBINARYOUTPUTSTREAM_IID_STR "204ee610-8765-11d3-90cf-0040056a906e"

#define NS_IBINARYOUTPUTSTREAM_IID \
  {0x204ee610, 0x8765, 0x11d3, \
    { 0x90, 0xcf, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e }}

class NS_NO_VTABLE nsIBinaryOutputStream : public nsIOutputStream {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBINARYOUTPUTSTREAM_IID)

  /* void setOutputStream (in nsIOutputStream aOutputStream); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetOutputStream(nsIOutputStream *aOutputStream) = 0;

  /* void writeBoolean (in boolean aBoolean); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteBoolean(bool aBoolean) = 0;

  /* void write8 (in uint8_t aByte); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Write8(uint8_t aByte) = 0;

  /* void write16 (in uint16_t a16); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Write16(uint16_t a16) = 0;

  /* void write32 (in uint32_t a32); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Write32(uint32_t a32) = 0;

  /* void write64 (in uint64_t a64); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Write64(uint64_t a64) = 0;

  /* void writeFloat (in float aFloat); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteFloat(float aFloat) = 0;

  /* void writeDouble (in double aDouble); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteDouble(double aDouble) = 0;

  /* void writeStringZ (in string aString); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteStringZ(const char * aString) = 0;

  /* void writeWStringZ (in wstring aString); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteWStringZ(const char16_t * aString) = 0;

  /* void writeUtf8Z (in wstring aString); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteUtf8Z(const char16_t * aString) = 0;

  /* void writeBytes ([size_is (aLength)] in string aString, [optional] in uint32_t aLength); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteBytes(const char * aString, uint32_t aLength) = 0;

  /* void writeByteArray ([array, size_is (aLength)] in uint8_t aBytes, [optional] in uint32_t aLength); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteByteArray(uint8_t *aBytes, uint32_t aLength) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIBinaryOutputStream, NS_IBINARYOUTPUTSTREAM_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBINARYOUTPUTSTREAM \
  NS_IMETHOD SetOutputStream(nsIOutputStream *aOutputStream) override; \
  NS_IMETHOD WriteBoolean(bool aBoolean) override; \
  NS_IMETHOD Write8(uint8_t aByte) override; \
  NS_IMETHOD Write16(uint16_t a16) override; \
  NS_IMETHOD Write32(uint32_t a32) override; \
  NS_IMETHOD Write64(uint64_t a64) override; \
  NS_IMETHOD WriteFloat(float aFloat) override; \
  NS_IMETHOD WriteDouble(double aDouble) override; \
  NS_IMETHOD WriteStringZ(const char * aString) override; \
  NS_IMETHOD WriteWStringZ(const char16_t * aString) override; \
  NS_IMETHOD WriteUtf8Z(const char16_t * aString) override; \
  NS_IMETHOD WriteBytes(const char * aString, uint32_t aLength) override; \
  NS_IMETHOD WriteByteArray(uint8_t *aBytes, uint32_t aLength) 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_NSIBINARYOUTPUTSTREAM \
  nsresult SetOutputStream(nsIOutputStream *aOutputStream); \
  nsresult WriteBoolean(bool aBoolean); \
  nsresult Write8(uint8_t aByte); \
  nsresult Write16(uint16_t a16); \
  nsresult Write32(uint32_t a32); \
  nsresult Write64(uint64_t a64); \
  nsresult WriteFloat(float aFloat); \
  nsresult WriteDouble(double aDouble); \
  nsresult WriteStringZ(const char * aString); \
  nsresult WriteWStringZ(const char16_t * aString); \
  nsresult WriteUtf8Z(const char16_t * aString); \
  nsresult WriteBytes(const char * aString, uint32_t aLength); \
  nsresult WriteByteArray(uint8_t *aBytes, uint32_t aLength); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBINARYOUTPUTSTREAM(_to) \
  NS_IMETHOD SetOutputStream(nsIOutputStream *aOutputStream) override { return _to SetOutputStream(aOutputStream); } \
  NS_IMETHOD WriteBoolean(bool aBoolean) override { return _to WriteBoolean(aBoolean); } \
  NS_IMETHOD Write8(uint8_t aByte) override { return _to Write8(aByte); } \
  NS_IMETHOD Write16(uint16_t a16) override { return _to Write16(a16); } \
  NS_IMETHOD Write32(uint32_t a32) override { return _to Write32(a32); } \
  NS_IMETHOD Write64(uint64_t a64) override { return _to Write64(a64); } \
  NS_IMETHOD WriteFloat(float aFloat) override { return _to WriteFloat(aFloat); } \
  NS_IMETHOD WriteDouble(double aDouble) override { return _to WriteDouble(aDouble); } \
  NS_IMETHOD WriteStringZ(const char * aString) override { return _to WriteStringZ(aString); } \
  NS_IMETHOD WriteWStringZ(const char16_t * aString) override { return _to WriteWStringZ(aString); } \
  NS_IMETHOD WriteUtf8Z(const char16_t * aString) override { return _to WriteUtf8Z(aString); } \
  NS_IMETHOD WriteBytes(const char * aString, uint32_t aLength) override { return _to WriteBytes(aString, aLength); } \
  NS_IMETHOD WriteByteArray(uint8_t *aBytes, uint32_t aLength) override { return _to WriteByteArray(aBytes, aLength); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBINARYOUTPUTSTREAM(_to) \
  NS_IMETHOD SetOutputStream(nsIOutputStream *aOutputStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOutputStream(aOutputStream); } \
  NS_IMETHOD WriteBoolean(bool aBoolean) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteBoolean(aBoolean); } \
  NS_IMETHOD Write8(uint8_t aByte) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write8(aByte); } \
  NS_IMETHOD Write16(uint16_t a16) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write16(a16); } \
  NS_IMETHOD Write32(uint32_t a32) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write32(a32); } \
  NS_IMETHOD Write64(uint64_t a64) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write64(a64); } \
  NS_IMETHOD WriteFloat(float aFloat) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFloat(aFloat); } \
  NS_IMETHOD WriteDouble(double aDouble) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteDouble(aDouble); } \
  NS_IMETHOD WriteStringZ(const char * aString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteStringZ(aString); } \
  NS_IMETHOD WriteWStringZ(const char16_t * aString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteWStringZ(aString); } \
  NS_IMETHOD WriteUtf8Z(const char16_t * aString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteUtf8Z(aString); } \
  NS_IMETHOD WriteBytes(const char * aString, uint32_t aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteBytes(aString, aLength); } \
  NS_IMETHOD WriteByteArray(uint8_t *aBytes, uint32_t aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteByteArray(aBytes, aLength); } 


inline nsresult
NS_WriteOptionalStringZ(nsIBinaryOutputStream* aStream, const char* aString)
{
    bool nonnull = (aString != nullptr);
    nsresult rv = aStream->WriteBoolean(nonnull);
    if (NS_SUCCEEDED(rv) && nonnull)
        rv = aStream->WriteStringZ(aString);
    return rv;
}
inline nsresult
NS_WriteOptionalWStringZ(nsIBinaryOutputStream* aStream, const char16_t* aString)
{
    bool nonnull = (aString != nullptr);
    nsresult rv = aStream->WriteBoolean(nonnull);
    if (NS_SUCCEEDED(rv) && nonnull)
        rv = aStream->WriteWStringZ(aString);
    return rv;
}

#endif /* __gen_nsIBinaryOutputStream_h__ */