From ec7db1b510501a086ac85fd80eb41d867b6cdf86 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 14 May 2026 15:38:59 -0600 Subject: [PATCH] feat: Remove IRoutingSinkWithFeedbackMessenger class and its associated actions --- .../IRoutingSinkWithSwitchingMessenger.cs | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IRoutingSinkWithSwitchingMessenger.cs diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IRoutingSinkWithSwitchingMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IRoutingSinkWithSwitchingMessenger.cs deleted file mode 100644 index 1298608b..00000000 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IRoutingSinkWithSwitchingMessenger.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Core.Logging; -using PepperDash.Essentials.AppServer; -using PepperDash.Essentials.AppServer.Messengers; -using PepperDash.Essentials.Core; -using System.Linq; -using DisplayBase = PepperDash.Essentials.Devices.Common.Displays.DisplayBase; - -namespace PepperDash.Essentials.Room.MobileControl -{ - /// - /// Represents a DisplayBaseMessenger - /// - public class IRoutingSinkWithFeedbackMessenger : MessengerBase - { - private readonly IRoutingSinkWithFeedback display; - - /// - /// Create an instance of the class. - /// - /// - /// - /// - public IRoutingSinkWithFeedbackMessenger(string key, string messagePath, IRoutingSinkWithFeedback device) : base(key, messagePath, device) - { - display = device; - } - - /// - protected override void RegisterActions() - { - base.RegisterActions(); - - /*AddAction("/powerOn", (id, content) => display.PowerOn()); - AddAction("/powerOff", (id, content) => display.PowerOff()); - AddAction("/powerToggle", (id, content) => display.PowerToggle());*/ - - AddAction("/inputSelect", (id, content) => - { - var s = content.ToObject>(); - - var inputPort = display.InputPorts.FirstOrDefault(i => i.Key == s.Value); - - if (inputPort == null) - { - this.LogWarning("No input named {inputName} found for {deviceKey}", s, display.Key); - return; - } - - display.ExecuteSwitch(inputPort.Selector); - }); - - AddAction("/inputs", (id, content) => - { - var inputsList = display.InputPorts.Select(p => p.Key).ToList(); - - var messageObject = new MobileControlMessage - { - Type = MessagePath + "/inputs", - Content = JToken.FromObject(new - { - inputKeys = inputsList, - }) - }; - - AppServerController.SendMessageObject(messageObject); - }); - } - } -} \ No newline at end of file