diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/mime/public/nsIMimeHeaders.idl | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | comm/mailnews/mime/public/nsIMimeHeaders.idl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/comm/mailnews/mime/public/nsIMimeHeaders.idl b/comm/mailnews/mime/public/nsIMimeHeaders.idl new file mode 100644 index 0000000000..3a0d05c491 --- /dev/null +++ b/comm/mailnews/mime/public/nsIMimeHeaders.idl @@ -0,0 +1,41 @@ +/* -*- 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; +}; |