1
0
Fork 0
forked from wry/wry

config: add async tasks and polling infrastructure

This commit is contained in:
Julian Orth 2024-03-05 18:28:15 +01:00
parent 7fb68561e8
commit d4d76c0ef3
13 changed files with 613 additions and 13 deletions

View file

@ -7,7 +7,7 @@ use {
timer::Timer,
video::{connector_type::ConnectorType, Connector, DrmDevice, GfxApi, Transform},
Axis, Direction, PciId, Workspace,
_private::WireMode,
_private::{PollableId, WireMode},
},
serde::{Deserialize, Serialize},
std::time::Duration,
@ -57,6 +57,11 @@ pub enum ServerMessage {
},
Idle,
DevicesEnumerated,
InterestReady {
id: PollableId,
writable: bool,
res: Result<(), String>,
},
}
#[derive(Serialize, Deserialize, Debug)]
@ -360,6 +365,16 @@ pub enum ClientMessage<'a> {
connector: Connector,
mode: WireMode,
},
AddPollable {
fd: i32,
},
RemovePollable {
id: PollableId,
},
AddInterest {
pollable: PollableId,
writable: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]
@ -465,6 +480,9 @@ pub enum Response {
ConnectorModes {
modes: Vec<WireMode>,
},
AddPollable {
id: Result<PollableId, String>,
},
}
#[derive(Serialize, Deserialize, Debug)]