[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KDEDModule help
From:       Luca Ferrari <fluca1978 () infinito ! it>
Date:       2012-06-14 16:09:59
Message-ID: CAKoxK+4SU=P1rBVJ-7ehY3vd9eLzi-MkFT8zSLNWgPc-_G6pFQ () mail ! gmail ! com
[Download RAW message or body]

Hi all,
I need to keep a consistent state among different kioslave instances,
so as pointed out in this mailing list, I'm going to do this via KDED.
 The problem is that I don't have fully understood how this works, so
I'm going to describe what I have so far and please give me advices.
I need to keep a list or "Role" objects that can be retrieved and
added or reduced by one entry at time. So I have a class that inherits
from KDEDModule that provides methods to do the role-list operations.
The constructor of my class looks like:

RoleFSKDEDModule::RoleFSKDEDModule ( QObject* parent, const QList<
QVariant >& parameters )
: KDEDModule ( parent ), _kdedModuleName( QString::fromLatin1(
"/modules/rolefskded" ) )
{
  Q_UNUSED( parameters )

  // get the DBus connection
  QDBusConnection currentConnection = QDBusConnection::sessionBus();
  currentConnection.registerService( QString::fromLatin1("org.kde.kded") );
  currentConnection.registerObject( _kdedModuleName, this );
}

Then I have an adaptor, that extends QDBusAbstractAdaptor and that
accepts, as parent in the constructor, and instance of my KDEDModule
subclass.
But I don't know how to go further, I mean which methods should I
place on the adaptor? And what about the factory as in the netwrok:/
slave? I found the following lines:

K_PLUGIN_FACTORY( NetworkWatcherFactory,
registerPlugin<Mollet::NetworkWatcher>(); )      \
K_EXPORT_PLUGIN( NetworkWatcherFactory("networkwatcher") )

which as far as I understand export a module named "networkwatcher"
which objects, of type NetworkWatcher are created by a factory which
is auto-generated. Is this correct? Do I need this too?

Thanks,
Luca

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic