KDECore
#include <kservicefactory.h>
Public Member Functions | |
KServiceFactory () | |
virtual | ~KServiceFactory () |
KService::List | allServices () |
virtual KSycocaEntry * | createEntry (const QString &, const char *) const |
virtual KService::Ptr | findServiceByDesktopName (const QString &_name) |
virtual KService::Ptr | findServiceByDesktopPath (const QString &_name) |
virtual KService::Ptr | findServiceByMenuId (const QString &_menuId) |
KService::Ptr | findServiceByName (const QString &_name) |
bool | hasOffer (int serviceTypeOffset, int serviceOffersOffset, int testedServiceOffset) |
KServiceOfferList | offers (int serviceTypeOffset, int serviceOffersOffset) |
KService::List | serviceOffers (int serviceTypeOffset, int serviceOffersOffset) |
Public Member Functions inherited from KSycocaFactory | |
virtual | ~KSycocaFactory () |
virtual void | addEntry (const KSycocaEntry::Ptr &newEntry) |
virtual KSycocaEntry::List | allEntries () const |
KSycocaEntryDict * | entryDict () |
virtual KSycocaFactoryId | factoryId () const =0 |
bool | isEmpty () const |
int | offset () const |
void | removeEntry (const QString &entryName) |
const KSycocaResourceList * | resourceList () const |
virtual void | save (QDataStream &str) |
virtual void | saveHeader (QDataStream &str) |
const KSycocaDict * | sycocaDict () const |
Static Public Member Functions | |
static KServiceFactory * | self () |
Protected Member Functions | |
virtual KService * | createEntry (int offset) const |
virtual void | virtual_hook (int id, void *data) |
Protected Member Functions inherited from KSycocaFactory | |
KSycocaFactory (KSycocaFactoryId factory_id) | |
QDataStream * | stream () const |
Protected Attributes | |
KSycocaDict * | m_menuIdDict |
int | m_menuIdDictOffset |
KSycocaDict * | m_nameDict |
int | m_nameDictOffset |
int | m_offerListOffset |
KSycocaDict * | m_relNameDict |
int | m_relNameDictOffset |
Protected Attributes inherited from KSycocaFactory | |
KSycocaEntryDict * | m_entryDict |
KSycocaResourceList * | m_resourceList |
Additional Inherited Members | |
Related Functions inherited from KSycocaFactory | |
enum | KSycocaFactoryId |
Detailed Description
A sycoca factory for services (e.g. applications) It loads the services from parsing directories (e.g. prefix/share/applications/) but can also create service from data streams or single config files
Exported for kbuildsycoca, but not installed.
Definition at line 41 of file kservicefactory.h.
Constructor & Destructor Documentation
KServiceFactory::KServiceFactory | ( | ) |
Create factory.
Definition at line 34 of file kservicefactory.cpp.
|
virtual |
Definition at line 72 of file kservicefactory.cpp.
Member Function Documentation
KService::List KServiceFactory::allServices | ( | ) |
- Returns
- all services. Very memory consuming, avoid using.
Definition at line 195 of file kservicefactory.cpp.
|
inlinevirtual |
Construct a KService from a config file.
Implements KSycocaFactory.
Definition at line 54 of file kservicefactory.h.
|
protectedvirtual |
Read an entry from the database.
Implements KSycocaFactory.
Definition at line 174 of file kservicefactory.cpp.
|
virtual |
Find a service (by desktop file name, e.g.
"konsole")
Definition at line 107 of file kservicefactory.cpp.
|
virtual |
Find a service ( by desktop path, e.g.
"System/konsole.desktop")
Definition at line 127 of file kservicefactory.cpp.
|
virtual |
Find a service ( by menu id, e.g.
"kde-konsole.desktop")
Definition at line 154 of file kservicefactory.cpp.
KService::Ptr KServiceFactory::findServiceByName | ( | const QString & | _name | ) |
Find a service (by translated name, e.g.
"Terminal") (Not virtual because not used inside kbuildsycoca4, only an external service for some KDE apps)
Definition at line 86 of file kservicefactory.cpp.
bool KServiceFactory::hasOffer | ( | int | serviceTypeOffset, |
int | serviceOffersOffset, | ||
int | testedServiceOffset | ||
) |
Test if a specific service is associated with a specific servicetype.
- Parameters
-
serviceTypeOffset the offset of the service type being tested serviceOffersOffset allows to jump to the right entries for the service type directly. testedServiceOffset the offset of the service being tested
Definition at line 280 of file kservicefactory.cpp.
QList< KServiceOffer > KServiceFactory::offers | ( | int | serviceTypeOffset, |
int | serviceOffersOffset | ||
) |
- Returns
- the services supporting the given service type The
serviceOffersOffset
allows to jump to the right entries directly.
Definition at line 209 of file kservicefactory.cpp.
|
static |
- Returns
- the unique service factory, creating it if necessary
Definition at line 81 of file kservicefactory.cpp.
KService::List KServiceFactory::serviceOffers | ( | int | serviceTypeOffset, |
int | serviceOffersOffset | ||
) |
- Returns
- the services supporting the given service type; without information about initialPreference The
serviceOffersOffset
allows to jump to the right entries directly.
Definition at line 245 of file kservicefactory.cpp.
|
protectedvirtual |
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Unused in this class.
Reimplemented from KSycocaFactory.
Definition at line 312 of file kservicefactory.cpp.
Member Data Documentation
|
protected |
Definition at line 117 of file kservicefactory.h.
|
protected |
Definition at line 118 of file kservicefactory.h.
|
protected |
Definition at line 113 of file kservicefactory.h.
|
protected |
Definition at line 114 of file kservicefactory.h.
|
protected |
Definition at line 112 of file kservicefactory.h.
|
protected |
Definition at line 115 of file kservicefactory.h.
|
protected |
Definition at line 116 of file kservicefactory.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.