Data Structures | |
struct | IconMappingEntry_s |
struct | HalStoragePolicy_s |
struct | HalDrive_s |
struct | HalVolume_s |
Defines | |
#define | MAX_STRING_SZ 256 |
#define | MOUNT_OPTIONS_SIZE 256 |
#define | HAL_PROP_EXTRACT_BEGIN if (FALSE) |
#define | HAL_PROP_EXTRACT_END ; |
#define | HAL_PROP_EXTRACT_INT(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == DBUS_TYPE_INT32) _where_ = hal_psi_get_int (&it) |
#define | HAL_PROP_EXTRACT_STRING(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == DBUS_TYPE_STRING) _where_ = (hal_psi_get_string (&it) != NULL && strlen (hal_psi_get_string (&it)) > 0) ? strdup (hal_psi_get_string (&it)) : NULL |
#define | HAL_PROP_EXTRACT_BOOL(_property_, _where_) else if (strcmp (key, _property_) == 0 && type == DBUS_TYPE_BOOLEAN) _where_ = hal_psi_get_bool (&it) |
#define | HAL_PROP_EXTRACT_BOOL_BITFIELD(_property_, _where_, _field_) else if (strcmp (key, _property_) == 0 && type == DBUS_TYPE_BOOLEAN) _where_ |= hal_psi_get_bool (&it) ? _field_ : 0 |
#define | strcat_len(dst, src, dstmaxlen) |
Typedefs | |
typedef IconMappingEntry_s | IconMappingEntry |
Functions | |
HalStoragePolicy * | hal_storage_policy_new () |
void | hal_storage_policy_free (HalStoragePolicy *policy) |
void | hal_storage_policy_set_icon_path (HalStoragePolicy *policy, HalStoragePolicyIcon icon, const char *path) |
void | hal_storage_policy_set_icon_mapping (HalStoragePolicy *policy, HalStoragePolicyIconPair *pairs) |
const char * | hal_storage_policy_lookup_icon (HalStoragePolicy *policy, HalStoragePolicyIcon icon) |
char * | hal_volume_policy_compute_size_as_string (HalVolume *volume) |
void | fixup_string (char *s) |
char * | hal_drive_policy_compute_display_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
char * | hal_volume_policy_compute_display_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
char * | hal_drive_policy_compute_icon_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
char * | hal_volume_policy_compute_icon_name (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
dbus_bool_t | hal_volume_policy_should_be_visible (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy, const char *target_mount_point) |
Policy function to determine if a volume should be visible in a desktop environment. | |
const char * | hal_drive_get_dedicated_icon_drive (HalDrive *drive) |
const char * | hal_drive_get_dedicated_icon_volume (HalDrive *drive) |
void | hal_drive_free (HalDrive *drive) |
Free all resources used by a HalDrive object. | |
void | hal_volume_free (HalVolume *vol) |
Free all resources used by a HalVolume object. | |
HalDrive * | hal_drive_from_udi (LibHalContext *hal_ctx, const char *udi) |
Given a UDI for a HAL device of capability 'storage', this function retrieves all the relevant properties into convenient in-process data structures. | |
const char * | hal_volume_get_storage_device_udi (HalVolume *volume) |
const char * | hal_drive_get_physical_device_udi (HalDrive *drive) |
dbus_bool_t | hal_drive_requires_eject (HalDrive *drive) |
HalVolume * | hal_volume_from_udi (LibHalContext *hal_ctx, const char *udi) |
Given a UDI for a HAL device of capability 'volume', this function retrieves all the relevant properties into convenient in-process data structures. | |
int | hal_volume_get_msdos_part_table_type (HalVolume *volume) |
If the volume is on a drive with a MSDOS style partition table, return the partition table id. | |
HalDrive * | hal_drive_from_device_file (LibHalContext *hal_ctx, const char *device_file) |
Get the drive object that either is (when given e.g. | |
HalVolume * | hal_volume_from_device_file (LibHalContext *hal_ctx, const char *device_file) |
Get the volume object for a given device file. | |
dbus_uint64_t | hal_volume_get_size (HalVolume *volume) |
dbus_bool_t | hal_drive_is_hotpluggable (HalDrive *drive) |
dbus_bool_t | hal_drive_uses_removable_media (HalDrive *drive) |
HalDriveType | hal_drive_get_type (HalDrive *drive) |
HalDriveBus | hal_drive_get_bus (HalDrive *drive) |
HalDriveCdromCaps | hal_drive_get_cdrom_caps (HalDrive *drive) |
unsigned int | hal_drive_get_device_major (HalDrive *drive) |
unsigned int | hal_drive_get_device_minor (HalDrive *drive) |
const char * | hal_drive_get_type_textual (HalDrive *drive) |
const char * | hal_drive_get_device_file (HalDrive *drive) |
const char * | hal_drive_get_udi (HalDrive *drive) |
const char * | hal_drive_get_serial (HalDrive *drive) |
const char * | hal_drive_get_firmware_version (HalDrive *drive) |
const char * | hal_drive_get_model (HalDrive *drive) |
const char * | hal_drive_get_vendor (HalDrive *drive) |
const char * | hal_volume_get_udi (HalVolume *volume) |
const char * | hal_volume_get_device_file (HalVolume *volume) |
unsigned int | hal_volume_get_device_major (HalVolume *volume) |
unsigned int | hal_volume_get_device_minor (HalVolume *volume) |
const char * | hal_volume_get_fstype (HalVolume *volume) |
const char * | hal_volume_get_fsversion (HalVolume *volume) |
HalVolumeUsage | hal_volume_get_fsusage (HalVolume *volume) |
dbus_bool_t | hal_volume_is_mounted (HalVolume *volume) |
dbus_bool_t | hal_volume_is_partition (HalVolume *volume) |
dbus_bool_t | hal_volume_is_disc (HalVolume *volume) |
unsigned int | hal_volume_get_partition_number (HalVolume *volume) |
const char * | hal_volume_get_label (HalVolume *volume) |
const char * | hal_volume_get_mount_point (HalVolume *volume) |
const char * | hal_volume_get_uuid (HalVolume *volume) |
dbus_bool_t | hal_volume_disc_has_audio (HalVolume *volume) |
dbus_bool_t | hal_volume_disc_has_data (HalVolume *volume) |
dbus_bool_t | hal_volume_disc_is_blank (HalVolume *volume) |
dbus_bool_t | hal_volume_disc_is_rewritable (HalVolume *volume) |
dbus_bool_t | hal_volume_disc_is_appendable (HalVolume *volume) |
HalVolumeDiscType | hal_volume_get_disc_type (HalVolume *volume) |
char ** | hal_drive_find_all_volumes (LibHalContext *hal_ctx, HalDrive *drive, int *num_volumes) |
char * | hal_drive_policy_default_get_mount_root (LibHalContext *hal_ctx) |
dbus_bool_t | hal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx) |
char * | hal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx) |
char * | hal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx) |
dbus_bool_t | hal_drive_policy_is_mountable (HalDrive *drive, HalStoragePolicy *policy) |
const char * | hal_drive_policy_get_desired_mount_point (HalDrive *drive, HalStoragePolicy *policy) |
void | mopts_collect (LibHalContext *hal_ctx, const char *namespace, int namespace_len, const char *udi, char *options_string, size_t options_max_len, dbus_bool_t only_collect_imply_opts) |
const char * | hal_drive_policy_get_mount_options (HalDrive *drive, HalStoragePolicy *policy) |
const char * | hal_drive_policy_get_mount_fs (HalDrive *drive, HalStoragePolicy *policy) |
dbus_bool_t | hal_volume_policy_is_mountable (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
const char * | hal_volume_policy_get_desired_mount_point (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
const char * | hal_volume_policy_get_mount_options (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
const char * | hal_volume_policy_get_mount_fs (HalDrive *drive, HalVolume *volume, HalStoragePolicy *policy) |
dbus_bool_t | hal_drive_no_partitions_hint (HalDrive *drive) |
|
Value: do { \ dst[dstmaxlen - 1] = '\0'; \ strncat (dst, src, dstmaxlen - strlen (dst) - 1); \ } while(0) Definition at line 1452 of file libhal-storage.c. |
|
Free all resources used by a HalDrive object.
Definition at line 717 of file libhal-storage.c. References hal_free_string(). Referenced by hal_drive_from_udi(). |
|
Get the drive object that either is (when given e.g. /dev/sdb) or contains (when given e.g. /dev/sdb1) the given device file.
Definition at line 1073 of file libhal-storage.c. References hal_device_get_property_string(), hal_device_query_capability(), hal_drive_from_udi(), hal_free_string(), hal_free_string_array(), and hal_manager_find_device_string_match(). |
|
Given a UDI for a HAL device of capability 'storage', this function retrieves all the relevant properties into convenient in-process data structures.
Definition at line 775 of file libhal-storage.c. References hal_device_get_all_properties(), hal_device_get_property_string(), hal_device_query_capability(), hal_drive_free(), hal_free_property_set(), hal_free_string(), hal_psi_get_key(), hal_psi_get_type(), hal_psi_has_more(), hal_psi_init(), and hal_psi_next(). Referenced by hal_drive_from_device_file(). |
|
Free all resources used by a HalVolume object.
Definition at line 740 of file libhal-storage.c. References hal_free_string(). Referenced by hal_volume_from_udi(). |
|
Get the volume object for a given device file.
Definition at line 1123 of file libhal-storage.c. References hal_device_query_capability(), hal_free_string_array(), hal_manager_find_device_string_match(), and hal_volume_from_udi(). |
|
Given a UDI for a HAL device of capability 'volume', this function retrieves all the relevant properties into convenient in-process data structures.
Definition at line 951 of file libhal-storage.c. References hal_device_get_all_properties(), hal_device_query_capability(), hal_free_property_set(), hal_free_string(), hal_psi_get_key(), hal_psi_get_type(), hal_psi_has_more(), hal_psi_init(), hal_psi_next(), and hal_volume_free(). Referenced by hal_volume_from_device_file(). |
|
If the volume is on a drive with a MSDOS style partition table, return the partition table id.
Definition at line 1058 of file libhal-storage.c. |
|
Policy function to determine if a volume should be visible in a desktop environment. This is useful to hide certain system volumes as bootstrap partitions, the /usr partition, swap partitions and other volumes that a unprivileged desktop user shouldn't know even exists.
Definition at line 550 of file libhal-storage.c. |