KDEREVIEW: nowplaying dataengine and applet for plasma

Kevin Krammer kevin.krammer at gmx.at
Thu Jan 31 12:07:46 GMT 2008


On Wednesday 30 January 2008, Ian Monroe wrote:

> You just have to pass an extra option to either the cmake command or
> to qdbusxml2cpp to change the classname.

Right, but I was more referring to having all methods of the interface in the 
QDBusAdaptor, having to implement all of them in the adaptee.

> You can see the code in 
> kdemultimedia/dragonplayer/src/dbus, I didn't have to do anything too
> strange (though I kind of messed up my naming scheme, that's my
> fault).

Ah, so you have split the interface into separate introspection files already.
Consider how awkward your code would look like if you had used the 
introspection data as specified by MPRIS spec, i.e. with all methods on each 
node.

> > It also messes up the discoverability. Any user using tools like qdbus
> > will see all methods on each node and probably wonder why certain methods
> > return a D-Bus error when being called.
>
> I haven't noticed this problem. That said, I'll ping the list and ask
> why we're doing it this way.

You introspection files are almost perfect, they just need different names for 
the interface, but they already split the methods into suitable groups.

I'd say suitable names would be org.freedesktop.MediaPlayer for the interface 
of the root object, org.freedesktop.MediaPlayer.Player for the interface of 
the player object and org.freedesktop.MediaPlayer.TrackList for the tracklist 
object.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080131/59a15820/attachment.sig>


More information about the kde-core-devel mailing list