Akonadi Mime

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

KDE's Doxygen guidelines are available online.