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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/comm-central/storage/mozIStorageValueArray.idl
 */

#ifndef __gen_mozIStorageValueArray_h__
#define __gen_mozIStorageValueArray_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.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
#include "mozilla/DebugOnly.h"

/* starting interface:    mozIStorageValueArray */
#define MOZISTORAGEVALUEARRAY_IID_STR "6e6306f4-ffa7-40f5-96ca-36159ce8f431"

#define MOZISTORAGEVALUEARRAY_IID \
  {0x6e6306f4, 0xffa7, 0x40f5, \
    { 0x96, 0xca, 0x36, 0x15, 0x9c, 0xe8, 0xf4, 0x31 }}

class mozIStorageValueArray : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(MOZISTORAGEVALUEARRAY_IID)

  enum {
    VALUE_TYPE_NULL = 0,
    VALUE_TYPE_INTEGER = 1,
    VALUE_TYPE_FLOAT = 2,
    VALUE_TYPE_TEXT = 3,
    VALUE_TYPE_BLOB = 4
  };

  /* readonly attribute unsigned long numEntries; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNumEntries(uint32_t *aNumEntries) = 0;

  /* long getTypeOfIndex (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTypeOfIndex(uint32_t aIndex, int32_t *_retval) = 0;

  /* long getInt32 (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetInt32(uint32_t aIndex, int32_t *_retval) = 0;

  /* long long getInt64 (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetInt64(uint32_t aIndex, int64_t *_retval) = 0;

  /* double getDouble (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDouble(uint32_t aIndex, double *_retval) = 0;

  /* AUTF8String getUTF8String (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUTF8String(uint32_t aIndex, nsACString& _retval) = 0;

  /* AString getString (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetString(uint32_t aIndex, nsAString& _retval) = 0;

  /* void getBlob (in unsigned long aIndex, out unsigned long aDataSize, [array, size_is (aDataSize)] out octet aData); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBlob(uint32_t aIndex, uint32_t *aDataSize, uint8_t **aData) = 0;

  /* AString getBlobAsString (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBlobAsString(uint32_t aIndex, nsAString& _retval) = 0;

  /* AUTF8String getBlobAsUTF8String (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBlobAsUTF8String(uint32_t aIndex, nsACString& _retval) = 0;

  /* boolean getIsNull (in unsigned long aIndex); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIsNull(uint32_t aIndex, bool *_retval) = 0;

  /* [noscript] void getSharedUTF8String (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out string aResult); */
  NS_IMETHOD GetSharedUTF8String(uint32_t aIndex, uint32_t *aLength, const char * *aResult) = 0;

  /* [noscript] void getSharedString (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out wstring aResult); */
  NS_IMETHOD GetSharedString(uint32_t aIndex, uint32_t *aLength, const char16_t * *aResult) = 0;

  /* [noscript] void getSharedBlob (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out octetPtr aResult); */
  NS_IMETHOD GetSharedBlob(uint32_t aIndex, uint32_t *aLength, const uint8_t * * aResult) = 0;

   /**
   * Getters for native code that return their values as
   * the return type, for convenience and sanity.
   *
   * Not virtual; no vtable bloat.
   */
  inline int32_t AsInt32(uint32_t idx) {
    int32_t v = 0;
    mozilla::DebugOnly<nsresult> rv = GetInt32(idx, &v);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return v;
  }
  inline int64_t AsInt64(uint32_t idx) {
    int64_t v = 0;
    mozilla::DebugOnly<nsresult> rv = GetInt64(idx, &v);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return v;
  }
  inline double AsDouble(uint32_t idx) {
    double v = 0.0;
    mozilla::DebugOnly<nsresult> rv = GetDouble(idx, &v);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return v;
  }
  inline const char* AsSharedUTF8String(uint32_t idx, uint32_t *len) {
    const char *str = nullptr;
    *len = 0;
    mozilla::DebugOnly<nsresult> rv = GetSharedUTF8String(idx, len, &str);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return str;
  }
  inline const char16_t* AsSharedWString(uint32_t idx, uint32_t *len) {
    const char16_t *str = nullptr;
    *len = 0;
    mozilla::DebugOnly<nsresult> rv = GetSharedString(idx, len, &str);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return str;
  }
  inline const uint8_t* AsSharedBlob(uint32_t idx, uint32_t *len) {
    const uint8_t *blob = nullptr;
    *len = 0;
    mozilla::DebugOnly<nsresult> rv = GetSharedBlob(idx, len, &blob);
    MOZ_ASSERT(NS_SUCCEEDED(rv) || IsNull(idx),
               "Getting value failed, wrong column index?");
    return blob;
  }
  inline bool IsNull(uint32_t idx) {
    bool b = false;
    mozilla::DebugOnly<nsresult> rv = GetIsNull(idx, &b);
    MOZ_ASSERT(NS_SUCCEEDED(rv),
               "Getting value failed, wrong column index?");
    return b;
  }
};

  NS_DEFINE_STATIC_IID_ACCESSOR(mozIStorageValueArray, MOZISTORAGEVALUEARRAY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZISTORAGEVALUEARRAY \
  NS_IMETHOD GetNumEntries(uint32_t *aNumEntries) override; \
  NS_IMETHOD GetTypeOfIndex(uint32_t aIndex, int32_t *_retval) override; \
  NS_IMETHOD GetInt32(uint32_t aIndex, int32_t *_retval) override; \
  NS_IMETHOD GetInt64(uint32_t aIndex, int64_t *_retval) override; \
  NS_IMETHOD GetDouble(uint32_t aIndex, double *_retval) override; \
  NS_IMETHOD GetUTF8String(uint32_t aIndex, nsACString& _retval) override; \
  NS_IMETHOD GetString(uint32_t aIndex, nsAString& _retval) override; \
  NS_IMETHOD GetBlob(uint32_t aIndex, uint32_t *aDataSize, uint8_t **aData) override; \
  NS_IMETHOD GetBlobAsString(uint32_t aIndex, nsAString& _retval) override; \
  NS_IMETHOD GetBlobAsUTF8String(uint32_t aIndex, nsACString& _retval) override; \
  NS_IMETHOD GetIsNull(uint32_t aIndex, bool *_retval) override; \
  NS_IMETHOD GetSharedUTF8String(uint32_t aIndex, uint32_t *aLength, const char * *aResult) override; \
  NS_IMETHOD GetSharedString(uint32_t aIndex, uint32_t *aLength, const char16_t * *aResult) override; \
  NS_IMETHOD GetSharedBlob(uint32_t aIndex, uint32_t *aLength, const uint8_t * * aResult) 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_MOZISTORAGEVALUEARRAY \
  nsresult GetNumEntries(uint32_t *aNumEntries); \
  nsresult GetTypeOfIndex(uint32_t aIndex, int32_t *_retval); \
  nsresult GetInt32(uint32_t aIndex, int32_t *_retval); \
  nsresult GetInt64(uint32_t aIndex, int64_t *_retval); \
  nsresult GetDouble(uint32_t aIndex, double *_retval); \
  nsresult GetUTF8String(uint32_t aIndex, nsACString& _retval); \
  nsresult GetString(uint32_t aIndex, nsAString& _retval); \
  nsresult GetBlob(uint32_t aIndex, uint32_t *aDataSize, uint8_t **aData); \
  nsresult GetBlobAsString(uint32_t aIndex, nsAString& _retval); \
  nsresult GetBlobAsUTF8String(uint32_t aIndex, nsACString& _retval); \
  nsresult GetIsNull(uint32_t aIndex, bool *_retval); \
  nsresult GetSharedUTF8String(uint32_t aIndex, uint32_t *aLength, const char * *aResult); \
  nsresult GetSharedString(uint32_t aIndex, uint32_t *aLength, const char16_t * *aResult); \
  nsresult GetSharedBlob(uint32_t aIndex, uint32_t *aLength, const uint8_t * * aResult); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZISTORAGEVALUEARRAY(_to) \
  NS_IMETHOD GetNumEntries(uint32_t *aNumEntries) override { return _to GetNumEntries(aNumEntries); } \
  NS_IMETHOD GetTypeOfIndex(uint32_t aIndex, int32_t *_retval) override { return _to GetTypeOfIndex(aIndex, _retval); } \
  NS_IMETHOD GetInt32(uint32_t aIndex, int32_t *_retval) override { return _to GetInt32(aIndex, _retval); } \
  NS_IMETHOD GetInt64(uint32_t aIndex, int64_t *_retval) override { return _to GetInt64(aIndex, _retval); } \
  NS_IMETHOD GetDouble(uint32_t aIndex, double *_retval) override { return _to GetDouble(aIndex, _retval); } \
  NS_IMETHOD GetUTF8String(uint32_t aIndex, nsACString& _retval) override { return _to GetUTF8String(aIndex, _retval); } \
  NS_IMETHOD GetString(uint32_t aIndex, nsAString& _retval) override { return _to GetString(aIndex, _retval); } \
  NS_IMETHOD GetBlob(uint32_t aIndex, uint32_t *aDataSize, uint8_t **aData) override { return _to GetBlob(aIndex, aDataSize, aData); } \
  NS_IMETHOD GetBlobAsString(uint32_t aIndex, nsAString& _retval) override { return _to GetBlobAsString(aIndex, _retval); } \
  NS_IMETHOD GetBlobAsUTF8String(uint32_t aIndex, nsACString& _retval) override { return _to GetBlobAsUTF8String(aIndex, _retval); } \
  NS_IMETHOD GetIsNull(uint32_t aIndex, bool *_retval) override { return _to GetIsNull(aIndex, _retval); } \
  NS_IMETHOD GetSharedUTF8String(uint32_t aIndex, uint32_t *aLength, const char * *aResult) override { return _to GetSharedUTF8String(aIndex, aLength, aResult); } \
  NS_IMETHOD GetSharedString(uint32_t aIndex, uint32_t *aLength, const char16_t * *aResult) override { return _to GetSharedString(aIndex, aLength, aResult); } \
  NS_IMETHOD GetSharedBlob(uint32_t aIndex, uint32_t *aLength, const uint8_t * * aResult) override { return _to GetSharedBlob(aIndex, aLength, aResult); } \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZISTORAGEVALUEARRAY(_to) \
  NS_IMETHOD GetNumEntries(uint32_t *aNumEntries) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumEntries(aNumEntries); } \
  NS_IMETHOD GetTypeOfIndex(uint32_t aIndex, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeOfIndex(aIndex, _retval); } \
  NS_IMETHOD GetInt32(uint32_t aIndex, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInt32(aIndex, _retval); } \
  NS_IMETHOD GetInt64(uint32_t aIndex, int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInt64(aIndex, _retval); } \
  NS_IMETHOD GetDouble(uint32_t aIndex, double *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDouble(aIndex, _retval); } \
  NS_IMETHOD GetUTF8String(uint32_t aIndex, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUTF8String(aIndex, _retval); } \
  NS_IMETHOD GetString(uint32_t aIndex, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetString(aIndex, _retval); } \
  NS_IMETHOD GetBlob(uint32_t aIndex, uint32_t *aDataSize, uint8_t **aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBlob(aIndex, aDataSize, aData); } \
  NS_IMETHOD GetBlobAsString(uint32_t aIndex, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBlobAsString(aIndex, _retval); } \
  NS_IMETHOD GetBlobAsUTF8String(uint32_t aIndex, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBlobAsUTF8String(aIndex, _retval); } \
  NS_IMETHOD GetIsNull(uint32_t aIndex, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsNull(aIndex, _retval); } \
  NS_IMETHOD GetSharedUTF8String(uint32_t aIndex, uint32_t *aLength, const char * *aResult) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedUTF8String(aIndex, aLength, aResult); } \
  NS_IMETHOD GetSharedString(uint32_t aIndex, uint32_t *aLength, const char16_t * *aResult) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedString(aIndex, aLength, aResult); } \
  NS_IMETHOD GetSharedBlob(uint32_t aIndex, uint32_t *aLength, const uint8_t * * aResult) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedBlob(aIndex, aLength, aResult); } \


#endif /* __gen_mozIStorageValueArray_h__ */