KDECore
ksycoca.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00047
00048 protected:
00053 explicit KSycoca( bool );
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();
00181
00189 void databaseChanged(const QStringList& changedResources);
00190
00191 protected:
00192
00193 KSycocaFactoryList* factories();
00194
00195
00196 QDataStream *m_str_deprecated;
00197
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