diff --git a/dbus/org.freedesktop.UPower.Device.xml b/dbus/org.freedesktop.UPower.Device.xml index a36595a..dab4648 100644 --- a/dbus/org.freedesktop.UPower.Device.xml +++ b/dbus/org.freedesktop.UPower.Device.xml @@ -572,11 +572,18 @@ method return sender=:1.386 -> dest=:1.477 reply_serial=2 + Luminosity being recorded by the meter. + + DEPRECATED + + + This property is deprecated since the code it depends on was removed in 0.99.12 + diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c index f3271a1..32cb54b 100644 --- a/libupower-glib/up-device.c +++ b/libupower-glib/up-device.c @@ -376,8 +376,12 @@ up_device_to_text (UpDevice *device) g_string_append_printf (string, " charge-cycles: %s\n", "N/A"); } if (kind == UP_DEVICE_KIND_KEYBOARD) { + /* DEPRECATED. This property is deprecated since the code it depends on was removed in 0.99.12. */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" if (up_exported_device_get_luminosity (priv->proxy_device) > 0) g_string_append_printf (string, " luminosity: %g lx\n", up_exported_device_get_luminosity (priv->proxy_device)); + #pragma GCC diagnostic pop } if (kind == UP_DEVICE_KIND_BATTERY || kind == UP_DEVICE_KIND_UPS) { @@ -693,7 +697,11 @@ up_device_set_property (GObject *object, guint prop_id, const GValue *value, GPa up_exported_device_set_voltage (device->priv->proxy_device, g_value_get_double (value)); break; case PROP_LUMINOSITY: + /* DEPRECATED. This property is deprecated since the code it depends on was removed in 0.99.12. */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" up_exported_device_set_luminosity (device->priv->proxy_device, g_value_get_double (value)); + #pragma GCC diagnostic pop break; case PROP_TIME_TO_EMPTY: up_exported_device_set_time_to_empty (device->priv->proxy_device, g_value_get_int64 (value)); @@ -839,7 +847,11 @@ up_device_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe g_value_set_double (value, up_exported_device_get_voltage (device->priv->proxy_device)); break; case PROP_LUMINOSITY: + /* DEPRECATED. This property is deprecated since the code it depends on was removed in 0.99.12. */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" g_value_set_double (value, up_exported_device_get_luminosity (device->priv->proxy_device)); + #pragma GCC diagnostic pop break; case PROP_TIME_TO_EMPTY: g_value_set_int64 (value, up_exported_device_get_time_to_empty (device->priv->proxy_device)); @@ -1190,13 +1202,16 @@ up_device_class_init (UpDeviceClass *klass) * * The current luminosity of the device. * + * NOTE: As of 1.91.1, this property is deprecated since the code it + * depends on was removed in 0.99.12. + * * Since: 0.9.19 **/ g_object_class_install_property (object_class, PROP_LUMINOSITY, g_param_spec_double ("luminosity", NULL, NULL, 0.0, G_MAXDOUBLE, 0.0, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * UpDevice:time-to-empty: *