• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • 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 <qobject.h>
00024 #include <qstring.h>
00025 #include <qtimer.h>
00026 #include <qasciidict.h>
00027 #include <qintdict.h>
00028 
00029 #include <dcopclient.h>
00030 #include <dcopobject.h>
00031 
00032 #include <ksycoca.h>
00033 #include <ksycocatype.h>
00034 #include <kdedmodule.h>
00035 #include <klibloader.h>
00036 
00037 class KDirWatch;
00038 class KService;
00039 
00040 // No need for this in libkio - apps only get readonly access
00041 class Kded : public QObject, public DCOPObject, public DCOPObjectProxy
00042 {
00043   Q_OBJECT
00044 public:
00045    Kded(bool checkUpdates, bool new_startup);
00046    virtual ~Kded();
00047 
00048    static Kded *self() { return _self;}
00052    bool process(const QCString &obj, const QCString &fun, 
00053                 const QByteArray &data, 
00054         QCString &replyType, QByteArray &replyData);
00055 
00060    bool process(const QCString &fun, const QByteArray &data, 
00061         QCString &replyType, QByteArray &replyData);
00062 
00063    virtual QCStringList functions();
00064 
00065    void noDemandLoad(const QString &obj); // Don't load obj on demand
00066 
00067    KDEDModule *loadModule(const QCString &obj, bool onDemand);
00068    KDEDModule *loadModule(const KService *service, bool onDemand);
00069    QCStringList loadedModules();
00070    bool unloadModule(const QCString &obj);
00071    bool isWindowRegistered(long windowId);
00072    void registerWindowId(long windowId);
00073    void unregisterWindowId(long windowId);
00074    void recreate(bool initial);
00075    void loadSecondPhase();
00076 
00077 public slots:
00081    void initModules();
00082 
00086    void recreate();
00087 
00091    void recreateDone();
00092 
00096    void updateDirWatch();
00097 
00101    void updateResourceList();
00102 
00106    void slotApplicationRemoved(const QCString &appId);
00107 
00111    void slotKDEDModuleRemoved(KDEDModule *);
00112 
00113 protected slots:
00114 
00118    void dirDeleted(const QString& path);
00119  
00123    void update (const QString& dir );
00124 
00128    void installCrashHandler();
00129    
00130    void runDelayedCheck();
00131 
00132 protected:
00136    void readDirectory(const QString& dir );
00137    
00138 
00139    static void crashHandler(int);
00140 
00146    KDirWatch* m_pDirWatch;
00147 
00148    bool b_checkUpdates;
00149 
00155    QTimer* m_pTimer;
00156    
00157    QValueList<DCOPClientTransaction *> m_recreateRequests;
00158    int m_recreateCount;
00159    bool m_recreateBusy;
00160    
00161    QAsciiDict<KDEDModule> m_modules;
00162    QAsciiDict<KLibrary> m_libs;
00163    QAsciiDict<QObject> m_dontLoad;
00164    QAsciiDict<QValueList<long> > m_windowIdList;
00165    QIntDict<long> m_globalWindowIdList;
00166    QStringList m_allResourceDirs;
00167    bool m_needDelayedCheck;
00168    bool m_newStartup;
00169 public:
00170    bool newStartup() const { return m_newStartup; }
00171 private:
00172      
00173    static Kded *_self;
00174 };
00175 
00176 class KUpdateD : public QObject
00177 {
00178    Q_OBJECT
00179 public:
00180    KUpdateD();
00181    ~KUpdateD();
00182    
00183 public slots:
00184    void runKonfUpdate();
00185    void slotNewUpdateFile();
00186 
00187 private:
00193    KDirWatch* m_pDirWatch;
00194 
00200    QTimer* m_pTimer;
00201 };
00202 
00203 class KHostnameD : public QObject
00204 {
00205    Q_OBJECT
00206 public:
00207    KHostnameD(int pollInterval);
00208    ~KHostnameD();
00209    
00210 public slots:
00211    void checkHostname();
00212 
00213 private:
00217    QTimer m_Timer;
00218    QCString m_hostname;
00219 };
00220 
00221 #endif

KDED

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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