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

KDECore

ksycoca.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries
00002  *  Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
00003  *  Copyright (C) 2005-2008 David Faure <faure@kde.org>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation;
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #ifndef KSYCOCA_H
00021 #define KSYCOCA_H
00022 
00023 #include <kdecore_export.h>
00024 #include <ksycocatype.h>
00025 
00026 #include <QtCore/QObject>
00027 #include <QtCore/QStringList>
00028 
00029 class QDataStream;
00030 class KSycocaFactory;
00031 class KSycocaFactoryList;
00032 class KSycocaPrivate;
00033 
00037 #define KBUILDSYCOCA_EXENAME "kbuildsycoca4"
00038 
00043 class KDECORE_EXPORT KSycoca : public QObject
00044 {
00045   Q_OBJECT
00046   //Q_CLASSINFO("D-Bus Interface", "org.kde.KSycoca")
00047 
00048 protected:
00053    explicit KSycoca( bool /* buildDatabase */ );
00054 
00055 public:
00060    typedef enum { LocalDatabase, GlobalDatabase } DatabaseType;
00061 
00065    KSycoca();
00066 
00070    static KSycoca *self();
00071 
00072    virtual ~KSycoca();
00073 
00077    static int version();
00078 
00084    static bool isAvailable();
00085 
00090    QDataStream *findEntry(int offset, KSycocaType &type);
00095    QDataStream *findFactory(KSycocaFactoryId id);
00099    QString kfsstnd_prefixes();
00109    static QString absoluteFilePath(DatabaseType type=LocalDatabase);
00113    QString language();
00114 
00121    quint32 timeStamp();
00122 
00132    quint32 updateSignature();
00133 
00138    QStringList allResourceDirs();
00139 
00143    void addFactory( KSycocaFactory * );
00144 
00149    virtual bool isBuilding();
00150 
00154    static void disableAutoRebuild();
00155 
00164    static KDE_DEPRECATED bool isChanged(const char *type);
00165 
00170    static void flagError();
00171 
00173    static KDE_DEPRECATED bool readError();
00174 
00175 Q_SIGNALS:
00180     QT_MOC_COMPAT void databaseChanged(); // KDE5 TODO: remove
00181 
00189     void databaseChanged(const QStringList& changedResources);
00190 
00191 protected:
00192     // @internal used by kbuildsycoca
00193     KSycocaFactoryList* factories();
00194 
00195     // @internal was for kbuildsycoca
00196     QDataStream *m_str_deprecated; // KDE5: REMOVE
00197     // @internal used by factories and kbuildsycoca
00198     QDataStream*& stream();
00199     friend class KSycocaFactory;
00200     friend class KSycocaDict;
00201 
00202 private Q_SLOTS:
00206     void notifyDatabaseChanged(const QStringList &);
00207 
00208 private:
00213     static void clearCaches();
00214     friend class KBuildSycoca;
00215 
00216     Q_DISABLE_COPY(KSycoca)
00217     friend class KSycocaPrivate;
00218     KSycocaPrivate * const d;
00219 };
00220 
00221 #endif
00222 

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