• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDED

  • kded
kbuildsycoca.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 * Copyright (C) 1999 David Faure <faure@kde.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License version 2 as published by the Free Software Foundation;
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU Library General Public License
14 * along with this library; see the file COPYING.LIB. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 **/
18#ifndef KDED_KBUILDSYCOCA_H
19#define KDED_KBUILDSYCOCA_H
20
21#include "kbuildsycocainterface.h"
22
23#include <sys/stat.h>
24
25#include <QtCore/QObject>
26#include <QtCore/QString>
27
28#include <kservice.h>
29#include <ksycoca.h>
30#include <ksycocatype.h>
31#include <ksycocaentry.h>
32#include <kservicegroup.h>
33
34#include "vfolder_menu.h"
35
36class QDataStream;
37
38// No need for this in libkio - apps only get readonly access
39class KBuildSycoca : public KSycoca, public KBuildSycocaInterface
40{
41 Q_OBJECT
42public:
43 KBuildSycoca();
44 virtual ~KBuildSycoca();
45
49 bool recreate();
50
51 static bool checkTimestamps( quint32 timestamp, const QStringList &dirs );
52
53 static QStringList existingResourceDirs();
54
55 void setTrackId(const QString &id) { m_trackId = id; }
56
57 QStringList changedResources() const { return m_changedResources; }
58
59 // Use our friendly-access-to-KSycoca to make this public
60 static void clearCaches() { KSycoca::clearCaches(); }
61
62private:
67 KSycocaEntry::Ptr createEntry(const QString &file, bool addToFactory);
68 KService::Ptr createService(const QString& path);
74
78 void createMenu(const QString &caption, const QString &name, VFolderMenu::SubMenu *menu);
79
83 bool build();
84
88 void save(QDataStream* str);
89
93 void clear();
94
95 static bool checkDirTimestamps( const QString& dir, const QDateTime& stamp, bool top );
96
101 virtual bool isBuilding() { return true; }
102
103 QStringList m_changedResources;
104 QStringList m_allResourceDirs;
105 QString m_trackId;
106};
107
108#endif
KBuildSycocaInterface
Definition: kbuildsycocainterface.h:26
KBuildSycoca
Definition: kbuildsycoca.h:40
KBuildSycoca::~KBuildSycoca
virtual ~KBuildSycoca()
Definition: kbuildsycoca.cpp:108
KBuildSycoca::clearCaches
static void clearCaches()
Definition: kbuildsycoca.h:60
KBuildSycoca::existingResourceDirs
static QStringList existingResourceDirs()
Definition: kbuildsycoca.cpp:594
KBuildSycoca::setTrackId
void setTrackId(const QString &id)
Definition: kbuildsycoca.h:55
KBuildSycoca::KBuildSycoca
KBuildSycoca()
Definition: kbuildsycoca.cpp:103
KBuildSycoca::recreate
bool recreate()
Recreate the database file.
Definition: kbuildsycoca.cpp:396
KBuildSycoca::checkTimestamps
static bool checkTimestamps(quint32 timestamp, const QStringList &dirs)
Definition: kbuildsycoca.cpp:578
KBuildSycoca::changedResources
QStringList changedResources() const
Definition: kbuildsycoca.h:57
KSharedPtr
KSycoca
VFolderMenu::SubMenu
Definition: vfolder_menu.h:40
kbuildsycocainterface.h
kservice.h
kservicegroup.h
ksycoca.h
ksycocaentry.h
ksycocatype.h
dirs
KStandardDirs * dirs()
vfolder_menu.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDED

Skip menu "KDED"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal