[packagekit] Res: Session D-BUS API
wm161 at wm161.net
Sat Mar 7 14:04:06 PST 2009
On Friday 06 March 2009 02:02:48 pm Daniel Nicoletti wrote:
> K, i think me and trever are a bit out of sync..
> First we don't need qpackagekit to be sync,
> QDbus does async for us.
I'm not referring to qpackagekit, or even PackageKit-Qt. I'm talking about the
session side D-BUS API.
> after that i want to work on the dbus interface,
> and as discussed before the way call and way
> to be finished imo does not work, so imo it's
> much better to provide a simple interface,
> that calls and exit imediatally, with signals
> that tell the status, finish.
> MAX_UINT is too short and ppl will start thinking
> this is our bug.
> i vote to have a simple asyinc lib..
> installPackage installFont
> statusChanged -> canceled, finished, downloading, waiting..
> and maybe a cancel..
> imo this should be enough..
Er, which method exactly are you advocating? Or are you saying that we should
have a sync and an async API? Implementing an async API would basically be the
same as making packagekitd available on the session bus. After reading
Richard's explanation of this stuff, I agree a synchronous API is best. In an
app, making a quick internal event loop to handle GUI events while waiting for
a dbus reply is pretty simple.
If an app wants to do anything more advanced than "install this codec", such
as "search for a list of packages that supply this codec, start installing the
one the user selected, and don't worry about showing a dialog because I'll
handle progress updates on my own", well, thats why we've got the PackageKit-
Qt/Glib libraries, and the much more complicated system bus calls.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the PackageKit