1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 /* Copyright (C) 2007 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <giomm/mount.h>
23 #include <glibmm/error.h>
24 #include <glibmm/exceptionhandler.h>
25 #include "slot_async.h"
30 typedef std::pair<Gio::File::SlotReadMore*, Gio::SlotAsyncReady*> LoadPartialSlots;
33 SignalProxy_file_progress_callback(goffset current_num_bytes,
34 goffset total_num_bytes,
37 Gio::File::SlotFileProgress* the_slot = static_cast<Gio::File::SlotFileProgress*>(data);
39 #ifdef GLIBMM_EXCEPTIONS_ENABLED
42 #endif //GLIBMM_EXCEPTIONS_ENABLED
44 (*the_slot)(current_num_bytes, total_num_bytes);
46 #ifdef GLIBMM_EXCEPTIONS_ENABLED
50 Glib::exception_handlers_invoke();
52 #endif //GLIBMM_EXCEPTIONS_ENABLED
58 SignalProxy_load_partial_contents_read_more_callback(const char* file_contents, goffset file_size, gpointer data)
60 LoadPartialSlots* slot_pair = static_cast<LoadPartialSlots*>(data);
61 Gio::File::SlotReadMore* the_slot = slot_pair->first;
65 #ifdef GLIBMM_EXCEPTIONS_ENABLED
68 #endif //GLIBMM_EXCEPTIONS_ENABLED
70 result = (*the_slot)(file_contents, file_size);
72 #ifdef GLIBMM_EXCEPTIONS_ENABLED
76 Glib::exception_handlers_invoke();
78 #endif //GLIBMM_EXCEPTIONS_ENABLED
83 // Same as SignalProxy_async_callback, except that this one knows that
84 // the slot is packed in a pair. The operation is assumed to be finished
85 // after the callback is triggered, so we delete that pair here.
87 SignalProxy_load_partial_contents_ready_callback(GObject*, GAsyncResult* res, void* data)
89 LoadPartialSlots* slot_pair = static_cast<LoadPartialSlots*>(data);
90 Gio::SlotAsyncReady* the_slot = slot_pair->second;
92 #ifdef GLIBMM_EXCEPTIONS_ENABLED
95 #endif //GLIBMM_EXCEPTIONS_ENABLED
96 Glib::RefPtr<Gio::AsyncResult> result = Glib::wrap(res, true /* take copy */);
98 #ifdef GLIBMM_EXCEPTIONS_ENABLED
102 Glib::exception_handlers_invoke();
104 #endif //GLIBMM_EXCEPTIONS_ENABLED
107 delete slot_pair->first; // read_more slot
111 } // anonymous namespace
116 File::create_for_path(const std::string& path)
118 GFile* cfile = g_file_new_for_path(path.c_str());
119 return Glib::wrap(G_FILE(cfile));
123 File::create_for_uri(const std::string& uri)
125 GFile* cfile = g_file_new_for_uri(uri.c_str());
126 return Glib::wrap(G_FILE(cfile));
130 File::create_for_commandline_arg(const std::string& arg)
132 GFile* cfile = g_file_new_for_commandline_arg(arg.c_str());
133 return Glib::wrap(G_FILE(cfile));
137 File::create_for_parse_name(const Glib::ustring& parse_name)
139 GFile* cfile = g_file_parse_name(parse_name.c_str());
140 return Glib::wrap(G_FILE(cfile));
144 File::read_async(const SlotAsyncReady& slot, int io_priority)
146 // Create a copy of the slot.
147 // A pointer to it will be passed through the callback's data parameter
148 // and deleted in the callback.
149 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
151 g_file_read_async(gobj(),
154 &SignalProxy_async_callback,
159 File::read_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
161 // Create a copy of the slot.
162 // A pointer to it will be passed through the callback's data parameter
163 // and deleted in the callback.
164 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
166 g_file_read_async(gobj(),
169 &SignalProxy_async_callback,
174 File::append_to_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags, int io_priority)
176 // Create a copy of the slot.
177 // A pointer to it will be passed through the callback's data parameter
178 // and deleted in the callback.
179 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
181 g_file_append_to_async(gobj(),
182 static_cast<GFileCreateFlags>(flags),
185 &SignalProxy_async_callback,
190 File::append_to_async(const SlotAsyncReady& slot, FileCreateFlags flags, int io_priority)
192 // Create a copy of the slot.
193 // A pointer to it will be passed through the callback's data parameter
194 // and deleted in the callback.
195 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
197 g_file_append_to_async(gobj(),
198 static_cast<GFileCreateFlags>(flags),
201 &SignalProxy_async_callback,
206 File::create_file_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags, int io_priority)
208 // Create a copy of the slot.
209 // A pointer to it will be passed through the callback's data parameter
210 // and deleted in the callback.
211 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
213 g_file_create_async(gobj(),
214 static_cast<GFileCreateFlags>(flags),
217 &SignalProxy_async_callback,
222 File::create_file_async(const SlotAsyncReady& slot, FileCreateFlags flags, int io_priority)
224 // Create a copy of the slot.
225 // A pointer to it will be passed through the callback's data parameter
226 // and deleted in the callback.
227 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
229 g_file_create_async(gobj(),
230 static_cast<GFileCreateFlags>(flags),
233 &SignalProxy_async_callback,
238 File::replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag, bool make_backup, FileCreateFlags flags, int io_priority)
240 // Create a copy of the slot.
241 // A pointer to it will be passed through the callback's data parameter
242 // and deleted in the callback.
243 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
245 g_file_replace_async(gobj(),
246 etag.empty() ? NULL : etag.c_str(),
248 static_cast<GFileCreateFlags>(flags),
251 &SignalProxy_async_callback,
256 File::replace_async(const SlotAsyncReady& slot, const std::string& etag, bool make_backup, FileCreateFlags flags, int io_priority)
258 // Create a copy of the slot.
259 // A pointer to it will be passed through the callback's data parameter
260 // and deleted in the callback.
261 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
263 g_file_replace_async(gobj(),
264 etag.empty() ? NULL : etag.c_str(),
266 static_cast<GFileCreateFlags>(flags),
269 &SignalProxy_async_callback,
273 #ifdef GLIBMM_EXCEPTIONS_ENABLED
274 Glib::RefPtr<FileInfo> File::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags) const
276 Glib::RefPtr<FileInfo> File::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error) const
277 #endif //GLIBMM_EXCEPTIONS_ENABLED
280 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_query_info(const_cast<GFile*>(gobj()), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
281 #ifdef GLIBMM_EXCEPTIONS_ENABLED
283 ::Glib::Error::throw_exception(gerror);
286 error = ::Glib::Error::throw_exception(gerror);
287 #endif //GLIBMM_EXCEPTIONS_ENABLED
292 #ifdef GLIBMM_EXCEPTIONS_ENABLED
293 Glib::RefPtr<FileInfo> File::query_info(const std::string& attributes, FileQueryInfoFlags flags) const
295 Glib::RefPtr<FileInfo> File::query_info(const std::string& attributes, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error) const
296 #endif //GLIBMM_EXCEPTIONS_ENABLED
299 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_query_info(const_cast<GFile*>(gobj()), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), NULL, &(gerror)));
300 #ifdef GLIBMM_EXCEPTIONS_ENABLED
302 ::Glib::Error::throw_exception(gerror);
305 error = ::Glib::Error::throw_exception(gerror);
306 #endif //GLIBMM_EXCEPTIONS_ENABLED
311 bool File::query_exists() const
313 return g_file_query_exists(const_cast<GFile*>(gobj()), NULL);
316 FileType File::query_file_type(FileQueryInfoFlags flags) const
318 return (FileType)g_file_query_file_type(const_cast<GFile*>(gobj()), (GFileQueryInfoFlags)flags, NULL);
322 File::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags, int io_priority) const
324 // Create a copy of the slot.
325 // A pointer to it will be passed through the callback's data parameter
326 // and deleted in the callback.
327 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
329 g_file_query_info_async(const_cast<GFile*>(gobj()),
331 static_cast<GFileQueryInfoFlags>(flags),
334 &SignalProxy_async_callback,
339 File::query_info_async(const SlotAsyncReady& slot, const std::string& attributes, FileQueryInfoFlags flags, int io_priority) const
341 // Create a copy of the slot.
342 // A pointer to it will be passed through the callback's data parameter
343 // and deleted in the callback.
344 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
346 g_file_query_info_async(const_cast<GFile*>(gobj()),
348 static_cast<GFileQueryInfoFlags>(flags),
351 &SignalProxy_async_callback,
356 #ifdef GLIBMM_EXCEPTIONS_ENABLED
357 Glib::RefPtr<FileInfo> File::query_filesystem_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
359 Glib::RefPtr<FileInfo> File::query_filesystem_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, std::auto_ptr<Glib::Error>& error)
360 #endif //GLIBMM_EXCEPTIONS_ENABLED
363 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_query_filesystem_info(gobj(), attributes.c_str(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
364 #ifdef GLIBMM_EXCEPTIONS_ENABLED
366 ::Glib::Error::throw_exception(gerror);
369 error = ::Glib::Error::throw_exception(gerror);
370 #endif //GLIBMM_EXCEPTIONS_ENABLED
375 #ifdef GLIBMM_EXCEPTIONS_ENABLED
376 Glib::RefPtr<FileInfo> File::query_filesystem_info(const std::string& attributes)
378 Glib::RefPtr<FileInfo> File::query_filesystem_info(const std::string& attributes, std::auto_ptr<Glib::Error>& error)
379 #endif //GLIBMM_EXCEPTIONS_ENABLED
382 Glib::RefPtr<FileInfo> retvalue = Glib::wrap(g_file_query_filesystem_info(gobj(), attributes.c_str(), NULL, &(gerror)));
383 #ifdef GLIBMM_EXCEPTIONS_ENABLED
385 ::Glib::Error::throw_exception(gerror);
388 error = ::Glib::Error::throw_exception(gerror);
389 #endif //GLIBMM_EXCEPTIONS_ENABLED
395 File::query_filesystem_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority) const
397 // Create a copy of the slot.
398 // A pointer to it will be passed through the callback's data parameter
399 // and deleted in the callback.
400 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
402 g_file_query_filesystem_info_async(const_cast<GFile*>(gobj()),
406 &SignalProxy_async_callback,
411 File::query_filesystem_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority) const
413 // Create a copy of the slot.
414 // A pointer to it will be passed through the callback's data parameter
415 // and deleted in the callback.
416 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
418 g_file_query_filesystem_info_async(const_cast<GFile*>(gobj()),
422 &SignalProxy_async_callback,
426 #ifdef GLIBMM_EXCEPTIONS_ENABLED
427 Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags)
429 Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
430 #endif //GLIBMM_EXCEPTIONS_ENABLED
433 Glib::RefPtr<FileEnumerator> retvalue = Glib::wrap(g_file_enumerate_children(gobj(), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
434 #ifdef GLIBMM_EXCEPTIONS_ENABLED
436 ::Glib::Error::throw_exception(gerror);
439 error = ::Glib::Error::throw_exception(gerror);
440 #endif //GLIBMM_EXCEPTIONS_ENABLED
445 #ifdef GLIBMM_EXCEPTIONS_ENABLED
446 Glib::RefPtr<FileEnumerator> File::enumerate_children(const std::string& attributes, FileQueryInfoFlags flags)
448 Glib::RefPtr<FileEnumerator> File::enumerate_children(const std::string& attributes, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
449 #endif //GLIBMM_EXCEPTIONS_ENABLED
452 Glib::RefPtr<FileEnumerator> retvalue = Glib::wrap(g_file_enumerate_children(gobj(), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), NULL, &(gerror)));
453 #ifdef GLIBMM_EXCEPTIONS_ENABLED
455 ::Glib::Error::throw_exception(gerror);
458 error = ::Glib::Error::throw_exception(gerror);
459 #endif //GLIBMM_EXCEPTIONS_ENABLED
465 File::enumerate_children_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags, int io_priority)
467 // Create a copy of the slot.
468 // A pointer to it will be passed through the callback's data parameter
469 // and deleted in the callback.
470 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
472 g_file_enumerate_children_async(gobj(),
474 static_cast<GFileQueryInfoFlags>(flags),
477 &SignalProxy_async_callback,
482 File::enumerate_children_async(const SlotAsyncReady& slot, const std::string& attributes, FileQueryInfoFlags flags, int io_priority)
484 // Create a copy of the slot.
485 // A pointer to it will be passed through the callback's data parameter
486 // and deleted in the callback.
487 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
489 g_file_enumerate_children_async(gobj(),
491 static_cast<GFileQueryInfoFlags>(flags),
494 &SignalProxy_async_callback,
498 #ifdef GLIBMM_EXCEPTIONS_ENABLED
499 Glib::RefPtr<File> File::set_display_name(const Glib::ustring& display_name)
501 Glib::RefPtr<File> File::set_display_name(const Glib::ustring& display_name, std::auto_ptr<Glib::Error>& error)
502 #endif //GLIBMM_EXCEPTIONS_ENABLED
505 Glib::RefPtr<File> retvalue = Glib::wrap(g_file_set_display_name(gobj(), display_name.c_str(), NULL, &(gerror)));
506 #ifdef GLIBMM_EXCEPTIONS_ENABLED
508 ::Glib::Error::throw_exception(gerror);
511 error = ::Glib::Error::throw_exception(gerror);
512 #endif //GLIBMM_EXCEPTIONS_ENABLED
519 File::set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
521 // Create a copy of the slot.
522 // A pointer to it will be passed through the callback's data parameter
523 // and deleted in the callback.
524 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
526 g_file_set_display_name_async(gobj(),
527 display_name.c_str(),
530 &SignalProxy_async_callback,
535 File::set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, int io_priority)
537 // Create a copy of the slot.
538 // A pointer to it will be passed through the callback's data parameter
539 // and deleted in the callback.
540 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
542 g_file_set_display_name_async(gobj(),
543 display_name.c_str(),
546 &SignalProxy_async_callback,
550 #ifdef GLIBMM_EXCEPTIONS_ENABLED
552 File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
555 File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
556 #endif // GLIBMM_EXCEPTIONS_ENABLED
561 // Create a copy of the slot.
562 // A pointer to it will be passed through the callback's data parameter
563 // and deleted in the callback.
564 SlotFileProgress* slot_copy = new SlotFileProgress(slot);
566 res = g_file_copy(gobj(),
568 static_cast<GFileCopyFlags>(flags),
570 &SignalProxy_file_progress_callback,
574 #ifdef GLIBMM_EXCEPTIONS_ENABLED
576 ::Glib::Error::throw_exception(gerror);
579 error = ::Glib::Error::throw_exception(gerror);
580 #endif //GLIBMM_EXCEPTIONS_ENABLED
585 #ifdef GLIBMM_EXCEPTIONS_ENABLED
587 File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags)
590 File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
591 #endif // GLIBMM_EXCEPTIONS_ENABLED
596 // Create a copy of the slot.
597 // A pointer to it will be passed through the callback's data parameter
598 // and deleted in the callback.
599 SlotFileProgress* slot_copy = new SlotFileProgress(slot);
601 res = g_file_copy(gobj(),
603 static_cast<GFileCopyFlags>(flags),
605 &SignalProxy_file_progress_callback,
609 #ifdef GLIBMM_EXCEPTIONS_ENABLED
611 ::Glib::Error::throw_exception(gerror);
614 error = ::Glib::Error::throw_exception(gerror);
615 #endif //GLIBMM_EXCEPTIONS_ENABLED
620 #ifdef GLIBMM_EXCEPTIONS_ENABLED
622 File::copy(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
625 File::copy(const Glib::RefPtr<File>& destination, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
626 #endif // GLIBMM_EXCEPTIONS_ENABLED
629 bool res = g_file_copy(gobj(),
631 static_cast<GFileCopyFlags>(flags),
637 #ifdef GLIBMM_EXCEPTIONS_ENABLED
639 ::Glib::Error::throw_exception(gerror);
642 error = ::Glib::Error::throw_exception(gerror);
643 #endif //GLIBMM_EXCEPTIONS_ENABLED
649 File::copy_async(const Glib::RefPtr<File>& destination,
650 const SlotFileProgress& slot_progress,
651 const SlotAsyncReady& slot_ready,
652 const Glib::RefPtr<Cancellable>& cancellable,
656 // Create copies of slots.
657 // Pointers to them will be passed through the callbacks' data parameter
658 // and deleted in the corresponding callback.
659 SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
660 SlotFileProgress* slot_progress_copy = new SlotFileProgress(slot_progress);
662 g_file_copy_async(gobj(),
664 static_cast<GFileCopyFlags>(flags),
667 &SignalProxy_file_progress_callback,
669 &SignalProxy_async_callback,
674 File::copy_async(const Glib::RefPtr<File>& destination,
675 const SlotAsyncReady& slot_ready,
676 const Glib::RefPtr<Cancellable>& cancellable,
680 // Create copies of slots.
681 // Pointers to them will be passed through the callbacks' data parameter
682 // and deleted in the corresponding callback.
683 SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
685 g_file_copy_async(gobj(),
687 static_cast<GFileCopyFlags>(flags),
692 &SignalProxy_async_callback,
697 File::copy_async(const Glib::RefPtr<File>& destination,
698 const SlotFileProgress& slot_progress,
699 const SlotAsyncReady& slot_ready,
703 // Create copies of slots.
704 // Pointers to them will be passed through the callbacks' data parameter
705 // and deleted in the corresponding callback.
706 SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
707 SlotFileProgress* slot_progress_copy = new SlotFileProgress(slot_progress);
709 g_file_copy_async(gobj(),
711 static_cast<GFileCopyFlags>(flags),
714 &SignalProxy_file_progress_callback,
716 &SignalProxy_async_callback,
721 File::copy_async(const Glib::RefPtr<File>& destination,
722 const SlotAsyncReady& slot_ready,
726 // Create copies of slots.
727 // Pointers to them will be passed through the callbacks' data parameter
728 // and deleted in the corresponding callback.
729 SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
731 g_file_copy_async(gobj(),
733 static_cast<GFileCopyFlags>(flags),
738 &SignalProxy_async_callback,
742 #ifdef GLIBMM_EXCEPTIONS_ENABLED
744 File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
747 File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
748 #endif // GLIBMM_EXCEPTIONS_ENABLED
753 // Create a move of the slot.
754 // A pointer to it will be passed through the callback's data parameter
755 // and deleted in the callback.
756 SlotFileProgress* slot_copy = new SlotFileProgress(slot);
758 res = g_file_move(gobj(),
760 static_cast<GFileCopyFlags>(flags),
762 &SignalProxy_file_progress_callback,
766 #ifdef GLIBMM_EXCEPTIONS_ENABLED
768 ::Glib::Error::throw_exception(gerror);
771 error = ::Glib::Error::throw_exception(gerror);
772 #endif //GLIBMM_EXCEPTIONS_ENABLED
777 #ifdef GLIBMM_EXCEPTIONS_ENABLED
779 File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags)
782 File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
783 #endif // GLIBMM_EXCEPTIONS_ENABLED
788 // Create a move of the slot.
789 // A pointer to it will be passed through the callback's data parameter
790 // and deleted in the callback.
791 SlotFileProgress* slot_copy = new SlotFileProgress(slot);
793 res = g_file_move(gobj(),
795 static_cast<GFileCopyFlags>(flags),
797 &SignalProxy_file_progress_callback,
801 #ifdef GLIBMM_EXCEPTIONS_ENABLED
803 ::Glib::Error::throw_exception(gerror);
806 error = ::Glib::Error::throw_exception(gerror);
807 #endif //GLIBMM_EXCEPTIONS_ENABLED
812 #ifdef GLIBMM_EXCEPTIONS_ENABLED
814 File::move(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
817 File::move(const Glib::RefPtr<File>& destination, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
818 #endif // GLIBMM_EXCEPTIONS_ENABLED
823 res = g_file_move(gobj(),
825 static_cast<GFileCopyFlags>(flags),
831 #ifdef GLIBMM_EXCEPTIONS_ENABLED
833 ::Glib::Error::throw_exception(gerror);
836 error = ::Glib::Error::throw_exception(gerror);
837 #endif //GLIBMM_EXCEPTIONS_ENABLED
843 File::set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags, int io_priority)
845 // Create a copy of the slot.
846 // A pointer to it will be passed through the callback's data parameter
847 // and deleted in the callback.
848 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
850 g_file_set_attributes_async(gobj(),
852 static_cast<GFileQueryInfoFlags>(flags),
855 &SignalProxy_async_callback,
860 File::set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, FileQueryInfoFlags flags, int io_priority)
862 // Create a copy of the slot.
863 // A pointer to it will be passed through the callback's data parameter
864 // and deleted in the callback.
865 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
867 g_file_set_attributes_async(gobj(),
869 static_cast<GFileQueryInfoFlags>(flags),
872 &SignalProxy_async_callback,
876 #ifdef GLIBMM_EXCEPTIONS_ENABLED
878 File::set_attributes_finish(const Glib::RefPtr<AsyncResult>& result,
879 const Glib::RefPtr<FileInfo>& info)
882 File::set_attributes_finish(const Glib::RefPtr<AsyncResult>& result,
883 const Glib::RefPtr<FileInfo>& info,
884 std::auto_ptr<Glib::Error>& error)
885 #endif // GLIBMM_EXCEPTIONS_ENABLED
888 GFileInfo* cinfo = info->gobj();
891 res = g_file_set_attributes_finish(gobj(),
896 #ifdef GLIBMM_EXCEPTIONS_ENABLED
898 ::Glib::Error::throw_exception(gerror);
901 error = ::Glib::Error::throw_exception(gerror);
902 #endif //GLIBMM_EXCEPTIONS_ENABLED
907 #ifdef GLIBMM_EXCEPTIONS_ENABLED
908 bool File::set_attribute_string(const std::string& attribute, const std::string& value, FileQueryInfoFlags flags)
910 bool File::set_attribute_string(const std::string& attribute, const std::string& value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
911 #endif //GLIBMM_EXCEPTIONS_ENABLED
914 bool retvalue = g_file_set_attribute_string(gobj(), attribute.c_str(), value.c_str(), ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
915 #ifdef GLIBMM_EXCEPTIONS_ENABLED
917 ::Glib::Error::throw_exception(gerror);
920 error = ::Glib::Error::throw_exception(gerror);
921 #endif //GLIBMM_EXCEPTIONS_ENABLED
927 #ifdef GLIBMM_EXCEPTIONS_ENABLED
928 bool File::set_attribute_byte_string(const std::string& attribute, const std::string& value, FileQueryInfoFlags flags)
930 bool File::set_attribute_byte_string(const std::string& attribute, const std::string& value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
931 #endif //GLIBMM_EXCEPTIONS_ENABLED
934 bool retvalue = g_file_set_attribute_byte_string(gobj(), attribute.c_str(), value.c_str(), ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
935 #ifdef GLIBMM_EXCEPTIONS_ENABLED
937 ::Glib::Error::throw_exception(gerror);
940 error = ::Glib::Error::throw_exception(gerror);
941 #endif //GLIBMM_EXCEPTIONS_ENABLED
947 #ifdef GLIBMM_EXCEPTIONS_ENABLED
948 bool File::set_attribute_uint32(const std::string& attribute, guint32 value, FileQueryInfoFlags flags)
950 bool File::set_attribute_uint32(const std::string& attribute, guint32 value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
951 #endif //GLIBMM_EXCEPTIONS_ENABLED
954 bool retvalue = g_file_set_attribute_uint32(gobj(), attribute.c_str(), value, ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
955 #ifdef GLIBMM_EXCEPTIONS_ENABLED
957 ::Glib::Error::throw_exception(gerror);
960 error = ::Glib::Error::throw_exception(gerror);
961 #endif //GLIBMM_EXCEPTIONS_ENABLED
967 #ifdef GLIBMM_EXCEPTIONS_ENABLED
968 bool File::set_attribute_int32(const std::string& attribute, gint32 value, FileQueryInfoFlags flags)
970 bool File::set_attribute_int32(const std::string& attribute, gint32 value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
971 #endif //GLIBMM_EXCEPTIONS_ENABLED
974 bool retvalue = g_file_set_attribute_int32(gobj(), attribute.c_str(), value, ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
975 #ifdef GLIBMM_EXCEPTIONS_ENABLED
977 ::Glib::Error::throw_exception(gerror);
980 error = ::Glib::Error::throw_exception(gerror);
981 #endif //GLIBMM_EXCEPTIONS_ENABLED
987 #ifdef GLIBMM_EXCEPTIONS_ENABLED
988 bool File::set_attribute_uint64(const std::string& attribute, guint64 value, FileQueryInfoFlags flags)
990 bool File::set_attribute_uint64(const std::string& attribute, guint64 value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
991 #endif //GLIBMM_EXCEPTIONS_ENABLED
994 bool retvalue = g_file_set_attribute_uint64(gobj(), attribute.c_str(), value, ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
995 #ifdef GLIBMM_EXCEPTIONS_ENABLED
997 ::Glib::Error::throw_exception(gerror);
1000 error = ::Glib::Error::throw_exception(gerror);
1001 #endif //GLIBMM_EXCEPTIONS_ENABLED
1007 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1008 bool File::set_attribute_int64(const std::string& attribute, gint64 value, FileQueryInfoFlags flags)
1010 bool File::set_attribute_int64(const std::string& attribute, gint64 value, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
1011 #endif //GLIBMM_EXCEPTIONS_ENABLED
1014 bool retvalue = g_file_set_attribute_int64(gobj(), attribute.c_str(), value, ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
1015 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1017 ::Glib::Error::throw_exception(gerror);
1020 error = ::Glib::Error::throw_exception(gerror);
1021 #endif //GLIBMM_EXCEPTIONS_ENABLED
1027 void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags)
1029 // Create a copy of the slot.
1030 // A pointer to it will be passed through the callback's data parameter
1031 // and deleted in the callback.
1032 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1034 g_file_mount_mountable(gobj(),
1035 static_cast<GMountMountFlags>(flags),
1036 mount_operation->gobj(),
1037 cancellable->gobj(),
1038 &SignalProxy_async_callback,
1042 void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags)
1044 // Create a copy of the slot.
1045 // A pointer to it will be passed through the callback's data parameter
1046 // and deleted in the callback.
1047 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1049 g_file_mount_mountable(gobj(),
1050 static_cast<GMountMountFlags>(flags),
1051 mount_operation->gobj(),
1053 &SignalProxy_async_callback,
1057 void File::mount_mountable(const SlotAsyncReady& slot, MountMountFlags flags)
1059 // Create a copy of the slot.
1060 // A pointer to it will be passed through the callback's data parameter
1061 // and deleted in the callback.
1062 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1064 g_file_mount_mountable(gobj(),
1065 static_cast<GMountMountFlags>(flags),
1068 &SignalProxy_async_callback,
1072 void File::mount_mountable(MountMountFlags flags)
1074 g_file_mount_mountable(gobj(),
1075 static_cast<GMountMountFlags>(flags),
1082 void File::unmount_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags)
1084 // Create a copy of the slot.
1085 // A pointer to it will be passed through the callback's data parameter
1086 // and deleted in the callback.
1087 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1089 g_file_unmount_mountable(gobj(),
1090 static_cast<GMountUnmountFlags>(flags),
1091 cancellable->gobj(),
1092 &SignalProxy_async_callback,
1097 File::unmount_mountable(const SlotAsyncReady& slot, MountUnmountFlags flags)
1099 // Create a copy of the slot.
1100 // A pointer to it will be passed through the callback's data parameter
1101 // and deleted in the callback.
1102 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1104 g_file_unmount_mountable(gobj(),
1105 static_cast<GMountUnmountFlags>(flags),
1107 &SignalProxy_async_callback,
1112 File::unmount_mountable(MountUnmountFlags flags)
1114 g_file_unmount_mountable(gobj(),
1115 static_cast<GMountUnmountFlags>(flags),
1121 void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags)
1123 // Create a copy of the slot.
1124 // A pointer to it will be passed through the callback's data parameter
1125 // and deleted in the callback.
1126 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1128 g_file_mount_enclosing_volume(gobj(),
1129 static_cast<GMountMountFlags>(flags),
1130 mount_operation->gobj(),
1131 cancellable->gobj(),
1132 &SignalProxy_async_callback,
1136 void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags)
1138 // Create a copy of the slot.
1139 // A pointer to it will be passed through the callback's data parameter
1140 // and deleted in the callback.
1141 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1143 g_file_mount_enclosing_volume(gobj(),
1144 static_cast<GMountMountFlags>(flags),
1145 mount_operation->gobj(),
1147 &SignalProxy_async_callback,
1151 void File::mount_enclosing_volume(const SlotAsyncReady& slot, MountMountFlags flags)
1153 // Create a copy of the slot.
1154 // A pointer to it will be passed through the callback's data parameter
1155 // and deleted in the callback.
1156 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1158 g_file_mount_enclosing_volume(gobj(),
1159 static_cast<GMountMountFlags>(flags),
1162 &SignalProxy_async_callback,
1166 void File::mount_enclosing_volume(MountMountFlags flags)
1168 g_file_mount_enclosing_volume(gobj(),
1169 static_cast<GMountMountFlags>(flags),
1177 File::eject_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags)
1179 // Create a copy of the slot.
1180 // A pointer to it will be passed through the callback's data parameter
1181 // and deleted in the callback.
1182 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1184 g_file_eject_mountable(gobj(),
1185 static_cast<GMountUnmountFlags>(flags),
1186 cancellable->gobj(),
1187 &SignalProxy_async_callback,
1192 File::eject_mountable(const SlotAsyncReady& slot, MountUnmountFlags flags)
1194 // Create a copy of the slot.
1195 // A pointer to it will be passed through the callback's data parameter
1196 // and deleted in the callback.
1197 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1199 g_file_eject_mountable(gobj(),
1200 static_cast<GMountUnmountFlags>(flags),
1202 &SignalProxy_async_callback,
1207 File::eject_mountable(MountUnmountFlags flags)
1209 g_file_eject_mountable(gobj(),
1210 static_cast<GMountUnmountFlags>(flags),
1217 File::load_contents_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
1219 // Create a copy of the slot.
1220 // A pointer to it will be passed through the callback's data parameter
1221 // and deleted in the callback.
1222 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1224 g_file_load_contents_async(gobj(),
1225 cancellable->gobj(),
1226 &SignalProxy_async_callback,
1231 File::load_contents_async(const SlotAsyncReady& slot)
1233 // Create a copy of the slot.
1234 // A pointer to it will be passed through the callback's data parameter
1235 // and deleted in the callback.
1236 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1238 g_file_load_contents_async(gobj(),
1240 &SignalProxy_async_callback,
1245 File::load_partial_contents_async(const SlotReadMore& slot_read_more, const SlotAsyncReady& slot_async_ready, const Glib::RefPtr<Cancellable>& cancellable)
1247 // Create a new pair which will hold copies of passed slots.
1248 // This will be deleted in the SignalProxy_load_partial_contents_ready_callback() callback
1249 LoadPartialSlots* slots = new LoadPartialSlots();
1250 SlotReadMore* slot_read_more_copy = new SlotReadMore(slot_read_more);
1251 SlotAsyncReady* slot_async_copy = new SlotAsyncReady(slot_async_ready);
1253 slots->first = slot_read_more_copy;
1254 slots->second = slot_async_copy;
1256 g_file_load_partial_contents_async(gobj(),
1257 cancellable->gobj(),
1258 &SignalProxy_load_partial_contents_read_more_callback,
1259 &SignalProxy_load_partial_contents_ready_callback,
1264 File::load_partial_contents_async(const SlotReadMore& slot_read_more,
1265 const SlotAsyncReady& slot_async_ready)
1267 // Create a new pair which will hold copies of passed slots.
1268 // This will be deleted in the SignalProxy_load_partial_contents_ready_callback() callback
1269 LoadPartialSlots* slots = new LoadPartialSlots();
1270 SlotReadMore* slot_read_more_copy = new SlotReadMore(slot_read_more);
1271 SlotAsyncReady* slot_async_copy = new SlotAsyncReady(slot_async_ready);
1273 slots->first = slot_read_more_copy;
1274 slots->second = slot_async_copy;
1276 g_file_load_partial_contents_async(gobj(),
1278 &SignalProxy_load_partial_contents_read_more_callback,
1279 &SignalProxy_load_partial_contents_ready_callback,
1283 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1284 void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags)
1286 void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1287 #endif //GLIBMM_EXCEPTIONS_ENABLED
1290 gchar* c_etag_new = 0;
1291 g_file_replace_contents(gobj(), contents, length, etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
1292 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1294 ::Glib::Error::throw_exception(gerror);
1297 error = ::Glib::Error::throw_exception(gerror);
1298 #endif //GLIBMM_EXCEPTIONS_ENABLED
1301 new_etag = c_etag_new;
1303 new_etag = std::string();
1306 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1307 void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags)
1309 void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1310 #endif //GLIBMM_EXCEPTIONS_ENABLED
1313 gchar* c_etag_new = 0;
1314 g_file_replace_contents(gobj(), contents, length, etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
1315 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1317 ::Glib::Error::throw_exception(gerror);
1320 error = ::Glib::Error::throw_exception(gerror);
1321 #endif //GLIBMM_EXCEPTIONS_ENABLED
1324 new_etag = c_etag_new;
1326 new_etag = std::string();
1329 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1330 void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags)
1332 void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1333 #endif //GLIBMM_EXCEPTIONS_ENABLED
1336 gchar* c_etag_new = 0;
1337 g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
1338 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1340 ::Glib::Error::throw_exception(gerror);
1343 error = ::Glib::Error::throw_exception(gerror);
1344 #endif //GLIBMM_EXCEPTIONS_ENABLED
1347 new_etag = c_etag_new;
1349 new_etag = std::string();
1352 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1353 void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags)
1355 void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1356 #endif //GLIBMM_EXCEPTIONS_ENABLED
1359 gchar* c_etag_new = 0;
1360 g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, NULL, &(gerror));
1361 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1363 ::Glib::Error::throw_exception(gerror);
1366 error = ::Glib::Error::throw_exception(gerror);
1367 #endif //GLIBMM_EXCEPTIONS_ENABLED
1370 new_etag = c_etag_new;
1372 new_etag = std::string();
1376 File::replace_contents_async(const SlotAsyncReady& slot,
1377 const Glib::RefPtr<Cancellable>& cancellable,
1378 const char* contents,
1380 const std::string& etag,
1382 FileCreateFlags flags)
1384 // Create a copy of the slot.
1385 // A pointer to it will be passed through the callback's data parameter
1386 // and deleted in the callback.
1387 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1389 g_file_replace_contents_async(gobj(),
1392 etag.empty() ? NULL : etag.c_str(),
1394 static_cast<GFileCreateFlags>(flags),
1395 cancellable->gobj(),
1396 &SignalProxy_async_callback,
1401 File::replace_contents_async(const SlotAsyncReady& slot,
1402 const char* contents,
1404 const std::string& etag,
1406 FileCreateFlags flags)
1408 // Create a copy of the slot.
1409 // A pointer to it will be passed through the callback's data parameter
1410 // and deleted in the callback.
1411 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1413 g_file_replace_contents_async(gobj(),
1416 etag.empty() ? NULL : etag.c_str(),
1418 static_cast<GFileCreateFlags>(flags),
1420 &SignalProxy_async_callback,
1425 File::replace_contents_async(const SlotAsyncReady& slot,
1426 const Glib::RefPtr<Cancellable>& cancellable,
1427 const std::string& contents,
1428 const std::string& etag,
1430 FileCreateFlags flags)
1432 // Create a copy of the slot.
1433 // A pointer to it will be passed through the callback's data parameter
1434 // and deleted in the callback.
1435 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1437 g_file_replace_contents_async(gobj(),
1440 etag.empty() ? NULL : etag.c_str(),
1442 static_cast<GFileCreateFlags>(flags),
1443 cancellable->gobj(),
1444 &SignalProxy_async_callback,
1449 File::replace_contents_async(const SlotAsyncReady& slot,
1450 const std::string& contents,
1451 const std::string& etag,
1453 FileCreateFlags flags)
1455 // Create a copy of the slot.
1456 // A pointer to it will be passed through the callback's data parameter
1457 // and deleted in the callback.
1458 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1460 g_file_replace_contents_async(gobj(),
1463 etag.empty() ? NULL : etag.c_str(),
1465 static_cast<GFileCreateFlags>(flags),
1467 &SignalProxy_async_callback,
1471 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1472 void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result, std::string& new_etag)
1474 void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result, std::string& new_etag, std::auto_ptr<Glib::Error>& error)
1475 #endif //GLIBMM_EXCEPTIONS_ENABLED
1478 gchar* c_new_etag = 0;
1479 g_file_replace_contents_finish(gobj(), Glib::unwrap(result), &c_new_etag, &(gerror));
1480 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1482 ::Glib::Error::throw_exception(gerror);
1485 error = ::Glib::Error::throw_exception(gerror);
1486 #endif //GLIBMM_EXCEPTIONS_ENABLED
1489 new_etag = c_new_etag;
1491 new_etag = std::string();
1495 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1496 void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result)
1498 void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result, std::auto_ptr<Glib::Error>& error)
1499 #endif //GLIBMM_EXCEPTIONS_ENABLED
1502 g_file_replace_contents_finish(gobj(), Glib::unwrap(result), NULL, &(gerror));
1503 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1505 ::Glib::Error::throw_exception(gerror);
1508 error = ::Glib::Error::throw_exception(gerror);
1509 #endif //GLIBMM_EXCEPTIONS_ENABLED
1513 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1514 Glib::RefPtr<FileOutputStream> File::replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag, bool make_backup, FileCreateFlags flags)
1516 Glib::RefPtr<FileOutputStream> File::replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1517 #endif //GLIBMM_EXCEPTIONS_ENABLED
1520 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1521 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1523 ::Glib::Error::throw_exception(gerror);
1526 error = ::Glib::Error::throw_exception(gerror);
1527 #endif //GLIBMM_EXCEPTIONS_ENABLED
1532 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1533 Glib::RefPtr<FileOutputStream> File::replace(const std::string& etag, bool make_backup, FileCreateFlags flags)
1535 Glib::RefPtr<FileOutputStream> File::replace(const std::string& etag, bool make_backup, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1536 #endif //GLIBMM_EXCEPTIONS_ENABLED
1539 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? NULL : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), NULL, &(gerror)));
1540 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1542 ::Glib::Error::throw_exception(gerror);
1545 error = ::Glib::Error::throw_exception(gerror);
1546 #endif //GLIBMM_EXCEPTIONS_ENABLED
1551 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1552 Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
1554 Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1555 #endif //GLIBMM_EXCEPTIONS_ENABLED
1558 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1559 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1561 ::Glib::Error::throw_exception(gerror);
1564 error = ::Glib::Error::throw_exception(gerror);
1565 #endif //GLIBMM_EXCEPTIONS_ENABLED
1570 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1571 Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags)
1573 Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1574 #endif //GLIBMM_EXCEPTIONS_ENABLED
1577 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), NULL, &(gerror)));
1578 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1580 ::Glib::Error::throw_exception(gerror);
1583 error = ::Glib::Error::throw_exception(gerror);
1584 #endif //GLIBMM_EXCEPTIONS_ENABLED
1589 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1590 Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
1592 Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1593 #endif //GLIBMM_EXCEPTIONS_ENABLED
1596 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1597 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1599 ::Glib::Error::throw_exception(gerror);
1602 error = ::Glib::Error::throw_exception(gerror);
1603 #endif //GLIBMM_EXCEPTIONS_ENABLED
1608 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1609 Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags)
1611 Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1612 #endif //GLIBMM_EXCEPTIONS_ENABLED
1615 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), NULL, &(gerror)));
1616 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1618 ::Glib::Error::throw_exception(gerror);
1621 error = ::Glib::Error::throw_exception(gerror);
1622 #endif //GLIBMM_EXCEPTIONS_ENABLED
1628 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1629 Glib::RefPtr<FileMonitor> File::monitor(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
1631 Glib::RefPtr<FileMonitor> File::monitor(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1632 #endif //GLIBMM_EXCEPTIONS_ENABLED
1635 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1636 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1638 ::Glib::Error::throw_exception(gerror);
1641 error = ::Glib::Error::throw_exception(gerror);
1642 #endif //GLIBMM_EXCEPTIONS_ENABLED
1647 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1648 Glib::RefPtr<FileMonitor> File::monitor(FileMonitorFlags flags)
1650 Glib::RefPtr<FileMonitor> File::monitor(FileMonitorFlags flags, std::auto_ptr<Glib::Error>& error)
1651 #endif //GLIBMM_EXCEPTIONS_ENABLED
1654 Glib::RefPtr<FileMonitor> retvalue = Glib::wrap(g_file_monitor(gobj(), ((GFileMonitorFlags)(flags)), NULL, &(gerror)));
1655 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1657 ::Glib::Error::throw_exception(gerror);
1660 error = ::Glib::Error::throw_exception(gerror);
1661 #endif //GLIBMM_EXCEPTIONS_ENABLED
1667 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1668 Glib::RefPtr<FileInputStream> File::read()
1670 Glib::RefPtr<FileInputStream> File::read(std::auto_ptr<Glib::Error>& error)
1671 #endif //GLIBMM_EXCEPTIONS_ENABLED
1674 Glib::RefPtr<FileInputStream> retvalue = Glib::wrap(g_file_read(gobj(), NULL, &(gerror)));
1675 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1677 ::Glib::Error::throw_exception(gerror);
1680 error = ::Glib::Error::throw_exception(gerror);
1681 #endif //GLIBMM_EXCEPTIONS_ENABLED
1686 void File::find_enclosing_mount_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
1688 // Create a copy of the slot.
1689 // A pointer to it will be passed through the callback's data parameter
1690 // and deleted in the callback.
1691 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1693 g_file_find_enclosing_mount_async(gobj(),
1695 cancellable->gobj(),
1696 &SignalProxy_async_callback,
1700 void File::find_enclosing_mount_async(const SlotAsyncReady& slot, int io_priority)
1702 // Create a copy of the slot.
1703 // A pointer to it will be passed through the callback's data parameter
1704 // and deleted in the callback.
1705 SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
1707 g_file_find_enclosing_mount_async(gobj(),
1710 &SignalProxy_async_callback,
1714 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1715 bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags)
1717 bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
1718 #endif //GLIBMM_EXCEPTIONS_ENABLED
1721 bool retvalue = g_file_set_attributes_from_info(gobj(), Glib::unwrap(info), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
1722 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1724 ::Glib::Error::throw_exception(gerror);
1727 error = ::Glib::Error::throw_exception(gerror);
1728 #endif //GLIBMM_EXCEPTIONS_ENABLED
1733 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1734 bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, FileQueryInfoFlags flags)
1736 bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, FileQueryInfoFlags flags, std::auto_ptr<Glib::Error>& error)
1737 #endif //GLIBMM_EXCEPTIONS_ENABLED
1740 bool retvalue = g_file_set_attributes_from_info(gobj(), Glib::unwrap(info), ((GFileQueryInfoFlags)(flags)), NULL, &(gerror));
1741 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1743 ::Glib::Error::throw_exception(gerror);
1746 error = ::Glib::Error::throw_exception(gerror);
1747 #endif //GLIBMM_EXCEPTIONS_ENABLED
1752 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1754 File::copy_attributes(const Glib::RefPtr<File>& destination, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
1757 File::copy_attributes(const Glib::RefPtr<File>& destination, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
1758 #endif // GLIBMM_EXCEPTIONS_ENABLED
1763 res = g_file_copy_attributes(gobj(),
1764 destination->gobj(),
1765 static_cast<GFileCopyFlags>(flags),
1766 cancellable->gobj(),
1769 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1771 ::Glib::Error::throw_exception(gerror);
1774 error = ::Glib::Error::throw_exception(gerror);
1775 #endif //GLIBMM_EXCEPTIONS_ENABLED
1780 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1782 File::copy_attributes(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
1785 File::copy_attributes(const Glib::RefPtr<File>& destination, FileCopyFlags flags, std::auto_ptr<Glib::Error>& error)
1786 #endif // GLIBMM_EXCEPTIONS_ENABLED
1791 res = g_file_copy_attributes(gobj(),
1792 destination->gobj(),
1793 static_cast<GFileCopyFlags>(flags),
1797 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1799 ::Glib::Error::throw_exception(gerror);
1802 error = ::Glib::Error::throw_exception(gerror);
1803 #endif //GLIBMM_EXCEPTIONS_ENABLED
1808 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1809 Glib::RefPtr<FileOutputStream> File::create_file(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags)
1811 Glib::RefPtr<FileOutputStream> File::create_file(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1812 #endif //GLIBMM_EXCEPTIONS_ENABLED
1815 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_create(gobj(), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1816 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1818 ::Glib::Error::throw_exception(gerror);
1821 error = ::Glib::Error::throw_exception(gerror);
1822 #endif //GLIBMM_EXCEPTIONS_ENABLED
1827 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1828 Glib::RefPtr<FileOutputStream> File::create_file(FileCreateFlags flags)
1830 Glib::RefPtr<FileOutputStream> File::create_file(FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1831 #endif //GLIBMM_EXCEPTIONS_ENABLED
1834 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_create(gobj(), ((GFileCreateFlags)(flags)), NULL, &(gerror)));
1835 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1837 ::Glib::Error::throw_exception(gerror);
1840 error = ::Glib::Error::throw_exception(gerror);
1841 #endif //GLIBMM_EXCEPTIONS_ENABLED
1846 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1849 bool File::remove(std::auto_ptr<Glib::Error>& error)
1850 #endif //GLIBMM_EXCEPTIONS_ENABLED
1853 bool retvalue = g_file_delete(gobj(), NULL, &(gerror));
1854 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1856 ::Glib::Error::throw_exception(gerror);
1859 error = ::Glib::Error::throw_exception(gerror);
1860 #endif //GLIBMM_EXCEPTIONS_ENABLED
1865 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1868 bool File::trash(std::auto_ptr<Glib::Error>& error)
1869 #endif //GLIBMM_EXCEPTIONS_ENABLED
1872 bool retvalue = g_file_trash(gobj(), NULL, &(gerror));
1873 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1875 ::Glib::Error::throw_exception(gerror);
1878 error = ::Glib::Error::throw_exception(gerror);
1879 #endif //GLIBMM_EXCEPTIONS_ENABLED
1884 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1885 bool File::make_directory()
1887 bool File::make_directory(std::auto_ptr<Glib::Error>& error)
1888 #endif //GLIBMM_EXCEPTIONS_ENABLED
1891 bool retvalue = g_file_make_directory(gobj(), NULL, &(gerror));
1892 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1894 ::Glib::Error::throw_exception(gerror);
1897 error = ::Glib::Error::throw_exception(gerror);
1898 #endif //GLIBMM_EXCEPTIONS_ENABLED
1903 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1904 bool File::make_symbolic_link(const std::string& symlink_value)
1906 bool File::make_symbolic_link(const std::string& symlink_value, std::auto_ptr<Glib::Error>& error)
1907 #endif //GLIBMM_EXCEPTIONS_ENABLED
1910 bool retvalue = g_file_make_symbolic_link(gobj(), symlink_value.c_str(), NULL, &(gerror));
1911 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1913 ::Glib::Error::throw_exception(gerror);
1916 error = ::Glib::Error::throw_exception(gerror);
1917 #endif //GLIBMM_EXCEPTIONS_ENABLED
1922 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1923 Glib::RefPtr<FileAttributeInfoList> File::query_settable_attributes()
1925 Glib::RefPtr<FileAttributeInfoList> File::query_settable_attributes(std::auto_ptr<Glib::Error>& error)
1926 #endif //GLIBMM_EXCEPTIONS_ENABLED
1929 Glib::RefPtr<FileAttributeInfoList> retvalue = Glib::wrap(g_file_query_settable_attributes(gobj(), NULL, &(gerror)));
1930 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1932 ::Glib::Error::throw_exception(gerror);
1935 error = ::Glib::Error::throw_exception(gerror);
1936 #endif //GLIBMM_EXCEPTIONS_ENABLED
1941 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1942 Glib::RefPtr<FileAttributeInfoList> File::query_writable_namespaces()
1944 Glib::RefPtr<FileAttributeInfoList> File::query_writable_namespaces(std::auto_ptr<Glib::Error>& error)
1945 #endif //GLIBMM_EXCEPTIONS_ENABLED
1948 Glib::RefPtr<FileAttributeInfoList> retvalue = Glib::wrap(g_file_query_writable_namespaces(gobj(), NULL, &(gerror)));
1949 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1951 ::Glib::Error::throw_exception(gerror);
1954 error = ::Glib::Error::throw_exception(gerror);
1955 #endif //GLIBMM_EXCEPTIONS_ENABLED
1961 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1962 Glib::RefPtr<FileOutputStream> File::append_to(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags)
1964 Glib::RefPtr<FileOutputStream> File::append_to(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1965 #endif //GLIBMM_EXCEPTIONS_ENABLED
1968 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_append_to(gobj(), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
1969 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1971 ::Glib::Error::throw_exception(gerror);
1974 error = ::Glib::Error::throw_exception(gerror);
1975 #endif //GLIBMM_EXCEPTIONS_ENABLED
1980 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1981 Glib::RefPtr<FileOutputStream> File::append_to(FileCreateFlags flags)
1983 Glib::RefPtr<FileOutputStream> File::append_to(FileCreateFlags flags, std::auto_ptr<Glib::Error>& error)
1984 #endif //GLIBMM_EXCEPTIONS_ENABLED
1987 Glib::RefPtr<FileOutputStream> retvalue = Glib::wrap(g_file_append_to(gobj(), ((GFileCreateFlags)(flags)), NULL, &(gerror)));
1988 #ifdef GLIBMM_EXCEPTIONS_ENABLED
1990 ::Glib::Error::throw_exception(gerror);
1993 error = ::Glib::Error::throw_exception(gerror);
1994 #endif //GLIBMM_EXCEPTIONS_ENABLED
1999 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2000 Glib::RefPtr<Mount> File::find_enclosing_mount()
2002 Glib::RefPtr<Mount> File::find_enclosing_mount(std::auto_ptr<Glib::Error>& error)
2003 #endif //GLIBMM_EXCEPTIONS_ENABLED
2006 Glib::RefPtr<Mount> retvalue = Glib::wrap(g_file_find_enclosing_mount(gobj(), NULL, &(gerror)));
2007 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2009 ::Glib::Error::throw_exception(gerror);
2012 error = ::Glib::Error::throw_exception(gerror);
2013 #endif //GLIBMM_EXCEPTIONS_ENABLED
2018 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2019 Glib::RefPtr<AppInfo> File::query_default_handler()
2021 Glib::RefPtr<AppInfo> File::query_default_handler(std::auto_ptr<Glib::Error>& error)
2022 #endif //GLIBMM_EXCEPTIONS_ENABLED
2025 Glib::RefPtr<AppInfo> retvalue = Glib::wrap(g_file_query_default_handler(gobj(), NULL, &(gerror)));
2026 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2028 ::Glib::Error::throw_exception(gerror);
2031 error = ::Glib::Error::throw_exception(gerror);
2032 #endif //GLIBMM_EXCEPTIONS_ENABLED
2037 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2038 bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& contents, gsize& length, std::string& etag_out)
2040 bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& contents, gsize& length, std::string& etag_out, std::auto_ptr<Glib::Error>& error)
2041 #endif //GLIBMM_EXCEPTIONS_ENABLED
2044 gchar* cetag_out = 0;
2045 bool retvalue = g_file_load_contents(gobj(), Glib::unwrap(cancellable), &contents, &(length), &cetag_out, &(gerror));
2046 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2048 ::Glib::Error::throw_exception(gerror);
2051 error = ::Glib::Error::throw_exception(gerror);
2052 #endif //GLIBMM_EXCEPTIONS_ENABLED
2054 etag_out = Glib::convert_return_gchar_ptr_to_stdstring(cetag_out);
2059 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2060 bool File::load_contents(char*& contents, gsize& length, std::string& etag_out)
2062 bool File::load_contents(char*& contents, gsize& length, std::string& etag_out, std::auto_ptr<Glib::Error>& error)
2063 #endif //GLIBMM_EXCEPTIONS_ENABLED
2066 gchar* cetag_out = 0;
2067 bool retvalue = g_file_load_contents(gobj(), NULL, &contents, &(length), &cetag_out, &(gerror));
2068 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2070 ::Glib::Error::throw_exception(gerror);
2073 error = ::Glib::Error::throw_exception(gerror);
2074 #endif //GLIBMM_EXCEPTIONS_ENABLED
2076 etag_out = Glib::convert_return_gchar_ptr_to_stdstring(cetag_out);
2081 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2082 bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out)
2084 bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out, std::auto_ptr<Glib::Error>& error)
2085 #endif //GLIBMM_EXCEPTIONS_ENABLED
2088 gchar* cetag_out = 0;
2089 bool retvalue = g_file_load_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), &cetag_out, &(gerror));
2090 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2092 ::Glib::Error::throw_exception(gerror);
2095 error = ::Glib::Error::throw_exception(gerror);
2096 #endif //GLIBMM_EXCEPTIONS_ENABLED
2098 etag_out = Glib::convert_return_gchar_ptr_to_stdstring(cetag_out);
2103 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2104 bool File::load_partial_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out)
2106 bool File::load_partial_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out, std::auto_ptr<Glib::Error>& error)
2107 #endif //GLIBMM_EXCEPTIONS_ENABLED
2110 gchar* cetag_out = 0;
2111 bool retvalue = g_file_load_partial_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), &cetag_out, &(gerror));
2112 #ifdef GLIBMM_EXCEPTIONS_ENABLED
2114 ::Glib::Error::throw_exception(gerror);
2117 error = ::Glib::Error::throw_exception(gerror);
2118 #endif //GLIBMM_EXCEPTIONS_ENABLED
2120 etag_out = Glib::convert_return_gchar_ptr_to_stdstring(cetag_out);