diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
index 65e60530..e66dd56b 100644
--- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
- public class MockVC : VideoCodecBase, IRoutingSource
+ public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory
{
public RoutingInputPort CodecOsdIn { get; private set; }
public RoutingInputPort HdmiIn1 { get; private set; }
@@ -43,6 +43,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
InputPorts.Add(HdmiIn2);
OutputPorts.Add(HdmiOut);
+ CallHistory = new CodecCallHistory();
+ for (int i = 0; i < 10; i++)
+ {
+ var call = new CodecCallHistory.CallHistoryEntry();
+ call.Name = "Call " + i;
+ call.Number = i + "@call.com";
+ CallHistory.RecentCalls.Add(call);
+ }
+ // eventually fire history event here
+
SetIsReady();
}
@@ -302,6 +312,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
Debug.Console(1, this, "TestFarEndHangup");
}
+
+ #region IHasCallHistory Members
+
+ public CodecCallHistory CallHistory { get; private set; }
+
+ public void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry)
+ {
+
+ }
+
+ #endregion
}
///
diff --git a/Essentials/PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs b/Essentials/PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs
index 330cb250..09e09bda 100644
--- a/Essentials/PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs
+++ b/Essentials/PepperDashEssentials/Room/Emergency/EsentialsRoomEmergencyContactClosure.cs
@@ -37,8 +37,12 @@ namespace PepperDash.Essentials.Room
if (config.Trigger.Type.Equals("contact", StringComparison.OrdinalIgnoreCase))
{
- if (config.Trigger.Number <= cs.NumberOfDigitalInputPorts)
- cs.DigitalInputPorts[(uint)config.Trigger.Number].StateChange += new DigitalInputEventHandler(EsentialsRoomEmergencyContactClosure_StateChange);
+ var portNum = (uint)config.Trigger.Number;
+ if (portNum <= cs.NumberOfDigitalInputPorts)
+ {
+ cs.DigitalInputPorts[portNum].Register();
+ cs.DigitalInputPorts[portNum].StateChange += EsentialsRoomEmergencyContactClosure_StateChange;
+ }
}
Behavior = config.Behavior;
TriggerOnClose = config.Trigger.TriggerOnClose;
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
index 207a7162..3ea7c07d 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
@@ -16,7 +16,19 @@
///
public const uint VCDialKeypad = 1201;
+ ///
+ /// 1202
+ ///
public const uint VCDirectoryList = 1202;
+ ///
+ /// 1203
+ ///
+ public const uint VCRecentsList = 1203;
+ ///
+ /// 1204
+ ///
+ public const uint VCFavoritesList = 1204;
+
//******************************************************
// General
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
index b38188c9..e337b37b 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
@@ -20,6 +20,11 @@ namespace PepperDash.Essentials
///
public const uint CodecAddressEntryText = 1001;
+ ///
+ /// 1201 - 1230 range of joins for recents list
+ ///
+ public const uint VCRecentListTextStart = 1201;
+
//******************************************************
// Keyboard
diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
index 53ea6eeb..53a40bb4 100644
--- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
+++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
@@ -58,6 +58,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
SubpageReferenceList ActiveCallsSRL;
+ SmartObjectDynamicList RecentCallsList;
+
// These are likely temp until we get a keyboard built
StringFeedback DialStringFeedback;
StringBuilder DialStringBuilder = new StringBuilder();
@@ -82,6 +84,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
SetupCallStagingPopover();
SetupDialKeypad();
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
+ SetupRecentCallsList();
codec.CallStatusChange += new EventHandler(Codec_CallStatusChange);
@@ -333,6 +336,40 @@ namespace PepperDash.Essentials.UIDrivers.VC
TriList.ID, UISmartObjectJoin.VCDialKeypad);
}
+ ///
+ ///
+ ///
+ void SetupRecentCallsList()
+ {
+ var codec = Codec as IHasCallHistory;
+ if (codec != null)
+ {
+ // EVENT??????????????? Pointed at refresh
+ RefreshRecentCallsList();
+ }
+ }
+
+ ///
+ ///
+ ///
+ void RefreshRecentCallsList()
+ {
+ var codec = Codec as IHasCallHistory;
+ if (codec != null)
+ {
+ RecentCallsList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCRecentsList], true, 1200);
+ ushort i = 0;
+ foreach (var c in codec.CallHistory.RecentCalls)
+ {
+ i++;
+ RecentCallsList.SetItemMainText(i, c.Name);
+ var call = c; // for lambda scope
+ RecentCallsList.SetItemButtonAction(i, b => { if(!b) Codec.Dial(call.Number); });
+ }
+ RecentCallsList.Count = i;
+ }
+ }
+
///
///
///
@@ -404,7 +441,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
void ShowRecents()
{
//populate recents
- VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible);
+ VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible);
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
}
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index a9eaa48f..b9ba95a1 100644
Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ
diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll
index c743f06a..72a8425d 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ