kservicefactory.h
/* This file is part of the KDE project
Copyright (C) 1998, 1999 Torben Weis <weis@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 __kservicefactory_h__
#define __kservicefactory_h__
#include <qstringlist.h>
#include "kservice.h"
#include "ksycocafactory.h"
#include <assert.h>
class KSycoca;
class KSycocaDict;
class KIO_EXPORT KServiceFactory : public KSycocaFactory
{
K_SYCOCAFACTORY( KST_KServiceFactory )
public:
KServiceFactory();
virtual ~KServiceFactory();
virtual KSycocaEntry *createEntry(const QString &, const char *)
{ assert(0); return 0; }
KService * findServiceByName( const QString &_name );
KService * findServiceByDesktopName( const QString &_name );
KService * findServiceByDesktopPath( const QString &_name );
KService * findServiceByMenuId( const QString &_menuId );
KService::List offers( int serviceTypeOffset );
KService::List allServices();
KService::List allInitServices();
static KServiceFactory * self();
protected:
virtual KService * createEntry(int offset);
int m_offerListOffset;
int m_initListOffset;
KSycocaDict *m_nameDict;
int m_nameDictOffset;
KSycocaDict *m_relNameDict;
int m_relNameDictOffset;
KSycocaDict *m_menuIdDict;
int m_menuIdDictOffset;
private:
static KServiceFactory *_self;
protected:
virtual void virtual_hook( int id, void* data );
private:
class KServiceFactoryPrivate* d;
};
#endif
KService
Represent a service, i.e.
Definition: kservice.h:48

KDE Home | KDE Accessibility Home | Description of Access Keys