KDECore
Go to the documentation of this file.
27 #include <QtCore/QTimer>
28 #include <QtDBus/QtDBus>
32 class KDEDModulePrivate
39 :
QObject(parent), d(new KDEDModulePrivate)
52 QDBusObjectPath realPath( QString::fromLatin1(
"/modules/") + d->moduleName);
54 if (realPath.path().isEmpty())
56 kError() <<
"The kded module name '" << name <<
"' is invalid!";
61 QDBusConnection::RegisterOptions regOptions;
63 if (this->metaObject()->indexOfClassInfo(
"D-Bus Interface")!=-1)
72 regOptions = QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors;
77 regOptions = QDBusConnection::ExportScriptableSlots
78 | QDBusConnection::ExportScriptableProperties
79 | QDBusConnection::ExportAdaptors;
80 kDebug() <<
"Registration of kded module " << d->moduleName <<
"without D-Bus interface.";
83 if (!QDBusConnection::sessionBus().registerObject(realPath.path(),
this, regOptions))
86 kDebug() <<
"registerObject() returned false for " << d->moduleName;
90 kDebug() <<
"registerObject() successful for " << d->moduleName;
101 #include "kdedmodule.moc"
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setModuleName(const QString &name)
void moduleDeleted(KDEDModule *)
Emitted when the module is being deleted.
QString moduleName() const
void moduleRegistered(const QDBusObjectPath &path)
Emitted after the module is registered successfully with D-Bus.
KDEDModule(QObject *parent=0)
Constructor.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.