summaryrefslogtreecommitdiff
path: root/libupower-glib
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-10 12:16:31 +0200
committerBastien Nocera <hadess@hadess.net>2013-10-14 10:42:55 +0200
commitc842f1a53ec5f1903bd911e0eee2383b0fc5503a (patch)
treea814d18ce3dfae9436a6c4e998cd324826907d60 /libupower-glib
parent3ed22cd32b5b98b032dd6d9489acd13c65ede0f1 (diff)
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 'libupower-glib')
-rw-r--r--libupower-glib/up-device.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c
index 72cf530..1c346da 100644
--- a/libupower-glib/up-device.c
+++ b/libupower-glib/up-device.c
@@ -86,9 +86,6 @@ struct _UpDevicePrivate
gint64 time_to_full; /* seconds */
gdouble percentage; /* percent */
gdouble temperature; /* degrees C */
- gboolean recall_notice;
- gchar *recall_vendor;
- gchar *recall_url;
};
enum {
@@ -119,9 +116,6 @@ enum {
PROP_TIME_TO_FULL,
PROP_PERCENTAGE,
PROP_TEMPERATURE,
- PROP_RECALL_NOTICE,
- PROP_RECALL_VENDOR,
- PROP_RECALL_URL,
PROP_LAST
};
@@ -221,14 +215,6 @@ up_device_collect_props_cb (const char *key, const GValue *value, UpDevice *devi
device->priv->capacity = g_value_get_double (value);
} else if (g_strcmp0 (key, "State") == 0) {
device->priv->state = g_value_get_uint (value);
- } else if (g_strcmp0 (key, "RecallNotice") == 0) {
- device->priv->recall_notice = g_value_get_boolean (value);
- } else if (g_strcmp0 (key, "RecallVendor") == 0) {
- g_free (device->priv->recall_vendor);
- device->priv->recall_vendor = g_strdup (g_value_get_string (value));
- } else if (g_strcmp0 (key, "RecallUrl") == 0) {
- g_free (device->priv->recall_url);
- device->priv->recall_url = g_strdup (g_value_get_string (value));
} else {
g_warning ("unhandled property '%s'", key);
}
@@ -527,12 +513,6 @@ up_device_to_text (UpDevice *device)
}
if (device->priv->kind == UP_DEVICE_KIND_LINE_POWER)
g_string_append_printf (string, " online: %s\n", up_device_bool_to_string (device->priv->online));
- if (device->priv->kind == UP_DEVICE_KIND_BATTERY) {
- if (device->priv->recall_notice) {
- g_string_append_printf (string, " recall vendor: %s\n", device->priv->recall_vendor);
- g_string_append_printf (string, " recall url: %s\n", device->priv->recall_url);
- }
- }
/* if we can, get history */
if (device->priv->has_history) {
@@ -841,17 +821,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;
@@ -945,15 +914,6 @@ up_device_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
case PROP_TEMPERATURE:
g_value_set_double (value, device->priv->temperature);
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;
@@ -1323,47 +1283,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:
- *
- * If the device may be recalled due to defect. NOTE: This property does
- * not mean the battery is broken, and just that the user should
- * _check_ with the vendor.
- *
- * Since: 0.9.0
- **/
- 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:
- *
- * The vendor that is recalling the device.
- *
- * Since: 0.9.0
- **/
- 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:
- *
- * The vendors internet link for the recalled device.
- *
- * Since: 0.9.0
- **/
- g_object_class_install_property (object_class,
- PROP_RECALL_URL,
- g_param_spec_string ("recall-url",
- NULL, NULL,
- NULL,
- G_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (UpDevicePrivate));
}
@@ -1397,8 +1316,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);
if (device->priv->proxy_device != NULL)
g_object_unref (device->priv->proxy_device);
if (device->priv->proxy_props != NULL)