htop/unsupported/Platform.c

67 lines
1.3 KiB
C
Raw Normal View History

/*
htop - unsupported/Platform.c
(C) 2014 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "Platform.h"
#include "CPUMeter.h"
#include "MemoryMeter.h"
#include "SwapMeter.h"
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "ClockMeter.h"
#include "HostnameMeter.h"
2014-11-27 21:41:14 +00:00
#include "UptimeMeter.h"
/*{
#include "Action.h"
#include "BatteryMeter.h"
#include "UnsupportedProcess.h"
}*/
void Platform_setBindings(Htop_Action* keys) {
(void) keys;
}
MeterClass* Platform_meterTypes[] = {
&CPUMeter_class,
&ClockMeter_class,
&LoadAverageMeter_class,
&LoadMeter_class,
&MemoryMeter_class,
&SwapMeter_class,
&TasksMeter_class,
&BatteryMeter_class,
&HostnameMeter_class,
2014-11-27 21:41:14 +00:00
&UptimeMeter_class,
&AllCPUsMeter_class,
&AllCPUs2Meter_class,
&LeftCPUsMeter_class,
&RightCPUsMeter_class,
&LeftCPUs2Meter_class,
&RightCPUs2Meter_class,
&BlankMeter_class,
NULL
};
2014-11-27 21:41:14 +00:00
int Platform_getUptime() {
return -1;
}
void Platform_getLoadAverage(double* one, double* five, double* fifteen) {
*one = 0;
*five = 0;
*fifteen = 0;
}
int Platform_getMaxPid() {
return -1;
}
void Platform_getBatteryLevel(double* level, ACPresence* isOnAC) {
*level = -1;
*isOnAC = AC_ERROR;
}