mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Merge branch 'feature/multi-display-adds' into feature/imobilecontrolroombridge-upgrades
This commit is contained in:
@@ -137,7 +137,7 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsNDisplayRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\DDVC01RoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\SimplRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsPresentationPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleRoomPropertiesConfig.cs" />
|
||||||
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
<Compile Include="Room\Config\EssentialsHuddleVtc1PropertiesConfig.cs" />
|
||||||
|
|||||||
@@ -196,9 +196,20 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
[JsonProperty("sourceListKey")]
|
[JsonProperty("sourceListKey")]
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
|
[JsonProperty("destinationListKey")]
|
||||||
|
public string DestinationListKey { get; set; }
|
||||||
[JsonProperty("defaultSourceItem")]
|
[JsonProperty("defaultSourceItem")]
|
||||||
public string DefaultSourceItem { get; set; }
|
public string DefaultSourceItem { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the room supports advanced sharing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("supportsAdvancedSharing")]
|
||||||
|
public bool SupportsAdvancedSharing { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if non-tech users can change the share mode
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("userCanChangeShareMode")]
|
||||||
|
public bool UserCanChangeShareMode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
|
||||||
|
|||||||
@@ -8,19 +8,19 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Room.Config
|
namespace PepperDash.Essentials.Room.Config
|
||||||
{
|
{
|
||||||
public class DDVC01RoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig
|
public class SimplRoomPropertiesConfig : EssentialsHuddleVtc1PropertiesConfig
|
||||||
{
|
{
|
||||||
[JsonProperty("roomPhoneNumber")]
|
[JsonProperty("roomPhoneNumber")]
|
||||||
public string RoomPhoneNumber { get; set; }
|
public string RoomPhoneNumber { get; set; }
|
||||||
[JsonProperty("roomURI")]
|
[JsonProperty("roomURI")]
|
||||||
public string RoomURI { get; set; }
|
public string RoomURI { get; set; }
|
||||||
[JsonProperty("speedDials")]
|
[JsonProperty("speedDials")]
|
||||||
public List<DDVC01SpeedDial> SpeedDials { get; set; }
|
public List<SimplSpeedDial> SpeedDials { get; set; }
|
||||||
[JsonProperty("volumeSliderNames")]
|
[JsonProperty("volumeSliderNames")]
|
||||||
public List<string> VolumeSliderNames { get; set; }
|
public List<string> VolumeSliderNames { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DDVC01SpeedDial
|
public class SimplSpeedDial
|
||||||
{
|
{
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
@@ -1,11 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
@@ -25,12 +20,25 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
[JsonProperty("sourceLists")]
|
[JsonProperty("sourceLists")]
|
||||||
public Dictionary<string, Dictionary<string, SourceListItem>> SourceLists { get; set; }
|
public Dictionary<string, Dictionary<string, SourceListItem>> SourceLists { get; set; }
|
||||||
|
|
||||||
[JsonProperty("tieLines")]
|
[JsonProperty("destinationLists")]
|
||||||
|
public Dictionary<string, Dictionary<string,DestinationListItem>> DestinationLists { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("tieLines")]
|
||||||
public List<TieLineConfig> TieLines { get; set; }
|
public List<TieLineConfig> TieLines { get; set; }
|
||||||
|
|
||||||
[JsonProperty("joinMaps")]
|
[JsonProperty("joinMaps")]
|
||||||
public Dictionary<string, JObject> JoinMaps { get; set; }
|
public Dictionary<string, JObject> JoinMaps { get; set; }
|
||||||
|
|
||||||
|
public BasicConfig()
|
||||||
|
{
|
||||||
|
Info = new InfoConfig();
|
||||||
|
Devices = new List<DeviceConfig>();
|
||||||
|
SourceLists = new Dictionary<string, Dictionary<string, SourceListItem>>();
|
||||||
|
DestinationLists = new Dictionary<string, Dictionary<string, DestinationListItem>>();
|
||||||
|
TieLines = new List<TieLineConfig>();
|
||||||
|
JoinMaps = new Dictionary<string, JObject>();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks SourceLists for a given list and returns it if found. Otherwise, returns null
|
/// Checks SourceLists for a given list and returns it if found. Otherwise, returns null
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -42,6 +50,21 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
return SourceLists[key];
|
return SourceLists[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieves a DestinationListItem based on the key
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">key of the item to retrieve</param>
|
||||||
|
/// <returns>DestinationListItem if the key exists, null otherwise</returns>
|
||||||
|
public Dictionary<string, DestinationListItem> GetDestinationListForKey(string key)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(key) || !DestinationLists.ContainsKey(key))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DestinationLists[key];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks Devices for an item with a Key that matches and returns it if found. Otherwise, retunes null
|
/// Checks Devices for an item with a Key that matches and returns it if found. Otherwise, retunes null
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -51,6 +51,13 @@ namespace PepperDash.Essentials.Core.Config
|
|||||||
|
|
||||||
[JsonProperty("rooms")]
|
[JsonProperty("rooms")]
|
||||||
public List<DeviceConfig> Rooms { get; set; }
|
public List<DeviceConfig> Rooms { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public EssentialsConfig()
|
||||||
|
: base()
|
||||||
|
{
|
||||||
|
Rooms = new List<DeviceConfig>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
public class DestinationListItem
|
||||||
|
{
|
||||||
|
[JsonProperty("sinkKey")]
|
||||||
|
public string SinkKey { get; set; }
|
||||||
|
|
||||||
|
private EssentialsDevice _sinkDevice;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public EssentialsDevice SinkDevice
|
||||||
|
{
|
||||||
|
get { return _sinkDevice ?? (_sinkDevice = DeviceManager.GetDeviceForKey(SinkKey) as EssentialsDevice); }
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("preferredName")]
|
||||||
|
public string PreferredName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(Name))
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SinkDevice == null ? "---" : SinkDevice.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("includeInDestinationList")]
|
||||||
|
public bool IncludeInDestinationList { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("order")]
|
||||||
|
public int Order { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("surfaceLocation")]
|
||||||
|
public int SurfaceLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("verticalLocation")]
|
||||||
|
public int VerticalLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("horizontalLocation")]
|
||||||
|
public int HorizontalLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("sinkType")]
|
||||||
|
public eRoutingSignalType SinkType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -130,10 +130,24 @@ namespace PepperDash.Essentials.Core
|
|||||||
[JsonProperty("sourceListKey")]
|
[JsonProperty("sourceListKey")]
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the device associated with this source is controllable
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("isControllable")]
|
||||||
|
public bool IsControllable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates that the device associated with this source has audio available
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("isAudioSource")]
|
||||||
|
public bool IsAudioSource { get; set; }
|
||||||
|
|
||||||
public SourceListItem()
|
public SourceListItem()
|
||||||
{
|
{
|
||||||
Icon = "Blank";
|
Icon = "Blank";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SourceRouteListItem
|
public class SourceRouteListItem
|
||||||
|
|||||||
@@ -189,6 +189,7 @@
|
|||||||
<Compile Include="Device Info\IDeviceInfoProvider.cs" />
|
<Compile Include="Device Info\IDeviceInfoProvider.cs" />
|
||||||
<Compile Include="Devices\CodecInterfaces.cs" />
|
<Compile Include="Devices\CodecInterfaces.cs" />
|
||||||
<Compile Include="Devices\CrestronProcessor.cs" />
|
<Compile Include="Devices\CrestronProcessor.cs" />
|
||||||
|
<Compile Include="Devices\DestinationListItem.cs" />
|
||||||
<Compile Include="Devices\DeviceApiBase.cs" />
|
<Compile Include="Devices\DeviceApiBase.cs" />
|
||||||
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
|
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
|
||||||
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
|
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ namespace PepperDash.Essentials
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Load Plugin not found. {0}.{2} is not a plugin factory. Exception: {1}",
|
Debug.Console(2, "Load Plugin not found. {0}.{2} is not a plugin factory. Exception: {1}",
|
||||||
loadedAssembly.Name, e, type.Name);
|
loadedAssembly.Name, e.Message, type.Name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace PepperDash.Essentials.Core.Queues
|
|||||||
if (programEvent != eProgramStatusEventType.Stopping)
|
if (programEvent != eProgramStatusEventType.Stopping)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dispose();
|
Dispose(true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,8 +231,13 @@ namespace PepperDash.Essentials.Core.Queues
|
|||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Enqueue(null);
|
Debug.Console(2, this, "Disposing...");
|
||||||
_worker.Join();
|
if (_queue != null && !_queue.Disposed)
|
||||||
|
{
|
||||||
|
_queue.Clear();
|
||||||
|
Enqueue(null);
|
||||||
|
}
|
||||||
|
_worker.Abort();
|
||||||
_waitHandle.Close();
|
_waitHandle.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +246,7 @@ namespace PepperDash.Essentials.Core.Queues
|
|||||||
|
|
||||||
~GenericQueue()
|
~GenericQueue()
|
||||||
{
|
{
|
||||||
Dispose(false);
|
Dispose(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -407,7 +412,7 @@ namespace PepperDash_Essentials_Core.Queues
|
|||||||
if (programEvent != eProgramStatusEventType.Stopping)
|
if (programEvent != eProgramStatusEventType.Stopping)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Dispose();
|
Dispose(true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,8 +482,13 @@ namespace PepperDash_Essentials_Core.Queues
|
|||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Enqueue(null);
|
Debug.Console(2, this, "Disposing...");
|
||||||
_worker.Join();
|
if (_queue != null && !_queue.Disposed)
|
||||||
|
{
|
||||||
|
_queue.Clear();
|
||||||
|
Enqueue(null);
|
||||||
|
}
|
||||||
|
_worker.Abort();
|
||||||
_waitHandle.Close();
|
_waitHandle.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,7 +497,7 @@ namespace PepperDash_Essentials_Core.Queues
|
|||||||
|
|
||||||
~GenericQueue()
|
~GenericQueue()
|
||||||
{
|
{
|
||||||
Dispose(false);
|
Dispose(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user