From feb5258cf9ca9c3b3d9a58a98b1c6c75c822855a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 17 Dec 2007 14:59:23 +0000 Subject: [PATCH] Namespace waste reduction, move some g_get_unix_mount functions to the 2007-12-17 Matthias Clasen * gio.symbols: * gunixmounts.[hc]: Namespace waste reduction, move some g_get_unix_mount functions to the g_unix_mount namespace. * gunixmounts.c: * gunixvolumemonitor.c: * glocalfile.c: * glocaldirectorymonitor.c: Update all callers. * gunixmounts.h: Remove leftover g_unix_get_canonical_device_path svn path=/trunk/; revision=6143 --- docs/reference/ChangeLog | 4 ++++ docs/reference/gio/gio-sections.txt | 7 +++---- gio/ChangeLog | 13 +++++++++++++ gio/gio.symbols | 6 +++--- gio/glocaldirectorymonitor.c | 4 ++-- gio/glocalfile.c | 2 +- gio/gunixmounts.c | 16 ++++++++-------- gio/gunixmounts.h | 16 +++++++--------- gio/gunixvolumemonitor.c | 6 +++--- gio/gunixvolumemonitor.h | 6 ++++++ 10 files changed, 50 insertions(+), 30 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 1f335d6..974892e 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2007-12-17 Matthias Clasen + + * gio/gio-sections.txt: Updates + 2007-12-14 Matthias Clasen * glib/tmpl/hash_tables.sgml: diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt index 0ee3aa7..97f8580 100644 --- a/docs/reference/gio/gio-sections.txt +++ b/docs/reference/gio/gio-sections.txt @@ -1111,13 +1111,12 @@ g_unix_mount_point_is_user_mountable g_unix_mount_point_is_loopback g_unix_mount_point_guess_icon g_unix_mount_point_guess_name -g_get_unix_mount_points -g_get_unix_mounts -g_get_unix_mount_at +g_unix_mount_points_get +g_unix_mounts_get +g_unix_mount_at g_unix_mounts_changed_since g_unix_mount_points_changed_since g_unix_mount_monitor_new -g_unix_get_canonical_device_path g_unix_is_mount_path_system_internal GUnixMountClass diff --git a/gio/ChangeLog b/gio/ChangeLog index afd265d..8fd3ac7 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,16 @@ +2007-12-17 Matthias Clasen + + * gio.symbols: + * gunixmounts.[hc]: Namespace waste reduction, move some + g_get_unix_mount functions to the g_unix_mount namespace. + + * gunixmounts.c: + * gunixvolumemonitor.c: + * glocalfile.c: + * glocaldirectorymonitor.c: Update all callers. + + * gunixmounts.h: Remove leftover g_unix_get_canonical_device_path + 2007-12-17 Alexander Larsson * gfile.c: diff --git a/gio/gio.symbols b/gio/gio.symbols index ed1b97b..3f2806e 100644 --- a/gio/gio.symbols +++ b/gio/gio.symbols @@ -645,9 +645,9 @@ g_unix_mount_point_is_user_mountable g_unix_mount_point_is_loopback g_unix_mount_point_guess_name g_unix_mount_point_guess_icon -g_get_unix_mount_points -g_get_unix_mounts -g_get_unix_mount_at +g_unix_mount_points_get +g_unix_mounts_get +g_unix_mount_at g_unix_mounts_changed_since g_unix_mount_points_changed_since g_unix_mount_monitor_get_type G_GNUC_CONST diff --git a/gio/glocaldirectorymonitor.c b/gio/glocaldirectorymonitor.c index 5047067..5a275ec 100644 --- a/gio/glocaldirectorymonitor.c +++ b/gio/glocaldirectorymonitor.c @@ -119,7 +119,7 @@ g_local_directory_monitor_constructor (GType type, /* Emulate unmount detection */ - mount = g_get_unix_mount_at (local_monitor->dirname, NULL); + mount = g_unix_mount_at (local_monitor->dirname, NULL); local_monitor->was_mounted = mount != NULL; @@ -173,7 +173,7 @@ mounts_changed (GUnixMountMonitor *mount_monitor, mount = NULL; g_warning ("G_OS_WIN32: no mount emulation"); #else - mount = g_get_unix_mount_at (local_monitor->dirname, NULL); + mount = g_unix_mount_at (local_monitor->dirname, NULL); is_mounted = mount != NULL; diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 2d981a5..9dcb962 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -730,7 +730,7 @@ get_mount_info (GFileInfo *fs_info, if (mountpoint == NULL) mountpoint = "/"; - mount = g_get_unix_mount_at (mountpoint, &cache_time); + mount = g_unix_mount_at (mountpoint, &cache_time); if (mount) { if (g_unix_mount_is_readonly (mount)) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index b3d7b4d..2d3e041 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -981,7 +981,7 @@ get_mount_points_timestamp (void) } /** - * g_get_unix_mounts: + * g_unix_mounts_get: * @time_read: guint64 to contain a timestamp. * * Gets a #GList of strings containing the unix mounts. @@ -992,7 +992,7 @@ get_mount_points_timestamp (void) * Returns: a #GList of the UNIX mounts. **/ GList * -g_get_unix_mounts (guint64 *time_read) +g_unix_mounts_get (guint64 *time_read) { if (time_read) *time_read = get_mounts_timestamp (); @@ -1001,7 +1001,7 @@ g_get_unix_mounts (guint64 *time_read) } /** - * g_get_unix_mount_at: + * g_unix_mount_at: * @mount_path: path for a possible unix mount. * @time_read: guint64 to contain a timestamp. * @@ -1012,13 +1012,13 @@ g_get_unix_mounts (guint64 *time_read) * Returns: a #GUnixMount. **/ GUnixMountEntry * -g_get_unix_mount_at (const char *mount_path, - guint64 *time_read) +g_unix_mount_at (const char *mount_path, + guint64 *time_read) { GList *mounts, *l; GUnixMountEntry *mount_entry, *found; - mounts = g_get_unix_mounts (time_read); + mounts = g_unix_mounts_get (time_read); found = NULL; for (l = mounts; l != NULL; l = l->next) @@ -1037,7 +1037,7 @@ g_get_unix_mount_at (const char *mount_path, } /** - * g_get_unix_mount_points: + * g_unix_mount_points_get: * @time_read: guint64 to contain a timestamp. * * Gets a #GList of strings containing the unix mount points. @@ -1048,7 +1048,7 @@ g_get_unix_mount_at (const char *mount_path, * Returns: a #GList of the UNIX mountpoints. **/ GList * -g_get_unix_mount_points (guint64 *time_read) +g_unix_mount_points_get (guint64 *time_read) { if (time_read) *time_read = get_mount_points_timestamp (); diff --git a/gio/gunixmounts.h b/gio/gunixmounts.h index 5bf7faa..ced5dd1 100644 --- a/gio/gunixmounts.h +++ b/gio/gunixmounts.h @@ -30,14 +30,16 @@ G_BEGIN_DECLS /** * GUnixMountEntry: * - * Defines a Unix mount entry (e.g. "/media/cdrom"). + * Defines a Unix mount entry (e.g. /media/cdrom). + * This corresponds roughly to a mtab entry. **/ typedef struct _GUnixMountEntry GUnixMountEntry; /** * GUnixMountPoint: * - * Defines a Unix mount point (e.g. "/dev"). + * Defines a Unix mount point (e.g. /dev). + * This corresponds roughly to a fstab entry. **/ typedef struct _GUnixMountPoint GUnixMountPoint; @@ -80,9 +82,9 @@ gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_p char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point); GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point); -GList * g_get_unix_mount_points (guint64 *time_read); -GList * g_get_unix_mounts (guint64 *time_read); -GUnixMountEntry * g_get_unix_mount_at (const char *mount_path, +GList * g_unix_mount_points_get (guint64 *time_read); +GList * g_unix_mounts_get (guint64 *time_read); +GUnixMountEntry *g_unix_mount_at (const char *mount_path, guint64 *time_read); gboolean g_unix_mounts_changed_since (guint64 time); gboolean g_unix_mount_points_changed_since (guint64 time); @@ -90,10 +92,6 @@ 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); - - -char *g_unix_get_canonical_device_path (const char *device_path); - gboolean g_unix_is_mount_path_system_internal (const char *mount_path); G_END_DECLS diff --git a/gio/gunixvolumemonitor.c b/gio/gunixvolumemonitor.c index 0f73d09..dab8eca 100644 --- a/gio/gunixvolumemonitor.c +++ b/gio/gunixvolumemonitor.c @@ -137,7 +137,7 @@ get_mount_for_mount_path (const char *mount_path) GUnixMountEntry *mount_entry; GUnixMount *mount; - mount_entry = g_get_unix_mount_at (mount_path, NULL); + mount_entry = g_unix_mount_at (mount_path, NULL); /* TODO: Set mountable volume? */ mount = _g_unix_mount_new (NULL, mount_entry, NULL); @@ -312,7 +312,7 @@ update_volumes (GUnixVolumeMonitor *monitor) GList *l; GUnixVolume *volume; - new_mountpoints = g_get_unix_mount_points (NULL); + new_mountpoints = g_unix_mount_points_get (NULL); new_mountpoints = g_list_sort (new_mountpoints, (GCompareFunc) g_unix_mount_point_compare); @@ -365,7 +365,7 @@ update_mounts (GUnixVolumeMonitor *monitor) GUnixVolume *volume; const char *mount_path; - new_mounts = g_get_unix_mounts (NULL); + new_mounts = g_unix_mounts_get (NULL); new_mounts = g_list_sort (new_mounts, (GCompareFunc) g_unix_mount_compare); diff --git a/gio/gunixvolumemonitor.h b/gio/gunixvolumemonitor.h index 1732c14..6aed8a4 100644 --- a/gio/gunixvolumemonitor.h +++ b/gio/gunixvolumemonitor.h @@ -39,6 +39,12 @@ typedef struct _GUnixVolumeMonitor GUnixVolumeMonitor; typedef struct _GUnixVolumeMonitorClass GUnixVolumeMonitorClass; /* Forward definitions */ + +/** + * GUnixMount: + * + * Implementation of the #GMount interface for Unix systems. + */ typedef struct _GUnixMount GUnixMount; typedef struct _GUnixVolume GUnixVolume; -- 2.7.4