diff options
Diffstat (limited to 'gio/src/file.hg')
-rw-r--r-- | gio/src/file.hg | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/gio/src/file.hg b/gio/src/file.hg index 7df94c3e..27b991c7 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2007 The gtkmm Development Team * * This library is free software; you can redistribute it and/or @@ -17,11 +15,6 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#m4 _PUSH(SECTION_CC_PRE_INCLUDES) -#undef G_DISABLE_DEPRECATED -#define GLIB_DISABLE_DEPRECATION_WARNINGS 1 -#m4 _POP() - #include <glibmm/error.h> #include <glibmm/interface.h> #include <giomm/appinfo.h> @@ -1052,7 +1045,7 @@ public: g_file_set_display_name_finish, errthrow) - //TODO: Remove the bool results from this and other methods that thrown an exception. + //TODO: Remove the bool results from this and other methods that throw an exception. /** Deletes a file. * If the file is a directory, it will only be deleted if it is empty. @@ -1472,7 +1465,7 @@ public: * @param flags Flags affecting the operation. */ void mount_enclosing_volume(MountMountFlags flags = MOUNT_MOUNT_NONE); - _IGNORE(g_file_mount_enclosing _volume) + _IGNORE(g_file_mount_enclosing_volume) _WRAP_METHOD(bool mount_enclosing_volume_finish(const Glib::RefPtr<AsyncResult>& result), g_file_mount_enclosing_volume_finish, @@ -2362,6 +2355,51 @@ public: void replace_contents_finish(const Glib::RefPtr<AsyncResult>& result); _IGNORE(g_file_replace_contents_finish) + + /** Same as replace_contents_async() but takes a Gio::Bytes input instead. + * + * When this operation has completed, @a slot will be called + * and the operation can be finalized with replace_contents_finish(). + * + * The operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, a Gio::Error with CANCELLED will be thrown. + * + * If @a make_backup is true, this function will attempt to + * make a backup of the file. + * + * @param slot: A callback to call when the request is satisfied. + * @param cancellable A Cancellable object. + * @param contents Bytes of contents to replace the file with. + * @param etag a new entity tag for the file. + * @param make_backup true if a backup should be created. + * @param flags A set of FileCreateFlags. + */ + void replace_contents_bytes_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const Glib::RefPtr<const Glib::Bytes>& contents, const std::string& etag, bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE); + + /** Same as replace_contents_async() but takes a Gio::Bytes input instead. + * + * When this operation has completed, @a slot will be called + * and the operation can be finalized with replace_contents_finish(). + * + * The operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, a Gio::Error with CANCELLED will be thrown. + * + * If @a make_backup is true, this function will attempt to + * make a backup of the file. + * + * @param slot: A callback to call when the request is satisfied. + * @param contents Bytes of contents to replace the file with. + * @param etag a new entity tag for the file. + * @param make_backup true if a backup should be created. + * @param flags A set of FileCreateFlags. + */ + void replace_contents_bytes_async(const SlotAsyncReady& slot, const Glib::RefPtr<const Glib::Bytes>& contents, const std::string& etag, bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE); + + _IGNORE(g_file_replace_contents_async) + + _WRAP_METHOD(bool supports_thread_contexts() const, g_file_supports_thread_contexts) // *** vfuncs *** |