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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mailnews/mime/public/msgIStructuredHeaders.idl
 */

#ifndef __gen_msgIStructuredHeaders_h__
#define __gen_msgIStructuredHeaders_h__


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

#include "js/Value.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
#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); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHeader(const char * aHeaderName, JS::MutableHandleValue _retval) = 0;

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

  /* AString getUnstructuredHeader (in string aHeaderName); */
  JS_HAZ_CAN_RUN_SCRIPT 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); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAddressingHeader(const char * aHeaderName, bool aPreserveGroups, uint32_t *count, msgIAddressObject ***addresses) = 0;

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

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

  /* AUTF8String buildMimeText (); */
  JS_HAZ_CAN_RUN_SCRIPT 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); } \


/* 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); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetHeader(const char * aHeaderName, JS::HandleValue aValue) = 0;

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

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

  /* void setUnstructuredHeader (in string aHeaderName, in AString aValue); */
  JS_HAZ_CAN_RUN_SCRIPT 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); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAddressingHeader(const char * aHeaderName, msgIAddressObject **aAddresses, uint32_t aCount) = 0;

  /* void setRawHeader (in string aHeaderName, in ACString aValue, in string aCharset); */
  JS_HAZ_CAN_RUN_SCRIPT 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); } \


#endif /* __gen_msgIStructuredHeaders_h__ */