Merge remote-tracking branch 'origin/bugfix/ecs-610' into bugfix/ecs-541-1

Conflicts:
	Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xConfiguration.cs
	Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/xStatus.cs
This commit is contained in:
Neil Dorin
2017-10-24 11:59:29 -06:00
8 changed files with 78 additions and 40 deletions

View File

@@ -137,6 +137,7 @@
<Compile Include="Streaming\Roku.cs" />
<Compile Include="VideoCodec\CiscoCodec\BookingsDataClasses.cs" />
<Compile Include="VideoCodec\CiscoCodec\CallHistoryDataClasses.cs" />
<Compile Include="VideoCodec\CiscoCodec\CameraConverter.cs" />
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodec.cs" />
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodecPropertiesConfig.cs" />
<Compile Include="VideoCodec\CiscoCodec\xStatusSparkPlus.cs" />

View File

@@ -0,0 +1,53 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//namespace PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec
//{
// /// <summary>
// /// This helps convert the camera section differences between Spark and Spark+
// /// One of them returns an object. One returns an array.
// /// </summary>
// public class CameraConverter : JsonConverter
// {
// public override bool CanConvert(System.Type objectType)
// {
// return objectType == typeof(Camera) || objectType == typeof(List<Camera>);
// }
// public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
// {
// 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();
// }
// return l;
// }
// else
// {
// return new List<Camera> { reader.Value as Camera };
// }
// }
// public override bool CanWrite
// {
// get
// {
// return false;
// }
// }
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
// {
// throw new NotImplementedException("SOD OFF HOSER");
// }
// }
//}

View File

@@ -2,8 +2,12 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
/// <summary>
@@ -239,7 +243,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Cameras
{
//public List<Camera> Camera { get; set; }
//[JsonConverter(typeof(CameraConverter))]
//public List<Camera> Camera { get; set; }
public SpeakerTrack SpeakerTrack { get; set; }
}

View File

@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronXml.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
@@ -313,12 +315,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class Cameras
{
//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();
}
}
@@ -1109,26 +1112,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
public class Primary
{
public URI URI { get; set; }
public Primary()
{
URI = new URI();
}
}
public class AlternateURI
{
public Primary Primary { get; set; }
public AlternateURI()
{
Primary = new Primary();
}
}
public class Authentication
{
public string Value { get; set; }
@@ -1210,11 +1193,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Reason3 Reason { get; set; }
public Status10 Status { get; set; }
public URI3 URI { get; set; }
public Registration()
{
URI = new URI3();
}
}
public class Secure
@@ -1229,7 +1207,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class SIP
{
public AlternateURI AlternateURI { get; set; }
public Authentication Authentication { get; set; }
public CallForward CallForward { get; set; }
public Mailbox Mailbox { get; set; }
@@ -1237,12 +1214,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public List<Registration> Registration { get; set; }
public Secure Secure { get; set; }
public Verified Verified { get; set; }
public SIP()
{
AlternateURI = new AlternateURI();
Registration = new List<Registration>();
}
}
public class Mode7

View File

@@ -55,8 +55,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;
};
}

View File

@@ -443,6 +443,9 @@ namespace PepperDash.Essentials
// If the room is on, and the meeting is joinable
// and the LastMeetingDismissed != this meeting
Debug.Console(0, "*#* Room on: {0}, LastMeetingDismissed: {1} *#*", CurrentRoom.OnFeedback.BoolValue,
LastMeetingDismissed != null ? LastMeetingDismissed.StartTime.ToShortTimeString() : "null");
if (CurrentRoom.OnFeedback.BoolValue
&& LastMeetingDismissed == meeting)
{
@@ -450,7 +453,11 @@ namespace PepperDash.Essentials
}
LastMeetingDismissed = null;
if (meeting != null)
if (meeting == null)
{
HideNextMeetingPopup();
}
else
{
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString());
@@ -473,10 +480,11 @@ namespace PepperDash.Essentials
// indexOf = 3, 4 meetings :
if (indexOfNext < meetings.Count)
{
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
meetings[indexOfNext].StartTime.ToShortTimeString());
}
else
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, "No more meetings today");
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
{
// Mark the meeting to not re-harass the user