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

KDED

  • kded
kded.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  * (C) 1999 Waldo Bastian <bastian@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 KDED_H
21 #define KDED_H
22 
23 #include <QtCore/QObject>
24 #include <QtCore/QString>
25 #include <QtCore/QTimer>
26 #include <QtCore/QHash>
27 #include <QtCore/QSet>
28 
29 #include <QtDBus/QtDBus>
30 
31 #include <ksycoca.h>
32 #include <ksycocatype.h>
33 #include <kdedmodule.h>
34 #include <kservice.h>
35 
36 class QDBusServiceWatcher;
37 class KDirWatch;
38 
39 // No need for this in libkio - apps only get readonly access
40 class Kded : public QObject
41 {
42  Q_OBJECT
43 public:
44  Kded();
45  virtual ~Kded();
46 
47  static Kded *self() { return _self;}
48  static void messageFilter(const QDBusMessage &);
49 
50  void noDemandLoad(const QString &obj); // Don't load obj on demand
51 
52  KDEDModule *loadModule(const QString &obj, bool onDemand);
53  KDEDModule *loadModule(const KService::Ptr& service, bool onDemand);
54  QStringList loadedModules();
55  bool unloadModule(const QString &obj);
56  //bool isWindowRegistered(qlonglong windowId) const;
66  void registerWindowId(qlonglong windowId, const QString &sender);
70  void unregisterWindowId(qlonglong windowId, const QString &sender);
72  void recreate(const QDBusMessage&);
73  void recreate(bool initial);
74  void loadSecondPhase();
75 
77 
83  bool isModuleAutoloaded(const QString &module) const;
90  bool isModuleAutoloaded(const KService::Ptr &module) const;
92 
94 
101  bool isModuleLoadedOnDemand(const QString &module) const;
109  bool isModuleLoadedOnDemand(const KService::Ptr &module) const;
111 
123  void setModuleAutoloading(const QString &module, bool autoload);
124 
125 
126 public Q_SLOTS:
130  void initModules();
131 
135  void recreate();
136 
140  void recreateDone();
141 
145  void updateDirWatch();
146 
150  void updateResourceList();
151 
155  void slotApplicationRemoved(const QString&);
156 
160  void slotKDEDModuleRemoved(KDEDModule *);
161 
162 protected Q_SLOTS:
163 
167  void dirDeleted(const QString& path);
168 
172  void update (const QString& dir );
173 
174  void runDelayedCheck();
175 
176 protected:
180  void readDirectory(const QString& dir );
181 
187  KDirWatch* m_pDirWatch;
188 
194  QTimer* m_pTimer;
195 
196  QList<QDBusMessage> m_recreateRequests;
197  int m_recreateCount;
198  bool m_recreateBusy;
199 
200  QHash<QString,KDEDModule *> m_modules;
201  //QHash<QString,KLibrary *> m_libs;
202  QHash<QString,QObject *> m_dontLoad;
203 
204  //window id tracking, with a QDBusServiceWatcher to remove them as needed
205  QDBusServiceWatcher *m_serviceWatcher;
206  QHash<QString,QList<qlonglong> > m_windowIdList;
207  QSet<long> m_globalWindowIdList;
208 
209  QStringList m_allResourceDirs;
210  bool m_needDelayedCheck;
211 
212  static Kded *_self;
213 };
214 
215 class KBuildsycocaAdaptor: public QDBusAbstractAdaptor
216 {
217  Q_OBJECT
218  Q_CLASSINFO("D-Bus Interface", "org.kde.kbuildsycoca")
219 public:
220  KBuildsycocaAdaptor(QObject *parent);
221 
222 public Q_SLOTS:
223  Q_NOREPLY void recreate(const QDBusMessage&);
224 };
225 
226 
227 class KUpdateD : public QObject
228 {
229  Q_OBJECT
230 public:
231  KUpdateD();
232  ~KUpdateD();
233 
234 public Q_SLOTS:
235  void runKonfUpdate();
236  void slotNewUpdateFile();
237 
238 private:
244  KDirWatch* m_pDirWatch;
245 
251  QTimer* m_pTimer;
252 };
253 
254 class KHostnameD : public QObject
255 {
256  Q_OBJECT
257 public:
258  KHostnameD(int pollInterval);
259  ~KHostnameD();
260 
261 public Q_SLOTS:
262  void checkHostname();
263 
264 private:
268  QTimer m_Timer;
269  QByteArray m_hostname;
270 };
271 
272 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 12:10:45 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDED

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

kdelibs-4.10.4 API Reference

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