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

msgIStructuredHeaders

msgIWritableStructuredHeaders

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 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 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/msgIStructuredHeaders.idl
 */

#ifndef __gen_msgIStructuredHeaders_h__
#define __gen_msgIStructuredHeaders_h__


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

#include "js/Value.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include "nsCOMArray.h"
#define NS_ISTRUCTUREDHEADERS_CONTRACTID \
  "@mozilla.org/messenger/structuredheaders;1"
class msgIAddressObject; /* forward declaration */

class nsIUTF8StringEnumerator; /* forward declaration */


/* starting interface:    msgIStructuredHeaders */
#define MSGISTRUCTUREDHEADERS_IID_STR "e109bf4f-788f-47ba-bfa8-1236ede05597"

#define MSGISTRUCTUREDHEADERS_IID \
  {0xe109bf4f, 0x788f, 0x47ba, \
    { 0xbf, 0xa8, 0x12, 0x36, 0xed, 0xe0, 0x55, 0x97 }}

class msgIStructuredHeaders : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(MSGISTRUCTUREDHEADERS_IID)

  /* jsval getHeader (in string aHeaderName); */
  NS_IMETHOD GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval) = 0;

  /* bool hasHeader (in string aHeaderName); */
  NS_IMETHOD HasHeader(const char * aHeaderName, bool *_retval) = 0;

  /* AString getUnstructuredHeader (in string aHeaderName); */
  NS_IMETHOD GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval) = 0;

  /* void getAddressingHeader (in string aHeaderName, [optional] in boolean aPreserveGroups, [optional] out unsigned long count, [array, size_is (count), retval] out msgIAddressObject addresses); */
  NS_IMETHOD GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses) = 0;

  /* AUTF8String getRawHeader (in string aHeaderName); */
  NS_IMETHOD GetRawHeader(const char * aHeaderName, nsACString & _retval) = 0;

  /* readonly attribute nsIUTF8StringEnumerator headerNames; */
  NS_IMETHOD GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames) = 0;

  /* AUTF8String buildMimeText (); */
  NS_IMETHOD BuildMimeText(nsACString & _retval) = 0;

   /**
   * A special variant of getAddressingHeader that is specialized better for C++
   * users of this API.
   */
  nsresult GetAddressingHeader(const char *aPropertyName,
                               nsCOMArray<msgIAddressObject> &addrs,
                               bool aPreserveGroups = false)
  {
    msgIAddressObject **addrPtr;
    uint32_t length;
    nsresult rv = GetAddressingHeader(aPropertyName, aPreserveGroups, &length,
      &addrPtr);
    NS_ENSURE_SUCCESS(rv, rv);
    addrs.Adopt(addrPtr, length);
    return NS_OK;
  }
};

  NS_DEFINE_STATIC_IID_ACCESSOR(msgIStructuredHeaders, MSGISTRUCTUREDHEADERS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MSGISTRUCTUREDHEADERS \
  NS_IMETHOD GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval) override; \
  NS_IMETHOD HasHeader(const char * aHeaderName, bool *_retval) override; \
  NS_IMETHOD GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval) override; \
  NS_IMETHOD GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses) override; \
  NS_IMETHOD GetRawHeader(const char * aHeaderName, nsACString & _retval) override; \
  NS_IMETHOD GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames) override; \
  NS_IMETHOD BuildMimeText(nsACString & _retval) 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_MSGISTRUCTUREDHEADERS \
  nsresult GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval); \
  nsresult HasHeader(const char * aHeaderName, bool *_retval); \
  nsresult GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval); \
  nsresult GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses); \
  nsresult GetRawHeader(const char * aHeaderName, nsACString & _retval); \
  nsresult GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames); \
  nsresult BuildMimeText(nsACString & _retval); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MSGISTRUCTUREDHEADERS(_to) \
  NS_IMETHOD GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval) override { return _to GetHeader(aHeaderName, _retval); } \
  NS_IMETHOD HasHeader(const char * aHeaderName, bool *_retval) override { return _to HasHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval) override { return _to GetUnstructuredHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses) override { return _to GetAddressingHeader(aHeaderName, aPreserveGroups, count, addresses); } \
  NS_IMETHOD GetRawHeader(const char * aHeaderName, nsACString & _retval) override { return _to GetRawHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames) override { return _to GetHeaderNames(aHeaderNames); } \
  NS_IMETHOD BuildMimeText(nsACString & _retval) override { return _to BuildMimeText(_retval); } \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MSGISTRUCTUREDHEADERS(_to) \
  NS_IMETHOD GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeader(aHeaderName, _retval); } \
  NS_IMETHOD HasHeader(const char * aHeaderName, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUnstructuredHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAddressingHeader(aHeaderName, aPreserveGroups, count, addresses); } \
  NS_IMETHOD GetRawHeader(const char * aHeaderName, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRawHeader(aHeaderName, _retval); } \
  NS_IMETHOD GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderNames(aHeaderNames); } \
  NS_IMETHOD BuildMimeText(nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BuildMimeText(_retval); } \

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

/* Header file */
class _MYCLASS_ : public msgIStructuredHeaders
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MSGISTRUCTUREDHEADERS

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(_MYCLASS_, msgIStructuredHeaders)

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

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

/* jsval getHeader (in string aHeaderName); */
NS_IMETHODIMP _MYCLASS_::GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* bool hasHeader (in string aHeaderName); */
NS_IMETHODIMP _MYCLASS_::HasHeader(const char * aHeaderName, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getUnstructuredHeader (in string aHeaderName); */
NS_IMETHODIMP _MYCLASS_::GetUnstructuredHeader(const char * aHeaderName, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getAddressingHeader (in string aHeaderName, [optional] in boolean aPreserveGroups, [optional] out unsigned long count, [array, size_is (count), retval] out msgIAddressObject addresses); */
NS_IMETHODIMP _MYCLASS_::GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject * **addresses)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String getRawHeader (in string aHeaderName); */
NS_IMETHODIMP _MYCLASS_::GetRawHeader(const char * aHeaderName, nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIUTF8StringEnumerator headerNames; */
NS_IMETHODIMP _MYCLASS_::GetHeaderNames(nsIUTF8StringEnumerator * *aHeaderNames)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String buildMimeText (); */
NS_IMETHODIMP _MYCLASS_::BuildMimeText(nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    msgIWritableStructuredHeaders */
#define MSGIWRITABLESTRUCTUREDHEADERS_IID_STR "5dcbbef6-2356-45d8-86d7-b3e73f9c9a0c"

#define MSGIWRITABLESTRUCTUREDHEADERS_IID \
  {0x5dcbbef6, 0x2356, 0x45d8, \
    { 0x86, 0xd7, 0xb3, 0xe7, 0x3f, 0x9c, 0x9a, 0x0c }}

class msgIWritableStructuredHeaders : public msgIStructuredHeaders {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(MSGIWRITABLESTRUCTUREDHEADERS_IID)

  /* void setHeader (in string aHeaderName, in jsval aValue); */
  NS_IMETHOD SetHeader(const char * aHeaderName, JS::HandleValue aValue) = 0;

  /* void deleteHeader (in string aHeaderName); */
  NS_IMETHOD DeleteHeader(const char * aHeaderName) = 0;

  /* void addAllHeaders (in msgIStructuredHeaders aOtherHeaders); */
  NS_IMETHOD AddAllHeaders(msgIStructuredHeaders *aOtherHeaders) = 0;

  /* void setUnstructuredHeader (in string aHeaderName, in AString aValue); */
  NS_IMETHOD SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue) = 0;

  /* void setAddressingHeader (in string aHeaderName, [array, size_is (aCount)] in msgIAddressObject aAddresses, in unsigned long aCount); */
  NS_IMETHOD SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount) = 0;

  /* void setRawHeader (in string aHeaderName, in ACString aValue, in string aCharset); */
  NS_IMETHOD SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset) = 0;

   /**
   * A special variant of setAddressingHeader that is specialized better for C++
   * users of this API.
   */
  nsresult SetAddressingHeader(const char *aPropertyName,
                               const nsCOMArray<msgIAddressObject> &addrs)
  {
    return SetAddressingHeader(aPropertyName,
      const_cast<nsCOMArray<msgIAddressObject>&>(addrs).Elements(),
      addrs.Length());
  }
};

  NS_DEFINE_STATIC_IID_ACCESSOR(msgIWritableStructuredHeaders, MSGIWRITABLESTRUCTUREDHEADERS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MSGIWRITABLESTRUCTUREDHEADERS \
  NS_IMETHOD SetHeader(const char * aHeaderName, JS::HandleValue aValue) override; \
  NS_IMETHOD DeleteHeader(const char * aHeaderName) override; \
  NS_IMETHOD AddAllHeaders(msgIStructuredHeaders *aOtherHeaders) override; \
  NS_IMETHOD SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue) override; \
  NS_IMETHOD SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount) override; \
  NS_IMETHOD SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset) 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_MSGIWRITABLESTRUCTUREDHEADERS \
  nsresult SetHeader(const char * aHeaderName, JS::HandleValue aValue); \
  nsresult DeleteHeader(const char * aHeaderName); \
  nsresult AddAllHeaders(msgIStructuredHeaders *aOtherHeaders); \
  nsresult SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue); \
  nsresult SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount); \
  nsresult SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MSGIWRITABLESTRUCTUREDHEADERS(_to) \
  NS_IMETHOD SetHeader(const char * aHeaderName, JS::HandleValue aValue) override { return _to SetHeader(aHeaderName, aValue); } \
  NS_IMETHOD DeleteHeader(const char * aHeaderName) override { return _to DeleteHeader(aHeaderName); } \
  NS_IMETHOD AddAllHeaders(msgIStructuredHeaders *aOtherHeaders) override { return _to AddAllHeaders(aOtherHeaders); } \
  NS_IMETHOD SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue) override { return _to SetUnstructuredHeader(aHeaderName, aValue); } \
  NS_IMETHOD SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount) override { return _to SetAddressingHeader(aHeaderName, aAddresses, aCount); } \
  NS_IMETHOD SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset) override { return _to SetRawHeader(aHeaderName, aValue, aCharset); } \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MSGIWRITABLESTRUCTUREDHEADERS(_to) \
  NS_IMETHOD SetHeader(const char * aHeaderName, JS::HandleValue aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHeader(aHeaderName, aValue); } \
  NS_IMETHOD DeleteHeader(const char * aHeaderName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteHeader(aHeaderName); } \
  NS_IMETHOD AddAllHeaders(msgIStructuredHeaders *aOtherHeaders) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddAllHeaders(aOtherHeaders); } \
  NS_IMETHOD SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUnstructuredHeader(aHeaderName, aValue); } \
  NS_IMETHOD SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAddressingHeader(aHeaderName, aAddresses, aCount); } \
  NS_IMETHOD SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRawHeader(aHeaderName, aValue, aCharset); } \

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

/* Header file */
class _MYCLASS_ : public msgIWritableStructuredHeaders
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MSGIWRITABLESTRUCTUREDHEADERS

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(_MYCLASS_, msgIWritableStructuredHeaders)

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

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

/* void setHeader (in string aHeaderName, in jsval aValue); */
NS_IMETHODIMP _MYCLASS_::SetHeader(const char * aHeaderName, JS::HandleValue aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteHeader (in string aHeaderName); */
NS_IMETHODIMP _MYCLASS_::DeleteHeader(const char * aHeaderName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addAllHeaders (in msgIStructuredHeaders aOtherHeaders); */
NS_IMETHODIMP _MYCLASS_::AddAllHeaders(msgIStructuredHeaders *aOtherHeaders)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setUnstructuredHeader (in string aHeaderName, in AString aValue); */
NS_IMETHODIMP _MYCLASS_::SetUnstructuredHeader(const char * aHeaderName, const nsAString & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAddressingHeader (in string aHeaderName, [array, size_is (aCount)] in msgIAddressObject aAddresses, in unsigned long aCount); */
NS_IMETHODIMP _MYCLASS_::SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setRawHeader (in string aHeaderName, in ACString aValue, in string aCharset); */
NS_IMETHODIMP _MYCLASS_::SetRawHeader(const char * aHeaderName, const nsACString & aValue, const char * aCharset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_msgIStructuredHeaders_h__ */