transfer.h

Go to the documentation of this file.
00001 /* Copyright 2003 gnome-vfsmm Development Team
00002  *
00003  * This library is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU Library General Public
00005  * License as published by the Free Software Foundation; either
00006  * version 2 of the License, or (at your option) any later version.
00007  *
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Library General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Library General Public
00014  * License along with this library; if not, write to the Free
00015  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00016  */
00017 
00018 
00019 #ifndef _LIBGNOMEVFSMM_TRANSFER_H
00020 #define _LIBGNOMEVFSMM_TRANSFER_H
00021 
00022 #include <glibmm.h>
00023 
00024 #include <libgnomevfsmm/enums.h>
00025 #include <libgnomevfsmm/exception.h>
00026 #include <libgnomevfsmm/uri.h>
00027 #include <libgnomevfsmm/transfer-progress.h>
00028 
00029 #include <libgnomevfs/gnome-vfs-xfer.h> //For GnomeVFSXferProgressInfo
00030 
00031 namespace Gnome
00032 {
00033 
00034 namespace Vfs
00035 {
00036 
00039 namespace Transfer
00040 {
00041 
00042 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
00043 typedef Glib::ListHandle< Glib::RefPtr<const Uri> > ListHandleUris;
00044 
00045 //TODO: Find out what the return value is meant to be for.
00047 typedef sigc::slot<bool, const ProgressInfo&> SlotProgress;
00048 
00049 
00050 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00051 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list,
00052       TransferOptions options,
00053       ErrorMode error_mode,
00054       OverwriteMode overwrite_mode,
00055       const SlotProgress& slot);
00056 #else
00057 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list,
00058       TransferOptions options,
00059       ErrorMode error_mode,
00060       OverwriteMode overwrite_mode,
00061       const SlotProgress& slot,
00062       std::auto_ptr<Gnome::Vfs::exception> error);
00063 #endif //GLIBMM_EXCEPTIONS_ENABLED
00064       
00084 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00085 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list,
00086       TransferOptions options = XFER_DEFAULT, //TODO: Does Default do anything useful?
00087       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00088       OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
00089       const SlotProgress& progress_callback = SlotProgress());
00090 #else
00091 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list,
00092       TransferOptions options, //TODO: Does Default do anything useful?
00093       ErrorMode error_mode,
00094       OverwriteMode overwrite_mode,
00095       const SlotProgress& progress_callback,
00096       std::auto_ptr<Gnome::Vfs::exception>& error);
00097 #endif //GLIBMM_EXCEPTIONS_ENABLED
00098 
00099 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00100 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri,
00101       TransferOptions options = XFER_DEFAULT, //TODO: Does Default do anything useful?
00102       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00103       OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
00104       const SlotProgress& progress_callback = SlotProgress());
00105 #else
00106 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri,
00107       TransferOptions options, //TODO: Does Default do anything useful?
00108       ErrorMode error_mode,
00109       OverwriteMode overwrite_mode,
00110       const SlotProgress& progress_callback,
00111       std::auto_ptr<Gnome::Vfs::exception>& error);
00112 #endif //GLIBMM_EXCEPTIONS_ENABLED
00113       
00114 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00115 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri,
00116       TransferOptions options = XFER_DEFAULT, //TODO: Does Default do anything useful?
00117       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00118       OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
00119       const SlotProgress& progress_callback = SlotProgress());
00120 #else
00121 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri,
00122       TransferOptions options, //TODO: Does Default do anything useful?
00123       ErrorMode error_mode,
00124       OverwriteMode overwrite_mode,
00125       const SlotProgress& progress_callback,
00126       std::auto_ptr<Gnome::Vfs::exception>& error);
00127 #endif //GLIBMM_EXCEPTIONS_ENABLED
00128 
00129 //TODO: Add a string-based version of gnome_vfs_xfer_delete() to gnome-vfs.
00130 
00131 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00132 void remove(const Glib::ustring& source_uri,
00133       TransferOptions options = XFER_DEFAULT,
00134       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00135       const SlotProgress& progress_callback = SlotProgress());
00136 #else
00137 void remove(const Glib::ustring& source_uri,
00138       TransferOptions options,
00139       ErrorMode error_mode,
00140       const SlotProgress& progress_callback,
00141       std::auto_ptr<Gnome::Vfs::exception>& error);
00142 #endif //GLIBMM_EXCEPTIONS_ENABLED
00143       
00144 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00145 void remove(const Glib::RefPtr<const Uri>& source_uri,
00146       TransferOptions options = XFER_DEFAULT,
00147       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00148       const SlotProgress& progress_callback = SlotProgress());
00149 #else
00150 void remove(const Glib::RefPtr<const Uri>& source_uri,
00151       TransferOptions options,
00152       ErrorMode error_mode,
00153       const SlotProgress& progress_callback,
00154       std::auto_ptr<Gnome::Vfs::exception>& error);
00155 #endif //GLIBMM_EXCEPTIONS_ENABLED
00156 
00157 void remove_list(const Glib::StringArrayHandle& source_uri_list,
00158       TransferOptions options = XFER_DEFAULT,
00159       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00160       const SlotProgress& progress_callback = SlotProgress());
00161 
00162 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00163 void remove_list_uris(const ListHandleUris& source_uri_list,
00164       TransferOptions options = XFER_DEFAULT,
00165       ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
00166       const SlotProgress& progress_callback = SlotProgress());
00167 #else
00168 void remove_list_uris(const ListHandleUris& source_uri_list,
00169       TransferOptions options,
00170       ErrorMode error_mode,
00171       const SlotProgress& progress_callbacki,
00172       std::auto_ptr<Gnome::Vfs::exception>& error);
00173 #endif //GLIBMM_EXCEPTIONS_ENABLED
00174 
00175 } // namespace Transfer
00176 } // namespace Vfs
00177 } // namespace Gnome
00178 
00179 #endif /* _LIBGNOMEVFSMM_TRANSFER_H */

Generated on Mon Mar 12 07:54:47 2007 for libgnomevfsmm by  doxygen 1.5.1