File indexing completed on 2024-10-06 12:24:01

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org>
0004     SPDX-FileCopyrightText: 1998, 1999  Waldo Bastian <bastian@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef KSYCOCATYPE_H
0010 #define KSYCOCATYPE_H
0011 
0012 /**
0013  * \relates KSycocaEntry
0014  * A KSycocaType is a code (out of the KSycocaType enum) assigned to each
0015  * class type derived from KSycocaEntry .
0016  * To use it, call the macro K_SYCOCATYPE( your_typecode, parent_class )
0017  * at the top of your class definition.
0018  */
0019 enum KSycocaType {
0020     KST_KSycocaEntry = 0,
0021     KST_KService = 1,
0022     KST_KServiceType = 2,
0023     KST_KMimeType = 3,
0024     KST_KMimeTypeEntry = 6 /*internal*/,
0025     KST_KServiceGroup = 7,
0026     // 8 was KST_KImageIOFormat in kdelibs4
0027     // 9 was KST_KProtocolInfo in kdelibs4
0028     KST_KServiceSeparator = 10,
0029     KST_KCustom = 1000,
0030 };
0031 
0032 /**
0033  * \relates KSycocaFactory
0034  * A KSycocaFactoryId is a code (out of the KSycocaFactoryId enum)
0035  * assigned to each class type derived from KSycocaFactory.
0036  * To use it, call the macro K_SYCOCAFACTORY( your_factory_id )
0037  * at the top of your class definition.
0038  */
0039 enum KSycocaFactoryId {
0040     KST_KServiceFactory = 1,
0041     KST_KServiceTypeFactory = 2,
0042     KST_KServiceGroupFactory = 3,
0043     // 4 was KST_KImageIO in kdelibs4
0044     // 5 was KST_KProtocolInfoFactory in kdelibs4
0045     KST_KMimeTypeFactory = 6,
0046     KST_CTimeInfo = 100,
0047 };
0048 
0049 #define K_SYCOCAFACTORY(factory_id)                                                                                                                            \
0050 public:                                                                                                                                                        \
0051     KSycocaFactoryId factoryId() const override                                                                                                                \
0052     {                                                                                                                                                          \
0053         return factory_id;                                                                                                                                     \
0054     }                                                                                                                                                          \
0055                                                                                                                                                                \
0056 private:
0057 
0058 #endif