kded.h
/* This file is part of the KDE libraries
* Copyright (C) 1999 David Faure <faure@kde.org>
* (C) 1999 Waldo Bastian <bastian@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 as published by the Free Software Foundation;
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
**/
#ifndef __kded_h__
#define __kded_h__
#include <qobject.h>
#include <qstring.h>
#include <qtimer.h>
#include <qasciidict.h>
#include <qintdict.h>
#include <dcopclient.h>
#include <dcopobject.h>
#include <ksycoca.h>
#include <ksycocatype.h>
#include <kdedmodule.h>
#include <klibloader.h>
class KDirWatch;
class KService;
// No need for this in libkio - apps only get readonly access
class Kded : public QObject, public DCOPObject, public DCOPObjectProxy
{
Q_OBJECT
public:
Kded(bool checkUpdates, bool new_startup);
virtual ~Kded();
static Kded *self() { return _self;}
bool process(const QCString &obj, const QCString &fun,
const QByteArray &data,
QCString &replyType, QByteArray &replyData);
bool process(const QCString &fun, const QByteArray &data,
QCString &replyType, QByteArray &replyData);
virtual QCStringList functions();
void noDemandLoad(const QString &obj); // Don't load obj on demand
KDEDModule *loadModule(const QCString &obj, bool onDemand);
KDEDModule *loadModule(const KService *service, bool onDemand);
QCStringList loadedModules();
bool unloadModule(const QCString &obj);
bool isWindowRegistered(long windowId);
void registerWindowId(long windowId);
void unregisterWindowId(long windowId);
void recreate(bool initial);
void loadSecondPhase();
public slots:
void initModules();
void recreate();
void recreateDone();
void updateDirWatch();
void updateResourceList();
void slotApplicationRemoved(const QCString &appId);
void slotKDEDModuleRemoved(KDEDModule *);
protected slots:
void dirDeleted(const QString& path);
void update (const QString& dir );
void installCrashHandler();
void runDelayedCheck();
protected:
void readDirectory(const QString& dir );
static void crashHandler(int);
KDirWatch* m_pDirWatch;
bool b_checkUpdates;
QTimer* m_pTimer;
QValueList<DCOPClientTransaction *> m_recreateRequests;
int m_recreateCount;
bool m_recreateBusy;
QAsciiDict<KDEDModule> m_modules;
QAsciiDict<KLibrary> m_libs;
QAsciiDict<QObject> m_dontLoad;
QAsciiDict<QValueList<long> > m_windowIdList;
QIntDict<long> m_globalWindowIdList;
QStringList m_allResourceDirs;
bool m_needDelayedCheck;
bool m_newStartup;
public:
bool newStartup() const { return m_newStartup; }
private:
static Kded *_self;
};
class KUpdateD : public QObject
{
Q_OBJECT
public:
KUpdateD();
~KUpdateD();
public slots:
void runKonfUpdate();
void slotNewUpdateFile();
private:
KDirWatch* m_pDirWatch;
QTimer* m_pTimer;
};
class KHostnameD : public QObject
{
Q_OBJECT
public:
KHostnameD(int pollInterval);
~KHostnameD();
public slots:
void checkHostname();
private:
QTimer m_Timer;
QCString m_hostname;
};
#endif
KDEDModule
The base class for KDED modules.
Definition: kdedmodule.h:55

KDE Home | KDE Accessibility Home | Description of Access Keys