From 94103c0c025f04e75d5e163d9f0bdde27bb0c848 Mon Sep 17 00:00:00 2001 From: Julian Murgia Date: Sat, 23 Jul 2016 13:15:55 +0200 Subject: Add API to access battery power state Done: - X11, server (tested) - Windows (developed, would be nice to retest) - OSX (not tested) Prepared (not developed): - Android (code is here, but may not compile) - iphone - winrt - bb10 - haiku - javascript --- platform/bb10/os_bb10.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'platform/bb10/os_bb10.h') diff --git a/platform/bb10/os_bb10.h b/platform/bb10/os_bb10.h index 9cf2091d49..678b8c9fc2 100644 --- a/platform/bb10/os_bb10.h +++ b/platform/bb10/os_bb10.h @@ -39,6 +39,7 @@ #include "servers/visual/rasterizer.h" #include "audio_driver_bb10.h" #include "payment_service.h" +#include "power_bb10.h" #include #include @@ -58,6 +59,7 @@ class OSBB10 : public OS_Unix { PhysicsServer *physics_server; Physics2DServer *physics_2d_server; AudioDriverBB10* audio_driver; + PowerBB10 *power_manager; #ifdef PAYMENT_SERVICE_ENABLED PaymentService* payment_service; @@ -142,6 +144,10 @@ public: void run(); + virtual PowerState get_power_state(); + virtual int get_power_seconds_left(); + virtual int get_power_percent_left(); + OSBB10(); ~OSBB10(); -- cgit v1.2.3