ksycoca.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __ksycoca_h__
00020 #define __ksycoca_h__ "$Id: ksycoca.h,v 1.63 2002/11/18 03:37:14 mueller Exp $"
00021
00022 #include <dcopobject.h>
00023 #include <qobject.h>
00024 #include <qstringlist.h>
00025 #include "ksycocatype.h"
00026
00027 class QDataStream;
00028 class KSycocaPrivate;
00029 class KSycocaFactory;
00030 class KSycocaFactoryList;
00031
00032
00033
00034
00035
00036
00037 #define KSYCOCA_VERSION 60
00038
00043 class KSycoca : public QObject, public DCOPObject
00044 {
00045 Q_OBJECT
00046 K_DCOP
00047
00048 protected:
00053 KSycoca( bool );
00054
00055 public:
00056
00060 KSycoca();
00061
00065 static KSycoca *self();
00066 static bool _checkSelf();
00067
00068 virtual ~KSycoca();
00069
00074 QDataStream *findEntry(int offset, KSycocaType &type);
00078 QDataStream *findFactory( KSycocaFactoryId id);
00082 QString kfsstnd_prefixes();
00086 QString language();
00087
00094 Q_UINT32 timeStamp();
00095
00105 Q_UINT32 updateSignature();
00106
00110 void addFactory( KSycocaFactory * );
00111
00116 virtual bool isBuilding() { return false; }
00117
00121 static QString determineRelativePath( const QString & _fullpath, const char *_resource );
00122
00128 static bool isChanged(const char *type);
00129
00133 static void flagError();
00134
00138 static bool readError();
00139
00140 k_dcop:
00144 void notifyDatabaseChanged(const QStringList &);
00145
00146 signals:
00151 void databaseChanged();
00152
00153 protected:
00154 bool checkVersion(bool abortOnError=true);
00155 bool openDatabase(bool openDummyIfNotFound=true);
00156 void closeDatabase();
00157 KSycocaFactoryList *m_lstFactories;
00158 QDataStream *m_str;
00159 bool bNoDatabase;
00160 size_t m_sycoca_size;
00161 const char *m_sycoca_mmap;
00162 Q_UINT32 m_timeStamp;
00163
00164 public:
00165 static KSycoca *_self;
00166
00167 protected:
00168 virtual void virtual_hook( int id, void* data );
00169 private:
00170 KSycocaPrivate *d;
00171 };
00172
00173 #endif
This file is part of the documentation for kdelibs Version 3.1.0.