Akonadi Mime

messageflags.cpp
1/*
2 * SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB a KDAB Group company, <info@kdab.com>
3 * SPDX-FileCopyrightText: 2010 Leo Franchi <lfranchi@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#include "messageflags.h"
9
10#include <Akonadi/Item>
11#include <KMime/Message>
12#include <KMime/Util>
13
14const char Akonadi::MessageFlags::Seen[] = "\\SEEN";
15const char Akonadi::MessageFlags::Deleted[] = "\\DELETED";
16const char Akonadi::MessageFlags::Answered[] = "\\ANSWERED";
17const char Akonadi::MessageFlags::Flagged[] = "\\FLAGGED";
18const char Akonadi::MessageFlags::HasError[] = "$ERROR";
19const char Akonadi::MessageFlags::HasAttachment[] = "$ATTACHMENT";
20const char Akonadi::MessageFlags::HasInvitation[] = "$INVITATION";
21const char Akonadi::MessageFlags::Sent[] = "$SENT";
22const char Akonadi::MessageFlags::Queued[] = "$QUEUED";
23const char Akonadi::MessageFlags::Replied[] = "$REPLIED";
24const char Akonadi::MessageFlags::Forwarded[] = "$FORWARDED";
25const char Akonadi::MessageFlags::ToAct[] = "$TODO";
26const char Akonadi::MessageFlags::Watched[] = "$WATCHED";
27const char Akonadi::MessageFlags::Ignored[] = "$IGNORED";
28const char Akonadi::MessageFlags::Signed[] = "$SIGNED";
29const char Akonadi::MessageFlags::Encrypted[] = "$ENCRYPTED";
30const char Akonadi::MessageFlags::Spam[] = "$JUNK";
31const char Akonadi::MessageFlags::Ham[] = "$NOTJUNK";
32
34{
35 if (KMime::isSigned(&message)) {
37 }
38
39 if (KMime::isEncrypted(&message)) {
41 }
42
43 if (KMime::hasInvitation(&message)) {
45 }
46
47 if (KMime::hasAttachment(&message)) {
49 }
50}
void setFlag(const QByteArray &name)
AKONADI_MIME_EXPORT const char HasInvitation[]
The flag for a message being marked as having an invitation.
AKONADI_MIME_EXPORT const char Watched[]
The flag for a message being marked as watched.
AKONADI_MIME_EXPORT const char Ham[]
The flag for a message being marked as ham.
AKONADI_MIME_EXPORT const char Encrypted[]
The flag for a message being marked as encrypted.
AKONADI_MIME_EXPORT const char ToAct[]
The flag for a message being marked as action item to act on.
AKONADI_MIME_EXPORT const char Answered[]
The flag for a message being replied to by the user.
AKONADI_MIME_EXPORT const char Replied[]
The flag for a message being marked as replied.
AKONADI_MIME_EXPORT const char Spam[]
The flag for a message being marked as spam.
AKONADI_MIME_EXPORT const char Seen[]
The flag for a message being seen (i.e.
AKONADI_MIME_EXPORT const char Forwarded[]
The flag for a message being marked as forwarded.
AKONADI_MIME_EXPORT void copyMessageFlags(KMime::Message &from, Akonadi::Item &to)
Copies all message flags from a KMime::Message object into an Akonadi::Item object.
AKONADI_MIME_EXPORT const char Deleted[]
The flag for a message being deleted by the user.
AKONADI_MIME_EXPORT const char HasError[]
The flag for a message being marked with an error.
AKONADI_MIME_EXPORT const char Ignored[]
The flag for a message being marked as ignored.
AKONADI_MIME_EXPORT const char Sent[]
The flag for a message being marked as sent.
AKONADI_MIME_EXPORT const char HasAttachment[]
The flag for a message being marked as having an attachment.
AKONADI_MIME_EXPORT const char Flagged[]
The flag for a message being marked as flagged.
AKONADI_MIME_EXPORT const char Queued[]
The flag for a message being marked as queued.
AKONADI_MIME_EXPORT const char Signed[]
The flag for a message being marked as signed.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.