libgnomevfsmm  2.26.0
transfer.h
Go to the documentation of this file.
1 /* Copyright 2003, 2006 gnome-vfsmm Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free
15  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16  */
17 
18 
19 #ifndef _LIBGNOMEVFSMM_TRANSFER_H
20 #define _LIBGNOMEVFSMM_TRANSFER_H
21 
22 #include <glibmm.h>
23 
24 #include <libgnomevfsmm/enums.h>
26 #include <libgnomevfsmm/uri.h>
28 
29 #include <libgnomevfs/gnome-vfs-xfer.h> //For GnomeVFSXferProgressInfo
30 
31 namespace Gnome
32 {
33 
34 namespace Vfs
35 {
36 
39 namespace Transfer
40 {
41 
42 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
43 typedef Glib::ListHandle< Glib::RefPtr<const Uri> > ListHandleUris;
44 
46 typedef sigc::slot<bool, const ProgressInfo&> SlotProgress;
47 
48 
49 #ifdef GLIBMM_EXCEPTIONS_ENABLED
50 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list,
51  TransferOptions options,
52  ErrorMode error_mode,
53  OverwriteMode overwrite_mode,
54  const SlotProgress& slot);
55 #else
56 void transfer_list(const Glib::StringArrayHandle& source_uri_list, const Glib::StringArrayHandle& target_uri_list,
57  TransferOptions options,
58  ErrorMode error_mode,
59  OverwriteMode overwrite_mode,
60  const SlotProgress& slot,
61  std::auto_ptr<Gnome::Vfs::exception> error);
62 #endif //GLIBMM_EXCEPTIONS_ENABLED
63 
82 #ifdef GLIBMM_EXCEPTIONS_ENABLED
83 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list,
84  TransferOptions options = XFER_DEFAULT,
85  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
87  const SlotProgress& progress_callback = SlotProgress());
88 #else
89 void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list,
90  TransferOptions options,
91  ErrorMode error_mode,
92  OverwriteMode overwrite_mode,
93  const SlotProgress& progress_callback,
94  std::auto_ptr<Gnome::Vfs::exception>& error);
95 #endif //GLIBMM_EXCEPTIONS_ENABLED
96 
97 #ifdef GLIBMM_EXCEPTIONS_ENABLED
98 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri,
99  TransferOptions options = XFER_DEFAULT,
100  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
101  OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
102  const SlotProgress& progress_callback = SlotProgress());
103 #else
104 void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri,
105  TransferOptions options,
106  ErrorMode error_mode,
107  OverwriteMode overwrite_mode,
108  const SlotProgress& progress_callback,
109  std::auto_ptr<Gnome::Vfs::exception>& error);
110 #endif //GLIBMM_EXCEPTIONS_ENABLED
111 
112 #ifdef GLIBMM_EXCEPTIONS_ENABLED
113 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri,
114  TransferOptions options = XFER_DEFAULT,
115  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
116  OverwriteMode overwrite_mode = XFER_OVERWRITE_MODE_ABORT,
117  const SlotProgress& progress_callback = SlotProgress());
118 #else
119 void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri,
120  TransferOptions options,
121  ErrorMode error_mode,
122  OverwriteMode overwrite_mode,
123  const SlotProgress& progress_callback,
124  std::auto_ptr<Gnome::Vfs::exception>& error);
125 #endif //GLIBMM_EXCEPTIONS_ENABLED
126 
127 #ifdef GLIBMM_EXCEPTIONS_ENABLED
128 void remove(const Glib::ustring& source_uri,
129  TransferOptions options = XFER_DEFAULT,
130  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
131  const SlotProgress& progress_callback = SlotProgress());
132 #else
133 void remove(const Glib::ustring& source_uri,
134  TransferOptions options,
135  ErrorMode error_mode,
136  const SlotProgress& progress_callback,
137  std::auto_ptr<Gnome::Vfs::exception>& error);
138 #endif //GLIBMM_EXCEPTIONS_ENABLED
139 
140 #ifdef GLIBMM_EXCEPTIONS_ENABLED
141 void remove(const Glib::RefPtr<const Uri>& source_uri,
142  TransferOptions options = XFER_DEFAULT,
143  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
144  const SlotProgress& progress_callback = SlotProgress());
145 #else
146 void remove(const Glib::RefPtr<const Uri>& source_uri,
147  TransferOptions options,
148  ErrorMode error_mode,
149  const SlotProgress& progress_callback,
150  std::auto_ptr<Gnome::Vfs::exception>& error);
151 #endif //GLIBMM_EXCEPTIONS_ENABLED
152 
153 #ifdef GLIBMM_EXCEPTIONS_ENABLED
154 void remove_list(const Glib::StringArrayHandle& source_uri_list,
155  TransferOptions options,
156  ErrorMode error_mode,
157  const SlotProgress& slot);
158 #else
159 void remove_list(const Glib::StringArrayHandle& source_uri_list,
160  TransferOptions options,
161  ErrorMode error_mode,
162  const SlotProgress& slot,
163  std::auto_ptr<Gnome::Vfs::exception>& error);
164 #endif //GLIBMM_EXCEPTIONS_ENABLED
165 
166 #ifdef GLIBMM_EXCEPTIONS_ENABLED
167 void remove_list_uris(const ListHandleUris& source_uri_list,
168  TransferOptions options = XFER_DEFAULT,
169  ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
170  const SlotProgress& progress_callback = SlotProgress());
171 #else
172 void remove_list_uris(const ListHandleUris& source_uri_list,
173  TransferOptions options,
174  ErrorMode error_mode,
175  const SlotProgress& progress_callbacki,
176  std::auto_ptr<Gnome::Vfs::exception>& error);
177 #endif //GLIBMM_EXCEPTIONS_ENABLED
178 
179 } // namespace Transfer
180 } // namespace Vfs
181 } // namespace Gnome
182 
183 #endif /* _LIBGNOMEVFSMM_TRANSFER_H */