#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
use crate::ported::batterymeter::ACPresence;
use crate::ported::diskiometer::DiskIOData;
use crate::ported::meter::Meter;
use crate::ported::networkiometer::NetworkIOData;
use crate::ported::xutils::String_safeStrncpy;
const CPU_METER_FREQUENCY: usize = 8;
const CPU_METER_TEMPERATURE: usize = 9;
const MEMORY_CLASS_USED: usize = 0;
const MEMORY_CLASS_CACHED: usize = 1;
const Platform_unsupported: &str = "unsupported";
pub fn Platform_init() -> bool {
true
}
pub fn Platform_done() {
}
pub fn Platform_setBindings(_keys: &mut [Option<crate::ported::action::Htop_Action>]) {
}
pub fn Platform_getUptime() -> i32 {
0
}
pub fn Platform_getLoadAverage(one: &mut f64, five: &mut f64, fifteen: &mut f64) {
*one = 0.0;
*five = 0.0;
*fifteen = 0.0;
}
pub fn Platform_getMaxPid() -> libc::pid_t {
i32::MAX
}
pub fn Platform_setCPUValues(this: &mut Meter, cpu: u32) -> f64 {
let _ = cpu;
let v = &mut this.values;
v[CPU_METER_FREQUENCY] = f64::NAN;
v[CPU_METER_TEMPERATURE] = f64::NAN;
this.curItems = 1;
0.0
}
pub fn Platform_setMemoryValues(this: &mut Meter) {
let v = &mut this.values;
v[MEMORY_CLASS_USED] = f64::NAN;
v[MEMORY_CLASS_CACHED] = f64::NAN;
this.curItems = 2;
}
pub fn Platform_setSwapValues(this: &mut Meter) {
let _ = this;
}
pub fn Platform_getProcessEnv(_pid: libc::pid_t) -> Option<String> {
None
}
pub fn Platform_getProcessLocks(
_pid: libc::pid_t,
) -> Option<crate::ported::processlocksscreen::FileLocks_ProcessData> {
None
}
pub fn Platform_getFileDescriptors(used: &mut f64, max: &mut f64) {
*used = 1337.0;
*max = 4711.0;
}
pub fn Platform_getDiskIO(_data: &mut DiskIOData) -> bool {
false
}
pub fn Platform_getNetworkIO(_data: &mut NetworkIOData) -> bool {
false
}
pub fn Platform_getBattery(percent: &mut f64, isOnAC: &mut ACPresence) {
*percent = f64::NAN;
*isOnAC = ACPresence::AC_ERROR;
}
pub fn Platform_getHostname(buffer: &mut [u8]) {
String_safeStrncpy(buffer, Platform_unsupported.as_bytes());
}
pub fn Platform_getRelease() -> &'static str {
Platform_unsupported
}
pub fn Platform_dynamicMeters() -> *mut crate::ported::hashtable::Hashtable {
std::ptr::null_mut()
}
pub fn Platform_dynamicMetersDone(_table: *mut crate::ported::hashtable::Hashtable) {}
pub fn Platform_dynamicMeterInit(_meter: &mut crate::ported::meter::Meter) {}
pub fn Platform_dynamicMeterUpdateValues(_meter: &mut crate::ported::meter::Meter) {}
pub fn Platform_dynamicMeterDisplay(
_meter: &crate::ported::meter::Meter,
_out: &mut crate::ported::richstring::RichString,
) {
}
pub fn Platform_dynamicScreens() -> *mut crate::ported::hashtable::Hashtable {
std::ptr::null_mut()
}
pub fn Platform_dynamicScreensDone(_screens: *mut crate::ported::hashtable::Hashtable) {}
pub fn Platform_addDynamicScreenAvailableColumns(
_availableColumns: &mut crate::ported::panel::Panel,
_screen: &str,
) {
}