1 /* This file is part of the KDE project
2 Copyright (C) 1999 David Faure <faure@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef KDED_KBUILD_SERVICE_TYPE_FACTORY_H
21 #define KDED_KBUILD_SERVICE_TYPE_FACTORY_H
23 #include <kservicetypefactory.h>
24 #include <QtCore/QStringList>
27 * Service-type factory for building ksycoca
30 class KBuildServiceTypeFactory
: public KServiceTypeFactory
36 KBuildServiceTypeFactory();
38 virtual ~KBuildServiceTypeFactory();
41 * Find a service type in the database file
42 * @return a pointer to the servicetype in the memory dict (don't free!)
44 virtual KServiceType::Ptr
findServiceTypeByName(const QString
&_name
);
47 * Construct a KServiceType from a config file.
49 virtual KSycocaEntry
* createEntry(const QString
&file
, const char *resource
) const;
51 virtual KServiceType
* createEntry( int ) const { assert(0); return 0L; }
56 virtual void addEntry(const KSycocaEntry::Ptr
& newEntry
);
59 * Write out service type specific index files.
61 virtual void save(QDataStream
&str
);
64 * Write out header information
66 * Don't forget to call the parent first when you override
69 virtual void saveHeader(QDataStream
&str
);
72 * Returns all resource types for this factory
74 static QStringList
resourceTypes();