glib r6711 - trunk/gio
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6711 - trunk/gio
- Date: Fri, 14 Mar 2008 11:19:00 +0000 (GMT)
Author: alexl
Date: Fri Mar 14 11:18:59 2008
New Revision: 6711
URL: http://svn.gnome.org/viewvc/glib?rev=6711&view=rev
Log:
2008-03-12 David Zeuthen <davidz redhat com>
* gio.symbols:
* gunixmounts.[ch]:
Add g_unix_mount_monitor_set_rate_limit() function (#521946)
Modified:
trunk/gio/ChangeLog
trunk/gio/gio.symbols
trunk/gio/gunixmounts.c
trunk/gio/gunixmounts.h
Modified: trunk/gio/gio.symbols
==============================================================================
--- trunk/gio/gio.symbols (original)
+++ trunk/gio/gio.symbols Fri Mar 14 11:18:59 2008
@@ -665,6 +665,7 @@
g_unix_mount_points_changed_since
g_unix_mount_monitor_get_type G_GNUC_CONST
g_unix_mount_monitor_new
+g_unix_mount_monitor_set_rate_limit
g_unix_is_mount_path_system_internal
#endif /* G_OS_UNIX */
#endif
Modified: trunk/gio/gunixmounts.c
==============================================================================
--- trunk/gio/gunixmounts.c (original)
+++ trunk/gio/gunixmounts.c Fri Mar 14 11:18:59 2008
@@ -1231,9 +1231,36 @@
}
/**
+ * g_unix_mount_monitor_set_rate_limit:
+ * @mount_monitor: a #GUnixMountMonitor.
+ * @limit_msecs: a integer with the limit in milliseconds to
+ * poll for changes.
+ *
+ * Sets the rate limit to which the @mount_monitor will report
+ * consecutive change events to the mount and mount point entry files.
+ *
+ * Since: 2.18
+ **/
+void
+g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor,
+ int limit_msec)
+{
+ g_return_if_fail (G_IS_UNIX_MOUNT_MONITOR (mount_monitor));
+
+ if (mount_monitor->fstab_monitor != NULL)
+ g_file_monitor_set_rate_limit (mount_monitor->fstab_monitor, limit_msec);
+
+ if (mount_monitor->mtab_monitor != NULL)
+ g_file_monitor_set_rate_limit (mount_monitor->mtab_monitor, limit_msec);
+}
+
+/**
* g_unix_mount_monitor_new:
*
- * Gets a new #GUnixMountMonitor.
+ * Gets a new #GUnixMountMonitor. The default rate limit for which the
+ * monitor will report consecutive changes for the mount and mount
+ * point entry files is the default for a #GFileMonitor. Use
+ * g_unix_mount_monitor_set_rate_limit() to change this.
*
* Returns: a #GUnixMountMonitor.
**/
Modified: trunk/gio/gunixmounts.h
==============================================================================
--- trunk/gio/gunixmounts.h (original)
+++ trunk/gio/gunixmounts.h Fri Mar 14 11:18:59 2008
@@ -90,8 +90,10 @@
gboolean g_unix_mounts_changed_since (guint64 time);
gboolean g_unix_mount_points_changed_since (guint64 time);
-GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST;
-GUnixMountMonitor *g_unix_mount_monitor_new (void);
+GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST;
+GUnixMountMonitor *g_unix_mount_monitor_new (void);
+void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor,
+ int limit_msec);
gboolean g_unix_is_mount_path_system_internal (const char *mount_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]