1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 1999-2007 David Faure <faure@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef KBUILD_MIME_TYPE_FACTORY_H |
9 | #define KBUILD_MIME_TYPE_FACTORY_H |
10 | |
11 | #include <QStringList> |
12 | #include <kmimetypefactory_p.h> |
13 | |
14 | /** |
15 | * Mime-type factory for building ksycoca |
16 | * @internal |
17 | */ |
18 | class KBuildMimeTypeFactory : public KMimeTypeFactory |
19 | { |
20 | public: |
21 | /** |
22 | * Create factory |
23 | */ |
24 | explicit KBuildMimeTypeFactory(KSycoca *db); |
25 | |
26 | ~KBuildMimeTypeFactory() override; |
27 | |
28 | KSycocaEntry::List allEntries() const override; |
29 | |
30 | /** |
31 | * Construct a KMimeType from a config file. |
32 | */ |
33 | KSycocaEntry *createEntry(const QString &file) const override; |
34 | |
35 | MimeTypeEntry *createEntry(int) const override |
36 | { |
37 | assert(0); |
38 | return nullptr; |
39 | } |
40 | |
41 | KMimeTypeFactory::MimeTypeEntry::Ptr createFakeMimeType(const QString &name); |
42 | |
43 | /** |
44 | * Write out MIME type specific index files. |
45 | */ |
46 | void save(QDataStream &str) override; |
47 | |
48 | /** |
49 | * Write out header information |
50 | * |
51 | * Don't forget to call the parent first when you override |
52 | * this function. |
53 | */ |
54 | void (QDataStream &str) override; |
55 | }; |
56 | |
57 | #endif |
58 | |