diff --git a/3-series/MobileControlConfig.cs b/3-series/MobileControlConfig.cs index 821f911..ba0fcec 100644 --- a/3-series/MobileControlConfig.cs +++ b/3-series/MobileControlConfig.cs @@ -1,5 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using PepperDash.Core; using System; using System.Collections.Generic; @@ -23,6 +25,9 @@ public class MobileControlConfig [JsonProperty("applicationConfig")] public MobileControlApplicationConfig ApplicationConfig { get; set; } + [JsonProperty("userInterfaceConfig")] + public UserInterfaceConfig UserInterfaceConfig { get; set; } + [JsonProperty("enableApiServer")] public bool EnableApiServer { get; set; } #endif @@ -38,6 +43,7 @@ public MobileControlConfig() #if SERIES4 EnableApiServer = true; // default to true ApplicationConfig = null; + UserInterfaceConfig = null; #endif } } @@ -116,6 +122,74 @@ public class MobileControlApplicationConfig [JsonProperty("enableRemoteLogging")] public bool Logging { get; set; } + + } + + public class UserInterfaceConfig + { + [JsonProperty("partnerMetadata", NullValueHandling = NullValueHandling.Ignore)] + public List PartnerMetadata { get; set; } + + [JsonProperty("techMenuConfig")] + public TechMenuConfig TechMenuConfig { get; set; } + + [JsonProperty("customStyles")] + public Dictionary CustomStyles { get; set; } + + public UserInterfaceConfig() + { + PartnerMetadata = new List(); + TechMenuConfig = new TechMenuConfig(); + CustomStyles = new Dictionary(); + } + } + + + public class MobileControlPartnerMetadata + { + [JsonProperty("role")] + public string Role { get; set; } + + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("logoPath")] + public string LogoPath { get; set; } + } + + public class TechMenuConfig + { + [JsonProperty("leftNav")] + [JsonConverter(typeof(StringEnumConverter))] + public Dictionary LeftNav { get; set; } + + public TechMenuConfig() + { + LeftNav = new Dictionary(); + } + } + + public enum eUiModeKeys + { + systemStatus, + matrixRouting, + displays, + audio, + setTopBox, + environment, + roomSchedule, + roomSetup, + changePin, + about, + } + + public class LeftNavItemConfig + { + [JsonProperty("label")] + public string Label { get; set; } + + [JsonProperty("enabled")] + public bool? Enabled { get; set; } } public class McMode diff --git a/4-series/epi-essentials-mobile-control/WebSocketServer/MobileControlWebsocketServer.cs b/4-series/epi-essentials-mobile-control/WebSocketServer/MobileControlWebsocketServer.cs index 68a57d3..b406b8a 100644 --- a/4-series/epi-essentials-mobile-control/WebSocketServer/MobileControlWebsocketServer.cs +++ b/4-series/epi-essentials-mobile-control/WebSocketServer/MobileControlWebsocketServer.cs @@ -945,6 +945,7 @@ private void HandleJoinRequest(HttpListenerRequest req, HttpListenerResponse res SystemUuid = _parent.SystemUuid, RoomUuid = _parent.SystemUuid, Config = _parent.GetConfigWithPluginVersion(), + UserInterfaceConfig = _parent.Config.UserInterfaceConfig, CodeExpires = new DateTime().AddYears(1), UserCode = bridge.UserCode, UserAppUrl = string.Format("http://{0}:{1}/mc/app", @@ -1233,6 +1234,9 @@ public class JoinResponse [JsonProperty("config")] public object Config { get; set; } + [JsonProperty("userInterfaceConfig")] + public UserInterfaceConfig UserInterfaceConfig { get; set; } + [JsonProperty("codeExpires")] public DateTime CodeExpires { get; set; }