[gnome-flashback] power-applet: add upower device interface
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] power-applet: add upower device interface
- Date: Wed, 9 Sep 2015 21:48:33 +0000 (UTC)
commit d3879669f56f046ba21265887e0d82b57acee3b6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Sep 9 20:50:59 2015 +0300
power-applet: add upower device interface
gnome-flashback/libpower-applet/Makefile.am | 22 ++++++++
.../org.freedesktop.UPower.Device.xml | 51 ++++++++++++++++++++
2 files changed, 73 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libpower-applet/Makefile.am b/gnome-flashback/libpower-applet/Makefile.am
index 10a7dcf..08d7e28 100644
--- a/gnome-flashback/libpower-applet/Makefile.am
+++ b/gnome-flashback/libpower-applet/Makefile.am
@@ -15,6 +15,7 @@ libpower_applet_la_CFLAGS = \
libpower_applet_la_SOURCES = \
gf-power-applet.c \
gf-power-applet.h \
+ $(BUILT_SOURCES) \
$(NULL)
libpower_applet_la_LDFLAGS = \
@@ -26,4 +27,25 @@ libpower_applet_la_LIBADD = \
$(POWER_APPLET_LIBS) \
$(NULL)
+gf-upower-device.h:
+gf-upower-device.c: org.freedesktop.UPower.Device.xml
+ $(AM_V_GEN) gdbus-codegen \
+ --interface-prefix org.freedesktop.UPower.Device. \
+ --c-namespace Gf \
+ --generate-c-code gf-upower-device \
+ $(srcdir)/org.freedesktop.UPower.Device.xml
+
+BUILT_SOURCES = \
+ gf-upower-device.c \
+ gf-upower-device.h \
+ $(NULL)
+
+EXTRA_DIST = \
+ org.freedesktop.UPower.Device.xml \
+ $(NULL)
+
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libpower-applet/org.freedesktop.UPower.Device.xml
b/gnome-flashback/libpower-applet/org.freedesktop.UPower.Device.xml
new file mode 100644
index 0000000..be17cbb
--- /dev/null
+++ b/gnome-flashback/libpower-applet/org.freedesktop.UPower.Device.xml
@@ -0,0 +1,51 @@
+<node>
+ <interface name="org.freedesktop.UPower.Device">
+
+ <annotation name="org.gtk.GDBus.C.Name" value="UPowerDevice" />
+
+ <method name="Refresh">
+ </method>
+
+ <method name="GetHistory">
+ <arg name="type" direction="in" type="s" />
+ <arg name="timespan" direction="in" type="u" />
+ <arg name="resolution" direction="in" type="u" />
+ <arg name="data" direction="out" type="a(udu)" />
+ </method>
+
+ <method name="GetStatistics">
+ <arg name="type" direction="in" type="s" />
+ <arg name="data" direction="out" type="a(dd)" />
+ </method>
+
+ <property name="NativePath" type="s" access="read" />
+ <property name="Vendor" type="s" access="read" />
+ <property name="Model" type="s" access="read" />
+ <property name="Serial" type="s" access="read" />
+ <property name="UpdateTime" type="t" access="read" />
+ <property name="Type" type="u" access="read" />
+ <property name="PowerSupply" type="b" access="read" />
+ <property name="HasHistory" type="b" access="read" />
+ <property name="HasStatistics" type="b" access="read" />
+ <property name="Online" type="b" access="read" />
+ <property name="Energy" type="d" access="read" />
+ <property name="EnergyEmpty" type="d" access="read" />
+ <property name="EnergyFull" type="d" access="read" />
+ <property name="EnergyFullDesign" type="d" access="read" />
+ <property name="EnergyRate" type="d" access="read" />
+ <property name="Voltage" type="d" access="read" />
+ <property name="Luminosity" type="d" access="read" />
+ <property name="TimeToEmpty" type="x" access="read" />
+ <property name="TimeToFull" type="x" access="read" />
+ <property name="Percentage" type="d" access="read" />
+ <property name="Temperature" type="d" access="read" />
+ <property name="IsPresent" type="b" access="read" />
+ <property name="State" type="u" access="read" />
+ <property name="IsRechargeable" type="b" access="read" />
+ <property name="Capacity" type="d" access="read" />
+ <property name="Technology" type="u" access="read" />
+ <property name="WarningLevel" type="u" access="read" />
+ <property name="IconName" type="s" access="read" />
+
+ </interface>
+</node>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]