kbuildservicefactory.h
/* This file is part of the KDE project
Copyright (C) 1999 David Faure <faure@kde.org>
1999 Waldo Bastian <bastian@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __k_build_service_factory_h__
#define __k_build_service_factory_h__
#include <qptrdict.h>
#include <qstringlist.h>
#include <kservicefactory.h>
// We export the services to the service group factory!
#include <kbuildservicegroupfactory.h>
class KBuildServiceFactory : public KServiceFactory
{
public:
KBuildServiceFactory( KSycocaFactory *serviceTypeFactory,
KBuildServiceGroupFactory *serviceGroupFactory );
virtual ~KBuildServiceFactory();
KService *findServiceByName(const QString &_name);
virtual KSycocaEntry * createEntry(const QString &file, const char *resource);
virtual KService * createEntry( int ) { assert(0); return 0L; }
void addEntry(KSycocaEntry *newEntry, const char *resource);
virtual void save(QDataStream &str);
virtual void saveHeader(QDataStream &str);
static QStringList resourceTypes();
private:
void saveOfferList(QDataStream &str);
void saveInitList(QDataStream &str);
QDict<KService> m_serviceDict;
QPtrDict<KService> m_dupeDict;
KSycocaFactory *m_serviceTypeFactory;
KBuildServiceGroupFactory *m_serviceGroupFactory;
};
#endif
KBuildServiceFactory::addEntry
void addEntry(KSycocaEntry *newEntry, const char *resource)
Add a new entry.
Definition: kbuildservicefactory.cpp:228
KBuildServiceFactory::resourceTypes
static QStringList resourceTypes()
Returns all resource types for this service factory.
Definition: kbuildservicefactory.cpp:50
KBuildServiceFactory::createEntry
virtual KSycocaEntry * createEntry(const QString &file, const char *resource)
Construct a KService from a config file.
Definition: kbuildservicefactory.cpp:67
KBuildServiceGroupFactory
Service group factory for building ksycoca.
Definition: kbuildservicegroupfactory.h:30
KBuildServiceFactory
Service factory for building ksycoca.
Definition: kbuildservicefactory.h:35
KBuildServiceFactory::save
virtual void save(QDataStream &str)
Write out service specific index files.
Definition: kbuildservicefactory.cpp:112
KBuildServiceFactory::saveHeader
virtual void saveHeader(QDataStream &str)
Write out header information.
Definition: kbuildservicefactory.cpp:100
KBuildServiceFactory::KBuildServiceFactory
KBuildServiceFactory(KSycocaFactory *serviceTypeFactory, KBuildServiceGroupFactory *serviceGroupFactory)
Create factory.
Definition: kbuildservicefactory.cpp:33

KDE Home | KDE Accessibility Home | Description of Access Keys