kdesupport/polkit-qt question

dantti85-dev at yahoo.com.br dantti85-dev at yahoo.com.br
Wed Mar 11 19:25:22 GMT 2009


Hey Kevin,

The issue is that some polkit methods included
in libpolkit-dbus and libpolkit-grant requires
you to pass DBusConnection and DBusMessage.

It's not that we didn't try to avoid but we can't
get a QDBusMessage and pass it, it's not simply
implementing or fixing an interface.

The only way to avoid that would be to reinvent
both libpolkit-dbus and libpolkit-grant which
imo is a waste of time.

I hope this can clarify the matter, or maybe
i don't get exactly what you meant. :D

Cheers,
Daniel.




________________________________
De: Kevin Krammer <kevin.krammer at gmx.at>
Para: kde-core-devel at kde.org
Enviadas: Quarta-feira, 11 de Março de 2009 16:10:30
Assunto: Re: kdesupport/polkit-qt question

On Wednesday 11 March 2009, Dario Freddi wrote:
> Hi Kevin,
>
> We surely would have liked to do as you said. Unfortunately, messing with
> those exact methods is unavoidable, since we need to pass PolicyKit a
> standard DBusMessage object, and there seems to be no way to get it from a
> QDBusMessage. If you dive deeper in the code, you'll see that
> methods/objects are used just to pass some DBusMessages to PolicyKit.

This is what I meant. You should be using the specified D-Bus interface 
instead.

After all this is the very purpose of D-Bus, to be able to specify interfaces 
without forcing certain implementations.

It helps to take a step back and have a look at it from a different angle.
Just assume you would not be using C or C++, e.g. Java or C#, then you would 
still have access to any D-Bus interface through the respective D-Bus 
implementation but not have access to libdbus API (especially since those 
D-Bus bindings are not using it internally either).

Which shows quite nicely that any kind of D-Bus related services that want to 
be infrastructure for Free Software desktop systems will have their D-Bus 
interfaces as the official API.

For example see HAL, NetworkManager, etc.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring



      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090311/45cc7b4f/attachment.htm>


More information about the kde-core-devel mailing list