summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mimetreeparser/otp/util.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-23 21:00:50 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-23 21:00:50 +0200
commit31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2 (patch)
treeb5b508c3f065e0f51c8ce40aaf97d7070b5f9ef5 /framework/src/domain/mimetreeparser/otp/util.h
parent1948369d4da2d0bc23b6af93683982b0e65d4992 (diff)
downloadkube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.tar.gz
kube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.zip
Moved MIME related stuff to a mime subdir
Diffstat (limited to 'framework/src/domain/mimetreeparser/otp/util.h')
-rw-r--r--framework/src/domain/mimetreeparser/otp/util.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/framework/src/domain/mimetreeparser/otp/util.h b/framework/src/domain/mimetreeparser/otp/util.h
deleted file mode 100644
index 099c647a..00000000
--- a/framework/src/domain/mimetreeparser/otp/util.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 Copyright (c) 2016 Sandro Knauß <sknauss@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __MIMETREEPARSER_UTILS_UTIL_H__
20#define __MIMETREEPARSER_UTILS_UTIL_H__
21
22#include <QString>
23
24class QMimeType;
25
26namespace KMime
27{
28class Content;
29}
30
31namespace MimeTreeParser
32{
33
34/**
35 * The Util namespace contains a collection of helper functions use in
36 * various places.
37 */
38namespace Util
39{
40
41/**
42 * Describes the type of the displayed message. This depends on the MIME structure
43 * of the mail and on whether HTML mode is enabled (which is decided by htmlMail())
44 */
45enum HtmlMode {
46 Normal, ///< A normal plaintext message, non-multipart
47 Html, ///< A HTML message, non-multipart
48 MultipartPlain, ///< A multipart/alternative message, the plain text part is currently displayed
49 MultipartHtml, ///< A multipart/altervative message, the HTML part is currently displayed
50 MultipartIcal ///< A multipart/altervative message, the ICal part is currently displayed
51};
52
53bool isTypeBlacklisted(KMime::Content *node);
54
55QString labelForContent(KMime::Content *node);
56
57QMimeType mimetype(const QString &name);
58
59QString iconNameForMimetype(const QString &mimeType,
60 const QString &fallbackFileName1 = QString(),
61 const QString &fallbackFileName2 = QString());
62
63QString iconNameForContent(KMime::Content *node);
64}
65}
66
67#endif