File indexing completed on 2024-11-24 04:53:09
0001 /* Copyright (C) 2006 - 2014 Jan Kundrát <jkt@flaska.net> 0002 0003 This file is part of the Trojita Qt IMAP e-mail client, 0004 http://trojita.flaska.net/ 0005 0006 This program is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU General Public License as 0008 published by the Free Software Foundation; either version 2 of 0009 the License or (at your option) version 3 or any later version 0010 accepted by the membership of KDE e.V. (or its successor approved 0011 by the membership of KDE e.V.), which shall act as a proxy 0012 defined in Section 14 of version 3 of the license. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 GNU General Public License for more details. 0018 0019 You should have received a copy of the GNU General Public License 0020 along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 */ 0022 0023 #ifndef IMAP_MODEL_ITEMROLES_H 0024 #define IMAP_MODEL_ITEMROLES_H 0025 0026 #include <Qt> 0027 0028 namespace Imap { 0029 namespace Mailbox { 0030 0031 /** @short Custom item data roles for IMAP */ 0032 enum { 0033 /** @short A "random" offset */ 0034 RoleBase = Qt::UserRole + 666, 0035 0036 /** @short Is the item already fetched? */ 0037 RoleIsFetched, 0038 /** @short The item is not available -- perhaps we're offline and it isn't cached */ 0039 RoleIsUnavailable, 0040 0041 /** @short Are we working in an offline mode? This role only works on a top-level item in a model. */ 0042 RoleIsNetworkOffline, 0043 0044 /** @short Name of the mailbox */ 0045 RoleMailboxName, 0046 /** @short Short name of the mailbox */ 0047 RoleShortMailboxName, 0048 /** @short Separator for mailboxes at the current level */ 0049 RoleMailboxSeparator, 0050 /** @short Total number of messages in a mailbox */ 0051 RoleTotalMessageCount, 0052 /** @short Number of unread messages in a mailbox */ 0053 RoleUnreadMessageCount, 0054 /** @short Number of recent messages in a mailbox */ 0055 RoleRecentMessageCount, 0056 /** @short The mailbox in question is the INBOX */ 0057 RoleMailboxIsINBOX, 0058 /** @short The mailbox can be selected */ 0059 RoleMailboxIsSelectable, 0060 /** @short The mailbox has child mailboxes */ 0061 RoleMailboxHasChildMailboxes, 0062 /** @short Information about whether the number of messages in the mailbox has already been loaded */ 0063 RoleMailboxNumbersFetched, 0064 /** @short Is anything still loading for this mailbox? */ 0065 RoleMailboxItemsAreLoading, 0066 /** @short Current UIDVALIDITY of a mailbox */ 0067 RoleMailboxUidValidity, 0068 /** @short Is the mailbox subscribed? 0069 0070 If the server doesn't support RFC5258, this can return wrong answer. 0071 */ 0072 RoleMailboxIsSubscribed, 0073 0074 /** @short UID of the message */ 0075 RoleMessageUid, 0076 /** @short Subject of the message */ 0077 RoleMessageSubject, 0078 /** @short The From addresses */ 0079 RoleMessageFrom, 0080 /** @short The To addresses */ 0081 RoleMessageTo, 0082 /** @short The Cc addresses */ 0083 RoleMessageCc, 0084 /** @short The Bcc: addresses */ 0085 RoleMessageBcc, 0086 /** @short The Sender: header */ 0087 RoleMessageSender, 0088 /** @short The Reply-To: header */ 0089 RoleMessageReplyTo, 0090 /** @short The Message-Id: header */ 0091 RoleMessageMessageId, 0092 /** @short The In-Reply-To: header */ 0093 RoleMessageInReplyTo, 0094 /** @short The message timestamp as determined from IMAP's ENVELOPE, ie. from the RFC2822 headers */ 0095 RoleMessageDate, 0096 /** @short Timestamp of when the message was delivered to the mailbox (ie. IMAP's INTERNALDATE) */ 0097 RoleMessageInternalDate, 0098 /** @short Size of the message */ 0099 RoleMessageSize, 0100 /** @short Status of the \\Seen flag */ 0101 RoleMessageIsMarkedRead, 0102 /** @short Was unread when mailbox opened, or has been marked unread. This flag is transient and is recalculated 0103 * when switching mailboxes. */ 0104 RoleMessageWasUnread, 0105 /** @short Status of the \\Deleted flag */ 0106 RoleMessageIsMarkedDeleted, 0107 /** @short Was the message forwarded? */ 0108 RoleMessageIsMarkedForwarded, 0109 /** @short Was the message replied to? */ 0110 RoleMessageIsMarkedReplied, 0111 /** @short Is the message marked as a recent one? */ 0112 RoleMessageIsMarkedRecent, 0113 /** @short Is the message markes as flagged? */ 0114 RoleMessageIsMarkedFlagged, 0115 /** @short Is the message markes as junk? */ 0116 RoleMessageIsMarkedJunk, 0117 /** @short Is the message markes as notjunk? */ 0118 RoleMessageIsMarkedNotJunk, 0119 /** @short IMAP flags of a message */ 0120 RoleMessageFlags, 0121 /** @short Is the current item a root of thread with unread messages */ 0122 RoleThreadRootWithUnreadMessages, 0123 /** @short Aggregated flags from the thread */ 0124 RoleThreadAggregatedFlags, 0125 /** @short Fuzzy date of a particular message; useful for rough navigation */ 0126 RoleMessageFuzzyDate, 0127 /** @short List of message IDs from the message's References header */ 0128 RoleMessageHeaderReferences, 0129 /** @short The List-Post header from RFC 2369 */ 0130 RoleMessageHeaderListPost, 0131 /** @short Is the List-Post set to a special value of "NO"? */ 0132 RoleMessageHeaderListPostNo, 0133 /** @short A full message envelope */ 0134 RoleMessageEnvelope, 0135 /** @short Is this a mail with at least one attachment? 0136 0137 The returned value might be a bit fuzzy. 0138 */ 0139 RoleMessageHasAttachments, 0140 0141 /** @short Contents of a message part */ 0142 RolePartData, 0143 /** @short Unicode text, i.e. RolePartData already decoded */ 0144 RolePartUnicodeText, 0145 /** @short MIME type of a message part */ 0146 RolePartMimeType, 0147 /** @short Charset of a message part */ 0148 RolePartCharset, 0149 /** @short The format= parameter of the message part's Content-Type */ 0150 RolePartContentFormat, 0151 /** @short The delsp= parameter of the message part's Content-Type */ 0152 RolePartContentDelSp, 0153 /** @short Content-Transfer-Encoding of a message part */ 0154 RolePartTransferEncoding, 0155 /** @short The body-fld-id field from BODYSTRUCTURE */ 0156 RolePartBodyFldId, 0157 /** @short The Content-Disposition of a message part */ 0158 RolePartBodyDisposition, 0159 /** @short The file name for a message part */ 0160 RolePartFileName, 0161 /** @short The size of this part, as determined from BODYSTRUCTURE */ 0162 RolePartOctets, 0163 /** @short Access to the partId() function */ 0164 RolePartId, 0165 /** @short Access to the partToPath() function */ 0166 RolePartPathToPart, 0167 /** @short CID of the main part of a multipart/related message */ 0168 RolePartMultipartRelatedMainCid, 0169 /** @short Is this a top-level multipart, i.e. a multipart/... and a child of a message/rfc822? See isTopLevelMultipart. */ 0170 RolePartIsTopLevelMultipart, 0171 /** @short Return the body-fld-param from BODYSTRUCTURE, which usually contains some optional MIME parameters about this part */ 0172 RolePartBodyFldParam, 0173 0174 /** @short Fetch a part from the cache if it's available, but do not request it from the server */ 0175 RolePartForceFetchFromCache, 0176 /** @short Pointer to the internal buffer */ 0177 RolePartBufferPtr, 0178 0179 /** @short QModelIndex of the message a part is associated to */ 0180 RolePartMessageIndex, 0181 0182 /** @short A relative IMAP URL pointing to this message or part, if available */ 0183 RoleIMAPRelativeUrl, 0184 0185 0186 /** @short Is the format of this particular multipart/signed supported for signature verification? 0187 0188 A multipart/signed could use some unrecognized or unsupported algorithm, in which case we won't even try 0189 to verify the signature. If this is role returns true, it means that there will be just one child item 0190 and that that child's validity will be checked by the crypto operation. This role does not imply anything 0191 about the validity of the actual signature, though. 0192 */ 0193 RolePartSignatureVerifySupported, 0194 /** @short Is the format of this particular multipart/encrypted supported and recognized? 0195 0196 If true, this message part represents content of an encrypted message that Trojita can attempt to decrypt. 0197 */ 0198 RolePartDecryptionSupported, 0199 /** @short Is there any point in waiting longer? 0200 0201 If true, this means that the crypto code is either waiting for data from the network, or that there is 0202 a crypto operation in progress. 0203 */ 0204 RolePartCryptoNotFinishedYet, 0205 /** @short Was there a failure in some cryptography operation which affected the ability to show the message? 0206 0207 "Failure" means that something went wrong. Maybe some system component failed, or the message arrived too damaged to 0208 be decrypted. This state has nothing to do with, say, a message whose signature failed to verify. 0209 */ 0210 RolePartCryptoDecryptionFailed, 0211 /** @short Short message about the status/result of a crypto operation 0212 0213 This is suitable for an immediate presentation to the user. The text should be short enough to not distract 0214 the user too much, but also descriptive enough to make sense on its own, without having to consult the longer, 0215 more detailed status message. 0216 */ 0217 RolePartCryptoTLDR, 0218 /** @short Longer information about the status/result of a crypto operation 0219 0220 This can be shown to the user when they ask for more details. It could possibly be a very long text, including some cryptic 0221 output from gpg's stderr, for example. 0222 */ 0223 RolePartCryptoDetailedMessage, 0224 /** @short Icon name for showing the result of a crypto operation */ 0225 RolePartCryptoStatusIconName, 0226 /** @short Is this a valid signature subject to all checks, whatever they are? */ 0227 RolePartSignatureValidTrusted, 0228 /** @short Is this a technically valid signature without taking the trust level and other policies into account? */ 0229 RolePartSignatureValidDisregardingTrust, 0230 /** @short Who made the signature */ 0231 RolePartSignatureSignerName, 0232 /** @short When was the signature made */ 0233 RolePartSignatureSignDate, 0234 0235 0236 /** @short True if the item in the tasks list is actually a ParserState 0237 0238 This role is *not* used or implemented by the IMAP models, but only by the TaskPresentationModel. 0239 */ 0240 RoleTaskIsParserState, 0241 /** @short True if the task shall be visible in the user-facing list of current activities 0242 0243 This role is *not* used or implemented by the IMAP models, but only by the TaskPresentationModel and VisibleTasksModel. 0244 */ 0245 RoleTaskIsVisible, 0246 /** @short A short explanaiton of the task -- what is it doing? */ 0247 RoleTaskCompactName, 0248 0249 /** @short Content-Disposition (inline or attachment) of an attachment within MessageComposer 0250 0251 The enum value is converted to int. 0252 */ 0253 RoleAttachmentContentDispositionMode, 0254 0255 /** @short The very last role */ 0256 RoleInvalidLastOne 0257 }; 0258 0259 } 0260 } 0261 0262 #endif // IMAP_MODEL_ITEMROLES_H