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.2.2 2003/05/05 21:03:52 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 61
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
00067 virtual ~KSycoca();
00068
00073 QDataStream *findEntry(int offset, KSycocaType &type);
00077 QDataStream *findFactory( KSycocaFactoryId id);
00081 QString kfsstnd_prefixes();
00085 QString language();
00086
00093 Q_UINT32 timeStamp();
00094
00104 Q_UINT32 updateSignature();
00105
00109 void addFactory( KSycocaFactory * );
00110
00115 virtual bool isBuilding() { return false; }
00116
00120 void disableAutoRebuild();
00121
00125 static QString determineRelativePath( const QString & _fullpath, const char *_resource );
00126
00132 static bool isChanged(const char *type);
00133
00137 static void flagError();
00138
00142 static bool readError();
00143
00144 k_dcop:
00148 void notifyDatabaseChanged(const QStringList &);
00149
00150 signals:
00155 void databaseChanged();
00156
00157 protected:
00158 bool checkVersion(bool abortOnError=true);
00159 bool openDatabase(bool openDummyIfNotFound=true);
00160 void closeDatabase();
00161 KSycocaFactoryList *m_lstFactories;
00162 QDataStream *m_str;
00163 bool bNoDatabase;
00164 size_t m_sycoca_size;
00165 const char *m_sycoca_mmap;
00166 Q_UINT32 m_timeStamp;
00167
00168 public:
00169 static KSycoca *_self;
00170
00171 protected:
00172 virtual void virtual_hook( int id, void* data );
00173 private:
00174 KSycocaPrivate *d;
00175 };
00176
00177 #endif
This file is part of the documentation for kdelibs Version 3.1.5.