Re: GnomeVFSXferProgressCallback return value



On Sun, 2003-12-07 at 00:37, Murray Cumming Comneon com wrote:

> Does anyone know what the return value from my callback is meant to mean? Is
> it really an int, or a gboolean?

Depends on what the status of the transfer is.  From gnome-vfs-xfer.h:

> /* This is the prototype for functions called during a transfer operation to
>    report progress.  If the return value is `FALSE' (0), the operation is
>    interrupted immediately: the transfer function returns with the value of
>    `vfs_status' if it is different from `GNOME_VFS_OK', or with
>    `GNOME_VFS_ERROR_INTERRUPTED' otherwise.  The effect of other values depend
>    on the value of `info->status':
>                                                                                 
>    - If the status is `GNOME_VFS_XFER_PROGRESS_STATUS_OK', the transfer
>      operation is resumed normally.
>                                                                                 
>    - If the status is `GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR', the return
>      value is interpreted as a `GnomeVFSXferErrorAction' and operation is
>      interrupted, continued or retried accordingly.
>                                                                                 
>    - If the status is `GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE', the return
>      value is interpreted as a `GnomeVFSXferOverwriteAction'.  */

Not very binding friendly, but quite convenient when you actually use
it.  (That's true for many things in GnomeVFS.)

HTH,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]