• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

KServiceFactory Class Reference

#include <kservicefactory.h>

Inheritance diagram for KServiceFactory:

Inheritance graph
[legend]

List of all members.


Public Member Functions

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)
 KServiceFactory ()
KServiceOfferList offers (int serviceTypeOffset, int serviceOffersOffset)
KService::List serviceOffers (int serviceTypeOffset, int serviceOffersOffset)
virtual ~KServiceFactory ()

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 Attributes

KSycocaDict * m_menuIdDict
int m_menuIdDictOffset
KSycocaDict * m_nameDict
int m_nameDictOffset
int m_offerListOffset
KSycocaDict * m_relNameDict
int m_relNameDictOffset

Detailed Description

For internal use only.

A sycoca factory for services (e.g. applications) It loads the services from parsing directories (e.g. applnk/) 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 32 of file kservicefactory.cpp.

KServiceFactory::~KServiceFactory (  )  [virtual]

Definition at line 71 of file kservicefactory.cpp.


Member Function Documentation

KService::List KServiceFactory::allServices (  ) 

Returns:
all services. Very memory consuming, avoid using.

Definition at line 197 of file kservicefactory.cpp.

KService * KServiceFactory::createEntry ( int  offset  )  const [protected, virtual]

Read an entry from the database.

Implements KSycocaFactory.

Definition at line 174 of file kservicefactory.cpp.

virtual KSycocaEntry* KServiceFactory::createEntry ( const QString &  ,
const char *   
) const [inline, virtual]

Construct a KService from a config file.

Implements KSycocaFactory.

Definition at line 54 of file kservicefactory.h.

KService::Ptr KServiceFactory::findServiceByDesktopName ( const QString &  _name  )  [virtual]

Find a service (by desktop file name, e.g.

"konsole")

Definition at line 108 of file kservicefactory.cpp.

KService::Ptr KServiceFactory::findServiceByDesktopPath ( const QString &  _name  )  [virtual]

Find a service ( by desktop path, e.g.

"System/konsole.desktop")

Definition at line 128 of file kservicefactory.cpp.

KService::Ptr KServiceFactory::findServiceByMenuId ( const QString &  _menuId  )  [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 87 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 211 of file kservicefactory.cpp.

KServiceFactory * KServiceFactory::self (  )  [static]

Returns:
the unique service factory, creating it if necessary

Definition at line 79 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 246 of file kservicefactory.cpp.

void KServiceFactory::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.

Unused in this class.

Reimplemented from KSycocaFactory.

Definition at line 313 of file kservicefactory.cpp.


Member Data Documentation

KSycocaDict* KServiceFactory::m_menuIdDict [protected]

Definition at line 117 of file kservicefactory.h.

int KServiceFactory::m_menuIdDictOffset [protected]

Definition at line 118 of file kservicefactory.h.

KSycocaDict* KServiceFactory::m_nameDict [protected]

Definition at line 113 of file kservicefactory.h.

int KServiceFactory::m_nameDictOffset [protected]

Definition at line 114 of file kservicefactory.h.

int KServiceFactory::m_offerListOffset [protected]

Definition at line 112 of file kservicefactory.h.

KSycocaDict* KServiceFactory::m_relNameDict [protected]

Definition at line 115 of file kservicefactory.h.

int KServiceFactory::m_relNameDictOffset [protected]

Definition at line 116 of file kservicefactory.h.


The documentation for this class was generated from the following files:
  • kservicefactory.h
  • kservicefactory.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal