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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • sycoca
ksycoca.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  * Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
3  * Copyright (C) 2005-2008 David Faure <faure@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License version 2 as published by the Free Software Foundation;
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  **/
19 
20 #ifndef KSYCOCA_H
21 #define KSYCOCA_H
22 
23 #include <kdecore_export.h>
24 #include <ksycocatype.h>
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QStringList>
28 
29 class QDataStream;
30 class KSycocaFactory;
31 class KSycocaFactoryList;
32 class KSycocaPrivate;
33 
37 #define KBUILDSYCOCA_EXENAME "kbuildsycoca4"
38 
43 class KDECORE_EXPORT KSycoca : public QObject
44 {
45  Q_OBJECT
46  //Q_CLASSINFO("D-Bus Interface", "org.kde.KSycoca")
47 
48 protected:
53  explicit KSycoca( bool /* buildDatabase */ );
54 
55 public:
60  typedef enum { LocalDatabase, GlobalDatabase } DatabaseType;
61 
65  KSycoca();
66 
70  static KSycoca *self();
71 
72  virtual ~KSycoca();
73 
77  static int version();
78 
84  static bool isAvailable();
85 
90  QDataStream *findEntry(int offset, KSycocaType &type);
95  QDataStream *findFactory(KSycocaFactoryId id);
99  QString kfsstnd_prefixes();
109  static QString absoluteFilePath(DatabaseType type=LocalDatabase);
113  QString language();
114 
121  quint32 timeStamp();
122 
132  quint32 updateSignature();
133 
138  QStringList allResourceDirs();
139 
143  void addFactory( KSycocaFactory * );
144 
149  virtual bool isBuilding();
150 
154  static void disableAutoRebuild();
155 
164 #ifndef KDE_NO_DEPRECATED
165  static KDE_DEPRECATED bool isChanged(const char *type);
166 #endif
167 
172  static void flagError();
173 
175 #ifndef KDE_NO_DEPRECATED
176  static KDE_DEPRECATED bool readError();
177 #endif
178 
179 Q_SIGNALS:
184 #ifndef KDE_NO_DEPRECATED
185  QT_MOC_COMPAT void databaseChanged(); // KDE5 TODO: remove
186 #endif
187 
199  void databaseChanged(const QStringList& changedResources);
200 
201 protected:
202  // @internal used by kbuildsycoca
203  KSycocaFactoryList* factories();
204 
205  // @internal was for kbuildsycoca
206 #ifndef KDE_NO_DEPRECATED
207  QDataStream *m_str_deprecated; // KDE5: REMOVE
208 #endif
209  // @internal used by factories and kbuildsycoca
210  QDataStream*& stream();
211  friend class KSycocaFactory;
212  friend class KSycocaDict;
213 
214 private Q_SLOTS:
218  void notifyDatabaseChanged(const QStringList &);
219 
220 private:
225  static void clearCaches();
226  friend class KBuildSycoca;
227  friend class Kded;
228 
229  Q_DISABLE_COPY(KSycoca)
230  friend class KSycocaPrivate;
231  KSycocaPrivate * const d;
232 };
233 
234 #endif
235 
KSycocaDict
Definition: ksycocadict_p.h:36
KSycocaFactoryList
This, instead of a typedef, allows to declare "class ..." in header files.
Definition: ksycocafactory.h:148
kdecore_export.h
KSycoca
Definition: ksycoca.h:43
QDataStream
quint32
KSycocaFactory
Definition: ksycocafactory.h:36
ksycocatype.h
factories
static factoryMap factories
Definition: k3socketdevice.cpp:875
KSycoca::LocalDatabase
Definition: ksycoca.h:60
QObject
QString
QStringList
KSycocaPrivate
Definition: ksycoca_p.h:30
KDE::version
unsigned int version()
Returns the encoded number of KDE's version, see the KDE_VERSION macro.
Definition: kdeversion.cpp:24
KSycoca::m_str_deprecated
QDataStream * m_str_deprecated
Definition: ksycoca.h:207
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs 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

Search



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