From c29e53c5d5aa9b9a5e13ea5ee74bb0fd13fc7f93 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 27 Nov 2014 21:07:42 -0200 Subject: [PATCH] Add a stub for the battery meter. --- freebsd/Platform.c | 9 ++++++++- freebsd/Platform.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 6239f33f..72f6e425 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -13,7 +13,6 @@ in the source distribution for its full text. #include "TasksMeter.h" #include "LoadAverageMeter.h" #include "UptimeMeter.h" -#include "BatteryMeter.h" #include "ClockMeter.h" #include "HostnameMeter.h" @@ -26,6 +25,7 @@ in the source distribution for its full text. /*{ #include "Action.h" +#include "BatteryMeter.h" }*/ void Platform_setBindings(Htop_Action* keys) { @@ -93,3 +93,10 @@ int Platform_getMaxPid() { } return maxPid; } + +void Platform_getBatteryLevel(double* level, ACPresence* isOnAC) { + // TODO + *level = -1; + *isOnAC = AC_ERROR; +} + diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 62bd7ca8..eb2a8017 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -10,6 +10,7 @@ in the source distribution for its full text. */ #include "Action.h" +#include "BatteryMeter.h" void Platform_setBindings(Htop_Action* keys); @@ -21,4 +22,7 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen); int Platform_getMaxPid(); +void Platform_getBatteryLevel(double* level, ACPresence* isOnAC); + + #endif