fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kded / kbuildservicetypefactory.h
blob4b0b5e3e544701bbcde392710456a14644c3bdd2
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>
26 /**
27 * Service-type factory for building ksycoca
28 * @internal
30 class KBuildServiceTypeFactory : public KServiceTypeFactory
32 public:
33 /**
34 * Create factory
36 KBuildServiceTypeFactory();
38 virtual ~KBuildServiceTypeFactory();
40 /**
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);
46 /**
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; }
53 /**
54 * Add entry
56 virtual void addEntry(const KSycocaEntry::Ptr& newEntry);
58 /**
59 * Write out service type specific index files.
61 virtual void save(QDataStream &str);
63 /**
64 * Write out header information
66 * Don't forget to call the parent first when you override
67 * this function.
69 virtual void saveHeader(QDataStream &str);
71 /**
72 * Returns all resource types for this factory
74 static QStringList resourceTypes();
77 #endif