mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Premerge call history
This commit is contained in:
@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
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 CodecOsdIn { get; private set; }
|
||||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||||
@@ -43,6 +43,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
InputPorts.Add(HdmiIn2);
|
InputPorts.Add(HdmiIn2);
|
||||||
OutputPorts.Add(HdmiOut);
|
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();
|
SetIsReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,6 +312,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
Debug.Console(1, this, "TestFarEndHangup");
|
Debug.Console(1, this, "TestFarEndHangup");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region IHasCallHistory Members
|
||||||
|
|
||||||
|
public CodecCallHistory CallHistory { get; private set; }
|
||||||
|
|
||||||
|
public void RemoveCallHistoryEntry(CodecCallHistory.CallHistoryEntry entry)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -37,8 +37,12 @@ namespace PepperDash.Essentials.Room
|
|||||||
|
|
||||||
if (config.Trigger.Type.Equals("contact", StringComparison.OrdinalIgnoreCase))
|
if (config.Trigger.Type.Equals("contact", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (config.Trigger.Number <= cs.NumberOfDigitalInputPorts)
|
var portNum = (uint)config.Trigger.Number;
|
||||||
cs.DigitalInputPorts[(uint)config.Trigger.Number].StateChange += new DigitalInputEventHandler(EsentialsRoomEmergencyContactClosure_StateChange);
|
if (portNum <= cs.NumberOfDigitalInputPorts)
|
||||||
|
{
|
||||||
|
cs.DigitalInputPorts[portNum].Register();
|
||||||
|
cs.DigitalInputPorts[portNum].StateChange += EsentialsRoomEmergencyContactClosure_StateChange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Behavior = config.Behavior;
|
Behavior = config.Behavior;
|
||||||
TriggerOnClose = config.Trigger.TriggerOnClose;
|
TriggerOnClose = config.Trigger.TriggerOnClose;
|
||||||
|
|||||||
@@ -16,7 +16,19 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCDialKeypad = 1201;
|
public const uint VCDialKeypad = 1201;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1202
|
||||||
|
/// </summary>
|
||||||
public const uint VCDirectoryList = 1202;
|
public const uint VCDirectoryList = 1202;
|
||||||
|
/// <summary>
|
||||||
|
/// 1203
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCRecentsList = 1203;
|
||||||
|
/// <summary>
|
||||||
|
/// 1204
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCFavoritesList = 1204;
|
||||||
|
|
||||||
|
|
||||||
//******************************************************
|
//******************************************************
|
||||||
// General
|
// General
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CodecAddressEntryText = 1001;
|
public const uint CodecAddressEntryText = 1001;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1201 - 1230 range of joins for recents list
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCRecentListTextStart = 1201;
|
||||||
|
|
||||||
|
|
||||||
//******************************************************
|
//******************************************************
|
||||||
// Keyboard
|
// Keyboard
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
SubpageReferenceList ActiveCallsSRL;
|
SubpageReferenceList ActiveCallsSRL;
|
||||||
|
|
||||||
|
SmartObjectDynamicList RecentCallsList;
|
||||||
|
|
||||||
// These are likely temp until we get a keyboard built
|
// These are likely temp until we get a keyboard built
|
||||||
StringFeedback DialStringFeedback;
|
StringFeedback DialStringFeedback;
|
||||||
StringBuilder DialStringBuilder = new StringBuilder();
|
StringBuilder DialStringBuilder = new StringBuilder();
|
||||||
@@ -82,6 +84,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
SetupCallStagingPopover();
|
SetupCallStagingPopover();
|
||||||
SetupDialKeypad();
|
SetupDialKeypad();
|
||||||
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
|
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
|
||||||
|
SetupRecentCallsList();
|
||||||
|
|
||||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||||
|
|
||||||
@@ -333,6 +336,40 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.ID, UISmartObjectJoin.VCDialKeypad);
|
TriList.ID, UISmartObjectJoin.VCDialKeypad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void SetupRecentCallsList()
|
||||||
|
{
|
||||||
|
var codec = Codec as IHasCallHistory;
|
||||||
|
if (codec != null)
|
||||||
|
{
|
||||||
|
// EVENT??????????????? Pointed at refresh
|
||||||
|
RefreshRecentCallsList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -404,7 +441,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void ShowRecents()
|
void ShowRecents()
|
||||||
{
|
{
|
||||||
//populate recents
|
//populate recents
|
||||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible);
|
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible);
|
||||||
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user