On Monday 06 December 2010 18:51:22 Kevin Ottens wrote: > On Friday 3 December 2010 12:41:29 Tulio Magno Quites Machado Filho wrote: > > I'm facing a problem with the current implementation of the DBUS > > service org.kde.Solid.PowerManagement. > > As I understood, the DBUS signal > > org.kde.Solid.PowerManagement.resumingFromSuspend is provided by Power > > Devil, which is located at kdebase/workspace/powerdevil/daemon. > > On this directory there is an XML file describing the service > > necessary to create the adaptor. > > > > The implementation of Solid::PowerManagement::Notifier is located at > > kdelibs/solid/solid and I need the DBUS interface created from the xml > > file explained above, but, IMHO, I don't think it's a good idea to > > make kdelibs depends on a file from kdebase. > > Well, we could move the xml file to kdelibs as you propose. The problem I > see with that is that it'd "expose" too much PowerDevil specific stuff to > the lib.
Exactly, I totally disagree. That interface is meant to be a workspace interface which should be used by KDE Power Management system only, so it should not be thrown into KDELibs. > > > I was planning to move the file > > kdebase/workspace/powerdevil/daemon/org.kde.Solid.PowerManagement.xml > > to kdelibs/solid/solid and change the CMakeLists.txt of both > > directories to correctly create the adaptor/interface. > > This will create an incompatibility with the service > > org.freedesktop.PowerManagement from kdelibs/solid/solid as both > > interfaces have the same name. I was planning, so, to use the same > > pattern as org.kde.Solid.PowerManagement.PolicyAgent: > > org_kde_solid_powermanagement.* > > > > Am I correct? > > Nope the interfaces don't have the same name because they're namespaced and > in different namespaces. The generated file names might clash though, is > it what you refer to? If yes, that's the networking client that we > actively rename. > > > Do you agree with these changes? > > Is there a better way to solve this problem? > > Well, org.kde.Solid.PowerManagement.PolicyAgent is kind of the interface > which carries extensions over org.freedesktop.PowerManagement* which > didn't end up in the spec. PowerDevil is supposed to implement it too, so > I'd rather add the signal to the corresponding xml file and keep the same > setup than before. > > Requires maybe synchronizing a bit this change with Dario though. Dario, > any input on that? The most sane solution to me (given that you need to connect to a single signal), is to use QDBusConnection::connect directly, and use QDBusServiceWatcher to be sure that the service exists (which should actually be done with all the other methods as well, TBH). If you are unsure on how to do that, I can code a patch tonight. > > Regards. -- ------------------- Dario Freddi KDE Developer GPG Key Signature: 511A9A3B
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-hardware-devel mailing list Kde-hardware-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-hardware-devel