Add Events filter

This commit is contained in:
Tobias Reisinger 2024-06-03 01:39:37 +02:00
parent 895f5f9373
commit 915c2ccbbf
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 39 additions and 12 deletions

View file

@ -1,4 +1,4 @@
use clap::{Args, Parser, Subcommand};
use clap::{Args, Parser, Subcommand, ValueEnum};
use telnet::Telnet;
use crate::parameter::ParameterList;
@ -79,9 +79,18 @@ pub struct UpdateArgs {
speakers: Option<bool>,
}
#[derive(Clone, ValueEnum)]
pub enum EventArgsFilter {
All,
Mine,
Others,
}
#[derive(Args)]
pub struct EventArgs {
pub event: Vec<EventType>,
#[arg(long, short)]
pub filter: Option<EventArgsFilter>,
}
impl FetchArgs {