-IRoutingSinkWithSwitching now inherits directly from IRoutingSink

-Marked IRoutingSinkNoSwitching as obsolete
-Updated HulldeSpace, VTCRoom, DualDisplayRoom that were casting from IRoutingSinkNoSwitching to IRoutingSink
This commit is contained in:
Nick Genovese
2020-05-28 20:07:33 -04:00
parent 8d2d45b5ce
commit 4b663eea62
4 changed files with 10 additions and 6 deletions

View File

@@ -555,7 +555,7 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route, SourceListItem sourceItem, string sourceItemKey)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;

View File

@@ -71,7 +71,7 @@ namespace PepperDash.Essentials
public EssentialsHuddleRoomPropertiesConfig PropertiesConfig { get; private set; }
public IRoutingSinkWithSwitching DefaultDisplay { get; private set; }
public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
public IRoutingSink DefaultAudioDevice { get; private set; }
public IBasicVolumeControls DefaultVolumeControls { get; private set; }
public bool ExcludeFromGlobalFunctions { get; set; }
@@ -471,14 +471,14 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice;
else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
dest = DefaultDisplay;
else
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching;
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink;
if (dest == null)
{

View File

@@ -590,7 +590,7 @@ namespace PepperDash.Essentials
/// <returns></returns>
bool DoRoute(SourceRouteListItem route)
{
IRoutingSinkNoSwitching dest = null;
IRoutingSink dest = null;
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;

View File

@@ -48,6 +48,9 @@ namespace PepperDash.Essentials.Core
RoutingPortCollection<RoutingOutputPort> OutputPorts { get; }
}
/// <summary>
/// For fixed-source endpoint devices
/// </summary>
public interface IRoutingSink : IRoutingInputs, IHasCurrentSourceInfoChange
{
@@ -56,6 +59,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// For fixed-source endpoint devices
/// </summary>
[Obsolete]
public interface IRoutingSinkNoSwitching : IRoutingSink
{
@@ -64,7 +68,7 @@ namespace PepperDash.Essentials.Core
/// <summary>
/// Endpoint device like a display, that selects inputs
/// </summary>
public interface IRoutingSinkWithSwitching : IRoutingSinkNoSwitching
public interface IRoutingSinkWithSwitching : IRoutingSink
{
//void ClearRoute();
void ExecuteSwitch(object inputSelector);