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/compose/public/nsIMsgCompUtils.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 'comm/mailnews/compose/public/nsIMsgCompUtils.idl')
-rw-r--r-- | comm/mailnews/compose/public/nsIMsgCompUtils.idl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/comm/mailnews/compose/public/nsIMsgCompUtils.idl b/comm/mailnews/compose/public/nsIMsgCompUtils.idl new file mode 100644 index 0000000000..18749e1f9d --- /dev/null +++ b/comm/mailnews/compose/public/nsIMsgCompUtils.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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 "nsISupports.idl" +#include "nsIMsgIdentity.idl" + +[scriptable, uuid(00b4569a-077e-4236-b993-980fd82bb948)] +interface nsIMsgCompUtils : nsISupports { + string mimeMakeSeparator(in string prefix); + + /** + * Try to use the provided identity and/or host name to generate a message ID. + * + * To identify the host name to use in the message ID, this will: + * - if the attribute "FQDN" of the identity is set to a valid host name, use it + * - otherwise, if the provided host name is valid, use it + * - otherwise, if the identity's email address includes a valid host name after + * an '@' symbol, use it + * - otherwise, bail without generating a message ID (returns with an empty value) + * + * @param nsIMsgIdentity The identity to use to generate the message ID. + * @param string The host to use to generate the message ID. Ignored if empty. + * + * @returns A message ID usable in a Message-ID header, or an empty string + * if no message ID could be generated. + */ + AUTF8String msgGenerateMessageId(in nsIMsgIdentity identity, in AUTF8String host); + + readonly attribute boolean msgMimeConformToStandard; + + /** + * Detect the text encoding of an input string. This is a wrapper of + * mozilla::EncodingDetector to be used by JavaScript code. For C++, use + * MsgDetectCharsetFromFile from nsMsgUtils.cpp instead. + * + * @param aContent The string to detect charset. + * + * @returns Detected charset. + */ + ACString detectCharset(in ACString aContent); +}; |