Namespace waste reduction, move some g_get_unix_mount functions to the

2007-12-17  Matthias Clasen  <mclasen@redhat.com>

        * 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
This commit is contained in:
Matthias Clasen 2007-12-17 14:59:23 +00:00 committed by Matthias Clasen
parent 19e895d818
commit feb5258cf9
10 changed files with 50 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2007-12-17 Matthias Clasen <mclasen@redhat.com>
* gio/gio-sections.txt: Updates
2007-12-14 Matthias Clasen <mclasen@redhat.com>
* glib/tmpl/hash_tables.sgml:

View File

@ -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
<SUBSECTION Standard>
GUnixMountClass

View File

@ -1,3 +1,16 @@
2007-12-17 Matthias Clasen <mclasen@redhat.com>
* 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 <alexl@redhat.com>
* gfile.c:

View File

@ -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

View File

@ -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;

View File

@ -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))

View File

@ -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 ();

View File

@ -30,14 +30,16 @@ G_BEGIN_DECLS
/**
* GUnixMountEntry:
*
* Defines a Unix mount entry (e.g. "/media/cdrom").
* Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
* 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. <filename>/dev</filename>).
* 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

View File

@ -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);

View File

@ -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;