Re: What to return in async transfer callbacks?
- From: Matthias Kaeppler <noreply finitestate org>
- To: gnome-vfs-list gnome org
- Subject: Re: What to return in async transfer callbacks?
- Date: Mon, 26 Sep 2005 11:32:45 +0200
Alexander Larsson wrote:
This whole API is less than ideal, and not much documented. Try reading
nautilus/libnautilus-private/nautilus-file-operations.c to see how its
used.
You can say that again. (Though I am still glad we have it!)
I'll take a peek at that file, thanks.
By the way, there is another thing I stumbled over while using gnome-vfs
(as far as I can tell, this applies to both the C and the C++ API):
It seems to me that the names and descriptions of these two callbacks
have been confused. The first one is called progress_update_callback and
is not really documented. Everything said about this callback is:
"called periodically to keep the client appraised of progress in
completing the XFer operation, and the current phase of operation."
Then there is the other one called progress_sync_callback:
"called when the program requires responses to interactive queries (e.g.
overwriting files, handling errors, etc"
From my observations, it's actually vice versa. The first function I
pass to gnome_vfs_async_xfer is the interaction slot, where user
interaction happens. It's e.g. called when you try to overwrite a file.
The second one, the (so called) sync callback, is in fact the update
callback. It is called when the transfer progresses.
Again, I am using the C++ bindings, but since they only (should) call
the C equivalents, and since in their documentation it's exactly the
same, I guess this small but confusing inaccuracy has been ported to C++
as well :D
I filed a bug to gnomemm, but I haven't received any answers so far (I'm
not sure if anyone reads the bug reports, it looked sort of abandoned to
me).
Best regards,
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]