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
31namespace Gnome
32{
33
34namespace Vfs
35{
36
39namespace Transfer
40{
41
42typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
43typedef Glib::ListHandle< Glib::RefPtr<const Uri> > ListHandleUris;
44
46typedef sigc::slot<bool, const ProgressInfo&> SlotProgress;
47
48
49#ifdef GLIBMM_EXCEPTIONS_ENABLED
50void 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
56void 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
83void transfer_list_uris(const ListHandleUris& source_uri_list, const ListHandleUris& target_uri_list,
87 const SlotProgress& progress_callback = SlotProgress());
88#else
89void 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
98void transfer(const Glib::ustring& source_uri, const Glib::ustring& target_uri,
100 ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
102 const SlotProgress& progress_callback = SlotProgress());
103#else
104void 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
113void transfer(const Glib::RefPtr<const Uri>& source_uri, const Glib::RefPtr<const Uri>& target_uri,
115 ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
117 const SlotProgress& progress_callback = SlotProgress());
118#else
119void 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
128void remove(const Glib::ustring& source_uri,
130 ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
131 const SlotProgress& progress_callback = SlotProgress());
132#else
133void 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
141void remove(const Glib::RefPtr<const Uri>& source_uri,
143 ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
144 const SlotProgress& progress_callback = SlotProgress());
145#else
146void 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
154void remove_list(const Glib::StringArrayHandle& source_uri_list,
155 TransferOptions options,
156 ErrorMode error_mode,
157 const SlotProgress& slot);
158#else
159void 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
167void remove_list_uris(const ListHandleUris& source_uri_list,
169 ErrorMode error_mode = XFER_ERROR_MODE_ABORT,
170 const SlotProgress& progress_callback = SlotProgress());
171#else
172void 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 */
ErrorMode
Definition enums.h:685
OverwriteMode
Definition enums.h:660
TransferOptions
Definition enums.h:599
@ XFER_ERROR_MODE_ABORT
Definition enums.h:686
@ XFER_OVERWRITE_MODE_ABORT
Definition enums.h:661
@ XFER_DEFAULT
Definition enums.h:600
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())
@source_uri_list: A List of uris (ie file://) @target_uri_list: A List of uris @options: These are op...
sigc::slot< bool, const ProgressInfo & > SlotProgress
For instance, int on_transfer_progress(GnomeVFSXferProgressInfo* info);.
Definition transfer.h:46
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())
Glib::ListHandle< Glib::RefPtr< const Uri > > ListHandleUris
Definition transfer.h:43
void remove_list(const Glib::StringArrayHandle &source_uri_list, TransferOptions options, ErrorMode error_mode, const SlotProgress &slot)
Glib::ListHandle< Glib::ustring > ListHandleStrings
Definition transfer.h:42
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)
void remove(const Glib::ustring &source_uri, TransferOptions options=XFER_DEFAULT, ErrorMode error_mode=XFER_ERROR_MODE_ABORT, const SlotProgress &progress_callback=SlotProgress())
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())
Definition address.h:37