Skip to main content

Mountain/IPC/WindServiceAdapters/
MountainSandboxConfiguration.rs

1#![allow(non_snake_case)]
2
3//! Mountain's own sandbox-config payload (input to
4//! `WindServiceAdapter::convert_to_wind_configuration`).
5//! Private to this module; the trio of nested DTOs
6//! (`Versions`, `NLSConfiguration`, `ProductConfiguration`)
7//! lives inline because they're consumed only here and never
8//! constructed externally.
9
10use std::collections::HashMap;
11
12use serde::{Deserialize, Serialize};
13
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub(super) struct Struct {
16	pub window_id:String,
17	pub machine_id:String,
18	pub session_id:String,
19	pub log_level:i32,
20	pub user_env:HashMap<String, String>,
21	pub app_root:String,
22	pub app_name:String,
23	pub app_uri_scheme:String,
24	pub app_language:String,
25	pub app_host:String,
26	pub platform:String,
27	pub arch:String,
28	pub versions:Versions,
29	pub exec_path:String,
30	pub home_dir:String,
31	pub tmp_dir:String,
32	pub user_data_dir:String,
33	pub backup_path:String,
34	pub resources_path:String,
35	pub vscode_cwd:String,
36	pub nls:NLSConfiguration,
37	pub product_configuration:ProductConfiguration,
38	pub zoom_level:f64,
39}
40
41#[derive(Debug, Clone, Serialize, Deserialize)]
42pub(super) struct Versions {
43	pub mountain:String,
44	pub electron:String,
45	pub chrome:String,
46	pub node:String,
47}
48
49#[derive(Debug, Clone, Serialize, Deserialize)]
50pub(super) struct NLSConfiguration {
51	pub messages:HashMap<String, String>,
52	pub language:String,
53	pub available_languages:HashMap<String, String>,
54}
55
56#[derive(Debug, Clone, Serialize, Deserialize)]
57pub(super) struct ProductConfiguration {
58	pub name_short:String,
59	pub name_long:String,
60	pub application_name:String,
61	pub embedder_identifier:String,
62	pub is_packaged:bool,
63}