[packagekit] Session D-BUS API
Adrien BUSTANY
madcat at mymadcat.com
Sun Mar 8 10:51:42 PDT 2009
Le 07/03/2009 23:05, Trever Fischer a écrit :
>>> Eg, if an app calls them, should it wait for them to complete
>>> before going on and assuming the job completed? I think it'd be easier to
>>> implement if they all returned some kind of job ID, and a jobComplete(id)
>>> signal got emitted, since the packagekit calls are already asynchronous.
>>>
>> I thought about that, but i really wanted the interface to be
>> fire-and-forget in that an application just called into the interface,
>> and it returned with success or failure. This needs to be kept very
>> simple for most apps.
>>
> I was afraid you'd say that...
>
>>> Then
>>> it'd be up to the specific app developer if they really want the calls to
>>> be synchronous or not. I mostly make this point because I'd rather not
>>> have a bunch of event loops floating around in kded to convert the native
>>> async calls to sync ones.
>>>
>> Yes, lots of event loops are icky.
>>
> ...and thats why. I'm sure we can manage it though.
>
>
>>> The exception of course is IsPackageInstalled.
>>>
>> Sure, but bear in mind this can block for a few minutes too if
>> packagekitd is servicing other transactions.
>>
>>
>>> 2. What is InstallProvideFile supposed to do? Is it supposed to search
>>> the list of available files for whats needed? Shouldn't whatProvides() be
>>> able to handle that?
>>>
>> It literally installs a package that provides the file /usr/bin/foo.
>> Basically, it's a way for an application to say "I need $this_file --
>> JUST DO IT" and not worry about all the details.
>>
> The packagekit-qt API doesn't seem to allow whatProvides to return a list of
> packages that provide a certain file. It seems the only way to do it is to use
> searchFile().
>
Well the packagekit-qt API is just a mapping of the packagekit API, no
more...
>>> 3. What are the xid and timestamp arguments for? Am I correct in assuming
>>> xid is an X11 window ID?
>>>
>> Well, you don't need to copy the "old" interface with the timestamps,
>> and yes, an XID is used to make the download window modal over the
>> window that launched the window. If the method is async, it also makes
>> doing that harder. FWIW, I think the max bus timeout is now pretty long
>> as long as you set it to MAX_UINT, but I am open to other ways of doing
>> it as the session methods need to be cross desktop.
>>
>>
> Ah, ok. I'm still curious what the timestamp was used for though :)
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090308/c6b731f8/attachment-0004.htm>
More information about the PackageKit
mailing list