summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
authorMaxim Sheronov <maxim.sheronov@gmail.com>2017-09-12 22:09:06 +0300
committerMaxim Sheronov <maxim.sheronov@gmail.com>2017-09-13 20:57:07 +0300
commit0fffa45158bebeb4aaba1df1d271c000fffbe7f7 (patch)
tree369918b0d7c9f367a7396c3584ac84ab550bd103 /platform/iphone
parent69017974beb16dcfa971f9b6f33a4f005be57bef (diff)
Fix enums bindings
Add missed bindings for enums Move some enums to class to have correct output of api.json
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/power_iphone.cpp8
-rw-r--r--platform/iphone/power_iphone.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/power_iphone.cpp
index 2811e62108..055d31ef0a 100644
--- a/platform/iphone/power_iphone.cpp
+++ b/platform/iphone/power_iphone.cpp
@@ -30,15 +30,15 @@
#include "power_iphone.h"
-bool PowerState::UpdatePowerInfo() {
+bool OS::PowerState::UpdatePowerInfo() {
return false;
}
-PowerState PowerIphone::get_power_state() {
+OS::PowerState PowerIphone::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
} else {
- return POWERSTATE_UNKNOWN;
+ return OS::POWERSTATE_UNKNOWN;
}
}
@@ -59,7 +59,7 @@ int PowerIphone::get_power_percent_left() {
}
PowerIphone::PowerIphone()
- : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
+ : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
// TODO Auto-generated constructor stub
}
diff --git a/platform/iphone/power_iphone.h b/platform/iphone/power_iphone.h
index b4fb8d62dc..6270a8069c 100644
--- a/platform/iphone/power_iphone.h
+++ b/platform/iphone/power_iphone.h
@@ -31,11 +31,13 @@
#ifndef PLATFORM_IPHONE_POWER_IPHONE_H_
#define PLATFORM_IPHONE_POWER_IPHONE_H_
+#include <os/os.h>
+
class PowerIphone {
private:
int nsecs_left;
int percent_left;
- PowerState power_state;
+ OS::PowerState power_state;
bool UpdatePowerInfo();
@@ -43,7 +45,7 @@ public:
PowerIphone();
virtual ~PowerIphone();
- PowerState get_power_state();
+ OS::PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
};