diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-01-17 23:46:46 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-01-17 23:46:46 +0000 |
commit | c2e58dabdadfa352674e4518d1164e55e604552f (patch) | |
tree | 4950b5158c7d1bd5eb8840b4b4db43fc2d668807 /gio | |
parent | ef71160be264bf565bb89ae9f0c6d0f905a95e52 (diff) | |
download | glibmm-c2e58dabdadfa352674e4518d1164e55e604552f.tar.gz |
Wrapped functions that reurn GLists.
2008-01-18 Murray Cumming <murrayc@murrayc.com>
* gio/src/drive.hg:
* gio/src/volumemonitor.hg: Wrapped functions that reurn GLists.
svn path=/trunk/; revision=521
Diffstat (limited to 'gio')
-rw-r--r-- | gio/src/drive.hg | 4 | ||||
-rw-r--r-- | gio/src/volumemonitor.hg | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gio/src/drive.hg b/gio/src/drive.hg index 2999321a..b1303602 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -53,8 +53,8 @@ public: _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) diff --git a/gio/src/volumemonitor.hg b/gio/src/volumemonitor.hg index dcab06e0..00ca1d61 100644 --- a/gio/src/volumemonitor.hg +++ b/gio/src/volumemonitor.hg @@ -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 @@ protected: 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) |