glibmm r521 - in trunk: . gio/src



Author: murrayc
Date: Thu Jan 17 23:46:46 2008
New Revision: 521
URL: http://svn.gnome.org/viewvc/glibmm?rev=521&view=rev

Log:
2008-01-18  Murray Cumming  <murrayc murrayc com>

* gio/src/drive.hg:
* gio/src/volumemonitor.hg: Wrapped functions that reurn GLists.

Modified:
   trunk/ChangeLog
   trunk/gio/src/drive.hg
   trunk/gio/src/volumemonitor.hg

Modified: trunk/gio/src/drive.hg
==============================================================================
--- trunk/gio/src/drive.hg	(original)
+++ trunk/gio/src/drive.hg	Thu Jan 17 23:46:46 2008
@@ -53,8 +53,8 @@
 
   _WRAP_METHOD(bool has_volumes() const, g_drive_has_volumes)
 
-  // TODO: get_volumes, returns a list of GVolumes, we shouldn't take copy
-  // as these are owned by the volume monitor
+#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Volume> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Volume> > get_volumes(), g_drive_get_volumes)
 
   _WRAP_METHOD(bool is_media_removable() const, g_drive_is_media_removable)
   _WRAP_METHOD(bool has_media() const, g_drive_has_media)

Modified: trunk/gio/src/volumemonitor.hg
==============================================================================
--- trunk/gio/src/volumemonitor.hg	(original)
+++ trunk/gio/src/volumemonitor.hg	Thu Jan 17 23:46:46 2008
@@ -17,6 +17,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <giomm/drive.h>
 #include <giomm/volume.h>
 #include <giomm/mount.h>
 
@@ -40,9 +41,16 @@
 public:
 
   _WRAP_METHOD(static Glib::RefPtr<VolumeMonitor> get(), g_volume_monitor_get)
-//TODO: GList *         g_volume_monitor_get_connected_drives    (GVolumeMonitor  *volume_monitor);
-//TODO: GList *         g_volume_monitor_get_volumes             (GVolumeMonitor  *volume_monitor);
-//TODO: GList *         g_volume_monitor_get_mounts              (GVolumeMonitor  *volume_monitor);
+
+#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Drive> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Drive> > get_connected_drives(), g_volume_monitor_get_connected_drives);
+
+#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Volume> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Volume> > get_volumes(), g_volume_monitor_get_volumes);
+
+#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Mount> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Mount> > get_mounts(), g_volume_monitor_get_mounts);
+
   _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)
 



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