Removed DLL
Added All functions from DLL into HarmonyLinkServer
This commit is contained in:
parent
53773040d6
commit
0d5497be1c
27 changed files with 2146 additions and 64 deletions
25
src/battery/structs.rs
Normal file
25
src/battery/structs.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize, PartialEq)]
|
||||
pub enum ChargingStatus {
|
||||
Charging,
|
||||
Battery,
|
||||
UNKNOWN,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct BatteryInfo {
|
||||
pub has_battery: bool,
|
||||
pub battery_percent: i8,
|
||||
pub charging_status: ChargingStatus,
|
||||
}
|
||||
|
||||
impl BatteryInfo {
|
||||
pub fn new() -> BatteryInfo {
|
||||
BatteryInfo {
|
||||
has_battery: false,
|
||||
battery_percent: 0,
|
||||
charging_status: ChargingStatus::UNKNOWN
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue