DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/Output/OutputCreate.rs
1//! Create a named output channel. Returns the channel name as
2//! its handle. The Sky/frontend listens for `sky://output/create`
3//! and instantiates the channel panel; we just acknowledge.
4
5use serde_json::{Value, json};
6use tauri::AppHandle;
7
8use crate::{IPC::WindServiceHandlers::Utilities::JsonValueHelpers::arg_string_or, dev_log};
9
10pub async fn Fn(_ApplicationHandle:AppHandle, Arguments:Vec<Value>) -> Result<Value, String> {
11 let ChannelName = arg_string_or(&Arguments, 0, "Output");
12
13 dev_log!("ipc", "output:create channel='{}'", ChannelName);
14
15 Ok(json!({ "channelName": ChannelName }))
16}