summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2011-06-02 15:11:11 +0100
committerRichard Hughes <richard@hughsie.com>2011-06-02 15:11:13 +0100
commitdfc017a89774ceb92b3f31f2235d25e668517c00 (patch)
tree44d3607145e3b781b7dbaa913ab1179c6c9cd1a6 /src
parent61c8e8d40d18ca198f2fba56b1508b695c064acb (diff)
downloadcolord-dfc017a89774ceb92b3f31f2235d25e668517c00.tar.gz
Do not return a 4-double triple for Sensor.GetSample(), instead just return 3 double values
This is an API break, but nothing is using the API. The libcolord library already disregards the 4th double value if it is returned. I think it's a lot saner this way.
Diffstat (limited to 'src')
-rw-r--r--src/cd-sensor.c5
-rw-r--r--src/org.freedesktop.ColorManager.Sensor.xml25
2 files changed, 17 insertions, 13 deletions
diff --git a/src/cd-sensor.c b/src/cd-sensor.c
index 4edc16f..6f9d2c5 100644
--- a/src/cd-sensor.c
+++ b/src/cd-sensor.c
@@ -443,11 +443,10 @@ cd_sensor_get_sample_cb (GObject *source_object,
sample->X,
sample->Y,
sample->Z);
- result = g_variant_new ("((ddd)d)",
+ result = g_variant_new ("(ddd)",
sample->X,
sample->Y,
- sample->Z,
- -1.0f);
+ sample->Z);
g_dbus_method_invocation_return_value (invocation, result);
out:
if (sample != NULL)
diff --git a/src/org.freedesktop.ColorManager.Sensor.xml b/src/org.freedesktop.ColorManager.Sensor.xml
index c394d48..bba13a9 100644
--- a/src/org.freedesktop.ColorManager.Sensor.xml
+++ b/src/org.freedesktop.ColorManager.Sensor.xml
@@ -168,28 +168,33 @@
</doc:summary>
</doc:doc>
</arg>
- <arg type='(ddd)' name='value' direction='out'>
+ <arg type='d' name='sample_x' direction='out'>
<doc:doc>
<doc:summary>
<doc:para>
- The XYZ value, or <doc:tt>-1.0, -1.0, -1.0</doc:tt> if not
- supported by the sensor.
+ The X value, or <doc:tt>-1.0</doc:tt> for an error.
+ </doc:para>
+ <doc:para>
+ For the capability of <doc:tt>ambient</doc:tt> this is
+ the brightness in Lux.
</doc:para>
</doc:summary>
</doc:doc>
</arg>
- <arg type='d' name='value' direction='out'>
+ <arg type='d' name='sample_y' direction='out'>
<doc:doc>
<doc:summary>
<doc:para>
- The value in Lux, or <doc:tt>-1.0</doc:tt> if not
- supported by the sensor.
+ The Y value, or <doc:tt>-1.0</doc:tt> for an error.
</doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type='d' name='sample_z' direction='out'>
+ <doc:doc>
+ <doc:summary>
<doc:para>
- Note: only populate this value when the capability is
- <doc:tt>ambient</doc:tt> or when this value is available
- at no cost, i.e. does not require additional hardware
- access.
+ The Z value, or <doc:tt>-1.0</doc:tt> for an error.
</doc:para>
</doc:summary>
</doc:doc>