mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Add g_unix_mount_monitor_set_rate_limit() function (#521946)
2008-03-12 David Zeuthen <davidz@redhat.com> * gio.symbols: * gunixmounts.[ch]: Add g_unix_mount_monitor_set_rate_limit() function (#521946) svn path=/trunk/; revision=6711
This commit is contained in:
parent
240ba02786
commit
51d7fc9e96
@ -1,3 +1,9 @@
|
||||
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:
|
||||
|
@ -665,6 +665,7 @@ g_unix_mounts_changed_since
|
||||
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
|
||||
|
@ -1230,10 +1230,37 @@ g_unix_mount_monitor_init (GUnixMountMonitor *monitor)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
**/
|
||||
|
@ -90,8 +90,10 @@ GUnixMountEntry *g_unix_mount_at (const char *mount_p
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user