refactor: Remove obsolete interfaces and classes to streamline the codebase

This commit is contained in:
Neil Dorin 2026-03-30 12:11:21 -06:00
parent 7076eafc21
commit 7bec96e68b
10 changed files with 9 additions and 383 deletions

View file

@ -1,60 +0,0 @@
using System;
namespace PepperDash.Essentials.Core.Devices.DeviceTypeInterfaces
{
/// <summary>
/// Defines the contract for IDisplayBasic
/// </summary>
[Obsolete("This interface is no longer used and will be removed in a future version. Please use IDisplay instead.")]
public interface IDisplayBasic
{
/// <summary>
/// Sets the input to HDMI 1
/// </summary>
void InputHdmi1();
/// <summary>
/// Sets the input to HDMI 2
/// </summary>
void InputHdmi2();
/// <summary>
/// Sets the input to HDMI 3
/// </summary>
void InputHdmi3();
/// <summary>
/// Sets the input to HDMI 4
/// </summary>
void InputHdmi4();
/// <summary>
/// Sets the input to DisplayPort 1
/// </summary>
void InputDisplayPort1();
/// <summary>
/// Sets the input to DVI 1
/// </summary>
void InputDvi1();
/// <summary>
/// Sets the input to Video 1
/// </summary>
void InputVideo1();
/// <summary>
/// Sets the input to VGA 1
/// </summary>
void InputVga1();
/// <summary>
/// Sets the input to VGA 2
/// </summary>
void InputVga2();
/// <summary>
/// Sets the input to RGB 1
/// </summary>
void InputRgb1();
}
}

View file

@ -43,12 +43,6 @@ namespace PepperDash.Essentials.Core
/// </summary>
public bool InTestMode { get; protected set; }
/// <summary>
/// Base Constructor - empty
/// </summary>
[Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")]
protected Feedback() : this(null) { }
/// <summary>
/// Constructor with Key parameter
/// </summary>

View file

@ -13,7 +13,9 @@ namespace PepperDash.Essentials.Core;
/// </summary>
public class SerialFeedback : Feedback
{
public override string SerialValue { get { return _SerialValue; } }
/// <inheritdoc />
public override string SerialValue { get { return _SerialValue; } }
string _SerialValue;
//public override eCueType Type { get { return eCueType.Serial; } }
@ -25,20 +27,20 @@ public class SerialFeedback : Feedback
List<StringInputSig> LinkedInputSigs = new List<StringInputSig>();
public SerialFeedback()
{
}
/// <inheritdoc />
public SerialFeedback(string key)
: base(key)
{
}
/// <inheritdoc />
public override void FireUpdate()
{
throw new NotImplementedException("This feedback type does not use Funcs");
}
/// <inheritdoc />
public void FireUpdate(string newValue)
{
_SerialValue = newValue;
@ -46,17 +48,20 @@ public class SerialFeedback : Feedback
OnOutputChange(newValue);
}
/// <inheritdoc />
public void LinkInputSig(StringInputSig sig)
{
LinkedInputSigs.Add(sig);
UpdateSig(sig);
}
/// <inheritdoc />
public void UnlinkInputSig(StringInputSig sig)
{
LinkedInputSigs.Remove(sig);
}
/// <inheritdoc />
public override string ToString()
{
return (InTestMode ? "TEST -- " : "") + SerialValue;

View file

@ -1,35 +0,0 @@
using System;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Room.Config;
/// <summary>
/// Configuration class for volume levels in the Essentials room. This is used to configure the volume levels for the master, program, audio call receive, and audio call transmit channels in the room.
/// </summary>
[Obsolete("This class is being deprecated in favor audio control point lists in the main config. It is recommended to use the DeviceKey property to get the device from the main system and then cast it to the correct type.")]
public class EssentialsRoomVolumesConfig
{
public EssentialsVolumeLevelConfig Master { get; set; }
public EssentialsVolumeLevelConfig Program { get; set; }
public EssentialsVolumeLevelConfig AudioCallRx { get; set; }
public EssentialsVolumeLevelConfig AudioCallTx { get; set; }
}
/// <summary>
/// Configuration class for a volume level in the Essentials room.
/// </summary>
public class EssentialsVolumeLevelConfig
{
public string DeviceKey { get; set; }
public string Label { get; set; }
public int Level { get; set; }
/// <summary>
/// Helper to get the device associated with key - one timer.
/// </summary>
[Obsolete("This method references DM CHASSIS Directly and should not be used in the Core library. It is recommended to use the DeviceKey property to get the device from the main system and then cast it to the correct type.")]
public IBasicVolumeWithFeedback GetDevice()
{
throw new NotImplementedException("This method references DM CHASSIS Directly and should not be used in the Core library. It is recommended to use the DeviceKey property to get the device from the main system and then cast it to the correct type.");
}
}

View file

@ -1,48 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Core.Shades;
/// <summary>
/// Base class for shades
/// </summary>
[Obsolete("Please use PepperDash.Essentials.Devices.Common, this will be removed in 2.1")]
public abstract class ShadeBase : EssentialsDevice, IShadesOpenCloseStop
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">key of the shade device</param>
/// <param name="name">name of the shade device</param>
public ShadeBase(string key, string name)
: base(key, name)
{
}
#region iShadesOpenClose Members
/// <summary>
/// Opens the shade
/// </summary>
public abstract void Open();
/// <summary>
/// Stops the shade
/// </summary>
public abstract void Stop();
/// <summary>
/// Closes the shade
/// </summary>
public abstract void Close();
#endregion
}

View file

@ -1,87 +0,0 @@
using System;
namespace PepperDash.Essentials.Devices.Displays;
/// <summary>
/// Defines the contract for IInputHdmi1
/// </summary>
[Obsolete()]
public interface IInputHdmi1
{
/// <summary>
/// Switches to HDMI 1 input
/// </summary>
void InputHdmi1();
}
/// <summary>
/// Defines the contract for IInputHdmi2
/// </summary>
[Obsolete()]
public interface IInputHdmi2
{
/// <summary>
/// Switches to HDMI 2 input
/// </summary>
void InputHdmi2();
}
/// <summary>
/// Defines the contract for IInputHdmi3
/// </summary>
[Obsolete()]
public interface IInputHdmi3
{
/// <summary>
/// Switches to HDMI 3 input
/// </summary>
void InputHdmi3();
}
/// <summary>
/// Defines the contract for IInputHdmi4
/// </summary>
[Obsolete()]
public interface IInputHdmi4
{
/// <summary>
/// Switches to HDMI 4 input
/// </summary>
void InputHdmi4();
}
/// <summary>
/// Defines the contract for IInputDisplayPort1
/// </summary>
[Obsolete()]
public interface IInputDisplayPort1
{
/// <summary>
/// Switches to DisplayPort 1 input
/// </summary>
void InputDisplayPort1();
}
/// <summary>
/// Defines the contract for IInputDisplayPort2
/// </summary>
[Obsolete()]
public interface IInputDisplayPort2
{
/// <summary>
/// Switches to DisplayPort 2 input
/// </summary>
void InputDisplayPort2();
}
/// <summary>
/// Defines the contract for IInputVga1
/// </summary>
[Obsolete()]
public interface IInputVga1
{
/// <summary>
/// Switches to VGA 1 input
/// </summary>
void InputVga1();
}

View file

@ -1,27 +0,0 @@
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.Devices.Common.Room;
/// <summary>
/// Defines the contract for IEssentialsHuddleSpaceRoom
/// </summary>
public interface IEssentialsHuddleSpaceRoom : IEssentialsRoom, IHasCurrentSourceInfoChange, IRunRouteAction, IHasDefaultDisplay, IHasCurrentVolumeControls, IRoomOccupancy,
IEmergency, IMicrophonePrivacy
{
/// <summary>
/// Gets whether to exclude this room from global functions
/// </summary>
bool ExcludeFromGlobalFunctions { get; }
/// <summary>
/// Runs the route action for the given routeKey and sourceListKey
/// </summary>
/// <param name="routeKey">The route key</param>
void RunRouteAction(string routeKey);
/// <summary>
/// Gets the PropertiesConfig
/// </summary>
EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; }
}

View file

@ -1,53 +0,0 @@
using System;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.AudioCodec;
using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.Devices.Common.Room;
/// <summary>
/// Defines the contract for IEssentialsHuddleVtc1Room
/// </summary>
[Obsolete("Obsolete in favor of IEssentialsRoom. This interface will be removed in a future release.")]
public interface IEssentialsHuddleVtc1Room : IEssentialsRoom, IHasCurrentSourceInfoChange, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec, IHasDefaultDisplay, IHasInCallFeedback,
IRoomOccupancy, IEmergency, IMicrophonePrivacy
{
/// <summary>
/// Gets the PropertiesConfig
/// </summary>
EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; }
/// <summary>
/// Gets whether to exclude this room from global functions
/// </summary>
bool ExcludeFromGlobalFunctions { get; }
/// <summary>
/// Runs the route action for the given routeKey and sourceListKey
/// </summary>
/// <param name="routeKey">The route key</param>
void RunRouteAction(string routeKey);
/// <summary>
/// Gets the ScheduleSource
/// </summary>
IHasScheduleAwareness ScheduleSource { get; }
/// <summary>
/// Gets the InCallFeedback
/// </summary>
new BoolFeedback InCallFeedback { get; }
/// <summary>
/// Gets the PrivacyModeIsOnFeedback
/// </summary>
new BoolFeedback PrivacyModeIsOnFeedback { get; }
/// <summary>
/// Gets the DefaultCodecRouteString
/// </summary>
string DefaultCodecRouteString { get; }
}

View file

@ -1,25 +0,0 @@
using System;
namespace PepperDash.Essentials
{
/// <summary>
/// Send an update request for a specific client
/// </summary>
[Obsolete]
public class ClientSpecificUpdateRequest
{
/// <summary>
/// Initialize an instance of the <see cref="ClientSpecificUpdateRequest"/> class.
/// </summary>
/// <param name="action"></param>
public ClientSpecificUpdateRequest(Action<string> action)
{
ResponseMethod = action;
}
/// <summary>
/// Gets or sets the ResponseMethod
/// </summary>
public Action<string> ResponseMethod { get; private set; }
}
}

View file

@ -143,22 +143,6 @@ namespace PepperDash.Essentials.RoomBridges
if (Room is IHasCurrentSourceInfoChange sscRoom)
sscRoom.CurrentSourceChange += Room_CurrentSingleSourceChange;
if (Room is IEssentialsHuddleVtc1Room vtcRoom)
{
if (vtcRoom.ScheduleSource != null)
{
var key = vtcRoom.Key + "-" + Key;
if (!AppServerController.CheckForDeviceMessenger(key))
{
var scheduleMessenger = new IHasScheduleAwarenessMessenger(key, vtcRoom.ScheduleSource,
$"/room/{vtcRoom.Key}");
AppServerController.AddDeviceMessenger(scheduleMessenger);
}
}
vtcRoom.InCallFeedback.OutputChange += InCallFeedback_OutputChange;
}
if (Room is IPrivacy privacyRoom)
{
@ -557,11 +541,6 @@ namespace PepperDash.Essentials.RoomBridges
IsCoolingDown = room.IsCoolingDownFeedback.BoolValue
};
if (room is IEssentialsHuddleVtc1Room vtcRoom)
{
state.IsInCall = vtcRoom.InCallFeedback.BoolValue;
}
return state;
}
catch (Exception ex)
@ -619,23 +598,6 @@ namespace PepperDash.Essentials.RoomBridges
configuration.HelpMessage = propertiesConfig.PropertiesConfig.HelpMessageForDisplay;
}
if (room is IEssentialsHuddleSpaceRoom huddleRoom && !string.IsNullOrEmpty(huddleRoom.PropertiesConfig.HelpMessageForDisplay))
{
this.LogVerbose("Getting huddle room config");
configuration.HelpMessage = huddleRoom.PropertiesConfig.HelpMessageForDisplay;
configuration.UiBehavior = huddleRoom.PropertiesConfig.UiBehavior;
configuration.DefaultPresentationSourceKey = huddleRoom.PropertiesConfig.DefaultSourceItem;
}
if (room is IEssentialsHuddleVtc1Room vtc1Room && !string.IsNullOrEmpty(vtc1Room.PropertiesConfig.HelpMessageForDisplay))
{
this.LogVerbose("Getting vtc room config");
configuration.HelpMessage = vtc1Room.PropertiesConfig.HelpMessageForDisplay;
configuration.UiBehavior = vtc1Room.PropertiesConfig.UiBehavior;
configuration.DefaultPresentationSourceKey = vtc1Room.PropertiesConfig.DefaultSourceItem;
}
if (room is IEssentialsTechRoom techRoom && !string.IsNullOrEmpty(techRoom.PropertiesConfig.HelpMessage))
{
this.LogVerbose("Getting tech room config");