1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org> |
4 | SPDX-FileCopyrightText: 1998, 1999 Waldo Bastian <bastian@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #ifndef KSYCOCATYPE_H |
10 | #define KSYCOCATYPE_H |
11 | |
12 | /** |
13 | * \relates KSycocaEntry |
14 | * A KSycocaType is a code (out of the KSycocaType enum) assigned to each |
15 | * class type derived from KSycocaEntry . |
16 | * To use it, call the macro K_SYCOCATYPE( your_typecode, parent_class ) |
17 | * at the top of your class definition. |
18 | */ |
19 | enum KSycocaType { |
20 | KST_KSycocaEntry = 0, |
21 | KST_KService = 1, |
22 | KST_KServiceType = 2, |
23 | KST_KMimeType = 3, |
24 | KST_KMimeTypeEntry = 6 /*internal*/, |
25 | KST_KServiceGroup = 7, |
26 | // 8 was KST_KImageIOFormat in kdelibs4 |
27 | // 9 was KST_KProtocolInfo in kdelibs4 |
28 | KST_KServiceSeparator = 10, |
29 | KST_KCustom = 1000, |
30 | }; |
31 | |
32 | /** |
33 | * \relates KSycocaFactory |
34 | * A KSycocaFactoryId is a code (out of the KSycocaFactoryId enum) |
35 | * assigned to each class type derived from KSycocaFactory. |
36 | * To use it, call the macro K_SYCOCAFACTORY( your_factory_id ) |
37 | * at the top of your class definition. |
38 | */ |
39 | enum KSycocaFactoryId { |
40 | KST_KServiceFactory = 1, |
41 | KST_KServiceTypeFactory = 2, |
42 | KST_KServiceGroupFactory = 3, |
43 | // 4 was KST_KImageIO in kdelibs4 |
44 | // 5 was KST_KProtocolInfoFactory in kdelibs4 |
45 | KST_KMimeTypeFactory = 6, |
46 | KST_CTimeInfo = 100, |
47 | }; |
48 | |
49 | #define K_SYCOCAFACTORY(factory_id) \ |
50 | public: \ |
51 | KSycocaFactoryId factoryId() const override \ |
52 | { \ |
53 | return factory_id; \ |
54 | } \ |
55 | \ |
56 | private: |
57 | |
58 | #endif |
59 | |