723
devkit_disks_device_set_drive_requires_eject (DevkitDisksDevice *device, gboolean value)
725
if (G_UNLIKELY (device->priv->drive_requires_eject != value))
727
device->priv->drive_requires_eject = value;
728
emit_changed (device, "drive_requires_eject");
736
devkit_disks_device_set_drive_can_detach (DevkitDisksDevice *device, gboolean value)
738
if (G_UNLIKELY (device->priv->drive_can_detach != value))
740
device->priv->drive_can_detach = value;
741
emit_changed (device, "drive_can_detach");
746
devkit_disks_device_set_drive_can_spindown (DevkitDisksDevice *device, gboolean value)
748
if (G_UNLIKELY (device->priv->drive_can_spindown != value))
750
device->priv->drive_can_spindown = value;
751
emit_changed (device, "drive_can_spindown");
756
devkit_disks_device_set_drive_is_rotational (DevkitDisksDevice *device, gboolean value)
758
if (G_UNLIKELY (device->priv->drive_is_rotational != value))
760
device->priv->drive_is_rotational = value;
761
emit_changed (device, "drive_is_rotational");
1084
devkit_disks_device_set_drive_ata_smart_is_failing (DevkitDisksDevice *device, gboolean value)
1086
if (G_UNLIKELY (device->priv->drive_ata_smart_is_failing != value))
1088
device->priv->drive_ata_smart_is_failing = value;
1089
emit_changed (device, "drive_ata_smart_is_failing");
1094
devkit_disks_device_set_drive_ata_smart_is_failing_valid (DevkitDisksDevice *device, gboolean value)
1096
if (G_UNLIKELY (device->priv->drive_ata_smart_is_failing_valid != value))
1098
device->priv->drive_ata_smart_is_failing_valid = value;
1099
emit_changed (device, "drive_ata_smart_is_failing_valid");
1104
devkit_disks_device_set_drive_ata_smart_has_bad_sectors (DevkitDisksDevice *device, gboolean value)
1106
if (G_UNLIKELY (device->priv->drive_ata_smart_has_bad_sectors != value))
1108
device->priv->drive_ata_smart_has_bad_sectors = value;
1109
emit_changed (device, "drive_ata_smart_has_bad_sectors");
1114
devkit_disks_device_set_drive_ata_smart_has_bad_attributes (DevkitDisksDevice *device, gboolean value)
1116
if (G_UNLIKELY (device->priv->drive_ata_smart_has_bad_attributes != value))
1118
device->priv->drive_ata_smart_has_bad_attributes = value;
1119
emit_changed (device, "drive_ata_smart_has_bad_attributes");
1124
devkit_disks_device_set_drive_ata_smart_temperature_kelvin (DevkitDisksDevice *device, gdouble value)
1126
if (G_UNLIKELY (device->priv->drive_ata_smart_temperature_kelvin != value))
1128
device->priv->drive_ata_smart_temperature_kelvin = value;
1129
emit_changed (device, "drive_ata_smart_temperature_kelvin");
1134
devkit_disks_device_set_drive_ata_smart_power_on_seconds (DevkitDisksDevice *device, guint64 value)
1136
if (G_UNLIKELY (device->priv->drive_ata_smart_power_on_seconds != value))
1138
device->priv->drive_ata_smart_power_on_seconds = value;
1139
emit_changed (device, "drive_ata_smart_power_on_seconds");
1144
1117
devkit_disks_device_set_drive_ata_smart_time_collected (DevkitDisksDevice *device, guint64 value)
1146
1119
if (G_UNLIKELY (device->priv->drive_ata_smart_time_collected != value))
1154
devkit_disks_device_set_drive_ata_smart_offline_data_collection_status (DevkitDisksDevice *device, guint value)
1156
if (G_UNLIKELY (device->priv->drive_ata_smart_offline_data_collection_status != value))
1158
device->priv->drive_ata_smart_offline_data_collection_status = value;
1159
emit_changed (device, "drive_ata_smart_offline_data_collection_status");
1164
devkit_disks_device_set_drive_ata_smart_offline_data_collection_seconds (DevkitDisksDevice *device, guint value)
1166
if (G_UNLIKELY (device->priv->drive_ata_smart_offline_data_collection_seconds != value))
1168
device->priv->drive_ata_smart_offline_data_collection_seconds = value;
1169
emit_changed (device, "drive_ata_smart_offline_data_collection_seconds");
1174
devkit_disks_device_set_drive_ata_smart_self_test_execution_status (DevkitDisksDevice *device, guint value)
1176
if (G_UNLIKELY (device->priv->drive_ata_smart_self_test_execution_status != value))
1178
device->priv->drive_ata_smart_self_test_execution_status = value;
1179
emit_changed (device, "drive_ata_smart_self_test_execution_status");
1184
devkit_disks_device_set_drive_ata_smart_self_test_execution_percent_remaining (DevkitDisksDevice *device, guint value)
1186
if (G_UNLIKELY (device->priv->drive_ata_smart_self_test_execution_percent_remaining != value))
1188
device->priv->drive_ata_smart_self_test_execution_percent_remaining = value;
1189
emit_changed (device, "drive_ata_smart_self_test_execution_percent_remaining");
1194
devkit_disks_device_set_drive_ata_smart_short_and_extended_self_test_available (DevkitDisksDevice *device, gboolean value)
1196
if (G_UNLIKELY (device->priv->drive_ata_smart_short_and_extended_self_test_available != value))
1198
device->priv->drive_ata_smart_short_and_extended_self_test_available = value;
1199
emit_changed (device, "drive_ata_smart_short_and_extended_self_test_available");
1204
devkit_disks_device_set_drive_ata_smart_conveyance_self_test_available (DevkitDisksDevice *device, gboolean value)
1206
if (G_UNLIKELY (device->priv->drive_ata_smart_conveyance_self_test_available != value))
1208
device->priv->drive_ata_smart_conveyance_self_test_available = value;
1209
emit_changed (device, "drive_ata_smart_conveyance_self_test_available");
1214
devkit_disks_device_set_drive_ata_smart_start_self_test_available (DevkitDisksDevice *device, gboolean value)
1216
if (G_UNLIKELY (device->priv->drive_ata_smart_start_self_test_available != value))
1218
device->priv->drive_ata_smart_start_self_test_available = value;
1219
emit_changed (device, "drive_ata_smart_start_self_test_available");
1224
devkit_disks_device_set_drive_ata_smart_abort_self_test_available (DevkitDisksDevice *device, gboolean value)
1226
if (G_UNLIKELY (device->priv->drive_ata_smart_abort_self_test_available != value))
1228
device->priv->drive_ata_smart_abort_self_test_available = value;
1229
emit_changed (device, "drive_ata_smart_abort_self_test_available");
1234
devkit_disks_device_set_drive_ata_smart_short_self_test_polling_minutes (DevkitDisksDevice *device, guint value)
1236
if (G_UNLIKELY (device->priv->drive_ata_smart_short_self_test_polling_minutes != value))
1238
device->priv->drive_ata_smart_short_self_test_polling_minutes = value;
1239
emit_changed (device, "drive_ata_smart_short_self_test_polling_minutes");
1244
devkit_disks_device_set_drive_ata_smart_extended_self_test_polling_minutes (DevkitDisksDevice *device, guint value)
1246
if (G_UNLIKELY (device->priv->drive_ata_smart_extended_self_test_polling_minutes != value))
1248
device->priv->drive_ata_smart_extended_self_test_polling_minutes = value;
1249
emit_changed (device, "drive_ata_smart_extended_self_test_polling_minutes");
1254
devkit_disks_device_set_drive_ata_smart_conveyance_self_test_polling_minutes (DevkitDisksDevice *device, guint value)
1256
if (G_UNLIKELY (device->priv->drive_ata_smart_conveyance_self_test_polling_minutes != value))
1258
device->priv->drive_ata_smart_conveyance_self_test_polling_minutes = value;
1259
emit_changed (device, "drive_ata_smart_conveyance_self_test_polling_minutes");
1264
devkit_disks_device_set_drive_ata_smart_attributes_steal (DevkitDisksDevice *device, GPtrArray *attributes)
1127
devkit_disks_device_set_drive_ata_smart_status (DevkitDisksDevice *device, SkSmartOverall value)
1129
if (G_UNLIKELY (device->priv->drive_ata_smart_status != value))
1131
device->priv->drive_ata_smart_status = value;
1132
emit_changed (device, "drive_ata_smart_status");
1137
devkit_disks_device_set_drive_ata_smart_blob_steal (DevkitDisksDevice *device, gchar *blob, gsize blob_size)
1266
1139
/* TODO: compare? Not really needed, this happens very rarely */
1268
g_ptr_array_foreach (device->priv->drive_ata_smart_attributes, (GFunc) g_value_array_free, NULL);
1269
g_ptr_array_free (device->priv->drive_ata_smart_attributes, TRUE);
1271
device->priv->drive_ata_smart_attributes = attributes;
1273
emit_changed (device, "drive_ata_smart_attributes");
1141
g_free (device->priv->drive_ata_smart_blob);
1142
device->priv->drive_ata_smart_blob = blob;
1143
device->priv->drive_ata_smart_blob_size = blob_size;
1145
emit_changed (device, "drive_ata_smart_blob");