From 28a59be69b37e2de2e6edf9e09d6ed6287911a14 Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Fri, 21 Aug 2009 14:52:31 +0200 Subject: Deprecate wrapper methods of deprecated functions * gio/src/file.{ccg,hg} (File::{eject,unmount}_mountable*), gio/src/volumemonitor.hg (VolumeMonitor::adopt_orphan_mount): Enclose within deprecation guards since the corresponding C API functions have been deprecated in API version 2.22 of GIO. Insert #undef G_DISABLE_DEPRECATED at the top of the source files so that giomm builds again at warning level fatal. --- ChangeLog | 11 +++++++++++ gio/src/file.ccg | 8 ++++++++ gio/src/file.hg | 8 ++++++++ gio/src/volumemonitor.hg | 8 ++++++++ 4 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4a104197..228d7b11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-08-21 Daniel Elstner + + Deprecate wrapper methods of deprecated functions + + * gio/src/file.{ccg,hg} (File::{eject,unmount}_mountable*), + gio/src/volumemonitor.hg (VolumeMonitor::adopt_orphan_mount): + Enclose within deprecation guards since the corresponding C API + functions have been deprecated in API version 2.22 of GIO. + Insert #undef G_DISABLE_DEPRECATED at the top of the source files + so that giomm builds again at warning level fatal. + 2009-08-21 Daniel Elstner Move #undef G_DISABLE_DEPRECATED out of header diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 007e73f7..3d0bd194 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -1079,6 +1079,8 @@ void File::mount_mountable(MountMountFlags flags) NULL); } +#ifndef GIOMM_DISABLE_DEPRECATED + void File::unmount_mountable(const SlotAsyncReady& slot, const Glib::RefPtr& cancellable, MountUnmountFlags flags) { // Create a copy of the slot. @@ -1118,6 +1120,8 @@ File::unmount_mountable(MountUnmountFlags flags) NULL); } +#endif /* !GIOMM_DISABLE_DEPRECATED */ + void File::mount_enclosing_volume(const Glib::RefPtr& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr& cancellable, MountMountFlags flags) { // Create a copy of the slot. @@ -1173,6 +1177,8 @@ void File::mount_enclosing_volume(MountMountFlags flags) NULL); } +#ifndef GIOMM_DISABLE_DEPRECATED + void File::eject_mountable(const SlotAsyncReady& slot, const Glib::RefPtr& cancellable, MountUnmountFlags flags) { @@ -1213,6 +1219,8 @@ File::eject_mountable(MountUnmountFlags flags) NULL); } +#endif /* !GIOMM_DISABLE_DEPRECATED */ + void File::load_contents_async(const SlotAsyncReady& slot, const Glib::RefPtr& cancellable) { diff --git a/gio/src/file.hg b/gio/src/file.hg index 0a680278..81d313b0 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -17,6 +17,10 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#m4 _PUSH(SECTION_CC_PRE_INCLUDES) +#undef G_DISABLE_DEPRECATED +#m4 _POP() + #include #include #include @@ -1494,6 +1498,8 @@ public: g_file_mount_mountable_finish, refreturn, errthrow) +_DEPRECATE_IFDEF_START + /** Unmounts a file of type FILE_TYPE_MOUNTABLE. * * The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, @@ -1560,6 +1566,8 @@ public: g_file_eject_mountable_finish, errthrow) +_DEPRECATE_IFDEF_END + /** Copies the file attributes from @a source to @a destination. * * Normally only a subset of the file attributes are copied, diff --git a/gio/src/volumemonitor.hg b/gio/src/volumemonitor.hg index 981eaf3d..2e4d4c8c 100644 --- a/gio/src/volumemonitor.hg +++ b/gio/src/volumemonitor.hg @@ -17,6 +17,10 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#m4 _PUSH(SECTION_CC_PRE_INCLUDES) +#undef G_DISABLE_DEPRECATED +#m4 _POP() + #include #include #include @@ -55,8 +59,12 @@ public: _WRAP_METHOD(Glib::RefPtr get_volume_for_uuid(const std::string& uuid), g_volume_monitor_get_volume_for_uuid, refreturn) _WRAP_METHOD(Glib::RefPtr get_mount_for_uuid(const std::string& uuid), g_volume_monitor_get_mount_for_uuid, refreturn) +_DEPRECATE_IFDEF_START + _WRAP_METHOD(static Glib::RefPtr adopt_orphan_mount(const Glib::RefPtr& mount), g_volume_monitor_adopt_orphan_mount) +_DEPRECATE_IFDEF_END + #m4 _CONVERSION(`GVolume*',`const Glib::RefPtr&',`Glib::wrap($3, true)') _WRAP_SIGNAL(void volume_added(const Glib::RefPtr& volume), volume_added) _WRAP_SIGNAL(void volume_removed(const Glib::RefPtr& volume), volume_removed) -- cgit v1.2.1