Add missing amfi actions

This commit is contained in:
Jackson Coxson
2025-07-02 19:47:47 -06:00
parent 2d9259f996
commit 4059e47a6e
2 changed files with 54 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ async fn main() {
.subcommand(Command::new("show").about("Shows the developer mode option in settings"))
.subcommand(Command::new("enable").about("Enables developer mode"))
.subcommand(Command::new("accept").about("Shows the accept dialogue for developer mode"))
.subcommand(Command::new("status").about("Gets the developer mode status"))
.subcommand(Command::new("state").about("Gets the device SEP state"))
.get_matches();
if matches.get_flag("about") {
@@ -77,6 +79,18 @@ async fn main() {
.accept_developer_mode()
.await
.expect("Failed to show");
} else if matches.subcommand_matches("status").is_some() {
let status = amfi_client
.get_developer_mode_status()
.await
.expect("Failed to get status");
println!("Enabled: {status}");
} else if matches.subcommand_matches("state").is_some() {
let status = amfi_client
.get_sep_device_state()
.await
.expect("Failed to get state");
println!("Enabled: {status}");
} else {
eprintln!("Invalid usage, pass -h for help");
}