updates to iCallHistory and changed CallHIstoryEntry to extend CodecActiveCallItem

This commit is contained in:
Neil Dorin
2017-09-21 11:53:13 -06:00
parent ff5fab4984
commit 75ff8ea88a
2 changed files with 9 additions and 7 deletions

View File

@@ -8,6 +8,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{ {
public interface IHasCallHistory public interface IHasCallHistory
{ {
event EventHandler<EventArgs> RecentCallsListHasChanged;
List<CallHistory.CallHistoryEntry> RecentCalls { get; } List<CallHistory.CallHistoryEntry> RecentCalls { get; }
void RemoveEntry(CallHistory.CallHistoryEntry entry); void RemoveEntry(CallHistory.CallHistoryEntry entry);
@@ -27,10 +29,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
/// <summary> /// <summary>
/// Generic call history entry, not device specific /// Generic call history entry, not device specific
/// </summary> /// </summary>
public class CallHistoryEntry public class CallHistoryEntry : CodecActiveCallItem
{ {
public string DisplayName { get; set; }
public string CallBackNumber { get; set; }
public DateTime StartTime { get; set; } public DateTime StartTime { get; set; }
public eCodecOccurrenctType OccurenceType { get; set; } public eCodecOccurrenctType OccurenceType { get; set; }
public string OccurrenceHistoryId { get; set; } public string OccurrenceHistoryId { get; set; }
@@ -49,8 +49,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{ {
genericEntries.Add(new CallHistoryEntry() genericEntries.Add(new CallHistoryEntry()
{ {
DisplayName = entry.DisplayName.Value, Name = entry.DisplayName.Value,
CallBackNumber = entry.CallbackNumber.Value, Number = entry.CallbackNumber.Value,
StartTime = entry.LastOccurrenceStartTime.Value, StartTime = entry.LastOccurrenceStartTime.Value,
OccurrenceHistoryId = entry.LastOccurrenceHistoryId.Value, OccurrenceHistoryId = entry.LastOccurrenceHistoryId.Value,
OccurenceType = ConvertToOccurenceTypeEnum(entry.OccurrenceType.Value) OccurenceType = ConvertToOccurenceTypeEnum(entry.OccurrenceType.Value)

View File

@@ -21,6 +21,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class CiscoCodec : VideoCodecBase, IHasCallHistory public class CiscoCodec : VideoCodecBase, IHasCallHistory
{ {
public event EventHandler<EventArgs> RecentCallsListHasChanged;
public IBasicCommunication Communication { get; private set; } public IBasicCommunication Communication { get; private set; }
public CommunicationGather PortGather { get; private set; } public CommunicationGather PortGather { get; private set; }
public CommunicationGather JsonGather { get; private set; } public CommunicationGather JsonGather { get; private set; }
@@ -668,7 +670,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
foreach (CallHistory.CallHistoryEntry entry in RecentCalls) foreach (CallHistory.CallHistoryEntry entry in RecentCalls)
{ {
Debug.Console(1, this, "\nName: {0}\nNumber{1}\nStartTime{2}\nType{3}\n", entry.DisplayName, entry.CallBackNumber, entry.StartTime.ToString(), entry.OccurenceType); Debug.Console(1, this, "\nName: {0}\nNumber: {1}\nStartTime: {2}\nType: {3}\n", entry.Name, entry.Number, entry.StartTime.ToString(), entry.OccurenceType);
} }
} }
} }