1
0
Fork 0
forked from wry/wry

config: add client-rule infrastructure

This commit is contained in:
Julian Orth 2025-05-04 18:02:17 +02:00
parent 17e715cde4
commit fd2163d658
32 changed files with 1804 additions and 27 deletions

View file

@ -4,7 +4,7 @@ mod logging;
pub(crate) mod string_error;
use {
crate::video::Mode,
crate::{client::ClientMatcher, video::Mode},
bincode::Options,
serde::{Deserialize, Serialize},
std::marker::PhantomData,
@ -64,3 +64,24 @@ impl WireMode {
pub struct PollableId(pub u64);
pub const DEFAULT_SEAT_NAME: &str = "default";
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
pub enum GenericCriterionIpc<T> {
Matcher(T),
Not(T),
List { list: Vec<T>, all: bool },
Exactly { list: Vec<T>, num: usize },
}
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
pub enum ClientCriterionIpc {
Generic(GenericCriterionIpc<ClientMatcher>),
String {
string: String,
field: ClientCriterionStringField,
regex: bool,
},
}
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
pub enum ClientCriterionStringField {}