mailnews/mime/public/nsIMimeHeaders.idl
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Mon, 21 Jun 2021 08:38:21 +0000
changeset 42627 e4b6c51fdbde68a411a3eb5a44295b52ab610410
parent 21599 45ccfc058277e081883f440f1b0aa22be05652b6
permissions -rw-r--r--
no bug - Bumping Thunderbird l10n changesets r=release a=l10n-bump DONTBUILD cs -> 0dc3320fcbfcf84d643d38e7e52a6aee12299dad da -> ff2a101d32d8a87aa0547e3191e4865678dd999a es-ES -> 3ce92eced5c9a86ebd8bb8d70605aa4b5f05362a fi -> cd0c7c5d85ce25a65f526de6d5e4531a49c50ef4 hy-AM -> 80795b085216988274c68eea23c6d0ee5f3fdea5 pt-BR -> 2b1b63ee61841fe15973568232e560ea088ead96 sr -> 3c31f284c086bf8e245d62fc6a24968868b1c101 sv-SE -> affb61843ab92b0adc66d31d5e427ff263411a4b

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "msgIStructuredHeaders.idl"

%{C++
#define NS_IMIMEHEADERS_CONTRACTID \
  "@mozilla.org/messenger/mimeheaders;1"
%}

/**
 * An interface that can extract individual headers from a body of headers.
 */
[scriptable, uuid(a9222679-b991-4786-8314-f8819c3a2ba3)]
interface nsIMimeHeaders : msgIStructuredHeaders {
  /// Feed in the text of headers
  void initialize(in ACString allHeaders);

  /**
   * Get the text of a header.
   *
   * Leading and trailing whitespace from headers will be stripped from the
   * return value. If getAllOfThem is set to true, then the returned string will
   * have all of the values of the header, in order, joined with the ',\r\n\t'.
   *
   * If the header is not present, then the returned value is NULL.
   */
  ACString extractHeader(in string headerName, in boolean getAllOfThem);

  /**
   * The current text of all header data.
   *
   * Unlike the asMimeText property, this result preserves the original
   * representation of the header text, including alternative line endings or
   * custom, non-8-bit text. For instances of this interface, this attribute is
   * usually preferable to asMimeText.
   */
  readonly attribute ACString allHeaders;
};