mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 13:55:05 +00:00
General code cleanup and updates to Huddle UI drivers to comply with Vtc1 changes
This commit is contained in:
@@ -21,7 +21,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public abstract bool MultiSiteOptionIsEnabled { get; }
|
||||
public abstract string IpAddress { get; }
|
||||
public abstract string PhoneNumber { get; }
|
||||
public abstract string SipPhoneNumber { get; }
|
||||
public abstract string E164Alias { get; }
|
||||
public abstract string H323Id { get; }
|
||||
public abstract string SipUri { get; }
|
||||
public abstract bool AutoAnswerEnabled { get; }
|
||||
}
|
||||
|
||||
@@ -1285,7 +1285,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public override string PhoneNumber
|
||||
public override string E164Alias
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CodecConfiguration.Configuration.H323.H323Alias.E164 != null)
|
||||
return CodecConfiguration.Configuration.H323.H323Alias.E164.Value;
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public override string H323Id
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CodecConfiguration.Configuration.H323.H323Alias.ID != null)
|
||||
return CodecConfiguration.Configuration.H323.H323Alias.E164.Value;
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public override string SipPhoneNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -5,7 +5,10 @@ using System.Text;
|
||||
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
@@ -212,9 +215,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public Mode7 Mode { get; set; }
|
||||
}
|
||||
|
||||
public class Framerate
|
||||
{
|
||||
public string valueSpaceRef { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Camera
|
||||
{
|
||||
public string id { get; set; }
|
||||
public Framerate Framerate { get; set; }
|
||||
public Backlight Backlight { get; set; }
|
||||
public Brightness Brightness { get; set; }
|
||||
public Focus Focus { get; set; }
|
||||
@@ -243,9 +253,68 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public class Cameras
|
||||
{
|
||||
//[JsonConverter(typeof(CameraConverter))]
|
||||
//public List<Camera> Camera { get; set; }
|
||||
//[JsonConverter(typeof(CameraConverter)), JsonProperty("Camera")]
|
||||
//public List<Camera> Camera { get; set; }
|
||||
//[JsonProperty("SpeakerTrack")]
|
||||
public SpeakerTrack SpeakerTrack { get; set; }
|
||||
|
||||
public Cameras()
|
||||
{
|
||||
//Camera = new List<Camera>();
|
||||
SpeakerTrack = new SpeakerTrack();
|
||||
}
|
||||
}
|
||||
|
||||
public class CameraConverter : JsonConverter
|
||||
{
|
||||
// this is currently not working
|
||||
public override bool CanConvert(System.Type objectType)
|
||||
{
|
||||
return objectType == typeof(Camera) || objectType == typeof(List<Camera>); // This should not be called but is required for implmentation
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (reader.TokenType == JsonToken.StartArray)
|
||||
{
|
||||
var l = new List<Camera>();
|
||||
reader.Read();
|
||||
while (reader.TokenType != JsonToken.EndArray)
|
||||
{
|
||||
l.Add(reader.Value as Camera);
|
||||
reader.Read();
|
||||
}
|
||||
Debug.Console(1, "[xConfiguration]: Cameras converted as list");
|
||||
return l;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, "[xConfiguration]: Camera converted as single object and added to list");
|
||||
return new List<Camera> { reader.Value as Camera };
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, "[xConfiguration]: Unable to convert JSON for camera objects: {0}", e);
|
||||
|
||||
return new List<Camera>();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException("Write not implemented");
|
||||
}
|
||||
}
|
||||
|
||||
public class Delay
|
||||
|
||||
@@ -315,17 +315,70 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public class Cameras
|
||||
{
|
||||
//[JsonConverter(typeof(CameraConverter))]
|
||||
//public List<Camera> Camera { get; set; }
|
||||
// [JsonConverter(typeof(CameraConverter))]
|
||||
public List<Camera> Camera { get; set; }
|
||||
public SpeakerTrack SpeakerTrack { get; set; }
|
||||
|
||||
public Cameras()
|
||||
{
|
||||
//Camera = new List<Camera>();
|
||||
Camera = new List<Camera>();
|
||||
SpeakerTrack = new SpeakerTrack();
|
||||
}
|
||||
}
|
||||
|
||||
//public class CameraConverter : JsonConverter
|
||||
//{
|
||||
|
||||
// public override bool CanConvert(System.Type objectType)
|
||||
// {
|
||||
// return true; // objectType == typeof(Camera) || objectType == typeof(List<Camera>); // This should not be called but is required for implmentation
|
||||
// }
|
||||
|
||||
// public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// if (reader.TokenType == JsonToken.StartArray)
|
||||
// {
|
||||
// var l = new List<Camera>();
|
||||
// reader.Read();
|
||||
// while (reader.TokenType != JsonToken.EndArray)
|
||||
// {
|
||||
// l.Add(reader.Value as Camera);
|
||||
// reader.Read();
|
||||
// }
|
||||
// Debug.Console(1, "[xStatus]: Cameras converted as list");
|
||||
// return l;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.Console(1, "[xStatus]: Camera converted as single object and added to list");
|
||||
// return new List<Camera> { reader.Value as Camera };
|
||||
// }
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// Debug.Console(1, "[xStatus]: Unable to convert JSON for camera objects: {0}", e);
|
||||
|
||||
// return new List<Camera>();
|
||||
// }
|
||||
// }
|
||||
|
||||
// public override bool CanWrite
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
// {
|
||||
// throw new NotImplementedException("Write not implemented");
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public class MaxActiveCalls
|
||||
{
|
||||
public string Value { get; set; }
|
||||
|
||||
@@ -402,12 +402,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override string IpAddress
|
||||
public override string E164Alias
|
||||
{
|
||||
get { return "xx.xx.xx.xx"; }
|
||||
get { return "someE164alias"; }
|
||||
}
|
||||
|
||||
public override string PhoneNumber
|
||||
public override string H323Id
|
||||
{
|
||||
get { return "someH323Id"; }
|
||||
}
|
||||
|
||||
public override string IpAddress
|
||||
{
|
||||
get { return "xxx.xxx.xxx.xxx"; }
|
||||
}
|
||||
|
||||
public override string SipPhoneNumber
|
||||
{
|
||||
get { return "333-444-5555"; }
|
||||
}
|
||||
|
||||
@@ -43,8 +43,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
bool wasIsInCall;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when any call is not in state Unknown, Disconnecting, Disconnected
|
||||
/// </summary>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<Compile Include="FOR REFERENCE UI\Panels\SmartGraphicsTouchpanelControllerBase.cs" />
|
||||
<Compile Include="UIDrivers\SigInterlock.cs" />
|
||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleTechPageDriver.cs" />
|
||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
||||
<Compile Include="UI\HttpLogoServer.cs" />
|
||||
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||
@@ -185,7 +185,7 @@
|
||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalDriver.cs" />
|
||||
<Compile Include="UIDrivers\Essentials\EssentialsPanelMainInterfaceDriver.cs" />
|
||||
<Compile Include="UIDrivers\enums and base.cs" />
|
||||
<Compile Include="UIDrivers\Essentials\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddlePanelAvFunctionsDriver.cs" />
|
||||
<Compile Include="UIDrivers\Page Drivers\SingleSubpageModalAndBackDriver.cs" />
|
||||
<Compile Include="UIDrivers\SmartObjectRoomsList.cs" />
|
||||
<Compile Include="UI\JoinConstants\UIBoolJoin.cs" />
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace PepperDash.Essentials
|
||||
var disp = DefaultDisplay as DisplayBase;
|
||||
var val = CurrentSourceInfo != null
|
||||
&& CurrentSourceInfo.Type == eSourceListItemType.Route
|
||||
&& disp != null
|
||||
&& disp.PowerIsOnFeedback.BoolValue;
|
||||
&& disp != null;
|
||||
//&& disp.PowerIsOnFeedback.BoolValue;
|
||||
return val;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -118,10 +118,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint RoomPhoneText = 3904;
|
||||
/// <summary>
|
||||
/// 3905 - SIP address for room header
|
||||
/// </summary>
|
||||
public const uint RoomSipText = 3905;
|
||||
/// <summary>
|
||||
/// 3906 - The separator for verbose-header text on addresses
|
||||
/// </summary>
|
||||
public const uint RoomAddressPipeText = 3906;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,10 +37,6 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
IAVDriver Parent;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
JoinedSigInterlock PagesInterlock;
|
||||
|
||||
/// <summary>
|
||||
@@ -63,10 +59,9 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
/// </summary>
|
||||
/// <param name="trilist"></param>
|
||||
/// <param name="parent"></param>
|
||||
public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, IAVDriver parent, EssentialsRoomTechConfig config)
|
||||
public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, EssentialsRoomTechConfig config)
|
||||
: base(trilist)
|
||||
{
|
||||
Parent = parent;
|
||||
Config = config;
|
||||
|
||||
PagesInterlock = new JoinedSigInterlock(trilist);
|
||||
@@ -164,7 +164,7 @@ namespace PepperDash.Essentials
|
||||
get
|
||||
{
|
||||
if (_TechDriver == null)
|
||||
_TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, this, CurrentRoom.Config.Tech);
|
||||
_TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, CurrentRoom.Config.Tech);
|
||||
return _TechDriver;
|
||||
}
|
||||
}
|
||||
@@ -1244,15 +1244,10 @@ namespace PepperDash.Essentials
|
||||
if (CurrentRoom.IsWarmingUpFeedback.BoolValue)
|
||||
{
|
||||
ShowNotificationRibbon("Room is powering on. Please wait...", 0);
|
||||
//WarmingCoolingModal = new ModalDialog(TriList);
|
||||
//WarmingCoolingModal.PresentModalDialog(0, "Powering Up", "Power", "<p>Room is powering up</p><p>Please wait</p>",
|
||||
// "", "", false, false, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotificationRibbon("Room is powered on. Welcome.", 2000);
|
||||
//if (WarmingCoolingModal != null)
|
||||
// WarmingCoolingModal.CancelDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1266,16 +1261,10 @@ namespace PepperDash.Essentials
|
||||
if (CurrentRoom.IsCoolingDownFeedback.BoolValue)
|
||||
{
|
||||
ShowNotificationRibbon("Room is powering off. Please wait.", 0);
|
||||
|
||||
//WarmingCoolingModal = new ModalDialog(TriList);
|
||||
//WarmingCoolingModal.PresentModalDialog(0, "Power Off", "Power", "<p>Room is powering off</p><p>Please wait</p>",
|
||||
// "", "", false, false, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
HideNotificationRibbon();
|
||||
//if (WarmingCoolingModal != null)
|
||||
// WarmingCoolingModal.CancelDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1460,13 +1449,13 @@ namespace PepperDash.Essentials
|
||||
void ComputeHeaderCallStatus(VideoCodecBase codec);
|
||||
bool HeaderButtonsAreSetUp { get; }
|
||||
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
||||
/// <summary>
|
||||
/// Exposes the ability to switch into call mode
|
||||
/// </summary>
|
||||
void ActivityCallButtonPressed();
|
||||
/// <summary>
|
||||
/// Allows the codec to trigger the main UI to clear up if call is coming in.
|
||||
/// </summary>
|
||||
void PrepareForCodecIncomingCall();
|
||||
/// <summary>
|
||||
/// Exposes the ability to switch into call mode
|
||||
/// </summary>
|
||||
void ActivityCallButtonPressed();
|
||||
/// <summary>
|
||||
/// Allows the codec to trigger the main UI to clear up if call is coming in.
|
||||
/// </summary>
|
||||
void PrepareForCodecIncomingCall();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
triList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard);
|
||||
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress);
|
||||
triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500,
|
||||
StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress);
|
||||
|
||||
@@ -194,8 +193,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// <param name="e"></param>
|
||||
void Codec_IsReady()
|
||||
{
|
||||
TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedPhoneNumber(Codec.CodecInfo.PhoneNumber));
|
||||
TriList.SetString(UIStringJoin.RoomSipText, Codec.CodecInfo.SipUri);
|
||||
string roomNumberSipUri = "";
|
||||
if (!string.IsNullOrEmpty(Codec.CodecInfo.SipUri)) // If both values are present, format the string with a pipe divider
|
||||
roomNumberSipUri = string.Format("{0} | {2}", GetFormattedPhoneNumber(Codec.CodecInfo.PhoneNumber), Codec.CodecInfo.SipUri);
|
||||
else // If only one value present, just show the phone number
|
||||
roomNumberSipUri = Codec.CodecInfo.PhoneNumber;
|
||||
|
||||
TriList.SetString(UIStringJoin.RoomPhoneText, roomNumberSipUri);
|
||||
|
||||
if(Parent.HeaderButtonsAreSetUp)
|
||||
Parent.ComputeHeaderCallStatus(Codec);
|
||||
|
||||
Reference in New Issue
Block a user