diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-23 21:00:50 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-23 21:00:50 +0200 |
commit | 31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2 (patch) | |
tree | b5b508c3f065e0f51c8ce40aaf97d7070b5f9ef5 /framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h | |
parent | 1948369d4da2d0bc23b6af93683982b0e65d4992 (diff) | |
download | kube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.tar.gz kube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.zip |
Moved MIME related stuff to a mime subdir
Diffstat (limited to 'framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h')
-rw-r--r-- | framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h b/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h deleted file mode 100644 index 2bba551d..00000000 --- a/framework/src/domain/mimetreeparser/otp/bodypartformatterbasefactory.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | bodypartformatterfactory.h | ||
3 | |||
4 | This file is part of KMail, the KDE mail client. | ||
5 | Copyright (c) 2004 Marc Mutz <mutz@kde.org>, | ||
6 | Ingo Kloecker <kloecker@kde.org> | ||
7 | |||
8 | KMail is free software; you can redistribute it and/or modify it | ||
9 | under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | KMail is distributed in the hope that it will be useful, but | ||
14 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | |||
22 | In addition, as a special exception, the copyright holders give | ||
23 | permission to link the code of this program with any edition of | ||
24 | the Qt library by Trolltech AS, Norway (or with modified versions | ||
25 | of Qt that use the same license as Qt), and distribute linked | ||
26 | combinations including the two. You must obey the GNU General | ||
27 | Public License in all respects for all of the code used other than | ||
28 | Qt. If you modify this file, you may extend this exception to | ||
29 | your version of the file, but you are not obligated to do so. If | ||
30 | you do not wish to do so, delete this exception statement from | ||
31 | your version. | ||
32 | */ | ||
33 | |||
34 | #ifndef __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_H__ | ||
35 | #define __MIMETREEPARSER_BODYPARTFORMATTERBASEFACTORY_H__ | ||
36 | |||
37 | #include <map> | ||
38 | #include <QByteArray> | ||
39 | |||
40 | namespace MimeTreeParser | ||
41 | { | ||
42 | |||
43 | namespace Interface | ||
44 | { | ||
45 | class BodyPartFormatter; | ||
46 | } | ||
47 | |||
48 | struct ltstr { | ||
49 | bool operator()(const char *s1, const char *s2) const | ||
50 | { | ||
51 | return qstricmp(s1, s2) < 0; | ||
52 | } | ||
53 | }; | ||
54 | |||
55 | typedef std::multimap<const char *, const Interface::BodyPartFormatter *, ltstr> SubtypeRegistry; | ||
56 | typedef std::map<const char *, MimeTreeParser::SubtypeRegistry, MimeTreeParser::ltstr> TypeRegistry; | ||
57 | |||
58 | class BodyPartFormatterBaseFactoryPrivate; | ||
59 | |||
60 | class BodyPartFormatterBaseFactory | ||
61 | { | ||
62 | public: | ||
63 | BodyPartFormatterBaseFactory(); | ||
64 | virtual ~BodyPartFormatterBaseFactory(); | ||
65 | |||
66 | SubtypeRegistry::const_iterator createForIterator(const char *type, const char *subtype) const; | ||
67 | const SubtypeRegistry &subtypeRegistry(const char *type) const; | ||
68 | |||
69 | protected: | ||
70 | void insert(const char *type, const char *subtype, const Interface::BodyPartFormatter *formatter); | ||
71 | virtual void loadPlugins(); | ||
72 | private: | ||
73 | static BodyPartFormatterBaseFactory *mSelf; | ||
74 | |||
75 | BodyPartFormatterBaseFactoryPrivate *d; | ||
76 | friend class BodyPartFormatterBaseFactoryPrivate; | ||
77 | private: | ||
78 | // disabled | ||
79 | const BodyPartFormatterBaseFactory &operator=(const BodyPartFormatterBaseFactory &); | ||
80 | BodyPartFormatterBaseFactory(const BodyPartFormatterBaseFactory &); | ||
81 | }; | ||
82 | |||
83 | } | ||
84 | |||
85 | #endif // __MIMETREEPARSER_BODYPARTFORMATTERFACTORY_H__ | ||