libgnomevfsmm  2.26.0
Classes | Typedefs | Functions
Gnome::Vfs::Transfer2 Namespace Reference

File transfers: conveniently copy/move/delete single or many URIs at once. More...

Classes

class  ProgressInfo
 Provides progress information for the transfer operation. More...
 

Typedefs

typedef Glib::ListHandle
< Glib::ustring > 
ListHandleStrings
 
typedef Glib::ListHandle
< Glib::RefPtr< const Uri > > 
ListHandleUris
 
typedef sigc::slot< gint,
const ProgressInfo & > 
SlotProgress
 For instance, gint on_transfer_progress(const Gnome::Vfs::Transfer::ProgressInfo& info);. More...
 

Functions

void transfer_list (const Glib::StringArrayHandle &source_uri_list, const Glib::StringArrayHandle &target_uri_list, TransferOptions options, ErrorMode error_mode, OverwriteMode overwrite_mode, const SlotProgress &slot)
 This function will transfer multiple files to multiple targets, given source URIs and destination URIs. More...
 
void transfer_list_uris (const ListHandleUris &source_uri_list, const ListHandleUris &target_uri_list, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, OverwriteMode overwrite_mode=XFER_OVERWRITE_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 This function will transfer multiple files to multiple targets, given source URIs and destination URIs. More...
 
void transfer (const Glib::ustring &source_uri, const Glib::ustring &target_uri, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, OverwriteMode overwrite_mode=XFER_OVERWRITE_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 This function works exactly like transfer_list(), and is a convenience wrapper for only acting on one source/target URI pair. More...
 
void transfer (const Glib::RefPtr< const Uri > &source_uri, const Glib::RefPtr< const Uri > &target_uri, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, OverwriteMode overwrite_mode=XFER_OVERWRITE_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 This function works exactly like transfer_list_uris(), and is a convenience wrapper for only acting on one source/target URI pair. More...
 
void remove_list (const Glib::StringArrayHandle &source_uri_list, TransferOptions options, ErrorMode error_mode, const SlotProgress &slot)
 Unlinks items in the source_uri_list from their filesystems. More...
 
void remove_list_uris (const ListHandleUris &source_uri_list, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 Unlinks items in the source_uri_list from their filesystems. More...
 
void remove (const Glib::ustring &source_uri, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 This function works exactly like remove_list(), and is a convenience wrapper for only acting on one source URI. More...
 
void remove (const Glib::RefPtr< const Uri > &source_uri, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
 This function works exactly like remove_list_uris(), and is a convenience wrapper for only acting on one source URI. More...
 

Detailed Description

File transfers: conveniently copy/move/delete single or many URIs at once.

Typedef Documentation

typedef Glib::ListHandle<Glib::ustring> Gnome::Vfs::Transfer2::ListHandleStrings
typedef Glib::ListHandle< Glib::RefPtr<const Uri> > Gnome::Vfs::Transfer2::ListHandleUris
typedef sigc::slot<gint, const ProgressInfo&> Gnome::Vfs::Transfer2::SlotProgress

For instance, gint on_transfer_progress(const Gnome::Vfs::Transfer::ProgressInfo& info);.

Function Documentation

void Gnome::Vfs::Transfer2::remove ( const Glib::ustring &  source_uri,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

This function works exactly like remove_list(), and is a convenience wrapper for only acting on one source URI.

See also
remove_list()
void Gnome::Vfs::Transfer2::remove ( const Glib::RefPtr< const Uri > &  source_uri,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

This function works exactly like remove_list_uris(), and is a convenience wrapper for only acting on one source URI.

See also
remove_list_uris()
void Gnome::Vfs::Transfer2::remove_list ( const Glib::StringArrayHandle &  source_uri_list,
TransferOptions  options,
ErrorMode  error_mode,
const SlotProgress &  slot 
)

Unlinks items in the source_uri_list from their filesystems.

Parameters
source_uri_listA string list containing URIs (ie file://).
error_modeDecide how you want to deal with interruptions.
xfer_optionsSet whatever transfer options you need.
progress_callbackCallback to check on progress of transfer.
dataData to be passed back in callbacks from the transfer engine.
Exceptions
exception
void Gnome::Vfs::Transfer2::remove_list_uris ( const ListHandleUris &  source_uri_list,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

Unlinks items in the source_uri_list from their filesystems.

Parameters
source_uri_listA Uri list.
error_modeDecide how you want to deal with interruptions.
xfer_optionsSet whatever transfer options you need.
progress_callbackCallback to check on progress of transfer.
dataData to be passed back in callbacks from the transfer engine.
Exceptions
exception
void Gnome::Vfs::Transfer2::transfer ( const Glib::ustring &  source_uri,
const Glib::ustring &  target_uri,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
OverwriteMode  overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

This function works exactly like transfer_list(), and is a convenience wrapper for only acting on one source/target URI pair.

See also
transfer_list()
void Gnome::Vfs::Transfer2::transfer ( const Glib::RefPtr< const Uri > &  source_uri,
const Glib::RefPtr< const Uri > &  target_uri,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
OverwriteMode  overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

This function works exactly like transfer_list_uris(), and is a convenience wrapper for only acting on one source/target URI pair.

See also
transfer_list()
void Gnome::Vfs::Transfer2::transfer_list ( const Glib::StringArrayHandle &  source_uri_list,
const Glib::StringArrayHandle &  target_uri_list,
TransferOptions  options,
ErrorMode  error_mode,
OverwriteMode  overwrite_mode,
const SlotProgress &  slot 
)

This function will transfer multiple files to multiple targets, given source URIs and destination URIs.

There are a list of options that your application can use to control how the transfer is done. If you want to do asynchronous file transfers, you have to use the functionality provided by the Async2 namespace instead.

Parameters
source_uri_listA list of source URI strings (ie file://).
target_uri_listA list of destination URI strings (ie file://).
optionsTransferOptions defining the desired operation and parameters.
error_modeAn ErrorMode specifying how to proceed if a VFS error occurs. For instance, you could set your application to return an error code in case of an interuption.
overwrite_modeAn OverwriteMode to define how to react if a file you are copying is being overwritten.
progress_callbackA callback used to monitor the progress of a transfer. Common use would be to check to see if the transfer is asking for permission to overwrite a file.
Exceptions
exception
void Gnome::Vfs::Transfer2::transfer_list_uris ( const ListHandleUris &  source_uri_list,
const ListHandleUris &  target_uri_list,
TransferOptions  options = XFER_DEFAULT,
ErrorMode  error_mode = XFER_ERROR_MODE_ABORT,
OverwriteMode  overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
const SlotProgress &  progress_callback = SlotProgress() 
)

This function will transfer multiple files to multiple targets, given source URIs and destination URIs.

There are a list of options that your application can use to control how the transfer is done. If you want to do asynchronous file transfers, you must use the functionality provided by the Async2 namespace instead.

Parameters
source_uri_listA Uri list.
target_uri_listA Uri list.
optionsTransferOptions defining the desired operation and parameters.
error_modeAn ErrorMode specifying how to proceed if a VFS error occurs. For instance, you could set your application to return an error code in case of an interuption.
overwrite_modeAn OverwriteMode to define how to react if a file you are copying is being overwritten.
progress_callbackA callback used to monitor the progress of a transfer. Common use would be to check to see if the transfer is asking for permission to overwrite a file.
Exceptions
exception