fix: further layer A (per-app) glitches
This commit is contained in:
parent
2978318019
commit
7797f60128
16 changed files with 1589 additions and 155 deletions
|
|
@ -307,6 +307,39 @@ impl Client {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// `per-app.list`
|
||||
pub fn layer_a_list(
|
||||
&mut self,
|
||||
) -> Result<Vec<headroom_ipc::LayerASnapshot>, ClientError> {
|
||||
#[derive(serde::Deserialize)]
|
||||
struct Body {
|
||||
layer_a: Vec<headroom_ipc::LayerASnapshot>,
|
||||
}
|
||||
let body: Body = self.send_into(Op::LayerAList)?;
|
||||
Ok(body.layer_a)
|
||||
}
|
||||
|
||||
/// `per-app.set`
|
||||
pub fn per_app_set(&mut self, app: &str, enabled: bool) -> Result<(), ClientError> {
|
||||
let _: serde_json::Value = self.send(Op::PerAppSet {
|
||||
app: app.to_owned(),
|
||||
enabled,
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `per-app.master`
|
||||
pub fn per_app_master(&mut self, enabled: bool) -> Result<(), ClientError> {
|
||||
let _: serde_json::Value = self.send(Op::PerAppMaster { enabled })?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `per-app.reset`
|
||||
pub fn layer_a_reset(&mut self, node_id: u32) -> Result<(), ClientError> {
|
||||
let _: serde_json::Value = self.send(Op::LayerAReset { node_id })?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `subscribe`
|
||||
pub fn subscribe(&mut self, topics: &[Topic]) -> Result<Vec<Topic>, ClientError> {
|
||||
#[derive(serde::Deserialize)]
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub use client::{Client, ClientError};
|
|||
|
||||
pub use headroom_ipc::{
|
||||
default_socket_path, Codec, DaemonEvent, Error as IpcError, ErrorCode, Event, HelloData,
|
||||
MeterTick, Op, ProfileEvent, ProfileInfo, ProtoError, Request, Response, ResponsePayload,
|
||||
Route, RouteList, RouteRule, RouteRuleMatch, RoutingEvent, ServerFrame, SinkInfo, Sinks,
|
||||
Status, StreamRoute, Topic, PROTOCOL_VERSION,
|
||||
LayerALevel, LayerASnapshot, MeterTick, Op, ProfileEvent, ProfileInfo, ProtoError, Request,
|
||||
Response, ResponsePayload, Route, RouteList, RouteRule, RouteRuleMatch, RoutingEvent,
|
||||
ServerFrame, SinkInfo, Sinks, Status, StreamRoute, Topic, PROTOCOL_VERSION,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue