+2008-03-12 David Zeuthen <davidz@redhat.com>
+
+ * gio.symbols:
+ * gunixmounts.[ch]:
+ Add g_unix_mount_monitor_set_rate_limit() function (#521946)
+
2008-03-14 Alexander Larsson <alexl@redhat.com>
* gunixmounts.c:
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
}
/**
+ * 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.
**/
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);