mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
feat: Update .gitignore and enhance routing-related classes
- Updated `.gitignore` to include additional files and directories. - Added summary comments and new properties in `LevelControlListItem.cs` for better clarity and functionality. - Enhanced documentation in `SourceListItem.cs` and introduced new properties, including `Destinations` and a `ToString` method. - Introduced `SourceRouteListItem` class with routing properties and expanded `eSourceListItemDestinationTypes` enum. - Added `IRoutingSinkWithInputPort` interface in `IRoutingSink.cs` to support input port functionality.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -393,4 +393,5 @@ essentials-framework/Essentials Interfaces/PepperDash_Essentials_Interfaces/Pepp
|
||||
/._PepperDash.Essentials.sln
|
||||
.vscode/settings.json
|
||||
_site/
|
||||
api/
|
||||
api/
|
||||
*.DS_Store
|
||||
|
||||
@@ -9,10 +9,15 @@ using PepperDash.Essentials.Core.Devices;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a level control item in a list, which can be used to control volume or mute functionality.
|
||||
/// </summary>
|
||||
public class LevelControlListItem : AudioControlListItemBase
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A reference to the IBasicVolumeWithFeedback device for control.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public IBasicVolumeWithFeedback LevelControl
|
||||
{
|
||||
@@ -55,7 +60,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrEmpty(ItemKey)) return ParentDeviceKey;
|
||||
if (string.IsNullOrEmpty(ItemKey)) return ParentDeviceKey;
|
||||
else
|
||||
{
|
||||
return DeviceManager.AllDevices.
|
||||
@@ -70,13 +75,39 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("type")]
|
||||
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public eLevelControlType Type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the item is a mic or not.
|
||||
/// </summary>
|
||||
[JsonProperty("isMic", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? IsMic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the item should show the raw level in the UI.
|
||||
/// </summary>
|
||||
[JsonProperty("showRawLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? ShowRawLevel { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the type of level control item.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum eLevelControlType
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the item is a level control only
|
||||
/// </summary>
|
||||
Level = 1,
|
||||
/// <summary>
|
||||
/// Indicates that the item is a mute control only
|
||||
/// </summary>
|
||||
Mute = 2,
|
||||
/// <summary>
|
||||
/// Indicates that the item is both a level and mute control
|
||||
/// </summary>
|
||||
LevelAndMute = Level | Mute,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,18 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public enum eSourceListItemType
|
||||
{
|
||||
Route, Off, Other, SomethingAwesomerThanThese
|
||||
/// <summary>
|
||||
/// Represents a typical route.
|
||||
/// </summary>
|
||||
Route,
|
||||
/// <summary>
|
||||
/// Represents an off route.
|
||||
/// </summary>
|
||||
Off,
|
||||
/// <summary>
|
||||
/// Represents some other type of route
|
||||
/// </summary>
|
||||
Other,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -18,6 +29,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public class SourceListItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The key of the source item, which is used to identify it in the DeviceManager
|
||||
/// </summary>
|
||||
[JsonProperty("sourceKey")]
|
||||
public string SourceKey { get; set; }
|
||||
|
||||
@@ -117,6 +131,9 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("disableRoutedSharing")]
|
||||
public bool DisableRoutedSharing { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonProperty("destinations")]
|
||||
public List<eSourceListItemDestinationTypes> Destinations { get; set; }
|
||||
/// <summary>
|
||||
@@ -149,31 +166,56 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("disableSimpleRouting")]
|
||||
public bool DisableSimpleRouting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor for SourceListItem, initializes the Icon to "Blank"
|
||||
/// </summary>
|
||||
public SourceListItem()
|
||||
{
|
||||
Icon = "Blank";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string representation of the SourceListItem, including the SourceKey and Name
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{SourceKey}:{Name}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a route in a source list item, which defines the source and destination keys and the type of signal being routed
|
||||
/// </summary>
|
||||
public class SourceRouteListItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The key of the source device to route from
|
||||
/// </summary>
|
||||
[JsonProperty("sourceKey")]
|
||||
public string SourceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the source port to route from
|
||||
/// </summary>
|
||||
[JsonProperty("sourcePortKey")]
|
||||
public string SourcePortKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the destination device to route to
|
||||
/// </summary>
|
||||
[JsonProperty("destinationKey")]
|
||||
public string DestinationKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The key of the destination port to route to
|
||||
/// </summary>
|
||||
[JsonProperty("destinationPortKey")]
|
||||
public string DestinationPortKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of signal being routed, such as audio or video
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public eRoutingSignalType Type { get; set; }
|
||||
}
|
||||
@@ -183,15 +225,85 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public enum eSourceListItemDestinationTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Default display, used for the main video output in a room
|
||||
/// </summary>
|
||||
defaultDisplay,
|
||||
/// <summary>
|
||||
/// Left display
|
||||
/// </summary>
|
||||
leftDisplay,
|
||||
/// <summary>
|
||||
/// Right display
|
||||
/// </summary>
|
||||
rightDisplay,
|
||||
/// <summary>
|
||||
/// Center display
|
||||
/// </summary>
|
||||
centerDisplay,
|
||||
/// <summary>
|
||||
/// Program audio, used for the main audio output in a room
|
||||
/// </summary>
|
||||
programAudio,
|
||||
/// <summary>
|
||||
/// Codec content, used for sharing content to the far end in a video call
|
||||
/// </summary>
|
||||
codecContent,
|
||||
/// <summary>
|
||||
/// Front left display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
frontLeftDisplay,
|
||||
/// <summary>
|
||||
/// Front right display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
frontRightDisplay,
|
||||
/// <summary>
|
||||
/// Rear left display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
rearLeftDisplay,
|
||||
/// <summary>
|
||||
/// Rear right display, used for rooms with multiple displays
|
||||
/// </summary>
|
||||
rearRightDisplay,
|
||||
/// <summary>
|
||||
/// Auxiliary display 1, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay1,
|
||||
/// <summary>
|
||||
/// Auxiliary display 2, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay2,
|
||||
/// <summary>
|
||||
/// Auxiliary display 3, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay3,
|
||||
/// <summary>
|
||||
/// Auxiliary display 4, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay4,
|
||||
/// <summary>
|
||||
/// Auxiliary display 5, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay5,
|
||||
/// <summary>
|
||||
/// Auxiliary display 6, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay6,
|
||||
/// <summary>
|
||||
/// Auxiliary display 7, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay7,
|
||||
/// <summary>
|
||||
/// Auxiliary display 8, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay8,
|
||||
/// <summary>
|
||||
/// Auxiliary display 9, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay9,
|
||||
/// <summary>
|
||||
/// Auxiliary display 10, used for additional displays in a room
|
||||
/// </summary>
|
||||
auxDisplay10,
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,14 @@
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For fixed-source endpoint devices with an input port
|
||||
/// </summary>
|
||||
public interface IRoutingSinkWithInputPort :IRoutingSink
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current input port for this routing sink.
|
||||
/// </summary>
|
||||
RoutingInputPort CurrentInputPort { get; }
|
||||
}
|
||||
/*/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user