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

KDECore

KSycoca Class Reference

#include <ksycoca.h>

Inheritance diagram for KSycoca:
QObject

List of all members.

Public Types

enum  DatabaseType { LocalDatabase, GlobalDatabase }

Signals

void databaseChanged (const QStringList &changedResources)
QT_MOC_COMPAT void databaseChanged ()

Public Member Functions

void addFactory (KSycocaFactory *)
QStringList allResourceDirs ()
QDataStream * findEntry (int offset, KSycocaType &type)
QDataStream * findFactory (KSycocaFactoryId id)
virtual bool isBuilding ()
QString kfsstnd_prefixes ()
 KSycoca ()
QString language ()
quint32 timeStamp ()
quint32 updateSignature ()
virtual ~KSycoca ()

Static Public Member Functions

static QString absoluteFilePath (DatabaseType type=LocalDatabase)
static void disableAutoRebuild ()
static void flagError ()
static bool isAvailable ()
static KDE_DEPRECATED bool isChanged (const char *type)
static KDE_DEPRECATED bool readError ()
static KSycoca * self ()
static int version ()

Protected Member Functions

KSycocaFactoryList * factories ()
 KSycoca (bool)
QDataStream *& stream ()

Protected Attributes

QDataStream * m_str_deprecated

Detailed Description

For internal use only.

Read-only SYstem COnfiguration CAche

Definition at line 43 of file ksycoca.h.


Member Enumeration Documentation

enum KSycoca::DatabaseType

type of database

See also:
absoluteFilePath()
Enumerator:
LocalDatabase 
GlobalDatabase 

Definition at line 60 of file ksycoca.h.


Constructor & Destructor Documentation

KSycoca::KSycoca ( bool   )  [explicit, protected]

For internal use only.

Building database

Definition at line 283 of file ksycoca.cpp.

KSycoca::KSycoca (  ) 

Read-only database.

Definition at line 179 of file ksycoca.cpp.

KSycoca::~KSycoca (  )  [virtual]

Definition at line 297 of file ksycoca.cpp.


Member Function Documentation

QString KSycoca::absoluteFilePath ( DatabaseType  type = LocalDatabase  )  [static]

For internal use only.

- returns absolute file path of the databasefor global database type the database is searched under the 'services' install path. Otherwise, the value from the environment variable KDESYCOCA is returned if set. If not set the path is build based on KStandardDirs cache save location.

Definition at line 522 of file ksycoca.cpp.

void KSycoca::addFactory ( KSycocaFactory *  factory  ) 

For internal use only.

- add a factory

Definition at line 338 of file ksycoca.cpp.

QStringList KSycoca::allResourceDirs (  ) 

For internal use only.

- returns all directories with information stored inside sycoca.

Definition at line 541 of file ksycoca.cpp.

void KSycoca::databaseChanged ( const QStringList &  changedResources  )  [signal]

Connect to this to get notified when the database changes Example: when mimetype definitions have changed, applications showing files as icons refresh icons to take into account the new mimetypes.

Another example: after creating a .desktop file in KOpenWithDialog, it must wait until kbuildsycoca4 finishes until the KService::Ptr is available.

QT_MOC_COMPAT void KSycoca::databaseChanged (  )  [signal]

Connect to this to get notified when the database changes.

Deprecated:
use the databaseChanged(QStringList) signal
void KSycoca::disableAutoRebuild (  )  [static]

For internal use only.

- disables launching of kbuildsycoca

Definition at line 575 of file ksycoca.cpp.

KSycocaFactoryList * KSycoca::factories (  )  [protected]

Definition at line 376 of file ksycoca.cpp.

QDataStream * KSycoca::findEntry ( int  offset,
KSycocaType &  type 
)

For internal use only.

- called by factories in read-only mode This is how factories get a stream to an entry

Definition at line 363 of file ksycoca.cpp.

QDataStream * KSycoca::findFactory ( KSycocaFactoryId  id  ) 

For internal use only.

- called by factories in read-only mode Returns stream(), but positioned for reading this factory, 0 on error.

Definition at line 452 of file ksycoca.cpp.

void KSycoca::flagError (  )  [static]

A read error occurs.

For internal use only.

Definition at line 548 of file ksycoca.cpp.

bool KSycoca::isAvailable (  )  [static]
Returns:
true if the ksycoca database is available This is usually the case, except if KDE isn't installed yet, or before kded is started.

Definition at line 306 of file ksycoca.cpp.

bool KSycoca::isBuilding (  )  [virtual]

For internal use only.

Returns:
true if building (i.e. if a KBuildSycoca);

Definition at line 570 of file ksycoca.cpp.

bool KSycoca::isChanged ( const char *  type  )  [static]

When you receive a "databaseChanged" signal, you can query here if a change has occurred in a specific resource type.

See also:
KStandardDirs for the various resource types.

This method is meant to be called from the GUI thread only.

Deprecated:
use the signal databaseChanged(QStringList) instead.

Definition at line 343 of file ksycoca.cpp.

QString KSycoca::kfsstnd_prefixes (  ) 

For internal use only.

- returns kfsstnd stored inside database

Definition at line 480 of file ksycoca.cpp.

QString KSycoca::language (  ) 

For internal use only.

- returns language stored inside database

Definition at line 534 of file ksycoca.cpp.

bool KSycoca::readError (  )  [static]
Deprecated:

Definition at line 565 of file ksycoca.cpp.

KSycoca * KSycoca::self (  )  [static]

Get or create the only instance of KSycoca (read-only).

Definition at line 290 of file ksycoca.cpp.

QDataStream *& KSycoca::stream (  )  [protected]

Definition at line 580 of file ksycoca.cpp.

quint32 KSycoca::timeStamp (  ) 

For internal use only.

- returns timestamp of databaseThe database contains all changes made _before_ this time and _might_ contain changes made after that.

Definition at line 508 of file ksycoca.cpp.

quint32 KSycoca::updateSignature (  ) 

For internal use only.

- returns update signature of databaseSignature that keeps track of changes to $KDEDIR/share/services/update_ksycocaTouching this file causes the database to be recreated from scratch.

Definition at line 515 of file ksycoca.cpp.

int KSycoca::version (  )  [static]
Returns:
the compiled-in version, i.e. the one used when writing a new ksycoca

Definition at line 149 of file ksycoca.cpp.


Member Data Documentation

QDataStream* KSycoca::m_str_deprecated [protected]

Definition at line 196 of file ksycoca.h.


The documentation for this class was generated from the following files:
  • ksycoca.h
  • ksycoca.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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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