Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guido Gunther
phosh
Commits
1309dcfa
Commit
1309dcfa
authored
Sep 28, 2020
by
Guido Gunther
Committed by
Guido Gunther
Oct 08, 2020
Browse files
dbus: Add (not yet merged) UPower Torch interface
Signed-off-by:
Guido Günther
<
guido.gunther@puri.sm
>
parent
6f6a96c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dbus/meson.build
View file @
1309dcfa
# DBus client interfaces
generated_dbus_sources = []
# iio-sensor-proxy
generated_dbus_sources += gnome.gdbus_codegen('iio-sensor-proxy-dbus',
'net.hadess.SensorProxy.xml',
interface_prefix: 'net.hadess',
namespace: 'PhoshDBus')
# org.freedesktop.UPower.Torch
generated_dbus_sources += gnome.gdbus_codegen('upower-torch-dbus',
'org.freedesktop.UPower.Torch.xml',
interface_prefix: 'org.freedesktop.UPower',
namespace: 'PhoshUPowerDBus')
# org.gnome.SessionManager.Presence
generated_dbus_sources += gnome.gdbus_codegen('gnome-session-presence-dbus',
'org.gnome.SessionManager.Presence.xml',
...
...
src/dbus/org.freedesktop.UPower.Torch.xml
0 → 100644
View file @
1309dcfa
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" [
<!ENTITY ERROR_GENERAL "org.freedesktop.UPower.GeneralError">
]>
<node
name=
"/"
xmlns:doc=
"http://www.freedesktop.org/dbus/1.0/doc.dtd"
>
<interface
name=
"org.freedesktop.UPower.Torch"
>
<doc:doc>
<doc:description>
<doc:para>
org.freedesktop.UPower.Torch is a DBus interface implemented
by UPower.
It allows a torch (if present) to be controlled.
</doc:para>
</doc:description>
</doc:doc>
<!-- ************************************************************ -->
<method
name=
"GetMaxBrightness"
>
<arg
name=
"value"
direction=
"out"
type=
"i"
>
<doc:doc>
<doc:summary>
The maximum value of the torch brightness.
</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>
Get the maximum brightness level for the torch.
</doc:para>
</doc:description>
<doc:errors>
<doc:error
name=
"&ERROR_GENERAL;"
>
if an error occured while getting the maximum brightness
</doc:error>
</doc:errors>
</doc:doc>
</method>
<!-- ************************************************************ -->
<method
name=
"GetBrightness"
>
<arg
name=
"value"
direction=
"out"
type=
"i"
>
<doc:doc>
<doc:summary>
The current value of the torch brightness.
</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>
Get the brightness level of the torch.
</doc:para>
</doc:description>
<doc:errors>
<doc:error
name=
"&ERROR_GENERAL;"
>
if an error occured while getting the brightness
</doc:error>
</doc:errors>
</doc:doc>
</method>
<!-- ************************************************************ -->
<method
name=
"SetBrightness"
>
<arg
name=
"value"
direction=
"in"
type=
"i"
>
<doc:doc>
<doc:summary>
The value to set the torch brightness.
</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>
Set the brightness level of the torch.
</doc:para>
</doc:description>
<doc:errors>
<doc:error
name=
"&ERROR_GENERAL;"
>
if an error occured while setting the brightness
</doc:error>
</doc:errors>
</doc:doc>
</method>
<!-- ************************************************************ -->
<signal
name=
"BrightnessChanged"
>
<arg
name=
"value"
direction=
"out"
type=
"i"
>
<doc:doc>
<doc:summary>
The new brightness value of the torch.
</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>
The torch brightness level has changed.
</doc:para>
</doc:description>
</doc:doc>
</signal>
<signal
name=
"BrightnessChangedWithSource"
>
<arg
name=
"value"
direction=
"out"
type=
"i"
>
<doc:doc>
<doc:summary>
The new brightness value of the torch.
</doc:summary>
</doc:doc>
</arg>
<arg
name=
"source"
direction=
"out"
type=
"s"
>
<doc:doc>
<doc:summary>
Source of the torch brightness change, either
"external" if SetBrightness was called, or "internal" if the
hardware changed the keyboard brightness itself.
</doc:summary>
</doc:doc>
</arg>
<doc:doc>
<doc:description>
<doc:para>
The torch brightness level has changed including
information about the source of the change.
</doc:para>
</doc:description>
</doc:doc>
</signal>
<!-- ************************************************************ -->
<property
name=
"MaxBrightness"
type=
"i"
access=
"read"
>
<doc:doc>
<doc:description>
<doc:para>
The maximum value of the torch brightness.
</doc:para>
</doc:description>
</doc:doc>
</property>
<property
name=
"Brightness"
type=
"i"
access=
"read"
>
<doc:doc>
<doc:description>
<doc:para>
The current value of the torch brightness.
</doc:para>
</doc:description>
</doc:doc>
</property>
</interface>
</node>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment