Warning, /pim/messagelib/messagecomposer/DESIGN is written in an unsupported language. File is not indexed.
0001 How the composer works: 0002 -------------------------- 0003 Input data: 0004 0005 MessagePart classes represent the data of messages in an abstract way that is very close to 0006 the way a GUI composer would see the data. Thus, the composer takes the following input data: 0007 * GlobalPart: 0008 - The charsets the user prefers. 0009 - Whether 8bit encoding is allowed. 0010 * InfoPart: 0011 - Mode: compose the messages to be sent, or to be saved somewhere locally. 0012 - Sender and recipients. 0013 - The transport to use. 0014 * TextPart: 0015 - The plain text and, optionally, the HTML text from an editor. 0016 * Zero or more AttachmentParts: 0017 - The data and details (such as MIME type, file name) of an attachment. 0018 0019 -------------------------- 0020 Output data: 0021 0022 The composer outputs a single KMime::Message containing the assembled message. 0023 0024 -------------------------- 0025 Logic: 0026 (NOTE: Based on messagecomposer.cpp in KMail. This does not apply. This is 0027 TODO in the crypto composer.) 0028 0029 Definitions: 0030 * Early attachment -- An attachment that has the same signing / crypto settings as the main 0031 text part, and is joined with the text part before any signing or 0032 encryption. 0033 * Late attachment -- An attachment that has different signing / crypto settings from the main 0034 text part, and is encrypted, signed, and added only after the main part 0035 has been signed and encrypted. 0036 0037 Algorithm: 0038 1) Take the text content (plain or plain+HTML) and the early attachments, and compose them 0039 into contentBeforeCrypto. 0040 2) For each recipient of the message, encrypt contentBeforeCrypto, encrypt and add the late 0041 attachments, save the recipients address (so that we know whom to send this message to), 0042 and save this as one of the final messages. 0043 0044 --------------------------