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

KDED

kded.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries
00002  *  Copyright (C) 1999 David Faure <faure@kde.org>
00003  *            (C) 1999 Waldo Bastian <bastian@kde.org>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation;
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #ifndef KDED_H
00021 #define KDED_H
00022 
00023 #include <QtCore/QObject>
00024 #include <QtCore/QString>
00025 #include <QtCore/QTimer>
00026 #include <QtCore/QHash>
00027 #include <QtCore/QSet>
00028 
00029 #include <QtDBus/QtDBus>
00030 
00031 #include <ksycoca.h>
00032 #include <ksycocatype.h>
00033 #include <kdedmodule.h>
00034 #include <klibloader.h>
00035 #include <kservice.h>
00036 
00037 class KDirWatch;
00038 
00039 // No need for this in libkio - apps only get readonly access
00040 class Kded : public QObject
00041 {
00042   Q_OBJECT
00043 public:
00044    Kded(bool checkUpdates);
00045    virtual ~Kded();
00046 
00047    static Kded *self() { return _self;}
00048    static void messageFilter(const QDBusMessage &);
00049 
00050    void noDemandLoad(const QString &obj); // Don't load obj on demand
00051 
00052    KDEDModule *loadModule(const QString &obj, bool onDemand);
00053    KDEDModule *loadModule(const KService::Ptr& service, bool onDemand);
00054    QStringList loadedModules();
00055    bool unloadModule(const QString &obj);
00056    //bool isWindowRegistered(qlonglong windowId) const;
00066    void registerWindowId(qlonglong windowId, const QString &sender);
00070    void unregisterWindowId(qlonglong windowId, const QString &sender);
00072    void recreate(const QDBusMessage&);
00073    void recreate(bool initial);
00074    void loadSecondPhase();
00075 
00077 
00083    bool isModuleAutoloaded(const QString &module) const;
00090    bool isModuleAutoloaded(const KService::Ptr &module) const;
00092 
00094 
00101    bool isModuleLoadedOnDemand(const QString &module) const;
00109    bool isModuleLoadedOnDemand(const KService::Ptr &module) const;
00111 
00123    void setModuleAutoloading(const QString &module, bool autoload);
00124 
00125 
00126 public Q_SLOTS:
00130    void initModules();
00131 
00135    void recreate();
00136 
00140    void recreateDone();
00141 
00145    void updateDirWatch();
00146 
00150    void updateResourceList();
00151 
00155    void slotApplicationRemoved(const QString&, const QString&, const QString&);
00156 
00160    void slotKDEDModuleRemoved(KDEDModule *);
00161 
00162 protected Q_SLOTS:
00163 
00167    void dirDeleted(const QString& path);
00168 
00172    void update (const QString& dir );
00173 
00174    void runDelayedCheck();
00175 
00176 protected:
00180    void readDirectory(const QString& dir );
00181 
00187    KDirWatch* m_pDirWatch;
00188 
00189    bool b_checkUpdates;
00190 
00196    QTimer* m_pTimer;
00197 
00198    QList<QDBusMessage> m_recreateRequests;
00199    int m_recreateCount;
00200    bool m_recreateBusy;
00201 
00202    QHash<QString,KDEDModule *> m_modules;
00203     //QHash<QString,KLibrary *> m_libs;
00204    QHash<QString,QObject *> m_dontLoad;
00205    QHash<QString,QList<qlonglong> > m_windowIdList;
00206 
00207    QSet<long> m_globalWindowIdList;
00208    QStringList m_allResourceDirs;
00209    bool m_needDelayedCheck;
00210 
00211    static Kded *_self;
00212 };
00213 
00214 class KBuildsycocaAdaptor: public QDBusAbstractAdaptor
00215 {
00216    Q_OBJECT
00217    Q_CLASSINFO("D-Bus Interface", "org.kde.kbuildsycoca")
00218 public:
00219    KBuildsycocaAdaptor(QObject *parent);
00220 
00221 public Q_SLOTS:
00222    Q_NOREPLY void recreate(const QDBusMessage&);
00223 };
00224 
00225 
00226 class KUpdateD : public QObject
00227 {
00228    Q_OBJECT
00229 public:
00230    KUpdateD();
00231    ~KUpdateD();
00232 
00233 public Q_SLOTS:
00234    void runKonfUpdate();
00235    void slotNewUpdateFile();
00236 
00237 private:
00243    KDirWatch* m_pDirWatch;
00244 
00250    QTimer* m_pTimer;
00251 };
00252 
00253 class KHostnameD : public QObject
00254 {
00255    Q_OBJECT
00256 public:
00257    KHostnameD(int pollInterval);
00258    ~KHostnameD();
00259 
00260 public Q_SLOTS:
00261    void checkHostname();
00262 
00263 private:
00267    QTimer m_Timer;
00268    QByteArray m_hostname;
00269 };
00270 
00271 #endif

KDED

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal