kdecore Library API Documentation

KSycoca Class Reference

Inheritance diagram for KSycoca:

QObject DCOPObject List of all members.

Signals

void databaseChanged ()

DCOP Member Functions

void notifyDatabaseChanged (const QStringList &)

Public Member Functions

 KSycoca ()
virtual ~KSycoca ()
QDataStreamfindEntry (int offset, KSycocaType &type)
QDataStreamfindFactory (KSycocaFactoryId id)
QString kfsstnd_prefixes ()
QString language ()
Q_UINT32 timeStamp ()
Q_UINT32 updateSignature ()
QStringList allResourceDirs ()
void addFactory (KSycocaFactory *)
virtual bool isBuilding ()
void disableAutoRebuild ()

Static Public Member Functions

static KSycocaself ()
static bool _checkSelf ()
static int version ()
static QString determineRelativePath (const QString &_fullpath, const char *_resource)
static bool isChanged (const char *type)
static void flagError ()
static bool readError ()

Static Public Attributes

static KSycoca_self = 0L

Protected Member Functions

 KSycoca (bool)
bool checkVersion (bool abortOnError=true)
bool openDatabase (bool openDummyIfNotFound=true)
void closeDatabase ()
virtual void virtual_hook (int id, void *data)

Protected Attributes

KSycocaFactoryListm_lstFactories
QDataStreamm_str
bool bNoDatabase
size_t m_sycoca_size
const char * m_sycoca_mmap
Q_UINT32 m_timeStamp

Detailed Description

Definition at line 44 of file ksycoca.h.


Constructor & Destructor Documentation

KSycoca::KSycoca  ) 
 

Read-only database.

Definition at line 82 of file ksycoca.cpp.

References _self, and openDatabase().

Referenced by self().


Member Function Documentation

KSycoca * KSycoca::self  )  [static]
 

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

Definition at line 207 of file ksycoca.cpp.

References _self, and KSycoca().

Referenced by KProtocolInfoFactory::createEntry(), and KSycocaFactory::KSycocaFactory().

QString KSycoca::determineRelativePath const QString _fullpath,
const char *  _resource
[static]
 

Determine relative path for a .desktop file from a full path and a resource name.

Definition at line 416 of file ksycoca.cpp.

References KGlobal::dirs(), endl(), QString::find(), QString::isEmpty(), kdFatal(), QString::mid(), and KStandardDirs::resourceDirs().

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.

Definition at line 259 of file ksycoca.cpp.

void KSycoca::flagError  )  [static]
 

A read error occurs.

Definition at line 436 of file ksycoca.cpp.

References _self, and d.

Referenced by KSycocaFactory::allEntries(), KSycocaDict::KSycocaDict(), and KSycocaEntry::read().

bool KSycoca::readError  )  [static]
 

Returns read error status and clears flag.

Definition at line 454 of file ksycoca.cpp.

References _self, and d.

void KSycoca::notifyDatabaseChanged const QStringList  ) 
 

internal function for receiving kded/kbuildsycoca's signal, when the sycoca file changes

Definition at line 264 of file ksycoca.cpp.

void KSycoca::databaseChanged  )  [signal]
 

Connect to this to get notified when the database changes (Usually apps showing icons do a 'refresh' to take into account the new mimetypes).


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 8 06:22:17 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003