[glibmm] Deprecate wrapper methods of deprecated functions



commit 28a59be69b37e2de2e6edf9e09d6ed6287911a14
Author: Daniel Elstner <danielk openismus com>
Date:   Fri Aug 21 14:52:31 2009 +0200

    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(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4a10419..228d7b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-08-21  Daniel Elstner  <danielk openismus com>
 
+	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  <danielk openismus com>
+
 	Move #undef G_DISABLE_DEPRECATED out of header
 
 	* glib/src/date.hg: Push the #undef G_DISABLE_DEPRECATED into the
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index 007e73f..3d0bd19 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>& 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<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& 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>& 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>& cancellable)
 {
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 0a68027..81d313b 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 <glibmm/error.h>
 #include <glibmm/interface.h>
 #include <giomm/appinfo.h>
@@ -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 981eaf3..2e4d4c8 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 <giomm/drive.h>
 #include <giomm/volume.h>
 #include <giomm/mount.h>
@@ -55,8 +59,12 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Volume> get_volume_for_uuid(const std::string& uuid), g_volume_monitor_get_volume_for_uuid, refreturn)
   _WRAP_METHOD(Glib::RefPtr<Mount> get_mount_for_uuid(const std::string& uuid), g_volume_monitor_get_mount_for_uuid, refreturn)
 
+_DEPRECATE_IFDEF_START
+
   _WRAP_METHOD(static Glib::RefPtr<Volume> adopt_orphan_mount(const Glib::RefPtr<Mount>& mount), g_volume_monitor_adopt_orphan_mount)
 
+_DEPRECATE_IFDEF_END
+
 #m4 _CONVERSION(`GVolume*',`const Glib::RefPtr<Volume>&',`Glib::wrap($3, true)')
   _WRAP_SIGNAL(void volume_added(const Glib::RefPtr<Volume>& volume), volume_added)
   _WRAP_SIGNAL(void volume_removed(const Glib::RefPtr<Volume>& volume), volume_removed)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]