• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
ksycoca.h
1 /* This file is part of the KDE libraries
2  * Copyright (C) 1999 Waldo Bastian <bastian@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 
19 #ifndef __ksycoca_h__
20 #define __ksycoca_h__
21 
22 #include <dcopobject.h>
23 #include <tqobject.h>
24 #include <tqstringlist.h>
25 #include "ksycocatype.h"
26 #include <kdelibs_export.h>
27 
28 class TQDataStream;
29 class KSycocaPrivate;
30 class KSycocaFactory;
31 class KSycocaFactoryList;
32 
33 /*
34  * Sycoca file version number.
35  * If the existing file is outdated, it will not get read
36  * but instead we'll ask kded to regenerate a new one...
37 */
38 #define KSYCOCA_VERSION 94
39 
44 class KDECORE_EXPORT KSycoca : public TQObject, public DCOPObject
45 {
46  Q_OBJECT
47  K_DCOP
48 
49 protected:
54  KSycoca( bool /* buildDatabase */ );
55 
56 public:
57 
61  KSycoca();
62 
66  static KSycoca *self();
67 
68  virtual ~KSycoca();
69 
70  static int version();
71 
76  TQDataStream *findEntry(int offset, KSycocaType &type);
80  TQDataStream *findFactory( KSycocaFactoryId id);
84  TQString kfsstnd_prefixes();
88  TQString language();
89 
96  TQ_UINT32 timeStamp();
97 
107  TQ_UINT32 updateSignature();
108 
113  TQStringList allResourceDirs();
114 
118  void addFactory( KSycocaFactory * );
119 
124  virtual bool isBuilding() { return false; }
125 
129  void disableAutoRebuild();
130 
134  static TQString determineRelativePath( const TQString & _fullpath, const char *_resource );
135 
141  static bool isChanged(const char *type);
142 
146  static void flagError();
147 
151  static bool readError();
152 
153 k_dcop:
157  void notifyDatabaseChanged(const TQStringList &);
158 
159 signals:
164  void databaseChanged();
165 
166 protected:
167  bool checkVersion(bool abortOnError=true);
168  bool openDatabase(bool openDummyIfNotFound=true);
169  void closeDatabase();
170  KSycocaFactoryList *m_lstFactories;
171  TQDataStream *m_str;
172  TQByteArray *m_barray;
173  bool bNoDatabase;
174  size_t m_sycoca_size;
175  const char *m_sycoca_mmap;
176  TQ_UINT32 m_timeStamp;
177 
178 public:
179  static KSycoca *_self; // Internal use only.
180 
181 protected:
182  virtual void virtual_hook( int id, void* data );
183 private:
184  KSycocaPrivate *d;
185 };
186 
187 #endif
KSycocaFactoryList
This, instead of a typedef, allows to declare "class ..." in header files.
Definition: ksycocafactory.h:137
KDE::version
unsigned int version()
Returns the encoded number of KDE's version, see the KDE_VERSION macro.
Definition: kdeversion.cpp:22
DCOPObject

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |