Unix Mounts

Unix Mounts

Synopsis




                    GUnixMount;
                    GUnixMountPoint;
enum                GUnixMountType;
                    GUnixMountMonitor;
void                g_unix_mount_free                   (GUnixMount *mount_entry);
void                g_unix_mount_point_free             (GUnixMountPoint *mount_point);
gint                g_unix_mount_compare                (GUnixMount *mount1,
                                                         GUnixMount *mount2);
const char*         g_unix_mount_get_mount_path         (GUnixMount *mount_entry);
const char*         g_unix_mount_get_device_path        (GUnixMount *mount_entry);
const char*         g_unix_mount_get_fs_type            (GUnixMount *mount_entry);
gboolean            g_unix_mount_is_readonly            (GUnixMount *mount_entry);
gboolean            g_unix_mount_is_system_internal     (GUnixMount *mount_entry);
GUnixMountType      g_unix_mount_guess_type             (GUnixMount *mount_entry);
gint                g_unix_mount_point_compare          (GUnixMountPoint *mount1,
                                                         GUnixMountPoint *mount2);
const char*         g_unix_mount_point_get_mount_path   (GUnixMountPoint *mount_point);
const char*         g_unix_mount_point_get_device_path  (GUnixMountPoint *mount_point);
const char*         g_unix_mount_point_get_fs_type      (GUnixMountPoint *mount_point);
gboolean            g_unix_mount_point_is_readonly      (GUnixMountPoint *mount_point);
gboolean            g_unix_mount_point_is_user_mountable
                                                        (GUnixMountPoint *mount_point);
gboolean            g_unix_mount_point_is_loopback      (GUnixMountPoint *mount_point);
GUnixMountType      g_unix_mount_point_guess_type       (GUnixMountPoint *mount_point);
GList*              g_get_unix_mount_points             (guint64 *time_read);
GList*              g_get_unix_mounts                   (guint64 *time_read);
GUnixMount*         g_get_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);
GUnixMountMonitor*  g_unix_mount_monitor_new            (void);


Object Hierarchy


  GObject
   +----GUnixMountMonitor

Signals


  "mountpoints-changed"                            : Run Last
  "mounts-changed"                                 : Run Last

Description

Details

GUnixMount

typedef struct _GUnixMount GUnixMount;


GUnixMountPoint

typedef struct _GUnixMountPoint GUnixMountPoint;


enum GUnixMountType

typedef enum {
  G_UNIX_MOUNT_TYPE_UNKNOWN,
  G_UNIX_MOUNT_TYPE_FLOPPY,
  G_UNIX_MOUNT_TYPE_CDROM,
  G_UNIX_MOUNT_TYPE_NFS,
  G_UNIX_MOUNT_TYPE_ZIP,
  G_UNIX_MOUNT_TYPE_JAZ,
  G_UNIX_MOUNT_TYPE_MEMSTICK,
  G_UNIX_MOUNT_TYPE_CF,
  G_UNIX_MOUNT_TYPE_SM,
  G_UNIX_MOUNT_TYPE_SDMMC,
  G_UNIX_MOUNT_TYPE_IPOD,
  G_UNIX_MOUNT_TYPE_CAMERA,
  G_UNIX_MOUNT_TYPE_HD,
} GUnixMountType;


GUnixMountMonitor

typedef struct _GUnixMountMonitor GUnixMountMonitor;


g_unix_mount_free ()

void                g_unix_mount_free                   (GUnixMount *mount_entry);

mount_entry :


g_unix_mount_point_free ()

void                g_unix_mount_point_free             (GUnixMountPoint *mount_point);

mount_point :


g_unix_mount_compare ()

gint                g_unix_mount_compare                (GUnixMount *mount1,
                                                         GUnixMount *mount2);

mount1 :

first GUnixMount to compare.

mount2 :

second GUnixMount to compare.

Returns :

1, 0 or -1 if mount1 is greater than, equal to, or less than mount2, respectively.

g_unix_mount_get_mount_path ()

const char*         g_unix_mount_get_mount_path         (GUnixMount *mount_entry);

mount_entry :

input GUnixMount to get the mount path for.

Returns :

the mount path for mount_entry.

g_unix_mount_get_device_path ()

const char*         g_unix_mount_get_device_path        (GUnixMount *mount_entry);

mount_entry :

Returns :


g_unix_mount_get_fs_type ()

const char*         g_unix_mount_get_fs_type            (GUnixMount *mount_entry);

mount_entry :

Returns :


g_unix_mount_is_readonly ()

gboolean            g_unix_mount_is_readonly            (GUnixMount *mount_entry);

mount_entry :

Returns :

TRUE if mount_entry is read only.

g_unix_mount_is_system_internal ()

gboolean            g_unix_mount_is_system_internal     (GUnixMount *mount_entry);

mount_entry :

Returns :


g_unix_mount_guess_type ()

GUnixMountType      g_unix_mount_guess_type             (GUnixMount *mount_entry);

mount_entry :

Returns :


g_unix_mount_point_compare ()

gint                g_unix_mount_point_compare          (GUnixMountPoint *mount1,
                                                         GUnixMountPoint *mount2);

mount1 :

mount2 :

Returns :

1, 0 or -1 if mount1 is greater than, equal to, or less than mount2, respectively.

g_unix_mount_point_get_mount_path ()

const char*         g_unix_mount_point_get_mount_path   (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_get_device_path ()

const char*         g_unix_mount_point_get_device_path  (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_get_fs_type ()

const char*         g_unix_mount_point_get_fs_type      (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_is_readonly ()

gboolean            g_unix_mount_point_is_readonly      (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_is_user_mountable ()

gboolean            g_unix_mount_point_is_user_mountable
                                                        (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_is_loopback ()

gboolean            g_unix_mount_point_is_loopback      (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_unix_mount_point_guess_type ()

GUnixMountType      g_unix_mount_point_guess_type       (GUnixMountPoint *mount_point);

mount_point :

Returns :


g_get_unix_mount_points ()

GList*              g_get_unix_mount_points             (guint64 *time_read);

time_read :

guint64 to contain a timestamp.

Returns :

a GList of the UNIX mountpoints. If time_read is set, it will be filled with the mount timestamp.

g_get_unix_mounts ()

GList*              g_get_unix_mounts                   (guint64 *time_read);

time_read :

guint64 to contain a timestamp.

Returns :

a GList of the UNIX mounts. If time_read is set, it will be filled with the mount timestamp.

g_get_unix_mount_at ()

GUnixMount*         g_get_unix_mount_at                 (const char *mount_path,
                                                         guint64 *time_read);

mount_path :

path to mount.

time_read :

guint64 to contain a timestamp.

Returns :

a GUnixMount. If time_read is set, it will be filled with the mount timestamp.

g_unix_mounts_changed_since ()

gboolean            g_unix_mounts_changed_since         (guint64 time);

time :

Returns :


g_unix_mount_points_changed_since ()

gboolean            g_unix_mount_points_changed_since   (guint64 time);

time :

Returns :


g_unix_mount_monitor_new ()

GUnixMountMonitor*  g_unix_mount_monitor_new            (void);

Returns :

a new GUnixMountMonitor.

Signal Details

The "mountpoints-changed" signal

void                user_function                      (GUnixMountMonitor *gunixmountmonitor,
                                                        gpointer           user_data)              : Run Last

gunixmountmonitor :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "mounts-changed" signal

void                user_function                      (GUnixMountMonitor *gunixmountmonitor,
                                                        gpointer           user_data)              : Run Last

gunixmountmonitor :

the object which received the signal.

user_data :

user data set when the signal handler was connected.