libgnomevfsmm 2.26.0
|
00001 /* Copyright 2006 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 Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 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 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser 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_2_H 00020 #define _LIBGNOMEVFSMM_TRANSFER_2_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-2.h> 00028 00029 #include <libgnomevfs/gnome-vfs-xfer.h> //For GnomeVFSXferProgressInfo 00030 00031 namespace Gnome 00032 { 00033 00034 namespace Vfs 00035 { 00036 00039 namespace Transfer2 00040 { 00041 00042 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings; 00043 typedef Glib::ListHandle< Glib::RefPtr<const Uri> > ListHandleUris; 00044 00046 // Essentially, this line, a different definition of SlotProgress, 00047 // is the main change forcing the introduction of the Transfer2 namespace. 00048 typedef sigc::slot<gint, const ProgressInfo&> SlotProgress; 00049 00069 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00070 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list, 00071 TransferOptions options, 00072 ErrorMode error_mode, 00073 OverwriteMode overwrite_mode, 00074 const SlotProgress& slot); 00075 #else 00076 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list, 00077 TransferOptions options, 00078 ErrorMode error_mode, 00079 OverwriteMode overwrite_mode, 00080 const SlotProgress& slot, 00081 std::auto_ptr<Gnome::Vfs::exception> error); 00082 #endif //GLIBMM_EXCEPTIONS_ENABLED 00083 00104 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00105 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list, 00106 TransferOptions options = XFER_DEFAULT, 00107 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00108 OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT, 00109 const SlotProgress& progress_callback = SlotProgress()); 00110 #else 00111 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list, 00112 TransferOptions options, 00113 ErrorMode error_mode, 00114 OverwriteMode overwrite_mode, 00115 const SlotProgress& progress_callback, 00116 std::auto_ptr<Gnome::Vfs::exception>& error); 00117 #endif //GLIBMM_EXCEPTIONS_ENABLED 00118 00124 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00125 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri, 00126 TransferOptions options = XFER_DEFAULT, 00127 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00128 OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT, 00129 const SlotProgress& progress_callback = SlotProgress()); 00130 #else 00131 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri, 00132 TransferOptions options, 00133 ErrorMode error_mode, 00134 OverwriteMode overwrite_mode, 00135 const SlotProgress& progress_callback, 00136 std::auto_ptr<Gnome::Vfs::exception>& error); 00137 #endif //GLIBMM_EXCEPTIONS_ENABLED 00138 00144 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00145 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri, 00146 TransferOptions options = XFER_DEFAULT, 00147 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00148 OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT, 00149 const SlotProgress& progress_callback = SlotProgress()); 00150 #else 00151 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri, 00152 TransferOptions options, 00153 ErrorMode error_mode, 00154 OverwriteMode overwrite_mode, 00155 const SlotProgress& progress_callback, 00156 std::auto_ptr<Gnome::Vfs::exception>& error); 00157 #endif //GLIBMM_EXCEPTIONS_ENABLED 00158 00159 //TODO: Add a string-based version of gnome_vfs_xfer_delete() to gnome-vfs. 00160 00170 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00171 void remove_list(const Glib::StringArrayHandle& source_uri_list, 00172 TransferOptions options, 00173 ErrorMode error_mode, 00174 const SlotProgress& slot); 00175 #else 00176 void remove_list(const Glib::StringArrayHandle& source_uri_list, 00177 TransferOptions options, 00178 ErrorMode error_mode, 00179 const SlotProgress& slot, 00180 std::auto_ptr<Gnome::Vfs::exception>& error); 00181 #endif //GLIBMM_EXCEPTIONS_ENABLED 00182 00192 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00193 void remove_list_uris(const ListHandleUris& source_uri_list, 00194 TransferOptions options = XFER_DEFAULT, 00195 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00196 const SlotProgress& progress_callback = SlotProgress()); 00197 #else 00198 void remove_list_uris(const ListHandleUris& source_uri_list, 00199 TransferOptions options, 00200 ErrorMode error_mode, 00201 const SlotProgress& progress_callbacki, 00202 std::auto_ptr<Gnome::Vfs::exception>& error); 00203 #endif //GLIBMM_EXCEPTIONS_ENABLED 00204 00210 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00211 void remove(const Glib::ustring& source_uri, 00212 TransferOptions options = XFER_DEFAULT, 00213 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00214 const SlotProgress& progress_callback = SlotProgress()); 00215 #else 00216 void remove(const Glib::ustring& source_uri, 00217 TransferOptions options, 00218 ErrorMode error_mode, 00219 const SlotProgress& progress_callback, 00220 std::auto_ptr<Gnome::Vfs::exception>& error); 00221 #endif //GLIBMM_EXCEPTIONS_ENABLED 00222 00228 #ifdef GLIBMM_EXCEPTIONS_ENABLED 00229 void remove(const Glib::RefPtr<const Uri>& source_uri, 00230 TransferOptions options = XFER_DEFAULT, 00231 ErrorMode error_mode = XFER_ERROR_MODE_ABORT, 00232 const SlotProgress& progress_callback = SlotProgress()); 00233 #else 00234 void remove(const Glib::RefPtr<const Uri>& source_uri, 00235 TransferOptions options, 00236 ErrorMode error_mode, 00237 const SlotProgress& progress_callback, 00238 std::auto_ptr<Gnome::Vfs::exception>& error); 00239 #endif //GLIBMM_EXCEPTIONS_ENABLED 00240 00241 } // namespace Transfer2 00242 } // namespace Vfs 00243 } // namespace Gnome 00244 00245 #endif /* _LIBGNOMEVFSMM_TRANSFER_2_H */