ksycoca.h
/* This file is part of the KDE libraries
* Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
*
* 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 __ksycoca_h__
#define __ksycoca_h__
#include <dcopobject.h>
#include <qobject.h>
#include <qstringlist.h>
#include "ksycocatype.h"
#include <kdelibs_export.h>
class QDataStream;
class KSycocaPrivate;
class KSycocaFactory;
class KSycocaFactoryList;
/*
* Sycoca file version number.
* If the existing file is outdated, it will not get read
* but instead we'll ask kded to regenerate a new one...
*/
#define KSYCOCA_VERSION 94
class KDECORE_EXPORT KSycoca : public QObject, public DCOPObject
{
Q_OBJECT
K_DCOP
protected:
KSycoca( bool /* buildDatabase */ );
public:
KSycoca();
static KSycoca *self();
virtual ~KSycoca();
static int version();
QDataStream *findEntry(int offset, KSycocaType &type);
QDataStream *findFactory( KSycocaFactoryId id);
QString kfsstnd_prefixes();
QString language();
Q_UINT32 timeStamp();
Q_UINT32 updateSignature();
QStringList allResourceDirs();
void addFactory( KSycocaFactory * );
virtual bool isBuilding() { return false; }
void disableAutoRebuild();
static QString determineRelativePath( const QString & _fullpath, const char *_resource );
static bool isChanged(const char *type);
static void flagError();
static bool readError();
k_dcop:
void notifyDatabaseChanged(const QStringList &);
signals:
void databaseChanged();
protected:
bool checkVersion(bool abortOnError=true);
bool openDatabase(bool openDummyIfNotFound=true);
void closeDatabase();
KSycocaFactoryList *m_lstFactories;
QDataStream *m_str;
bool bNoDatabase;
size_t m_sycoca_size;
const char *m_sycoca_mmap;
Q_UINT32 m_timeStamp;
public:
static KSycoca *_self; // Internal use only.
protected:
virtual void virtual_hook( int id, void* data );
private:
KSycocaPrivate *d;
};
#endif
KSycocaFactoryList
This, instead of a typedef, allows to declare "class ..." in header files.
Definition: ksycocafactory.h:137
KDE::version
unsigned int version()
Returns the encoded number of KDE's version, see the KDE_VERSION macro.
Definition: kdeversion.cpp:22
DCOPObject

KDE Home | KDE Accessibility Home | Description of Access Keys