Mountain/IPC/WindServiceHandlers/Output/OutputCreate.rs
1#![allow(non_snake_case, unused_variables)]
2
3//! Create a named output channel. Returns the channel name as
4//! its handle. The Sky/frontend listens for `sky://output/create`
5//! and instantiates the channel panel; we just acknowledge.
6
7use serde_json::{Value, json};
8use tauri::AppHandle;
9
10use crate::dev_log;
11
12pub async fn OutputCreate(_ApplicationHandle:AppHandle, Arguments:Vec<Value>) -> Result<Value, String> {
13 let ChannelName = Arguments.first().and_then(|V| V.as_str()).unwrap_or("Output").to_string();
14 dev_log!("ipc", "output:create channel='{}'", ChannelName);
15 Ok(json!({ "channelName": ChannelName }))
16}