File indexing completed on 2024-04-14 14:19:34

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org>
0004     SPDX-FileCopyrightText: 2000 Waldo Bastian <bastian@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef KDED_KDEDADAPTOR_H
0010 #define KDED_KDEDADAPTOR_H
0011 
0012 #include <QDBusAbstractAdaptor>
0013 class QDBusMessage;
0014 
0015 class KdedAdaptor : public QDBusAbstractAdaptor
0016 {
0017     Q_OBJECT
0018     Q_CLASSINFO("D-Bus Interface", "org.kde.kded5")
0019 public:
0020     KdedAdaptor(QObject *parent);
0021 
0022 public Q_SLOTS:
0023     bool loadModule(const QString &obj);
0024     QStringList loadedModules();
0025     bool unloadModule(const QString &obj);
0026     // bool isWindowRegistered(qlonglong windowId) const;
0027     void registerWindowId(qlonglong windowId, const QDBusMessage &);
0028     void unregisterWindowId(qlonglong windowId, const QDBusMessage &);
0029     void reconfigure();
0030     // TODO KF6 remove
0031     void loadSecondPhase();
0032     void quit();
0033 
0034     /**
0035      * Check if module @a module has @c X-KDE-Kded-autoload=True.
0036      */
0037     bool isModuleAutoloaded(const QString &module);
0038 
0039     /**
0040      * Check if module @a module has @c X-KDE-Kded-load-on-demand=True.
0041      */
0042     bool isModuleLoadedOnDemand(const QString &module);
0043 
0044     /**
0045      * Set @c X-KDE-Kded-autoload to @a autoload for module @a module.
0046      */
0047     void setModuleAutoloading(const QString &module, bool autoload);
0048 };
0049 
0050 #endif