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

List:       kde-core-devel
Subject:    Re: kdesupport/polkit-qt question
From:       dantti85-dev () yahoo ! com ! br
Date:       2009-03-11 19:25:22
Message-ID: 249813.65200.qm () web32105 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

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@gmx.at>
Para: kde-core-devel@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
[Attachment #3 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:Courier \
New,courier,monaco,monospace,sans-serif;font-size:10pt"><div>Hey Kevin,<br><br>The \
issue is that some polkit methods included<br>in libpolkit-dbus and libpolkit-grant \
requires<br>you to pass DBusConnection and DBusMessage.<br><br>It's not that we \
didn't try to avoid but we can't<br>get a QDBusMessage and pass it, it's not \
simply<br>implementing or fixing an interface.<br><br>The only way to avoid that \
would be to reinvent<br>both libpolkit-dbus and libpolkit-grant which<br>imo is a \
waste of time.<br><br>I hope this can clarify the matter, or maybe<br>i don't get \
exactly what you meant. :D<br><br>Cheers,<br>Daniel.<br></div><div \
style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: \
10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: \
13px;"><font size="2" face="Tahoma"><hr size="1"><b><span  style="font-weight: \
bold;">De:</span></b> Kevin Krammer &lt;kevin.krammer@gmx.at&gt;<br><b><span \
style="font-weight: bold;">Para:</span></b> kde-core-devel@kde.org<br><b><span \
style="font-weight: bold;">Enviadas:</span></b> Quarta-feira, 11 de Março de 2009 \
16:10:30<br><b><span style="font-weight: bold;">Assunto:</span></b> Re: \
kdesupport/polkit-qt question<br></font><br>On Wednesday 11 March 2009, Dario Freddi \
wrote:<br>&gt; Hi Kevin,<br>&gt;<br>&gt; We surely would have liked to do as you \
said. Unfortunately, messing with<br>&gt; those exact methods is unavoidable, since \
we need to pass PolicyKit a<br>&gt; standard DBusMessage object, and there seems to \
be no way to get it from a<br>&gt; QDBusMessage. If you dive deeper in the code, \
you'll see that<br>&gt; methods/objects are used just to pass some DBusMessages to \
PolicyKit.<br><br>This is what I meant. You should be using the specified D-Bus \
interface <br>instead.<br><br>After all this is the very  purpose of D-Bus, to be \
able to specify interfaces <br>without forcing certain implementations.<br><br>It \
helps to take a step back and have a look at it from a different angle.<br>Just \
assume you would not be using C or C++, e.g. Java or C#, then you would <br>still \
have access to any D-Bus interface through the respective D-Bus <br>implementation \
but not have access to libdbus API (especially since those <br>D-Bus bindings are not \
using it internally either).<br><br>Which shows quite nicely that any kind of D-Bus \
related services that want to <br>be infrastructure for Free Software desktop systems \
will have their D-Bus <br>interfaces as the official API.<br><br>For example see HAL, \
NetworkManager, etc.<br><br>Cheers,<br>Kevin<br><br>-- <br>Kevin Krammer, KDE \
developer, xdg-utils developer<br>KDE user support, developer \
mentoring<br></div></div></div><br>


      <hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a \
href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top \
10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> \
- <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> \
- <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a></body></html>




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

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