[vala] gio-unix-2.0: Various improvements to UnixMountEntry



commit 42691177a8cac60e02f2f1a7058c6def3dea48c9
Author: Jaap A. Haitsma <jaap haitsma org>
Date:   Sat Jul 11 22:51:22 2009 +0200

    gio-unix-2.0: Various improvements to UnixMountEntry
    
    Fixes bug 586017
    Patch by Evan Nemerson <evan polussystems com>

 vapi/gio-unix-2.0.vapi                             |   60 +++++++++----------
 .../packages/gio-unix-2.0/gio-unix-2.0-custom.vala |   53 +++++++++++++++++
 vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata   |   18 ++++++
 3 files changed, 99 insertions(+), 32 deletions(-)
---
diff --git a/vapi/gio-unix-2.0.vapi b/vapi/gio-unix-2.0.vapi
index 77ecd95..55f616d 100644
--- a/vapi/gio-unix-2.0.vapi
+++ b/vapi/gio-unix-2.0.vapi
@@ -24,8 +24,32 @@ namespace GLib {
 		public int fd { get; construct; }
 	}
 	[Compact]
-	[CCode (cheader_filename = "gio/gunixmounts.h")]
+	[CCode (free_function = "g_unix_mount_free", cheader_filename = "gio/gunixmounts.h")]
 	public class UnixMountEntry {
+		[CCode (cname = "g_unix_mount_compare")]
+		public int compare (GLib.UnixMountEntry mount);
+		[CCode (cname = "g_unix_mounts_get")]
+		public static GLib.List<GLib.UnixMountEntry> get (ref uint64? time_read = null);
+		[CCode (cname = "g_unix_mount_get_device_path")]
+		public unowned string get_device_path ();
+		[CCode (cname = "g_unix_mount_get_fs_type")]
+		public unowned string get_fs_type ();
+		[CCode (cname = "g_unix_mount_get_mount_path")]
+		public unowned string get_mount_path ();
+		[CCode (cname = "g_unix_mount_guess_can_eject")]
+		public bool guess_can_eject ();
+		[CCode (cname = "g_unix_mount_guess_icon")]
+		public unowned GLib.Icon guess_icon ();
+		[CCode (cname = "g_unix_mount_guess_name")]
+		public unowned string guess_name ();
+		[CCode (cname = "g_unix_mount_guess_should_display")]
+		public bool guess_should_display ();
+		[CCode (cname = "g_unix_mount_is_readonly")]
+		public bool is_readonly ();
+		[CCode (cname = "g_unix_mount_is_system_internal")]
+		public bool is_system_internal ();
+		[CCode (cname = "g_unix_mount_at")]
+		public UnixMountEntry (string mount_path, uint64 time_read);
 	}
 	[CCode (cheader_filename = "gio/gunixmounts.h")]
 	public class UnixMountMonitor : GLib.Object {
@@ -77,37 +101,9 @@ namespace GLib {
 	[CCode (cheader_filename = "gio/gunixmounts.h")]
 	public const string DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME;
 	[CCode (cname = "g_unix_is_mount_path_system_internal", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_is_mount_path_system_internal (string mount_path);
-	[CCode (cname = "g_unix_mount_at", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned GLib.UnixMountEntry g_unix_mount_at (string mount_path, uint64 time_read);
-	[CCode (cname = "g_unix_mount_compare", cheader_filename = "gio/gunixmounts.h")]
-	public static int g_unix_mount_compare (GLib.UnixMountEntry mount1, GLib.UnixMountEntry mount2);
-	[CCode (cname = "g_unix_mount_free", cheader_filename = "gio/gunixmounts.h")]
-	public static void g_unix_mount_free (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_get_device_path", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned string g_unix_mount_get_device_path (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_get_fs_type", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned string g_unix_mount_get_fs_type (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_get_mount_path", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned string g_unix_mount_get_mount_path (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_guess_can_eject", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mount_guess_can_eject (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_guess_icon", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned GLib.Icon g_unix_mount_guess_icon (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_guess_name", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned string g_unix_mount_guess_name (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_guess_should_display", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mount_guess_should_display (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_is_readonly", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mount_is_readonly (GLib.UnixMountEntry mount_entry);
-	[CCode (cname = "g_unix_mount_is_system_internal", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mount_is_system_internal (GLib.UnixMountEntry mount_entry);
+	public static bool is_mount_path_system_internal (string mount_path);
 	[CCode (cname = "g_unix_mount_points_changed_since", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mount_points_changed_since (uint64 time);
-	[CCode (cname = "g_unix_mount_points_get", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned GLib.List g_unix_mount_points_get (uint64 time_read);
+	public static bool mount_points_changed_since (uint64 time);
 	[CCode (cname = "g_unix_mounts_changed_since", cheader_filename = "gio/gunixmounts.h")]
-	public static bool g_unix_mounts_changed_since (uint64 time);
-	[CCode (cname = "g_unix_mounts_get", cheader_filename = "gio/gunixmounts.h")]
-	public static unowned GLib.List g_unix_mounts_get (uint64 time_read);
+	public static bool mounts_changed_since (uint64 time);
 }
diff --git a/vapi/packages/gio-unix-2.0/gio-unix-2.0-custom.vala b/vapi/packages/gio-unix-2.0/gio-unix-2.0-custom.vala
new file mode 100644
index 0000000..8ab5c08
--- /dev/null
+++ b/vapi/packages/gio-unix-2.0/gio-unix-2.0-custom.vala
@@ -0,0 +1,53 @@
+/* gio-unix-2.0-custom.vala
+ *
+ * Copyright (C) 2009  Evan Nemerson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ * 	Evan Nemerson <evan polussystems com>
+ */
+
+namespace GLib {
+	[Compact]
+	[CCode (cname = "GUnixMountEntry", cheader_filename = "gio/gunixmounts.h", lower_case_prefix = "g_unix_mount_", free_function = "g_unix_mount_free")]
+	public class UnixMountEntry {
+		[CCode (cname = "g_unix_mount_at")]
+		public UnixMountEntry (string mount_path, uint64 time_read);
+		[CCode (cname = "g_unix_mount_compare")]
+		public int compare (GLib.UnixMountEntry mount);
+		[CCode (cname = "g_unix_mount_get_device_path")]
+		public unowned string get_device_path ();
+		[CCode (cname = "g_unix_mount_get_fs_type")]
+		public unowned string get_fs_type ();
+		[CCode (cname = "g_unix_mount_get_mount_path")]
+		public unowned string get_mount_path ();
+		[CCode (cname = "g_unix_mount_guess_can_eject")]
+		public bool guess_can_eject ();
+		[CCode (cname = "g_unix_mount_guess_icon")]
+		public unowned GLib.Icon guess_icon ();
+		[CCode (cname = "g_unix_mount_guess_name")]
+		public unowned string guess_name ();
+		[CCode (cname = "g_unix_mount_guess_should_display")]
+		public bool guess_should_display ();
+		[CCode (cname = "g_unix_mount_is_readonly")]
+		public bool is_readonly ();
+		[CCode (cname = "g_unix_mount_is_system_internal")]
+		public bool is_system_internal ();
+
+		[CCode (cname = "g_unix_mounts_get", cheader_filename = "gio/gunixmounts.h")]
+		public static GLib.List<UnixMountEntry> @get (ref uint64? time_read = null);
+	}
+}
diff --git a/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata b/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
index 080d8a1..535891e 100644
--- a/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
+++ b/vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata
@@ -1,5 +1,23 @@
 GLib cprefix="G" lower_case_cprefix="g_" cheader_filename="gio/gunixmounts.h"
 GDesktopAppInfo cheader_filename="gio/gdesktopappinfo.h"
 GUnixInputStream cheader_filename="gio/gunixinputstream.h"
+g_unix_is_mount_path_system_internal name="is_mount_path_system_internal"
+GUnixMountEntry hidden="1"
+g_unix_mounts_changed_since name="mounts_changed_since"
+g_unix_mounts_get hidden="1"
+g_unix_mount_at hidden="1"
+g_unix_mount_compare hidden="1"
+g_unix_mount_free hidden="1"
+g_unix_mount_get_device_path hidden="1"
+g_unix_mount_get_fs_type hidden="1"
+g_unix_mount_get_mount_path hidden="1"
+g_unix_mount_guess_can_eject hidden="1"
+g_unix_mount_guess_icon hidden="1"
+g_unix_mount_guess_name hidden="1"
+g_unix_mount_guess_should_display hidden="1"
+g_unix_mount_is_readonly hidden="1"
+g_unix_mount_is_system_internal hidden="1"
+g_unix_mount_points_changed_since name="mount_points_changed_since"
+g_unix_mount_points_get hidden="1"
 GUnixOutputStream cheader_filename="gio/gunixoutputstream.h"
 



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