mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 03:35:00 +00:00
Call favorites start on mock; Fixed OBTP dialogs to match NYU
This commit is contained in:
@@ -142,6 +142,7 @@
|
||||
<Compile Include="VideoCodec\CiscoCodec\BookingsDataClasses.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\CiscoCodec.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\CiscoCodecPropertiesConfig.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockVcPropertiesConfig.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\PhonebookDataClasses.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xConfiguration.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xEvent.cs" />
|
||||
|
||||
@@ -103,8 +103,10 @@ namespace PepperDash.Essentials.Devices.Common
|
||||
|
||||
else if (typeName == "mockvc")
|
||||
{
|
||||
return new PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
.MockVC(key, name);
|
||||
var props = JsonConvert.DeserializeObject
|
||||
<PepperDash.Essentials.Devices.Common.VideoCodec.MockVcPropertiesConfig>(properties.ToString());
|
||||
return new PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
.MockVC(key, name, props);
|
||||
}
|
||||
|
||||
else if (typeName == "ciscocodec")
|
||||
|
||||
@@ -11,21 +11,30 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory, IHasScheduleAwareness
|
||||
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory, IHasScheduleAwareness, IHasCallFavorites
|
||||
{
|
||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||
public RoutingInputPort HdmiIn2 { get; private set; }
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
|
||||
public CodecCallFavorites CallFavorites { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public MockVC(string key, string name)
|
||||
public MockVC(string key, string name, MockVcPropertiesConfig props)
|
||||
: base(key, name)
|
||||
{
|
||||
CodecInfo = new MockCodecInfo();
|
||||
|
||||
// Get favoritesw
|
||||
if (props.Favorites != null)
|
||||
{
|
||||
CallFavorites = new CodecCallFavorites();
|
||||
CallFavorites.Favorites = props.Favorites;
|
||||
}
|
||||
|
||||
// Debug helpers
|
||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
@@ -329,19 +338,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
public CodecScheduleAwareness CodecSchedule
|
||||
{
|
||||
get {
|
||||
var sch = new CodecScheduleAwareness();
|
||||
for(int i = 0; i < 5; i++)
|
||||
// if the last meeting has past, generate a new list
|
||||
if (_CodecSchedule == null
|
||||
|| _CodecSchedule.Meetings[_CodecSchedule.Meetings.Count - 1].StartTime < DateTime.Now)
|
||||
{
|
||||
var m = new Meeting();
|
||||
m.StartTime = DateTime.Now.AddMinutes(3).AddHours(i);
|
||||
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(30);
|
||||
m.Title = "Meeting " + i;
|
||||
m.ConferenceNumberToDial = i + "meeting@fake.com";
|
||||
sch.Meetings.Add(m);
|
||||
_CodecSchedule = new CodecScheduleAwareness();
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var m = new Meeting();
|
||||
m.StartTime = DateTime.Now.AddMinutes(3).AddHours(i);
|
||||
m.EndTime = DateTime.Now.AddHours(i).AddMinutes(30);
|
||||
m.Title = "Meeting " + i;
|
||||
m.ConferenceNumberToDial = i + "meeting@fake.com";
|
||||
_CodecSchedule.Meetings.Add(m);
|
||||
}
|
||||
}
|
||||
return sch;
|
||||
return _CodecSchedule;
|
||||
}
|
||||
}
|
||||
CodecScheduleAwareness _CodecSchedule;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
public class MockVcPropertiesConfig
|
||||
{
|
||||
public List<CodecActiveCallItem> Favorites { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user