Warning, file /frameworks/kservice/src/sycoca/kbuildservicetypefactory_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef KBUILD_SERVICE_TYPE_FACTORY_H
0009 #define KBUILD_SERVICE_TYPE_FACTORY_H
0010 
0011 #include <QStringList>
0012 #include <kservicetypefactory_p.h>
0013 
0014 /**
0015  * Service-type factory for building ksycoca
0016  * @internal
0017  */
0018 class KBuildServiceTypeFactory : public KServiceTypeFactory
0019 {
0020 public:
0021     /**
0022      * Create factory
0023      */
0024     explicit KBuildServiceTypeFactory(KSycoca *db);
0025 
0026     ~KBuildServiceTypeFactory() override;
0027 
0028     /**
0029      * Find a service type in the database file
0030      * @return a pointer to the servicetype in the memory dict (don't free!)
0031      */
0032     KServiceType::Ptr findServiceTypeByName(const QString &_name) override;
0033 
0034     /**
0035      * Construct a KServiceType from a config file.
0036      */
0037     KSycocaEntry *createEntry(const QString &file) const override;
0038 
0039     KServiceType *createEntry(int) const override
0040     {
0041         assert(0);
0042         return nullptr;
0043     }
0044 
0045     /**
0046      * Add entry
0047      */
0048     void addEntry(const KSycocaEntry::Ptr &newEntry) override;
0049 
0050     /**
0051      * Write out service type specific index files.
0052      */
0053     void save(QDataStream &str) override;
0054 
0055     /**
0056      * Write out header information
0057      *
0058      * Don't forget to call the parent first when you override
0059      * this function.
0060      */
0061     void saveHeader(QDataStream &str) override;
0062 };
0063 
0064 #endif