summaryrefslogtreecommitdiff
path: root/external/plyer/facades/battery.py
diff options
context:
space:
mode:
authorLivio Recchia <recchialivio@libero.it>2020-02-10 23:06:34 +0100
committerLivio Recchia <recchialivio@libero.it>2020-02-10 23:06:34 +0100
commit9a13903a2f7d3a65fdf15a65fb59cccd622e2066 (patch)
tree9403b7dff39eb5e5d7fa0f79efb69b496add4c4b /external/plyer/facades/battery.py
parent11cc316b74d5f3f283413a33e7693b314741aa4a (diff)
downloadmanachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.gz
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.bz2
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.xz
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.zip
Initial commit
Diffstat (limited to 'external/plyer/facades/battery.py')
-rw-r--r--external/plyer/facades/battery.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/external/plyer/facades/battery.py b/external/plyer/facades/battery.py
new file mode 100644
index 0000000..7cd48c7
--- /dev/null
+++ b/external/plyer/facades/battery.py
@@ -0,0 +1,22 @@
+class Battery(object):
+ '''Battery info facade.'''
+
+ @property
+ def status(self):
+ '''Property that contains a dict with the following fields:
+ * **isCharging** *(bool)*: Battery is charging
+ * **percentage** *(float)*: Battery charge remaining
+
+ .. warning::
+ If any of the fields is not readable, it is set as
+ None.
+ '''
+ return self.get_state()
+
+ def get_state(self):
+ return self._get_state()
+
+ #private
+
+ def _get_state(self):
+ raise NotImplementedError()