playground/base/plasma

Marco Martin notmart at gmail.com
Wed Feb 11 18:19:36 CET 2009


On Wednesday 11 February 2009, Kevin Ottens wrote:
> On Wednesday 11 February 2009 17:24:02 Aaron J. Seigo wrote:
> > or clients could listen for a dbus signal and re-register whenever it is
> > emitted? so when the kded plugin first loads it could emit that signal?
>
> D-Bus already provide this kind of service, it's exposed through
> QDBusConnectionInterface in Qt:
> http://doc.trolltech.com/4.4/qdbusconnectioninterface.html
>
> Relevant signals are probably: serviceRegistered() and
> serviceUnregistered().
>
> You just have to make sure your service register with a fixed name and
> you'll get that for free, no need to craft our own signal.

sounds exactly what is needed:
-apps listens for serviceregistred of org.kde.systemtraydaemon or whatever, 
when it arrives they register their name by hand with the registerservice 
offered by the systemtray daemon (maybe another name different from 
registerservice to not confuse with those signals, but maybe that name makes 
sense, hmm)

-the daemon listens for serviceunregistered of its registered services

-the systemtray asks for the list of services to the daemon

-when a systray using app is closed the daemon removes the service from its 
list 

-and the systray  listen for serviceunregistered either from qdbusconnection 
and then check if it was actually a systray using  thing or listen to a 
serviceunregistered of the daemon, and in this case we know for sure it was 
actually a systemtray using app
>
> Hope that helps.
>
> Regards.




More information about the Plasma-devel mailing list