diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-10 12:16:31 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-14 10:42:55 +0200 |
commit | c842f1a53ec5f1903bd911e0eee2383b0fc5503a (patch) | |
tree | a814d18ce3dfae9436a6c4e998cd324826907d60 /src | |
parent | 3ed22cd32b5b98b032dd6d9489acd13c65ede0f1 (diff) | |
download | upower-c842f1a53ec5f1903bd911e0eee2383b0fc5503a.tar.gz |
Remove obsolete battery recall properties
The recalls for that broken batch of Sony batteries dates back from
2006. All the batteries that could have been recalled have now
been recalled, and somebody particularly interested in supporting
them can match the batteries using the old rules file, in a
user session or a separate daemon.
Diffstat (limited to 'src')
-rw-r--r-- | src/linux/up-device-supply.c | 13 | ||||
-rw-r--r-- | src/org.freedesktop.UPower.Device.xml | 39 | ||||
-rw-r--r-- | src/up-device.c | 55 |
3 files changed, 0 insertions, 107 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index 8020277..53ab977 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -505,9 +505,6 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) gchar *manufacturer = NULL; gchar *model_name = NULL; gchar *serial_number = NULL; - gboolean recall_notice; - const gchar *recall_vendor = NULL; - const gchar *recall_url = NULL; UpDaemon *daemon; gboolean ac_online = FALSE; gboolean has_ac = FALSE; @@ -562,13 +559,6 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) up_device_supply_make_safe_string (model_name); up_device_supply_make_safe_string (serial_number); - /* are we possibly recalled by the vendor? */ - recall_notice = g_udev_device_has_property (native, "UPOWER_RECALL_NOTICE"); - if (recall_notice) { - recall_vendor = g_udev_device_get_property (native, "UPOWER_RECALL_VENDOR"); - recall_url = g_udev_device_get_property (native, "UPOWER_RECALL_URL"); - } - g_object_set (device, "vendor", manufacturer, "model", model_name, @@ -576,9 +566,6 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) "is-rechargeable", TRUE, /* assume true for laptops */ "has-history", TRUE, "has-statistics", TRUE, - "recall-notice", recall_notice, - "recall-vendor", recall_vendor, - "recall-url", recall_url, NULL); /* these don't change at runtime */ diff --git a/src/org.freedesktop.UPower.Device.xml b/src/org.freedesktop.UPower.Device.xml index 0be009c..4379fa0 100644 --- a/src/org.freedesktop.UPower.Device.xml +++ b/src/org.freedesktop.UPower.Device.xml @@ -684,45 +684,6 @@ method return sender=:1.386 -> dest=:1.477 reply_serial=2 </doc:doc> </property> - <property name="RecallNotice" type="b" access="read"> - <doc:doc> - <doc:description> - <doc:para> - If the device may have been recalled by the vendor due to a suspected - fault. - This key does not imply the device is faulty, only that it approximatly - matches the description from the vendor of units that were recalled. - </doc:para> - </doc:description> - </doc:doc> - </property> - - <property name="RecallVendor" type="s" access="read"> - <doc:doc> - <doc:description> - <doc:para> - The vendor that is handling the hardware recall. - </doc:para> - <doc:para> - This property is only valid if the property recall-notice is true. - </doc:para> - </doc:description> - </doc:doc> - </property> - - <property name="RecallUrl" type="s" access="read"> - <doc:doc> - <doc:description> - <doc:para> - The URL to visit about the hardware recall. - </doc:para> - <doc:para> - This property is only valid if the property recall-notice is true. - </doc:para> - </doc:description> - </doc:doc> - </property> - </interface> </node> diff --git a/src/up-device.c b/src/up-device.c index 28ac3a9..cf309fc 100644 --- a/src/up-device.c +++ b/src/up-device.c @@ -78,9 +78,6 @@ struct UpDevicePrivate gint64 time_to_full; /* seconds */ gdouble percentage; /* percent */ gdouble temperature; /* degrees C */ - gboolean recall_notice; - gchar *recall_vendor; - gchar *recall_url; }; static gboolean up_device_register_device (UpDevice *device); @@ -113,9 +110,6 @@ enum { PROP_PERCENTAGE, PROP_TEMPERATURE, PROP_TECHNOLOGY, - PROP_RECALL_NOTICE, - PROP_RECALL_VENDOR, - PROP_RECALL_URL, PROP_LAST }; @@ -257,15 +251,6 @@ up_device_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe case PROP_TECHNOLOGY: g_value_set_uint (value, device->priv->technology); break; - case PROP_RECALL_NOTICE: - g_value_set_boolean (value, device->priv->recall_notice); - break; - case PROP_RECALL_VENDOR: - g_value_set_string (value, device->priv->recall_vendor); - break; - case PROP_RECALL_URL: - g_value_set_string (value, device->priv->recall_url); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -363,17 +348,6 @@ up_device_set_property (GObject *object, guint prop_id, const GValue *value, GPa case PROP_TECHNOLOGY: device->priv->technology = g_value_get_uint (value); break; - case PROP_RECALL_NOTICE: - device->priv->recall_notice = g_value_get_boolean (value); - break; - case PROP_RECALL_VENDOR: - g_free (device->priv->recall_vendor); - device->priv->recall_vendor = g_strdup (g_value_get_string (value)); - break; - case PROP_RECALL_URL: - g_free (device->priv->recall_url); - device->priv->recall_url = g_strdup (g_value_get_string (value)); - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -928,8 +902,6 @@ up_device_finalize (GObject *object) g_free (device->priv->model); g_free (device->priv->serial); g_free (device->priv->native_path); - g_free (device->priv->recall_vendor); - g_free (device->priv->recall_url); G_OBJECT_CLASS (up_device_parent_class)->finalize (object); } @@ -1185,33 +1157,6 @@ up_device_class_init (UpDeviceClass *klass) g_param_spec_double ("temperature", NULL, NULL, 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); - /** - * UpDevice:recall-notice: - */ - g_object_class_install_property (object_class, - PROP_RECALL_NOTICE, - g_param_spec_boolean ("recall-notice", - NULL, NULL, - FALSE, - G_PARAM_READWRITE)); - /** - * UpDevice:recall-vendor: - */ - g_object_class_install_property (object_class, - PROP_RECALL_VENDOR, - g_param_spec_string ("recall-vendor", - NULL, NULL, - NULL, - G_PARAM_READWRITE)); - /** - * UpDevice:recall-url: - */ - g_object_class_install_property (object_class, - PROP_RECALL_URL, - g_param_spec_string ("recall-url", - NULL, NULL, - NULL, - G_PARAM_READWRITE)); dbus_g_error_domain_register (UP_DEVICE_ERROR, NULL, UP_DEVICE_TYPE_ERROR); } |