summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-volume-monitor.h
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-08-25 21:08:31 +0000
committerDarin Adler <darin@src.gnome.org>2000-08-25 21:08:31 +0000
commitb24048db62f7a33427302acdd4c4bbaeef95fdc2 (patch)
treecdc9d2389bb5de2e022c3bd51e663aee3e915786 /libnautilus-extensions/nautilus-volume-monitor.h
parente0f71713d23feee9fe99eb5241f818efb7b0e9f7 (diff)
downloadnautilus-b24048db62f7a33427302acdd4c4bbaeef95fdc2.tar.gz
Added helper. (floppy_sort): Simplified logic.
* libnautilus-extensions/nautilus-volume-monitor.h: * libnautilus-extensions/nautilus-volume-monitor.c: (is_floppy_mount_path): Added helper. (floppy_sort): Simplified logic. (nautilus_volume_monitor_get_removable_volume_names): Used the prepend/reverse idiom instead of append. (nautilus_volume_monitor_volume_is_mounted): Fixed extremely unlikely but possible buffer overflow and checked result from sscanf. (mount_volume_mount): Use g_strchomp instead of rolling our own. Took out some dead code. (mount_volumes_update_is_mounted): Fixed extremely unlikely but possible buffer overflow and checked result from sscanf. (mount_volume_add_aliases): Fixed possible buffer overflow and storage leak. (mount_volume_ext2_add): Removed code to ignore all ext2 volumes other than "/". Moved the hack into FMDesktopIconView. (mount_volume_cdrom_set_state), (mount_volume_floppy_set_state), (mount_volume_ext2_set_state), (mount_volume_set_state), (volume_set_state_empty) (mount_volume_activate_cdrom), (mount_volume_activate_floppy), (mount_volume_activate_ext2), (mount_volume_activate), (eject_cdrom), (mount_volume_deactivate), (mount_volume_check_change), (check_permissions), (mount_volume_floppy_add), (cdrom_ioctl_frenzy), (mount_volume_iso9660_add), (add_mount_volume), (mntent_is_removable_fs), (find_volumes), (nautilus_volume_monitor_mount_unmount_removable), (free_volume_info), (get_iso9660_volume_name), (get_ext2_volume_name), (get_floppy_volume_name): Removed mount_type and volume_fd. Made a bunch of formerly- public things private and added NAUTILUS_ prefix to some public identifier that didn't have it. * libnautilus-extensions/nautilus-trash-directory.c: (get_volume_vfs_uri_if_writable): Changed callers to use the constants with the NAUTILUS_ prefix. * src/file-manager/fm-desktop-icon-view.c: (create_mount_link): Moved the "/" hack here (marked with a FIXME and bug number) and made the two cases that create mount links share code. Also made it use type instead of the now-gone mount_type. (startup_create_mount_links), (volume_mounted_callback): Call the new common routine instead of having two copies of the same code.
Diffstat (limited to 'libnautilus-extensions/nautilus-volume-monitor.h')
-rw-r--r--libnautilus-extensions/nautilus-volume-monitor.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/libnautilus-extensions/nautilus-volume-monitor.h b/libnautilus-extensions/nautilus-volume-monitor.h
index 1052bcb7d..62a46bb84 100644
--- a/libnautilus-extensions/nautilus-volume-monitor.h
+++ b/libnautilus-extensions/nautilus-volume-monitor.h
@@ -53,35 +53,26 @@ struct NautilusVolumeMonitorClass {
const NautilusVolume *volume);
};
-#define NAUTILUS_MOUNT_TYPE_ISO9660 "iso9660"
-#define NAUTILUS_MOUNT_TYPE_EXT2 "ext2"
-#define NAUTILUS_MOUNT_OPTIONS_USER "user"
-#define NAUTILUS_MOUNT_OPTIONS_OWNER "owner"
-
-#define NAUTILUS_CHECK_INTERVAL 2000
-
typedef enum {
- STATE_ACTIVE = 0,
- STATE_INACTIVE,
- STATE_EMPTY,
- STATE_LAST,
+ NAUTILUS_VOLUME_ACTIVE,
+ NAUTILUS_VOLUME_INACTIVE,
+ NAUTILUS_VOLUME_EMPTY,
+ NAUTILUS_VOLUME_NUMBER_OF_STATES
} NautilusVolumeState;
typedef enum {
- VOLUME_CDROM,
- VOLUME_FLOPPY,
- VOLUME_EXT2,
- VOLUME_OTHER
+ NAUTILUS_VOLUME_CDROM,
+ NAUTILUS_VOLUME_FLOPPY,
+ NAUTILUS_VOLUME_EXT2,
+ NAUTILUS_VOLUME_OTHER
} NautilusVolumeType;
struct NautilusVolume {
NautilusVolumeType type;
NautilusVolumeState state;
- int volume_fd;
char *fsname;
char *mount_path;
- char *mount_type;
char *volume_name;
gboolean is_mounted;