kded
tdebuildsycoca.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __tdebuildsycoca_h__
00019 #define __tdebuildsycoca_h__
00020
00021 #include <sys/stat.h>
00022
00023 #include <tqobject.h>
00024 #include <tqstring.h>
00025 #include <tqdict.h>
00026
00027 #include <kservice.h>
00028 #include <tdesycoca.h>
00029 #include <tdesycocatype.h>
00030 #include <tdesycocaentry.h>
00031 #include <kservicegroup.h>
00032
00033 #include "vfolder_menu.h"
00034
00035 class TQDataStream;
00036
00037
00038 class KBuildSycoca : public KSycoca
00039 {
00040 Q_OBJECT
00041 public:
00042 KBuildSycoca();
00043 virtual ~KBuildSycoca();
00044
00048 bool recreate();
00049
00050 static bool checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs );
00051
00052 static TQStringList existingResourceDirs();
00053
00054 void setTrackId(const TQString &id) { m_trackId = id; }
00055
00056 protected slots:
00057 void slotCreateEntry(const TQString &file, KService **entry);
00058
00059 protected:
00060
00064 void processGnomeVfs();
00065
00070 KSycocaEntry *createEntry(const TQString &file, bool addToFactory);
00071
00075 void createMenu(TQString caption, TQString name, VFolderMenu::SubMenu *menu);
00076
00080 bool build();
00081
00085 void save();
00086
00090 void clear();
00091
00092 static bool checkDirTimestamps( const TQString& dir, const TQDateTime& stamp, bool top );
00093
00098 virtual bool isBuilding() { return true; }
00099
00100 TQStringList m_allResourceDirs;
00101 TQString m_trackId;
00102 };
00103
00104 #endif