From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- comm/mailnews/compose/public/nsIMsgCompUtils.idl | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 comm/mailnews/compose/public/nsIMsgCompUtils.idl (limited to 'comm/mailnews/compose/public/nsIMsgCompUtils.idl') 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); +}; -- cgit v1.2.3