From 5794c3da731603014dce3e017563e7dd105a6714 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Tue, 4 Oct 2022 10:47:08 -0500 Subject: [PATCH] ci: update github workflows ci: update nuspec --- src/BookingsDataClasses.cs | 53 +- src/CiscoCamera.cs | 42 +- src/CiscoCodecJoinMap.cs | 12 +- src/CiscoRoomOsCodec.cs | 447 +++---- src/CodecSyncState.cs | 8 +- src/HttpApiServerExtended.cs | 36 +- src/epi-videoCodec-ciscoExtended.csproj | 1 - src/xConfiguration.cs | 965 +++++--------- src/xEvent.cs | 77 +- src/xStatus.cs | 859 ++++++------ src/xStatusSparkPlus.cs | 1576 ----------------------- 11 files changed, 1063 insertions(+), 3013 deletions(-) delete mode 100644 src/xStatusSparkPlus.cs diff --git a/src/BookingsDataClasses.cs b/src/BookingsDataClasses.cs index 9ce501e..a86258d 100644 --- a/src/BookingsDataClasses.cs +++ b/src/BookingsDataClasses.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; - +using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Devices.Common.Codec; @@ -27,11 +28,9 @@ public DateTime Value { get { - DateTime _valueDateTime; try { - _valueDateTime = DateTime.Parse(_value); - return _valueDateTime; + return DateTime.Parse(_value); } catch { @@ -40,7 +39,7 @@ public DateTime Value } set { - _value = value.ToString(); + _value = value.ToString(CultureInfo.InvariantCulture); } } } @@ -80,17 +79,14 @@ public class Email public string Value { get; set; } } - public class Id2 - { - public string Value { get; set; } - } public class Organizer { public FirstName FirstName { get; set; } public LastName LastName { get; set; } public Email Email { get; set; } - public Id2 Id { get; set; } + [JsonProperty("CiscoCallId")] + public Id OrganizerId { get; set; } public Organizer() { @@ -230,7 +226,8 @@ public class CallType public class CiscoCall { - public string id { get; set; } + [JsonProperty("CiscoCallId")] + public string CiscoCallId { get; set; } public Number Number { get; set; } public Protocol Protocol { get; set; } public CallRate CallRate { get; set; } @@ -261,7 +258,8 @@ public DialInfo() public class Booking { - public string id { get; set; } + [JsonProperty("LocalInstanceId")] + public string StringId { get; set; } public Id Id { get; set; } public Title Title { get; set; } public Agenda Agenda { get; set; } @@ -292,10 +290,12 @@ public Booking() public class BookingsListResult { - public string status { get; set; } + + public string Status { get; set; } public ResultInfo ResultInfo { get; set; } //public LastUpdated LastUpdated { get; set; } - public List Booking { get; set; } + [JsonProperty("booking")] + public List BookingsListResultBooking { get; set; } } public class CommandResponse @@ -309,19 +309,29 @@ public class RootObject } /// - /// Extracts the necessary meeting values from the Cisco bookings response ans converts them to the generic class + /// Extracts the necessary meeting values from the Cisco bookings response and converts them to the generic class /// /// + /// How many seconds must be between now and booked time to allow the meeting to be joined /// public static List GetGenericMeetingsFromBookingResult(List bookings, int joinableCooldownSeconds) { var meetings = new List(); - foreach (Booking b in bookings) + foreach (var b in bookings) { var meeting = new Meeting(joinableCooldownSeconds); + if (b.Time == null) continue; + + meeting.StartTime = b.Time.StartTime.Value; + meeting.MinutesBeforeMeeting = Int32.Parse(b.Time.StartTimeBuffer.Value) / 60; + meeting.EndTime = b.Time.EndTime.Value; + + if (meeting.EndTime <= DateTime.Now) continue; + + if (b.Id != null) meeting.Id = b.Id.Value; @@ -334,13 +344,6 @@ public static List GetGenericMeetingsFromBookingResult(List bo if (b.Agenda != null) meeting.Agenda = b.Agenda.Value; - if (b.Time != null) - { - meeting.StartTime = b.Time.StartTime.Value; - meeting.MinutesBeforeMeeting = Int32.Parse(b.Time.StartTimeBuffer.Value) / 60; - meeting.EndTime = b.Time.EndTime.Value; - } - if (b.Privacy != null) meeting.Privacy = CodecCallPrivacy.ConvertToDirectionEnum(b.Privacy.Value); @@ -352,9 +355,9 @@ public static List GetGenericMeetingsFromBookingResult(List bo if (b.DialInfo.Calls.Call != null) { - foreach (CiscoCall c in b.DialInfo.Calls.Call) + foreach (var c in b.DialInfo.Calls.Call) { - meeting.Calls.Add(new Call() + meeting.Calls.Add(new Call { Number = c.Number.Value, Protocol = c.Protocol.Value, diff --git a/src/CiscoCamera.cs b/src/CiscoCamera.cs index 7e4a4c9..33ac482 100644 --- a/src/CiscoCamera.cs +++ b/src/CiscoCamera.cs @@ -37,12 +37,12 @@ public void PositionHome() public void PanLeft() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Left CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Left CallId: {0}", CallId)); } public void PanRight() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Right CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Right CallId: {0}", CallId)); } public void PanStop() @@ -56,12 +56,12 @@ public void PanStop() public void TiltDown() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Down CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Down CallId: {0}", CallId)); } public void TiltUp() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Up CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Up CallId: {0}", CallId)); } public void TiltStop() @@ -75,12 +75,12 @@ public void TiltStop() public void ZoomIn() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomIn CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: ZoomIn CallId: {0}", CallId)); } public void ZoomOut() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomOut CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: ZoomOut CallId: {0}", CallId)); } public void ZoomStop() @@ -93,7 +93,7 @@ public void ZoomStop() void Stop() { - ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Stop CallId: {0}", CallId)); + ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Stop CallId: {0}", CallId)); } public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) @@ -185,7 +185,7 @@ public void SetCapabilites(string capabilites) public void PositionHome() { - // Not supported on Internal Spark Camera + // Not supported on Internal Spark CameraList } @@ -198,7 +198,7 @@ public void PanLeft() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed)); isPanning = true; } } @@ -207,14 +207,14 @@ public void PanRight() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed)); isPanning = true; } } public void PanStop() { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Stop", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Stop", CameraId)); isPanning = false; } @@ -228,7 +228,7 @@ public void TiltDown() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed)); isTilting = true; } } @@ -237,14 +237,14 @@ public void TiltUp() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed)); isTilting = true; } } public void TiltStop() { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Stop", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Stop", CameraId)); isTilting = false; } @@ -256,7 +256,7 @@ public void ZoomIn() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed)); isZooming = true; } } @@ -265,14 +265,14 @@ public void ZoomOut() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed)); isZooming = true; } } public void ZoomStop() { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Stop", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: Stop", CameraId)); isZooming = false; } @@ -284,7 +284,7 @@ public void FocusNear() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Near", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Near", CameraId)); isFocusing = true; } } @@ -293,20 +293,20 @@ public void FocusFar() { if (!isMoving) { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Far", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Far", CameraId)); isFocusing = true; } } public void FocusStop() { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Stop", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Stop", CameraId)); isFocusing = false; } public void TriggerAutoFocus() { - ParentCodec.EnqueueCommand(string.Format("xCommand Camera TriggerAutofocus CameraId: {0}", CameraId)); + ParentCodec.EnqueueCommand(string.Format("xCommand CameraList TriggerAutofocus CameraId: {0}", CameraId)); } #endregion diff --git a/src/CiscoCodecJoinMap.cs b/src/CiscoCodecJoinMap.cs index 8c19bb3..bb73fd7 100644 --- a/src/CiscoCodecJoinMap.cs +++ b/src/CiscoCodecJoinMap.cs @@ -188,7 +188,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Activates Do Not Disturb Mode. FB High if active.", + Description = "Activates Do Not Disturb H323Mode. FB High if active.", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); @@ -202,7 +202,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Deactivates Do Not Disturb Mode. FB High if deactivated.", + Description = "Deactivates Do Not Disturb H323Mode. FB High if deactivated.", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); @@ -216,7 +216,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Toggles Do Not Disturb Mode.", + Description = "Toggles Do Not Disturb H323Mode.", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); @@ -230,7 +230,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Activates Standby Mode. FB High if active.", + Description = "Activates Standby H323Mode. FB High if active.", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); @@ -244,7 +244,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Deactivates Standby Mode. FB High if deactivated.", + Description = "Deactivates Standby H323Mode. FB High if deactivated.", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); @@ -258,7 +258,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap }, new JoinMetadata { - Description = "Activates Half Wake Mode. FB High if active.", + Description = "Activates Half Wake H323Mode. FB High if active.", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); diff --git a/src/CiscoRoomOsCodec.cs b/src/CiscoRoomOsCodec.cs index cdef67e..1346360 100644 --- a/src/CiscoRoomOsCodec.cs +++ b/src/CiscoRoomOsCodec.cs @@ -118,7 +118,6 @@ private bool EnhancedLayouts private Meeting _currentMeeting; - private bool _validFirmware; private bool _presentationActive; private readonly bool _phonebookAutoPopulate; @@ -136,15 +135,13 @@ private bool EnhancedLayouts public event EventHandler DirectoryResultReturned; - private readonly bool _meetingsOverrideLimit; - private CTimer _brandingTimer; public CommunicationGather PortGather { get; private set; } public StatusMonitorBase CommunicationMonitor { get; private set; } - private GenericQueue _receiveQueue; + private readonly GenericQueue _receiveQueue; public BoolFeedback PresentationViewMaximizedFeedback { get; private set; } @@ -156,7 +153,7 @@ private bool EnhancedLayouts private string _currentPresentationView; - private eCameraTrackingCapabilities _preferredTrackingMode { get; set; } + private eCameraTrackingCapabilities PreferredTrackingMode { get; set; } public BoolFeedback RoomIsOccupiedFeedback { get; private set; } @@ -170,8 +167,6 @@ private bool EnhancedLayouts public BoolFeedback PresentationActiveFeedback { get; private set; } - private bool _isRoomOS; - private string _currentLayoutBacker; private string CurrentLayout @@ -311,12 +306,12 @@ protected override Func SharingSourceFeedbackFunc protected override Func SharingContentIsOnFeedbackFunc { - get { return () => CodecStatus.Status.Conference.Presentation.Mode.BoolValue; } + get { return () => CodecStatus.Status.StatusConference.Presentation.ModeValueProperty.BoolValue; } } protected Func FarEndIsSharingContentFeedbackFunc { - get { return () => CodecStatus.Status.Conference.Presentation.Mode.Value == "Receiving"; } + get { return () => CodecStatus.Status.StatusConference.Presentation.ModeValueProperty.Value == "Receiving"; } } protected override Func MuteFeedbackFunc @@ -331,12 +326,12 @@ protected Func RoomIsOccupiedFeedbackFunc protected Func PresentationActiveFeedbackFunc { - get { return () => CodecStatus.Status.Conference.Presentation.Mode.Value != "Off"; } + get { return () => CodecStatus.Status.StatusConference.Presentation.ModeValueProperty.Value != "Off"; } } protected Func PeopleCountFeedbackFunc { - get { return () => CodecStatus.Status.RoomAnalytics.PeopleCount.Current.IntValue; } + get { return () => CodecStatus.Status.RoomAnalytics.PeopleCount.CurrentPeopleCount.IntValue; } } @@ -347,7 +342,7 @@ protected Func AvailableLayoutsFeedbackFunc protected Func SelfViewIsOnFeedbackFunc { - get { return () => CodecStatus.Status.Video.Selfview.Mode.BoolValue; } + get { return () => CodecStatus.Status.Video.Selfview.SelfViewMode.BoolValue; } } protected Func SelfviewPipPositionFeedbackFunc @@ -382,9 +377,9 @@ protected Func CameraTrackingOnFeedbackFunc get { return () => (CodecStatus.Status.Cameras.SpeakerTrack.Availability.BoolValue - && CodecStatus.Status.Cameras.SpeakerTrack.Status.BoolValue) + && CodecStatus.Status.Cameras.SpeakerTrack.SpeakerTrackStatus.BoolValue) || (CodecStatus.Status.Cameras.PresenterTrack.Availability.BoolValue - && CodecStatus.Status.Cameras.PresenterTrack.Status.BoolValue); + && CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.BoolValue); } } @@ -401,42 +396,42 @@ protected Func SpeakerTrackAvailableFeedbackFunc protected Func SpeakerTrackStatusOnFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.SpeakerTrack.Status.BoolValue; } + get { return () => CodecStatus.Status.Cameras.SpeakerTrack.SpeakerTrackStatus.BoolValue; } } protected Func PresenterTrackStatusNameFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.PresenterTrack.Status.StringValue; } + get { return () => CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.StringValue; } } protected Func PresenterTrackStatusOnFeedbackFunc { get { - return () => ((CodecStatus.Status.Cameras.PresenterTrack.Status.BoolValue) - || (String.IsNullOrEmpty(CodecStatus.Status.Cameras.PresenterTrack.Status.StringValue))); + return () => ((CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.BoolValue) + || (String.IsNullOrEmpty(CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.StringValue))); } } protected Func PresenterTrackStatusOffFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.PresenterTrack.Status.StringValue.ToLower() == "off"; } + get { return () => CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.StringValue.ToLower() == "off"; } } protected Func PresenterTrackStatusFollowFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.PresenterTrack.Status.Value.ToLower() == "follow"; } + get { return () => CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.Value.ToLower() == "follow"; } } protected Func PresenterTrackStatusBackgroundFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.PresenterTrack.Status.Value.ToLower() == "background"; } + get { return () => CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.Value.ToLower() == "background"; } } protected Func PresenterTrackStatusPersistentFeedbackFunc { - get { return () => CodecStatus.Status.Cameras.PresenterTrack.Status.Value.ToLower() == "persistent"; } + get { return () => CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.Value.ToLower() == "persistent"; } } #endregion @@ -520,7 +515,7 @@ public CiscoCodec(DeviceConfig config, IBasicCommunication comm) _dateFormatSpecifier = _config.DateFormatSpecifier.NullIfEmpty() ?? "d"; _joinableCooldownSeconds = _config.JoinableCooldownSeconds; - _preferredTrackingMode = eCameraTrackingCapabilities.SpeakerTrack; + PreferredTrackingMode = eCameraTrackingCapabilities.SpeakerTrack; var trackingMode = _config.DefaultCameraTrackingMode.ToLower(); @@ -529,7 +524,7 @@ public CiscoCodec(DeviceConfig config, IBasicCommunication comm) { if (trackingMode.Contains("presenter")) { - _preferredTrackingMode = eCameraTrackingCapabilities.PresenterTrack; + PreferredTrackingMode = eCameraTrackingCapabilities.PresenterTrack; } } @@ -549,7 +544,7 @@ public CiscoCodec(DeviceConfig config, IBasicCommunication comm) LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); LocalLayoutIsProminentFeedback = new BoolFeedback(LocalLayoutIsProminentFeedbackFunc); FarEndIsSharingContentFeedback = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); - CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.Input.MainVideoMute.BoolValue); + CameraIsOffFeedback = new BoolFeedback(() => CodecStatus.Status.Video.VideoInput.MainVideoMute.BoolValue); AvailableLayoutsFeedback = new StringFeedback(AvailableLayoutsFeedbackFunc); PresentationActiveFeedback = new BoolFeedback(PresentationActiveFeedbackFunc); @@ -588,7 +583,7 @@ public CiscoCodec(DeviceConfig config, IBasicCommunication comm) CameraIsMutedFeedback = CameraIsOffFeedback; SupportsCameraOff = true; - DoNotDisturbModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Conference.DoNotDisturb.BoolValue); + DoNotDisturbModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.StatusConference.DoNotDisturb.BoolValue); HalfWakeModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value.ToLower() == "halfwake"); EnteringStandbyModeFeedback = @@ -642,8 +637,7 @@ public CiscoCodec(DeviceConfig config, IBasicCommunication comm) _syncState.InitialSyncCompleted += SyncState_InitialSyncCompleted; - PortGather = new CommunicationGather(Communication, Delimiter); - PortGather.IncludeDelimiter = true; + PortGather = new CommunicationGather(Communication, Delimiter) {IncludeDelimiter = true}; PortGather.LineReceived += this.Port_LineReceived; @@ -817,7 +811,6 @@ private void CiscoCodec_CallStatusChange(object sender, CodecCallStatusItemChang private string UpdateActiveMeetingXSig(Meeting currentMeeting) { - // TODO [ ] hotfix/videocodecbase-max-meeting-xsig-set //const int _meetingsToDisplay = 3; const int maxDigitals = 3; const int maxStrings = 8; @@ -840,7 +833,7 @@ private string UpdateActiveMeetingXSig(Meeting currentMeeting) * Start Time - 4 * End Date - 5 * End Time - 6 - * Id - 7 + * OrganizerId - 7 * Active "StartTime - EndTime" - 8 * TimeRemaining Text - 9 * TimeRemaining MinutesRemaining Text - 10 @@ -915,36 +908,17 @@ private void SetFeedbackActions() CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate; - CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate; - - - /*CodecStatus.Status.Video.Layout.CurrentLayouts.AvailableLayoutsCount.ValueChangedAction = () => - { - Debug.Console(0, this, "*******LAYOUTSCHANGED**********"); - Debug.Console(0, this, "There are {0} Layouts", CodecStatus.Status.Video.Layout.CurrentLayouts.AvailableLayoutsCount.Value); - - var layoutObj = CodecStatus.Status.Video.Layout.CurrentLayouts; - var count = layoutObj.AvailableLayoutsCount.Value; - - if (count < 1) - { - OnAvailableLayoutsChanged(new List()); - return; - } - OnAvailableLayoutsChanged(layoutObj.LayoutCommands); - };*/ - + CodecStatus.Status.RoomAnalytics.PeopleCount.CurrentPeopleCount.ValueChangedAction = PeopleCountFeedback.FireUpdate; - CodecStatus.Status.Video.Layout.CurrentLayouts.ActiveLayout.ValueChangedAction = () => { Debug.Console(0, this, "CurrentLayout = \"{0}\"", CurrentLayout); OnCurrentLayoutChanged(CodecStatus.Status.Video.Layout.CurrentLayouts.ActiveLayout.Value); }; - CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate; + CodecStatus.Status.Video.Selfview.SelfViewMode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate; - CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus; + CodecStatus.Status.Video.Selfview.PipPosition.ValueChangedAction = ComputeSelfviewPipStatus; CodecStatus.Status.Video.Layout.CurrentLayouts.ActiveLayout.ValueChangedAction = LocalLayoutFeedback.FireUpdate; @@ -952,15 +926,15 @@ private void SetFeedbackActions() CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLegacyLayout; - //CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout; - CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = () => + //CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout; + CodecStatus.Status.StatusConference.Presentation.ModeValueProperty.ValueChangedAction = () => { SharingContentIsOnFeedback.FireUpdate(); FarEndIsSharingContentFeedback.FireUpdate(); PresentationActiveFeedback.FireUpdate(); }; - CodecStatus.Status.Conference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate; + CodecStatus.Status.StatusConference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate; CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.ValueChangedAction = @@ -968,13 +942,13 @@ private void SetFeedbackActions() #region CameraTrackingFeedbackRegistration - CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction += + CodecStatus.Status.Cameras.SpeakerTrack.SpeakerTrackStatus.ValueChangedAction += () => { SpeakerTrackStatusOnFeedback.FireUpdate(); CameraAutoModeIsOnFeedback.FireUpdate(); }; - CodecStatus.Status.Cameras.PresenterTrack.Status.ValueChangedAction += + CodecStatus.Status.Cameras.PresenterTrack.PresenterTrackStatus.ValueChangedAction += () => { PresenterTrackFeedbackGroup.FireUpdate(); @@ -999,7 +973,7 @@ private void SetFeedbackActions() try { - CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate; + CodecStatus.Status.Video.VideoInput.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate; } catch (Exception ex) { @@ -1204,27 +1178,27 @@ private string BuildFeedbackRegistrationExpression() var feedbackRegistrationExpression = prefix + "/Configuration" + Delimiter + - prefix + "/Status/Audio" + Delimiter + - prefix + "/Status/Call" + Delimiter + - prefix + "/Status/Conference/Presentation" + Delimiter + - prefix + "/Status/Conference/DoNotDisturb" + Delimiter + - prefix + "/Status/Cameras/SpeakerTrack" + Delimiter + - prefix + "/Status/Cameras/SpeakerTrack/Status" + Delimiter + - prefix + "/Status/Cameras/SpeakerTrack/Availability" + Delimiter + - prefix + "/Status/Cameras/PresenterTrack" + Delimiter + - prefix + "/Status/Cameras/PresenterTrack/Status" + Delimiter + - prefix + "/Status/Cameras/PresenterTrack/Availability" + Delimiter + - prefix + "/Status/RoomAnalytics" + Delimiter + - prefix + "/Status/RoomPreset" + Delimiter + - prefix + "/Status/Standby" + Delimiter + - prefix + "/Status/Video/Selfview" + Delimiter + - prefix + "/Status/MediaChannels/Call" + Delimiter + - prefix + "/Status/Video/Layout" + Delimiter + - //prefix + "/Status/Video/Layout/LayoutFamily" + Delimiter + - //prefix + "/Status/Video/Layout/LayoutFamily/Local" + Delimiter + - //prefix + "/Status/Video/Layout/CurrentLayouts" + Delimiter + - //prefix + "/Status/Video/Layout/CurrentLayouts/AvailableLayouts" + Delimiter + - prefix + "/Status/Video/Input/MainVideoMute" + Delimiter + + prefix + "/PresenterTrackStatus/Audio" + Delimiter + + prefix + "/PresenterTrackStatus/MediaChannelCalls" + Delimiter + + prefix + "/PresenterTrackStatus/ExperimentalConference/Presentation" + Delimiter + + prefix + "/PresenterTrackStatus/ExperimentalConference/DoNotDisturb" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/SpeakerTrack" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/SpeakerTrack/PresenterTrackStatus" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/SpeakerTrack/Availability" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/PresenterTrack" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/PresenterTrack/PresenterTrackStatus" + Delimiter + + prefix + "/PresenterTrackStatus/Cameras/PresenterTrack/Availability" + Delimiter + + prefix + "/PresenterTrackStatus/RoomAnalytics" + Delimiter + + prefix + "/PresenterTrackStatus/RoomPreset" + Delimiter + + prefix + "/PresenterTrackStatus/Standby" + Delimiter + + prefix + "/PresenterTrackStatus/ChannelVideo/Selfview" + Delimiter + + prefix + "/PresenterTrackStatus/MediaChannels/MediaChannelCalls" + Delimiter + + prefix + "/PresenterTrackStatus/ChannelVideo/Layout" + Delimiter + + //prefix + "/PresenterTrackStatus/ChannelVideo/Layout/LayoutFamily" + Delimiter + + //prefix + "/PresenterTrackStatus/ChannelVideo/Layout/LayoutFamily/Local" + Delimiter + + //prefix + "/PresenterTrackStatus/ChannelVideo/Layout/CurrentLayouts" + Delimiter + + //prefix + "/PresenterTrackStatus/ChannelVideo/Layout/CurrentLayouts/AvailableLayouts" + Delimiter + + prefix + "/PresenterTrackStatus/ChannelVideo/Input/MainVideoMute" + Delimiter + prefix + "/Bookings" + Delimiter + prefix + "/Event/Bookings" + Delimiter + prefix + "/Event/CameraPresetListUpdated" + Delimiter + @@ -1269,24 +1243,24 @@ private void SyncState_InitialSyncCompleted(object sender, EventArgs e) { var cameraInfo = new List(); - Debug.Console(0, this, "Codec reports {0} cameras", CodecStatus.Status.Cameras.Camera.Count); + Debug.Console(0, this, "Codec reports {0} cameras", CodecStatus.Status.Cameras.CameraList.Count); - foreach (var camera in CodecStatus.Status.Cameras.Camera) + foreach (var camera in CodecStatus.Status.Cameras.CameraList) { Debug.Console(0, this, - @"Camera id: {0} + @"CameraList CiscoCallId: {0} Name: {1} ConnectorID: {2}" - , camera.id + , camera.CameraId , camera.Manufacturer.Value , camera.Model.Value); - var id = Convert.ToUInt16(camera.id); + var id = Convert.ToUInt16(camera.CameraId); var info = new CameraInfo() { CameraNumber = id, Name = string.Format("{0} {1}", camera.Manufacturer.Value, camera.Model.Value), - SourceId = camera.DetectedConnector.ConnectorId + SourceId = camera.DetectedConnector.DetectedConnectorId }; cameraInfo.Add(info); } @@ -1471,7 +1445,7 @@ public void EnqueueCommand(string command) /// /// Appends the delimiter and send the command to the codec. /// Should not be used for sending general commands to the codec. Use EnqueueCommand instead. - /// Should be used to get initial Status and Configuration as well as set up Feedback Registration + /// Should be used to get initial PresenterTrackStatus and Configuration as well as set up Feedback Registration /// /// public void SendText(string command) @@ -1545,10 +1519,10 @@ private void ClearLayouts() private void RegisterSystemUnitEvents() { - CodecStatus.Status.SystemUnit.Software.DisplayName.ValueChangedAction += + CodecStatus.Status.SystemUnit.SystemUnitSoftware.DisplayName.ValueChangedAction += () => { - var splitSoftware = CodecStatus.Status.SystemUnit.Software.DisplayName.Value.Split(' '); + var splitSoftware = CodecStatus.Status.SystemUnit.SystemUnitSoftware.DisplayName.Value.Split(' '); Debug.Console(2, this, "Splitsoftware = {0}", splitSoftware[1]); CodecFirmware = GetVersion(splitSoftware[1]); @@ -1563,11 +1537,11 @@ private void RegisterSystemUnitEvents() }; - CodecStatus.Status.SystemUnit.Software.OptionKeys.MultiSite.ValueChangedAction += + CodecStatus.Status.SystemUnit.SystemUnitSoftware.OptionKeys.MultiSite.ValueChangedAction += () => OnCodecInfoChanged(new CodecInfoChangedEventArgs(eCodecInfoChangeType.Multisite) { - MultiSiteOptionIsEnabled = CodecStatus.Status.SystemUnit.Software.OptionKeys.MultiSite.BoolValue + MultiSiteOptionIsEnabled = CodecStatus.Status.SystemUnit.SystemUnitSoftware.OptionKeys.MultiSite.BoolValue }); CodecStatus.Status.SystemUnit.Hardware.Module.SerialNumber.ValueChangedAction += @@ -1589,13 +1563,13 @@ private void RegisterSystemUnitEvents() private void RegisterVideoEvents() { /* - CodecStatus.Status.Video.Layout.CurrentLayouts.AvailableLayoutsCount.ValueChangedAction += () => + CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.CurrentLayouts.AvailableLayoutsCount.ValueChangedAction += () => { Debug.Console(0, this, "Layouts Received Change"); var layoutData = new List(); - if (CodecStatus.Status.Video.Layout.CurrentLayouts.AvailableLayouts != null) + if (CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.CurrentLayouts.AvailableLayouts != null) { - foreach (var i in CodecStatus.Status.Video.Layout.CurrentLayouts.AvailableLayouts) + foreach (var i in CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.CurrentLayouts.AvailableLayouts) { var r = i; Debug.Console(2, "Adding New layout {0}", r.LayoutName.Value); @@ -1610,11 +1584,11 @@ private void RegisterVideoEvents() - CodecStatus.Status.Video.Layout.CurrentLayouts.ActiveLayout.ValueChangedAction += () => + CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.CurrentLayouts.ActiveLayout.ValueChangedAction += () => { Debug.Console(0, this, "Active Layouts Received Change"); - CurrentLayout = CodecStatus.Status.Video.Layout.CurrentLayouts.ActiveLayout.Value; + CurrentLayout = CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.CurrentLayouts.ActiveLayout.Value; LocalLayoutFeedback.FireUpdate(); }; */ @@ -1630,9 +1604,9 @@ private void DeserializeResponse(string response) //settings.MissingMemberHandling = MissingMemberHandling.Ignore; //settings.ObjectCreationHandling = ObjectCreationHandling.Auto; - if (response.IndexOf("\"Status\":{") > -1 || response.IndexOf("\"Status\": {") > -1) + if (response.IndexOf("\"PresenterTrackStatus\":{") > -1 || response.IndexOf("\"PresenterTrackStatus\": {") > -1) { - // Status Message + // PresenterTrackStatus DiagnosticsMessage // Temp object so we can inpsect for call data before simply deserializing var tempCodecStatus = new CiscoCodecStatus.RootObject(); @@ -1654,14 +1628,14 @@ private void DeserializeResponse(string response) } - var network = status.Network; + var network = status.Networks; if (network != null) { - var myNetwork = network.FirstOrDefault(i => i.id == "1"); + var myNetwork = network.FirstOrDefault(i => i.NetworkId == "1"); if (myNetwork != null) { - var hostname = myNetwork.CDP.DeviceId.Value.NullIfEmpty() ?? "Unknown"; + var hostname = myNetwork.Cdp.DeviceId.Value.NullIfEmpty() ?? "Unknown"; var ipAddress = myNetwork.IPv4.Address.Value.NullIfEmpty() ?? "Unknown"; var macAddress = myNetwork.Ethernet.MacAddress.Value.NullIfEmpty() ?? "Unknown"; @@ -1680,13 +1654,13 @@ private void DeserializeResponse(string response) } - var sip = status.SIP; + var sip = status.Sip; if (sip != null) { - JsonConvert.PopulateObject(response, CodecStatus.Status.SIP); - if (sip.Registration.Count > 0) + JsonConvert.PopulateObject(response, CodecStatus.Status.Sip); + if (sip.Registrations.Count > 0) { - var sipUri = sip.Registration[0].URI.Value.NullIfEmpty() ?? "Unknown"; + var sipUri = sip.Registrations[0].Uri.Value.NullIfEmpty() ?? "Unknown"; var match = Regex.Match(sipUri, @"(\d+)"); var sipPhoneNumber = match.Success ? match.Groups[1].Value : "Unknown"; OnCodecInfoChanged(new CodecInfoChangedEventArgs(eCodecInfoChangeType.Sip) @@ -1724,17 +1698,17 @@ private void DeserializeResponse(string response) } - // Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value + // Check to see if the message contains /PresenterTrackStatus/ExperimentalConference/Presentation/PresentationLocalInstances and extract source value - var conference = status.Conference; + var conference = status.StatusConference; if (conference != null) { - JsonConvert.PopulateObject(response, CodecStatus.Status.Conference); + JsonConvert.PopulateObject(response, CodecStatus.Status.StatusConference); } if (conference != null && - (conference.Presentation != null && conference.Presentation.LocalInstance == null)) + (conference.Presentation != null && conference.Presentation.PresentationLocalInstances == null)) { // Handles an empty presentation object response @@ -1744,33 +1718,33 @@ private void DeserializeResponse(string response) if (conference != null && conference.Presentation != null) { - if (conference.Presentation.LocalInstance != null && - conference.Presentation.LocalInstance.Count > 0) + if (conference.Presentation.PresentationLocalInstances != null && + conference.Presentation.PresentationLocalInstances.Count > 0) { - if (conference.Presentation.Mode != null) + if (conference.Presentation.ModeValueProperty != null) { - _presentationActive = conference.Presentation.Mode.Value != "Off"; + _presentationActive = conference.Presentation.ModeValueProperty.Value != "Off"; CodecPollLayouts(); } - if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost)) + if (!string.IsNullOrEmpty(conference.Presentation.PresentationLocalInstances[0].Ghost)) { _presentationSource = 0; _presentationLocalOnly = false; _presentationLocalRemote = false; } - else if (conference.Presentation.LocalInstance[0].Source != null) + else if (conference.Presentation.PresentationLocalInstances[0].SourceValueProperty != null) { - _presentationSource = conference.Presentation.LocalInstance[0].Source.IntValue; + _presentationSource = conference.Presentation.PresentationLocalInstances[0].SourceValueProperty.IntValue; // Check for any values in the SendingMode property if ( - conference.Presentation.LocalInstance.Any( + conference.Presentation.PresentationLocalInstances.Any( (i) => !string.IsNullOrEmpty(i.SendingMode.Value))) { _presentationLocalOnly = - conference.Presentation.LocalInstance.Any((i) => i.SendingMode.LocalOnly); + conference.Presentation.PresentationLocalInstances.Any((i) => i.SendingMode.LocalOnly); _presentationLocalRemote = - conference.Presentation.LocalInstance.Any((i) => i.SendingMode.LocalRemote); + conference.Presentation.PresentationLocalInstances.Any((i) => i.SendingMode.LocalRemote); } } @@ -1780,7 +1754,7 @@ private void DeserializeResponse(string response) } } - var calls = status.Call ?? null; + var calls = status.Calls ?? null; // Check to see if this is a call status message received after the initial status message if (calls != null && calls.Count > 0) @@ -1795,7 +1769,6 @@ private void DeserializeResponse(string response) // Iterate through the call objects in the response foreach (var c in calls) { - var i = 1; var call = c; var currentCallType = String.Empty; @@ -1803,14 +1776,16 @@ private void DeserializeResponse(string response) if (tempCodecStatus != null && tempCodecStatus.Status != null && tempCodecStatus.Status.MediaChannels != null) { - currentCallType = tempCodecStatus.Status.MediaChannels.Call == null + currentCallType = tempCodecStatus.Status.MediaChannels.MediaChannelCalls == null ? null - : CheckCallType(c.id, tempCodecStatus.Status.MediaChannels.Call); + : CheckCallType(c.CallIdString, + tempCodecStatus.Status.MediaChannels.MediaChannelCalls); } - Debug.Console(0, this, "Current Call Type = {0}", currentCallType); - var tempActiveCall = ActiveCalls.FirstOrDefault(x => x.Id.Equals(call.id)); + + Debug.Console(0, this, "Current MediaChannelCalls Type = {0}", currentCallType); + var tempActiveCall = ActiveCalls.FirstOrDefault(x => x.Id.Equals(call.CallIdString)); if (tempActiveCall != null) { @@ -1820,10 +1795,10 @@ private void DeserializeResponse(string response) //var newStatus = eCodecCallStatus.Unknown; // Update properties of ActiveCallItem - if (call.Status != null) - if (!string.IsNullOrEmpty(call.Status.Value)) + if (call.CallStatus != null) + if (!string.IsNullOrEmpty(call.CallStatus.Value)) { - tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value); + tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.CallStatus.Value); tempActiveCall.IsOnHold = tempActiveCall.Status == eCodecCallStatus.OnHold; if (tempActiveCall.Status == eCodecCallStatus.Connected) @@ -1886,15 +1861,15 @@ private void DeserializeResponse(string response) CodecPollLayouts(); } - else if (call.ghost == null || call.ghost.ToLower() == "false") // if the ghost value is present the call has ended already + else if (call.GhostString == null || call.GhostString.ToLower() == "false") // if the ghost value is present the call has ended already { // Create a new call item var newCallItem = new CodecActiveCallItem() { - Id = call.id, - Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value), + Id = call.CallIdString, + Status = CodecCallStatus.ConvertToStatusEnum(call.CallStatus.Value), Name = call.DisplayName.Value, Number = call.RemoteNumber.Value, Type = CodecCallType.ConvertToTypeEnum(currentCallType ?? call.CallType.Value), @@ -1929,39 +1904,39 @@ private void DeserializeResponse(string response) // Check for Room Preset data (comes in partial, so we need to handle these responses differently to prevent appending duplicate items - var tempPresets = tempCodecStatus.Status.RoomPreset; + var tempPresets = tempCodecStatus.Status.RoomPresets; if (tempPresets.Count > 0) { // Create temporary list to store the existing items from the CiscoCodecStatus.RoomPreset collection var existingRoomPresets = new List(); // Add the existing items to the temporary list - existingRoomPresets.AddRange(CodecStatus.Status.RoomPreset); + existingRoomPresets.AddRange(CodecStatus.Status.RoomPresets); // Populate the CodecStatus object (this will append new values to the RoomPreset collection JsonConvert.PopulateObject(response, CodecStatus); var jResponse = JObject.Parse(response); - IList roomPresets = jResponse["Status"]["RoomPreset"].Children().ToList(); + IList roomPresets = jResponse["PresenterTrackStatus"]["RoomPreset"].Children().ToList(); // Iterate the new items in this response agains the temporary list. Overwrite any existing items and add new ones. foreach (var camPreset in tempPresets) { var preset = camPreset; if (preset == null) continue; - // First fine the existing preset that matches the id - var existingPreset = existingRoomPresets.FirstOrDefault(p => p.id.Equals(preset.id)); + // First fine the existing preset that matches the CiscoCallId + var existingPreset = existingRoomPresets.FirstOrDefault(p => p.RoomPresetId.Equals(preset.RoomPresetId)); if (existingPreset != null) { Debug.Console(1, this, "Existing Room Preset with ID: {0} found. Updating.", - existingPreset.id); + existingPreset.RoomPresetId); JToken updatedPreset = null; - // Find the JToken from the response with the matching id + // Find the JToken from the response with the matching CiscoCallId foreach ( var jPreset in - roomPresets.Where(jPreset => jPreset["id"].Value() == existingPreset.id) + roomPresets.Where(jPreset => jPreset["CiscoCallId"].Value() == existingPreset.RoomPresetId) ) { updatedPreset = jPreset; @@ -1976,13 +1951,13 @@ var jPreset in } else { - Debug.Console(1, this, "New Room Preset with ID: {0}. Adding.", preset.id); + Debug.Console(1, this, "New Room Preset with ID: {0}. Adding.", preset.RoomPresetId); existingRoomPresets.Add(preset); } } // Replace the list in the CodecStatus object with the processed list - CodecStatus.Status.RoomPreset = existingRoomPresets; + CodecStatus.Status.RoomPresets = existingRoomPresets; // Generecise the list NearEndPresets = @@ -2018,7 +1993,7 @@ var jPreset in } else if (response.IndexOf("\"Configuration\":{") > -1 || response.IndexOf("\"Configuration\": {") > -1) { - // Configuration Message + // Configuration DiagnosticsMessage Debug.Console(2, this, "Parse Configuration : {0}", response); JsonConvert.PopulateObject(response, CodecConfiguration); @@ -2031,7 +2006,7 @@ var jPreset in if (h323.H323Alias != null) { var e164 = h323.H323Alias.E164.Value.NullIfEmpty() ?? "unknown"; - var h323Id = h323.H323Alias.ID.Value.NullIfEmpty() ?? "unknown"; + var h323Id = h323.H323Alias.H323AliasId.Value.NullIfEmpty() ?? "unknown"; OnCodecInfoChanged(new CodecInfoChangedEventArgs(eCodecInfoChangeType.H323) {E164Alias = e164, H323Id = h323Id}); } } @@ -2078,13 +2053,13 @@ var jPreset in } else if (response.IndexOf("\"UserInterface\":{") > -1 || - response.IndexOf("\"UserInterface\": {") > -1) // External Source Trigger + response.IndexOf("\"UserInterface\": {") > -1) // External SourceValueProperty Trigger { Debug.Console(2, this, "Parse UserInterface"); CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject(); JsonConvert.PopulateObject(response, eventReceived); - Debug.Console(2, this, "*** Got an External Source Selection {0} {1}", eventReceived, + Debug.Console(2, this, "*** Got an External SourceValueProperty Selection {0} {1}", eventReceived, eventReceived.Event.UserInterface, eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected .SourceIdentifier.Value); @@ -2102,7 +2077,7 @@ var jPreset in else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1) { - // CommandResponse Message + // CommandResponse DiagnosticsMessage Debug.Console(2, this, "Parse CommandResponse - {0}", response); @@ -2201,7 +2176,7 @@ var jPreset in "0") CodecSchedule.Meetings = CiscoExtendedCodecBookings.GetGenericMeetingsFromBookingResult( - codecBookings.CommandResponse.BookingsListResult.Booking, _joinableCooldownSeconds); + codecBookings.CommandResponse.BookingsListResult.BookingsListResultBooking, _joinableCooldownSeconds); else { CodecSchedule.Meetings = new List(); @@ -2229,28 +2204,22 @@ var jPreset in } } - private string CheckCallType(string id, IEnumerable calls) + private static string CheckCallType(string id, IEnumerable calls) { - var currentCall = calls.FirstOrDefault(p => p.Id == id); + var currentCall = calls.FirstOrDefault(p => p.MediaChannelCallId == id); if (currentCall != null) { - var videoChannels = currentCall.Channel.Where(x => x.Type.Value == "Video").ToList(); + var videoChannels = currentCall.Channels.Where(x => x.Type.Value == "ChannelVideo").ToList(); - return videoChannels.All(v => v.Video.Protocol.Value == "Off") ? "Audio" : "Video"; + return videoChannels.All(v => v.ChannelVideo.Protocol.Value == "Off") ? "Audio" : "ChannelVideo"; } return null; } - private int IteratedDebug(int data) - { - data = data++; - //Debug.Console(1, this, "Completed Step {0}", data ); - return data; - } /// - /// Call when directory results are updated + /// MediaChannelCalls when directory results are updated /// /// private void OnDirectoryResultReturned(CodecDirectory result) @@ -2333,7 +2302,7 @@ private static string GetXSigString(XSigToken[] tokenArray) public void CodecPollLayouts() { - EnqueueCommand("xStatus Video Layout CurrentLayouts"); + EnqueueCommand("xStatus ChannelVideo Layout CurrentLayouts"); } @@ -2424,7 +2393,7 @@ public void GetSchedule() /// public void GetBookings(object command) { - Debug.Console(1, this, "Retrieving Booking Info from Codec. Current Time: {0}", DateTime.Now.ToLocalTime()); + Debug.Console(1, this, "Retrieving BookingsListResultBooking Info from Codec. Current Time: {0}", DateTime.Now.ToLocalTime()); EnqueueCommand("xCommand Bookings List Days: 1 DayOffset: 0"); } @@ -2607,7 +2576,7 @@ public void Dial(string number, string protocol, string callRate, string callTyp public override void EndCall(CodecActiveCallItem activeCall) { - EnqueueCommand(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Disconnect CallId: {0}", activeCall.Id)); PresentationStates = eCodecPresentationStates.LocalOnly; } @@ -2615,31 +2584,31 @@ public override void EndAllCalls() { foreach (CodecActiveCallItem activeCall in ActiveCalls) { - EnqueueCommand(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Disconnect CallId: {0}", activeCall.Id)); } PresentationStates = eCodecPresentationStates.LocalOnly; } public override void AcceptCall(CodecActiveCallItem item) { - EnqueueCommand("xCommand Call Accept"); + EnqueueCommand("xCommand MediaChannelCalls Accept"); } public override void RejectCall(CodecActiveCallItem item) { - EnqueueCommand("xCommand Call Reject"); + EnqueueCommand("xCommand MediaChannelCalls Reject"); } #region IHasCallHold Members public void HoldCall(CodecActiveCallItem activeCall) { - EnqueueCommand(string.Format("xCommand Call Hold CallId: {0}", activeCall.Id)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Hold CallId: {0}", activeCall.Id)); } public void ResumeCall(CodecActiveCallItem activeCall) { - EnqueueCommand(string.Format("xCommand Call Resume CallId: {0}", activeCall.Id)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Resume CallId: {0}", activeCall.Id)); } /// @@ -2659,7 +2628,7 @@ public void ResumeAllCalls() public void JoinCall(CodecActiveCallItem activeCall) { - EnqueueCommand(string.Format("xCommand Call Join CallId: {0}", activeCall.Id)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Join CallId: {0}", activeCall.Id)); } public void JoinAllCalls() @@ -2676,7 +2645,7 @@ public void JoinAllCalls() if (ids.Length > 0) { - EnqueueCommand(string.Format("xCommand Call Join {0}", ids.ToString())); + EnqueueCommand(string.Format("xCommand MediaChannelCalls Join {0}", ids.ToString())); } } @@ -2688,7 +2657,7 @@ public void JoinAllCalls() /// public override void SendDtmf(string s) { - EnqueueCommand(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s)); } /// @@ -2698,7 +2667,7 @@ public override void SendDtmf(string s) /// public override void SendDtmf(string s, CodecActiveCallItem activeCall) { - EnqueueCommand(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", activeCall.Id, s)); + EnqueueCommand(string.Format("xCommand MediaChannelCalls DTMFSend CallId: {0} DTMFString: \"{1}\"", activeCall.Id, s)); } public void SelectPresentationSource(int source) @@ -2772,17 +2741,17 @@ public override void StopSharing() public override void PrivacyModeOn() { - EnqueueCommand("xCommand Audio Microphones Mute"); + EnqueueCommand("xCommand Audio MicrophoneList Mute"); } public override void PrivacyModeOff() { - EnqueueCommand("xCommand Audio Microphones Unmute"); + EnqueueCommand("xCommand Audio MicrophoneList Unmute"); } public override void PrivacyModeToggle() { - EnqueueCommand("xCommand Audio Microphones ToggleMute"); + EnqueueCommand("xCommand Audio MicrophoneList ToggleMute"); } public override void MuteOff() @@ -2897,8 +2866,8 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) const int mtg = 1; const int index = mtg - 1; Debug.Console(1, this, - "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeeting1.JoinNumber, index, _currentMeetings[index].Id, + "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].OrganizerId: {3}, Title: {4}", + mtg, joinMap.DialMeeting1.JoinNumber, index, _currentMeetings[index].OrganizerId, _currentMeetings[index].Title); if (_currentMeetings[index] != null) Dial(_currentMeetings[index]); @@ -2908,8 +2877,8 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) const int mtg = 2; const int index = mtg - 1; Debug.Console(1, this, - "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeeting2.JoinNumber, index, _currentMeetings[index].Id, + "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].OrganizerId: {3}, Title: {4}", + mtg, joinMap.DialMeeting2.JoinNumber, index, _currentMeetings[index].OrganizerId, _currentMeetings[index].Title); if (_currentMeetings[index] != null) Dial(_currentMeetings[index]); @@ -2919,8 +2888,8 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) const int mtg = 3; const int index = mtg - 1; Debug.Console(1, this, - "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeeting3.JoinNumber, index, _currentMeetings[index].Id, + "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].OrganizerId: {3}, Title: {4}", + mtg, joinMap.DialMeeting3.JoinNumber, index, _currentMeetings[index].OrganizerId, _currentMeetings[index].Title); if (_currentMeetings[index] != null) Dial(_currentMeetings[index]); @@ -2930,8 +2899,8 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) const int mtg = 4; const int index = mtg - 1; Debug.Console(1, this, - "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeeting4.JoinNumber, index, _currentMeetings[index].Id, + "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].OrganizerId: {3}, Title: {4}", + mtg, joinMap.DialMeeting4.JoinNumber, index, _currentMeetings[index].OrganizerId, _currentMeetings[index].Title); if (_currentMeetings[index] != null) Dial(_currentMeetings[index]); @@ -2942,8 +2911,8 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) const int mtg = 5; const int index = mtg - 1; Debug.Console(1, this, - "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].Id: {3}, Title: {4}", - mtg, joinMap.DialMeeting5.JoinNumber, index, _currentMeetings[index].Id, + "Meeting {0} Selected (EISC dig-o{1}) > _currentMeetings[{2}].OrganizerId: {3}, Title: {4}", + mtg, joinMap.DialMeeting5.JoinNumber, index, _currentMeetings[index].OrganizerId, _currentMeetings[index].Title); if (_currentMeetings[index] != null) Dial(_currentMeetings[index]); @@ -3078,7 +3047,7 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) trilist.SetUShortSigAction(joinMap.RingtoneVolume.JoinNumber, (u) => SetRingtoneVolume(u)); RingtoneVolumeFeedback.LinkInputSig(trilist.UShortInput[joinMap.RingtoneVolume.JoinNumber]); - // Presentation Source + // Presentation SourceValueProperty trilist.SetUShortSigAction(joinMap.PresentationSource.JoinNumber, (u) => SelectPresentationSource(u)); PresentationSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.PresentationSource.JoinNumber]); @@ -3123,7 +3092,7 @@ public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap) { if (_scheduleCheckTimer == null) _scheduleCheckTimer = new CTimer(ScheduleTimeCheck, null, 0, 15000); - if (args.ChangeType != eMeetingEventChangeType.Unknown) ; + if (args.ChangeType != eMeetingEventChangeType.Unknown) { UpdateMeetingsListEnhanced(this, trilist, joinMap); } @@ -3254,7 +3223,7 @@ public void Reboot() } /// - /// Sets SelfView Mode based on config + /// Sets SelfView H323Mode based on config /// private void SetSelfViewMode() { @@ -3304,19 +3273,19 @@ private void OnCurrentLayoutChanged(string currentLayout) /// - /// Turns on Selfview Mode + /// Turns on Selfview H323Mode /// public void SelfViewModeOn() { - EnqueueCommand("xCommand Video Selfview Set Mode: On"); + EnqueueCommand("xCommand ChannelVideo Selfview Set H323Mode: On"); } /// - /// Turns off Selfview Mode + /// Turns off Selfview H323Mode /// public void SelfViewModeOff() { - EnqueueCommand("xCommand Video Selfview Set Mode: Off"); + EnqueueCommand("xCommand ChannelVideo Selfview Set H323Mode: Off"); } /// @@ -3326,12 +3295,12 @@ public void SelfViewModeToggle() { string mode = string.Empty; - if (CodecStatus.Status.Video.Selfview.Mode.BoolValue) + if (CodecStatus.Status.Video.Selfview.SelfViewMode.BoolValue) mode = "Off"; else mode = "On"; - EnqueueCommand(string.Format("xCommand Video Selfview Set Mode: {0}", mode)); + EnqueueCommand(string.Format("xCommand ChannelVideo Selfview Set H323Mode: {0}", mode)); } /// @@ -3340,7 +3309,7 @@ public void SelfViewModeToggle() /// public void SelfviewPipPositionSet(CodecCommandWithLabel position) { - EnqueueCommand(string.Format("xCommand Video Selfview Set Mode: On PIPPosition: {0}", position.Command)); + EnqueueCommand(string.Format("xCommand ChannelVideo Selfview Set H323Mode: On PIPPosition: {0}", position.Command)); } /// @@ -3371,7 +3340,7 @@ public void LayoutSet(CodecCommandWithLabel layout) Debug.Console(0, this, "Unable to Recall Layout - Null CodecCommandWithLabel Object Sent"); return; } - EnqueueCommand(string.Format("xCommand Video Layout SetLayout LayoutName: \"{0}\"", layout.Command)); + EnqueueCommand(string.Format("xCommand ChannelVideo Layout SetLayout LayoutName: \"{0}\"", layout.Command)); if (!EnhancedLayouts) { OnCurrentLayoutChanged(layout.Label); @@ -3391,7 +3360,7 @@ public void LayoutSet(string layout) Debug.Console(1, this, "Unable to Recall Layout - Null string Sent"); return; } - EnqueueCommand(string.Format("xCommand Video Layout SetLayout LayoutName: \"{0}\"", layout)); + EnqueueCommand(string.Format("xCommand ChannelVideo Layout SetLayout LayoutName: \"{0}\"", layout)); if (!EnhancedLayouts) @@ -3448,7 +3417,7 @@ public void PresentationViewDefaultSet() { _currentPresentationView = "Default"; - EnqueueCommand(string.Format("xCommand Video PresentationView Set View: {0}", _currentPresentationView)); + EnqueueCommand(string.Format("xCommand ChannelVideo PresentationView Set View: {0}", _currentPresentationView)); PresentationViewFeedbackGroup.FireUpdate(); //PresentationViewMaximizedFeedback.FireUpdate(); } @@ -3457,7 +3426,7 @@ public void PresentationViewMinimizedzedSet() { _currentPresentationView = "Minimized"; - EnqueueCommand(string.Format("xCommand Video PresentationView Set View: {0}", _currentPresentationView)); + EnqueueCommand(string.Format("xCommand ChannelVideo PresentationView Set View: {0}", _currentPresentationView)); PresentationViewFeedbackGroup.FireUpdate(); } @@ -3466,7 +3435,7 @@ public void PresentationViewMaximizedSet() { _currentPresentationView = "Maximized"; - EnqueueCommand(string.Format("xCommand Video PresentationView Set View: {0}", _currentPresentationView)); + EnqueueCommand(string.Format("xCommand ChannelVideo PresentationView Set View: {0}", _currentPresentationView)); PresentationViewFeedbackGroup.FireUpdate(); } @@ -3477,7 +3446,7 @@ private void ComputeSelfviewPipStatus() { _currentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault( - p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PIPPosition.Value.ToLower())); + p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PipPosition.Value.ToLower())); if (_currentSelfviewPipPosition != null) SelfviewIsOnFeedback.FireUpdate(); @@ -3489,7 +3458,7 @@ private void ComputeSelfviewPipStatus() /// void ComputeLocalLayout() { - _currentLocalLayout = Layouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.Status.Video.Layout.LayoutFamily.Local.Value.ToLower())); + _currentLocalLayout = Layouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.PresenterTrackStatus.ChannelVideo.Layout.LayoutFamily.Local.Value.ToLower())); if (_currentLocalLayout != null) LocalLayoutFeedback.FireUpdate(); @@ -3522,7 +3491,7 @@ public void CameraAutoModeOn() { case eCameraTrackingCapabilities.None: { - Debug.Console(0, this, "Camera Auto Mode Unavailable"); + Debug.Console(0, this, "CameraList Auto H323Mode Unavailable"); break; } case eCameraTrackingCapabilities.PresenterTrack: @@ -3537,7 +3506,7 @@ public void CameraAutoModeOn() } case eCameraTrackingCapabilities.Both: { - if (_preferredTrackingMode == eCameraTrackingCapabilities.SpeakerTrack) + if (PreferredTrackingMode == eCameraTrackingCapabilities.SpeakerTrack) { SpeakerTrackOn(); break; @@ -3554,7 +3523,7 @@ public void CameraAutoModeOff() { case eCameraTrackingCapabilities.None: { - Debug.Console(0, this, "Camera Auto Mode Unavailable"); + Debug.Console(0, this, "CameraList Auto H323Mode Unavailable"); break; } case eCameraTrackingCapabilities.PresenterTrack: @@ -3569,7 +3538,7 @@ public void CameraAutoModeOff() } case eCameraTrackingCapabilities.Both: { - if (_preferredTrackingMode == eCameraTrackingCapabilities.SpeakerTrack) + if (PreferredTrackingMode == eCameraTrackingCapabilities.SpeakerTrack) { SpeakerTrackOff(); break; @@ -3618,7 +3587,7 @@ public void PresenterTrackOff() CameraMuteOff(); } - EnqueueCommand("xCommand Cameras PresenterTrack Set Mode: Off"); + EnqueueCommand("xCommand Cameras PresenterTrack Set H323Mode: Off"); } public void PresenterTrackFollow() @@ -3633,7 +3602,7 @@ public void PresenterTrackFollow() CameraMuteOff(); } - EnqueueCommand("xCommand Cameras PresenterTrack Set Mode: Follow"); + EnqueueCommand("xCommand Cameras PresenterTrack Set H323Mode: Follow"); } public void PresenterTrackBackground() @@ -3649,7 +3618,7 @@ public void PresenterTrackBackground() CameraMuteOff(); } - EnqueueCommand("xCommand Cameras PresenterTrack Set Mode: Background"); + EnqueueCommand("xCommand Cameras PresenterTrack Set H323Mode: Background"); } public void PresenterTrackPersistent() @@ -3664,7 +3633,7 @@ public void PresenterTrackPersistent() CameraMuteOff(); } - EnqueueCommand("xCommand Cameras PresenterTrack Set Mode: Persistent"); + EnqueueCommand("xCommand Cameras PresenterTrack Set H323Mode: Persistent"); } @@ -3678,7 +3647,7 @@ private void SetUpCameras(List cameraInfo) // Add the internal camera Cameras = new List(); - var camCount = CodecStatus.Status.Cameras.Camera.Count; + var camCount = CodecStatus.Status.Cameras.CameraList.Count; Debug.Console(0, this, "THERE ARE {0} CAMERAS", camCount); // Deal with the case of 1 or no reported cameras @@ -3689,10 +3658,10 @@ private void SetUpCameras(List cameraInfo) if (camCount > 0) { // Try to get the capabilities from the codec - if (CodecStatus.Status.Cameras.Camera[0] != null && - CodecStatus.Status.Cameras.Camera[0].Capabilities != null) + if (CodecStatus.Status.Cameras.CameraList[0] != null && + CodecStatus.Status.Cameras.CameraList[0].Capabilities != null) { - internalCamera.SetCapabilites(CodecStatus.Status.Cameras.Camera[0].Capabilities.Options.Value); + internalCamera.SetCapabilites(CodecStatus.Status.Cameras.CameraList[0].Capabilities.Options.Value); } } @@ -3705,38 +3674,38 @@ private void SetUpCameras(List cameraInfo) // Setup all the cameras for (int i = 0; i < camCount; i++) { - var cam = CodecStatus.Status.Cameras.Camera[i]; + var cam = CodecStatus.PresenterTrackStatus.Cameras.CameraList[i]; - var id = (uint) i; - var name = string.Format("Camera {0}", id); + var CiscoCallId = (uint) i; + var name = string.Format("CameraList {0}", CiscoCallId); // Check for a config object that matches the camera number var camInfo = cameraInfo.FirstOrDefault(c => c.CameraNumber == i + 1); if (camInfo != null) { - id = (uint) camInfo.SourceId; + CiscoCallId = (uint) camInfo.SourceId; name = camInfo.Name; } - var key = string.Format("{0}-camera{1}", Key, id); - var camera = new CiscoCamera(key, name, this, id); + var key = string.Format("{0}-camera{1}", Key, CiscoCallId); + var camera = new CiscoCamera(key, name, this, CiscoCallId); - if (cam.Capabilities != null) + if (cam.StatusCapabilities != null) { - camera.SetCapabilites(cam.Capabilities.Options.Value); + camera.SetCapabilites(cam.StatusCapabilities.Options.Value); } Cameras.Add(camera); } */ - foreach (var item in CodecStatus.Status.Cameras.Camera) + foreach (var item in CodecStatus.Status.Cameras.CameraList) { var cam = item; - var id = uint.Parse(item.id); + var id = uint.Parse(item.CameraId); var camId = id; var camInfo = cameraInfo.FirstOrDefault(c => c.CameraNumber == camId); - var name = string.Format("Camera {0}", camId); + var name = string.Format("CameraList {0}", camId); if (camInfo != null) { name = camInfo.Name; @@ -3750,7 +3719,7 @@ private void SetUpCameras(List cameraInfo) camera.SetCapabilites(cam.Capabilities.Options.Value); } - Debug.Console(0, this, "Adding Camera {0}", camera.CameraId); + Debug.Console(0, this, "Adding CameraList {0}", camera.CameraId); Cameras.Add(camera); } } @@ -3774,7 +3743,7 @@ private void SetUpCameras(List cameraInfo) FarEndRoomPresets.Add(new CodecRoomPreset(i, label, true, false)); } - Debug.Console(0, this, "Selected Camera has key {0} and name {1}", Cameras.First().Key, Cameras.First().Name); + Debug.Console(0, this, "Selected CameraList has key {0} and name {1}", Cameras.First().Key, Cameras.First().Name); SelectedCamera = Cameras.First(); SelectCamera(SelectedCamera.Key);// call the method to select the camera and ensure the feedbacks get updated. @@ -3818,7 +3787,7 @@ public void SelectCamera(string key) var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(key, StringComparison.OrdinalIgnoreCase) > -1); if (camera != null) { - Debug.Console(2, this, "Selected Camera with key: '{0}'", camera.Key); + Debug.Console(2, this, "Selected CameraList with key: '{0}'", camera.Key); SelectedCamera = camera; } else @@ -3827,7 +3796,7 @@ public void SelectCamera(string key) var ciscoCam = camera as CiscoCamera; if (ciscoCam != null) { - EnqueueCommand(string.Format("xCommand Video Input SetMainVideoSource SourceId: {0}", ciscoCam.CameraId)); + EnqueueCommand(string.Format("xCommand ChannelVideo Input SetMainVideoSource SourceId: {0}", ciscoCam.CameraId)); } } @@ -3865,7 +3834,7 @@ public void CodecRoomPresetStore(int preset, string description) public void SelectFarEndPreset(int preset) { EnqueueCommand( - string.Format("xCommand Call FarEndControl RoomPreset Activate CallId: {0} PresetId: {1}", + string.Format("xCommand MediaChannelCalls FarEndControl RoomPreset Activate CallId: {0} PresetId: {1}", GetCallId(), preset)); } @@ -3873,7 +3842,7 @@ public void SelectFarEndPreset(int preset) #region IHasExternalSourceSwitching Members /// - /// Wheather the Cisco supports External Source Lists or not + /// Wheather the Cisco supports External SourceValueProperty Lists or not /// public bool ExternalSourceListEnabled { get; private set; } @@ -3894,15 +3863,15 @@ public void SelectFarEndPreset(int preset) /// /*public void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type) { - int id = 2; + int CiscoCallId = 2; if (connectorId.ToLower() == "hdmiin3") { - id = 3; + CiscoCallId = 3; } EnqueueCommand( string.Format( - "xCommand UserInterface Presentation ExternalSource Add ConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: {3}", - id, key, name, type.ToString())); + "xCommand UserInterface Presentation ExternalSource Add DetectedConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: {3}", + CiscoCallId, key, name, type.ToString())); // SendText(string.Format("xCommand UserInterface Presentation ExternalSource State Set SourceIdentifier: \"{0}\" State: Ready", key)); Debug.Console(2, this, "Adding ExternalSource {0} {1}", connectorId, name); @@ -3918,7 +3887,7 @@ public void AddExternalSource(string connectorId, string key, string name, } EnqueueCommand( string.Format( - "xCommand UserInterface Presentation ExternalSource Add ConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: {3}", + "xCommand UserInterface Presentation ExternalSource Add DetectedConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: {3}", id, key, name, type.ToString())); // SendText(string.Format("xCommand UserInterface Presentation ExternalSource State Set SourceIdentifier: \"{0}\" State: Ready", key)); Debug.Console(2, this, "Adding ExternalSource {0} {1}", connectorId, name); @@ -3927,7 +3896,7 @@ public void AddExternalSource(string connectorId, string key, string name, /// - /// Sets the state of the External Source + /// Sets the state of the External SourceValueProperty /// /// /// @@ -3961,7 +3930,7 @@ public void SetSelectedSource(string key) } /// - /// Action that will run when the External Source is selected. + /// Action that will run when the External SourceValueProperty is selected. /// public Action RunRouteAction { private get; set; } @@ -3996,7 +3965,7 @@ public void CameraOff() /// public void CameraMuteOn() { - EnqueueCommand("xCommand Video Input MainVideo Mute"); + EnqueueCommand("xCommand ChannelVideo Input MainVideo Mute"); } /// @@ -4004,7 +3973,7 @@ public void CameraMuteOn() /// public void CameraMuteOff() { - EnqueueCommand("xCommand Video Input MainVideo Unmute"); + EnqueueCommand("xCommand ChannelVideo Input MainVideo Unmute"); } /// @@ -4024,12 +3993,12 @@ public void CameraMuteToggle() public void ActivateDoNotDisturbMode() { - EnqueueCommand("xCommand Conference DoNotDisturb Activate"); + EnqueueCommand("xCommand ExperimentalConference DoNotDisturb Activate"); } public void DeactivateDoNotDisturbMode() { - EnqueueCommand("xCommand Conference DoNotDisturb Deactivate"); + EnqueueCommand("xCommand ExperimentalConference DoNotDisturb Deactivate"); } public void ToggleDoNotDisturbMode() diff --git a/src/CodecSyncState.cs b/src/CodecSyncState.cs index e1bd744..74cb22c 100644 --- a/src/CodecSyncState.cs +++ b/src/CodecSyncState.cs @@ -71,28 +71,28 @@ public void AddCommandToQueue(string query) public void LoginMessageReceived() { LoginMessageWasReceived = true; - Debug.Console(1, this, "Login Message Received."); + Debug.Console(1, this, "Login DiagnosticsMessage Received."); CheckSyncStatus(); } public void JsonResponseModeMessageReceived() { JsonResponseModeSet = true; - Debug.Console(1, this, "Json Response Mode Message Received."); + Debug.Console(1, this, "Json Response H323Mode DiagnosticsMessage Received."); CheckSyncStatus(); } public void InitialStatusMessageReceived() { InitialStatusMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Status Message Received."); + Debug.Console(1, this, "Initial Codec PresenterTrackStatus DiagnosticsMessage Received."); CheckSyncStatus(); } public void InitialConfigurationMessageReceived() { InitialConfigurationMessageWasReceived = true; - Debug.Console(1, this, "Initial Codec Configuration Message Received."); + Debug.Console(1, this, "Initial Codec Configuration DiagnosticsMessage Received."); CheckSyncStatus(); } diff --git a/src/HttpApiServerExtended.cs b/src/HttpApiServerExtended.cs index 1412119..0fa3993 100644 --- a/src/HttpApiServerExtended.cs +++ b/src/HttpApiServerExtended.cs @@ -13,7 +13,7 @@ public class HttpApiServerExtended public static Dictionary ExtensionContentTypes; public event EventHandler ApiRequest; - public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; } + public HttpServer HttpServer { get; private set; } public string HtmlRoot { get; set; } @@ -47,20 +47,15 @@ public void Start(int port) { // TEMP - this should be inserted by configuring class - HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer(); - HttpServer.ServerName = "Cisco API Server"; - HttpServer.KeepAlive = true; - HttpServer.Port = port; + HttpServer = new HttpServer {ServerName = "Cisco API Servers", KeepAlive = true, Port = port}; HttpServer.OnHttpRequest += Server_Request; HttpServer.Open(); - CrestronEnvironment.ProgramStatusEventHandler += (a) => + CrestronEnvironment.ProgramStatusEventHandler += a => { - if (a == eProgramStatusEventType.Stopping) - { - HttpServer.Close(); - Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port); - } + if (a != eProgramStatusEventType.Stopping) return; + HttpServer.Close(); + Debug.Console(1, "Shutting down HTTP Servers on port {0}", HttpServer.Port); }; } @@ -74,31 +69,24 @@ void Server_Request(object sender, OnHttpRequestArgs args) return; } - string path = Uri.UnescapeDataString(args.Request.Path); + var path = Uri.UnescapeDataString(args.Request.Path); var host = args.Request.DataConnection.RemoteEndPointAddress; //string authToken; Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host); // ----------------------------------- ADD AUTH HERE - if (path.StartsWith("/cisco/api")) - { - var handler = ApiRequest; - if (ApiRequest != null) - ApiRequest(this, args); - } + if (!path.StartsWith("/cisco/api")) return; + var handler = ApiRequest; + if (handler != null) + handler(this, args); } public static string GetContentType(string extension) { - string type; - if (ExtensionContentTypes.ContainsKey(extension)) - type = ExtensionContentTypes[extension]; - else - type = "text/plain"; + var type = ExtensionContentTypes.ContainsKey(extension) ? ExtensionContentTypes[extension] : "text/plain"; return type; } - } } \ No newline at end of file diff --git a/src/epi-videoCodec-ciscoExtended.csproj b/src/epi-videoCodec-ciscoExtended.csproj index 21ebe44..e0cca59 100644 --- a/src/epi-videoCodec-ciscoExtended.csproj +++ b/src/epi-videoCodec-ciscoExtended.csproj @@ -118,7 +118,6 @@ - diff --git a/src/xConfiguration.cs b/src/xConfiguration.cs index f853bc1..2a7acc5 100644 --- a/src/xConfiguration.cs +++ b/src/xConfiguration.cs @@ -14,25 +14,42 @@ public class CiscoCodecConfiguration { public class DefaultVolume { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Dereverberation { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode + public class Mode : ValueProperty { - public string valueSpaceRef { get; set; } - public string Value { get; set; } + + string _value; + + /// + /// Sets Value and triggers the action when set + /// + public string Value + { + get + { + return _value; + } + set + { + _value = value; + OnValueChanged(); + } + } + } public class NoiseReduction { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -45,32 +62,29 @@ public class EchoControl public class Level { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Microphone { - public string id { get; set; } + [JsonProperty("id")] + public string MicrophoneId { get; set; } public EchoControl EchoControl { get; set; } public Level Level { get; set; } - public Mode2 Mode { get; set; } + public Mode Mode { get; set; } } public class Input { - public List Microphone { get; set; } + [JsonProperty("microphone")] + public List InputMicrophones { get; set; } } public class Enabled { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -84,15 +98,10 @@ public class Microphones public Mute Mute { get; set; } } - public class Mode3 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class InternalSpeaker { - public Mode3 Mode { get; set; } + public Mode Mode { get; set; } } public class Output @@ -102,15 +111,15 @@ public class Output public class RingTone { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class RingVolume : ValueProperty { - public string valueSpaceRef { get; set; } + - string _Value; + string _value; /// /// Sets Value and triggers the action when set @@ -119,11 +128,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -132,7 +141,7 @@ public int Volume { get { - return Int32.Parse(_Value); + return Int32.Parse(_value); } } } @@ -165,7 +174,7 @@ public Audio() public class DefaultMode { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -176,84 +185,55 @@ public class Backlight public class DefaultLevel { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode4 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Brightness { public DefaultLevel DefaultLevel { get; set; } - public Mode4 Mode { get; set; } + public Mode Mode { get; set; } } - public class Mode5 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Focus { - public Mode5 Mode { get; set; } + public Mode Mode { get; set; } } - public class Level2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Mode6 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Gamma { - public Level2 Level { get; set; } - public Mode6 Mode { get; set; } + public Level Level { get; set; } + public Mode Mode { get; set; } } public class Mirror { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Level3 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Mode7 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Whitebalance { - public Level3 Level { get; set; } - public Mode7 Mode { get; set; } + public Level Level { get; set; } + public Mode Mode { get; set; } } public class Framerate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Camera { - public string id { get; set; } + [JsonProperty("id")] + public string CameraIdString { get; set; } public Framerate Framerate { get; set; } public Backlight Backlight { get; set; } public Brightness Brightness { get; set; } @@ -265,32 +245,27 @@ public class Camera public class Closeup { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode8 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class SpeakerTrack { public Closeup Closeup { get; set; } - public Mode8 Mode { get; set; } + public Mode Mode { get; set; } } public class Cameras { - //[JsonConverter(typeof(CameraConverter)), JsonProperty("Camera")] - //public List Camera { get; set; } + //[JsonConverter(typeof(CameraConverter)), JsonProperty("CameraList")] + //public List CameraList { get; set; } //[JsonProperty("SpeakerTrack")] public SpeakerTrack SpeakerTrack { get; set; } public Cameras() { - //Camera = new List(); + //CameraList = new List(); SpeakerTrack = new SpeakerTrack(); } } @@ -319,11 +294,8 @@ public override object ReadJson(JsonReader reader, System.Type objectType, objec Debug.Console(1, "[xConfiguration]: Cameras converted as list"); return l; } - else - { - Debug.Console(1, "[xConfiguration]: Camera converted as single object and added to list"); - return new List { reader.Value as Camera }; - } + Debug.Console(1, "[xConfiguration]: CameraList converted as single object and added to list"); + return new List { reader.Value as Camera }; } catch (Exception e) { @@ -349,45 +321,41 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s public class Delay { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode9 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Mute2 + public class MuteString { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class AutoAnswer { public Delay Delay { get; set; } - public Mode9 Mode { get; set; } - public Mute2 Mute { get; set; } + public Mode Mode { get; set; } + [JsonProperty("mute")] + public MuteString MuteString { get; set; } public AutoAnswer() { - Mode = new Mode9(); + Mode = new Mode(); Delay = new Delay(); - Mute = new Mute2(); + MuteString = new MuteString(); } } public class Protocol { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Rate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -399,7 +367,7 @@ public class DefaultCall public class DefaultTimeout { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -408,61 +376,46 @@ public class DoNotDisturb public DefaultTimeout DefaultTimeout { get; set; } } - public class Mode10 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Encryption { - public Mode10 Mode { get; set; } + public Mode Mode { get; set; } } - public class Mode11 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class FarEndControl { - public Mode11 Mode { get; set; } + public Mode Mode { get; set; } } public class MaxReceiveCallRate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class MaxTotalReceiveCallRate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class MaxTotalTransmitCallRate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class MaxTransmitCallRate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode12 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class MultiStream { - public Mode12 Mode { get; set; } + public Mode Mode { get; set; } } public class Conference @@ -486,54 +439,43 @@ public Conference() public class LoginName { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode13 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Password - { - public string valueSpaceRef { get; set; } + { public string Value { get; set; } } public class Authentication { public LoginName LoginName { get; set; } - public Mode13 Mode { get; set; } + public Mode Mode { get; set; } public Password Password { get; set; } } - public class Mode14 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class CallSetup { - public Mode14 Mode { get; set; } + public Mode Mode { get; set; } } public class KeySize { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Encryption2 + public class H323Encryption { public KeySize KeySize { get; set; } } public class Address { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -544,106 +486,99 @@ public class Gatekeeper public class E164 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class ID + public class Id { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class H323Alias { public E164 E164 { get; set; } - public ID ID { get; set; } + [JsonProperty("id")] + public Id H323AliasId { get; set; } } - public class Address2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Mode15 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class NAT + public class Nat { - public Address2 Address { get; set; } - public Mode15 Mode { get; set; } + public Address Address { get; set; } + public Mode Mode { get; set; } } public class H323 { public Authentication Authentication { get; set; } public CallSetup CallSetup { get; set; } - public Encryption2 Encryption { get; set; } + [JsonProperty("encryption")] + public H323Encryption H323Encryption { get; set; } public Gatekeeper Gatekeeper { get; set; } public H323Alias H323Alias { get; set; } - public NAT NAT { get; set; } + public Nat Nat { get; set; } } public class Name - { - public string valueSpaceRef { get; set; } + { public string Value { get; set; } } public class Domain { public Name Name { get; set; } - } - - public class Address3 - { - public string valueSpaceRef { get; set; } public string Value { get; set; } + + public Domain() + { + Name = new Name(); + } } - public class Server + + public class ServerBase { - public string id { get; set; } - public Address3 Address { get; set; } + [JsonProperty("id")] + public string ServerId { get; set; } + public Address Address { get; set; } } - public class DNS + public class Dns { public Domain Domain { get; set; } - public List Server { get; set; } + public List Server { get; set; } } public class AnonymousIdentity { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Md5 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Peap { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Tls { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Ttls { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -657,187 +592,160 @@ public class Eap public class Identity { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode16 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Password2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class TlsVerify { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class UseClientCertificate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class IEEE8021X + public class Ieee8021X { public AnonymousIdentity AnonymousIdentity { get; set; } public Eap Eap { get; set; } public Identity Identity { get; set; } - public Mode16 Mode { get; set; } - public Password2 Password { get; set; } + public Mode Mode { get; set; } + public Password Password { get; set; } public TlsVerify TlsVerify { get; set; } public UseClientCertificate UseClientCertificate { get; set; } } - public class IPStack + public class IpStack { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Address4 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Assignment { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Gateway { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class SubnetMask { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } +// ReSharper disable once InconsistentNaming public class IPv4 { - public Address4 Address { get; set; } + public Address Address { get; set; } public Assignment Assignment { get; set; } public Gateway Gateway { get; set; } public SubnetMask SubnetMask { get; set; } public IPv4() { - Address = new Address4(); + Address = new Address(); } } - public class Address5 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Assignment2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class DHCPOptions + public class DhcpOptions { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Gateway2 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } +// ReSharper disable once InconsistentNaming public class IPv6 { - public Address5 Address { get; set; } - public Assignment2 Assignment { get; set; } - public DHCPOptions DHCPOptions { get; set; } - public Gateway2 Gateway { get; set; } + public Address Address { get; set; } + public Assignment Assignment { get; set; } + public DhcpOptions DhcpOptions { get; set; } + public Gateway Gateway { get; set; } } - public class MTU + public class Mtu { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Audio2 + public class AudioString { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Data { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class ICMPv6 + public class IcmPv6 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class NTP + public class Ntp { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Signalling { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Video { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Diffserv { - public Audio2 Audio { get; set; } + [JsonProperty("audio")] + public AudioString AudioString { get; set; } public Data Data { get; set; } - public ICMPv6 ICMPv6 { get; set; } - public NTP NTP { get; set; } + public IcmPv6 IcmPv6 { get; set; } + public Ntp Ntp { get; set; } public Signalling Signalling { get; set; } public Video Video { get; set; } } - public class Mode17 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class QoS { public Diffserv Diffserv { get; set; } - public Mode17 Mode { get; set; } + public Mode Mode { get; set; } } public class Allow { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -848,46 +756,45 @@ public class RemoteAccess public class Speed { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode18 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } + public class VlanId { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Voice { - public Mode18 Mode { get; set; } + public Mode Mode { get; set; } public VlanId VlanId { get; set; } } - public class VLAN + public class Vlan { public Voice Voice { get; set; } } public class Network { - public string id { get; set; } - public DNS DNS { get; set; } - public IEEE8021X IEEE8021X { get; set; } - public IPStack IPStack { get; set; } + [JsonProperty("id")] + public string NetworkIdString { get; set; } + public Dns Dns { get; set; } + public Ieee8021X Ieee8021X { get; set; } + public IpStack IpStack { get; set; } +// ReSharper disable once InconsistentNaming public IPv4 IPv4 { get; set; } +// ReSharper disable once InconsistentNaming public IPv6 IPv6 { get; set; } - public MTU MTU { get; set; } + public Mtu Mtu { get; set; } public QoS QoS { get; set; } public RemoteAccess RemoteAccess { get; set; } public Speed Speed { get; set; } - public VLAN VLAN { get; set; } + public Vlan Vlan { get; set; } public Network() { @@ -895,219 +802,172 @@ public Network() } } - public class Mode19 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class CDP - { - public Mode19 Mode { get; set; } - } - public class Mode20 + public class Cdp { - public string valueSpaceRef { get; set; } - public string Value { get; set; } + public Mode Mode { get; set; } } + + public class H3232 { - public Mode20 Mode { get; set; } + public Mode Mode { get; set; } } - public class Mode21 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class HTTP + + public class Http { - public Mode21 Mode { get; set; } + public Mode Mode { get; set; } } - public class MinimumTLSVersion + public class MinimumTlsVersion { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Server2 + public class TlsServer { - public MinimumTLSVersion MinimumTLSVersion { get; set; } + public MinimumTlsVersion MinimumTlsVersion { get; set; } } public class StrictTransportSecurity { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class VerifyClientCertificate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class VerifyServerCertificate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class HTTPS + public class Https { - public Server2 Server { get; set; } + public TlsServer Server { get; set; } public StrictTransportSecurity StrictTransportSecurity { get; set; } public VerifyClientCertificate VerifyClientCertificate { get; set; } public VerifyServerCertificate VerifyServerCertificate { get; set; } } - public class Mode22 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Address6 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Server3 - { - public string id { get; set; } - public Address6 Address { get; set; } - } - public class NTP2 + public class NtpService { - public Mode22 Mode { get; set; } - public List Server { get; set; } + public Mode Mode { get; set; } + public List Server { get; set; } } - public class Mode23 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class SIP + public class Sip { - public Mode23 Mode { get; set; } + public Mode Mode { get; set; } } public class CommunityName { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Address7 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Host { - public string id { get; set; } - public Address7 Address { get; set; } + [JsonProperty("id")] + public string HostIdString { get; set; } + public Address Address { get; set; } } - public class Mode24 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class SystemContact { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class SystemLocation { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class SNMP + public class Snmp { public CommunityName CommunityName { get; set; } - public List Host { get; set; } - public Mode24 Mode { get; set; } + [JsonProperty("host")] + public List Hosts { get; set; } + public Mode Mode { get; set; } public SystemContact SystemContact { get; set; } public SystemLocation SystemLocation { get; set; } } - public class Mode25 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class SSH + public class Ssh { - public Mode25 Mode { get; set; } + public Mode Mode { get; set; } } - public class Mode26 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class UPnP + public class UpnP { - public Mode26 Mode { get; set; } + public Mode Mode { get; set; } } public class WelcomeText { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class NetworkServices { - public CDP CDP { get; set; } - public H3232 H323 { get; set; } - public HTTP HTTP { get; set; } - public HTTPS HTTPS { get; set; } - public NTP2 NTP { get; set; } - public SIP SIP { get; set; } - public SNMP SNMP { get; set; } - public SSH SSH { get; set; } - public UPnP UPnP { get; set; } + public Cdp Cdp { get; set; } + [JsonProperty("h323")] + public H3232 H323Service { get; set; } + public Http Http { get; set; } + public Https Https { get; set; } + [JsonProperty("ntp")] + public NtpService NtpService { get; set; } + public Sip Sip { get; set; } + public Snmp Snmp { get; set; } + public Ssh Ssh { get; set; } + public UpnP UpnP { get; set; } public WelcomeText WelcomeText { get; set; } } - public class Cameras2 + public class ProfileCameras { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class ControlSystems { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class TouchPanels { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Profile { - public Cameras2 Cameras { get; set; } + [JsonProperty("cameras")] + public ProfileCameras ProfileCameras { get; set; } public ControlSystems ControlSystems { get; set; } public TouchPanels TouchPanels { get; set; } } @@ -1117,137 +977,109 @@ public class Peripherals public Profile Profile { get; set; } } - public class ID2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Type { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class URL + public class Url { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Server4 + public class PhonebookServer { - public string id { get; set; } - public ID2 ID { get; set; } + [JsonProperty("id")] + public string PhonebookServerId { get; set; } + [JsonProperty("id")] + public Id IdObject { get; set; } public Type Type { get; set; } - public URL URL { get; set; } + public Url Url { get; set; } } public class Phonebook { - public List Server { get; set; } + public List Server { get; set; } } public class Connectivity { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Address8 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class AlternateAddress { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Domain2 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Path { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Protocol2 { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class ExternalManager { - public Address8 Address { get; set; } + public Address Address { get; set; } public AlternateAddress AlternateAddress { get; set; } - public Domain2 Domain { get; set; } + public Domain Domain { get; set; } public Path Path { get; set; } - public Protocol2 Protocol { get; set; } + public Protocol Protocol { get; set; } } public class HttpMethod { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class LoginName2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Mode27 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Password3 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Provisioning { public Connectivity Connectivity { get; set; } public ExternalManager ExternalManager { get; set; } public HttpMethod HttpMethod { get; set; } - public LoginName2 LoginName { get; set; } - public Mode27 Mode { get; set; } - public Password3 Password { get; set; } + public LoginName LoginName { get; set; } + public Mode Mode { get; set; } + public Password Password { get; set; } } - public class Mode28 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class CallControl { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class FromClients { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class ToClients { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1265,19 +1097,19 @@ public class Services public class Proximity { - public Mode28 Mode { get; set; } + public Mode Mode { get; set; } public Services Services { get; set; } } public class PeopleCountOutOfCall { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class PeoplePresenceDetector { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1287,167 +1119,134 @@ public class RoomAnalytics public PeoplePresenceDetector PeoplePresenceDetector { get; set; } } - public class Password4 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class UserName { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Authentication2 + public class SipAuthentication { - public Password4 Password { get; set; } + public Password Password { get; set; } public UserName UserName { get; set; } } public class DefaultTransport { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class DisplayName { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class DefaultCandidate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode29 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Ice { public DefaultCandidate DefaultCandidate { get; set; } - public Mode29 Mode { get; set; } + public Mode Mode { get; set; } } public class ListenPort { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Address9 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Proxy { - public string id { get; set; } - public Address9 Address { get; set; } + [JsonProperty("id")] + public string ProxyId { get; set; } + public Address Address { get; set; } } - public class Password5 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Server5 + public class TurnServer { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class UserName2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class Turn { - public Password5 Password { get; set; } - public Server5 Server { get; set; } - public UserName2 UserName { get; set; } + public Password Password { get; set; } + public TurnServer Server { get; set; } + public UserName UserName { get; set; } } - public class URI + public class CiscoCodecUri { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class SIP2 + public class SipConfiguration { - public Authentication2 Authentication { get; set; } + [JsonProperty("authentication")] + public SipAuthentication SipAuthentication { get; set; } public DefaultTransport DefaultTransport { get; set; } public DisplayName DisplayName { get; set; } public Ice Ice { get; set; } public ListenPort ListenPort { get; set; } - public List Proxy { get; set; } + [JsonProperty("Proxy")] + public List Proxies { get; set; } public Turn Turn { get; set; } - public URI URI { get; set; } + public CiscoCodecUri Uri { get; set; } } public class BaudRate { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class LoginRequired { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode30 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class SerialPort { public BaudRate BaudRate { get; set; } public LoginRequired LoginRequired { get; set; } - public Mode30 Mode { get; set; } + public Mode Mode { get; set; } } public class BootAction { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Control { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - - public class Delay2 - { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class StandbyAction { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class WakeupAction { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1455,37 +1254,32 @@ public class Standby { public BootAction BootAction { get; set; } public Control Control { get; set; } - public Delay2 Delay { get; set; } + public Delay Delay { get; set; } public StandbyAction StandbyAction { get; set; } public WakeupAction WakeupAction { get; set; } } - public class Name2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class SystemUnit { - public Name2 Name { get; set; } + public Name Name { get; set; } } public class DateFormat { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class TimeFormat { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Zone { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1496,43 +1290,33 @@ public class Time public Zone Zone { get; set; } } - public class Type2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class ContactInfo { - public Type2 Type { get; set; } + public Type Type { get; set; } } - public class Mode31 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class KeyTones { - public Mode31 Mode { get; set; } + public Mode Mode { get; set; } } public class Language { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Output2 - { - public string valueSpaceRef { get; set; } + public class OsdOutput + { public string Value { get; set; } } - public class OSD + public class Osd { - public Output2 Output { get; set; } + [JsonProperty("output")] + public OsdOutput OsdOutput { get; set; } } public class UserInterface @@ -1540,18 +1324,18 @@ public class UserInterface public ContactInfo ContactInfo { get; set; } public KeyTones KeyTones { get; set; } public Language Language { get; set; } - public OSD OSD { get; set; } + public Osd Osd { get; set; } } public class Filter { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Group { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1563,197 +1347,169 @@ public class Admin public class Attribute { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class BaseDN + public class BaseDn { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Encryption3 + public class LdapEncryption { - public string valueSpaceRef { get; set; } + public string Value { get; set; } - } - public class MinimumTLSVersion2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } } - public class Mode32 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class Address10 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } + public class Port { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Server6 + public class LdapServer { - public Address10 Address { get; set; } + public Address Address { get; set; } public Port Port { get; set; } } - public class VerifyServerCertificate2 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class LDAP + public class Ldap { public Admin Admin { get; set; } public Attribute Attribute { get; set; } - public BaseDN BaseDN { get; set; } - public Encryption3 Encryption { get; set; } - public MinimumTLSVersion2 MinimumTLSVersion { get; set; } - public Mode32 Mode { get; set; } - public Server6 Server { get; set; } - public VerifyServerCertificate2 VerifyServerCertificate { get; set; } + public BaseDn BaseDn { get; set; } + [JsonProperty("encryption")] + public LdapEncryption LdapEncryption { get; set; } + [JsonProperty("minimumTlsVersion")] + public MinimumTlsVersion LdapMinimumTlsVersion { get; set; } + public Mode Mode { get; set; } + public LdapServer Server { get; set; } + public VerifyServerCertificate VerifyServerCertificate { get; set; } } public class UserManagement { - public LDAP LDAP { get; set; } + public Ldap Ldap { get; set; } } public class DefaultMainSource { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class CameraId { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode33 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class CameraControl { public CameraId CameraId { get; set; } - public Mode33 Mode { get; set; } + public Mode Mode { get; set; } } public class InputSourceType { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Name3 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class PreferredResolution { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class PresentationSelection { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Quality { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Visibility { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Connector { - public string id { get; set; } + [JsonProperty("id")] + public string ConnectorIdString { get; set; } public CameraControl CameraControl { get; set; } public InputSourceType InputSourceType { get; set; } - public Name3 Name { get; set; } + public Name Name { get; set; } public PreferredResolution PreferredResolution { get; set; } public PresentationSelection PresentationSelection { get; set; } public Quality Quality { get; set; } public Visibility Visibility { get; set; } } - public class Input2 + public class ConfigurationVideoInput { - public List Connector { get; set; } + [JsonProperty("connector")] + public List Connectors { get; set; } } public class Monitors { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode34 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } - public class CEC + public class Cec { - public Mode34 Mode { get; set; } + public Mode Mode { get; set; } } public class MonitorRole { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Resolution { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Connector2 + public class ConfigurationVideoOutputConnector { - public string id { get; set; } - public CEC CEC { get; set; } + [JsonProperty("id")] + public string IdString { get; set; } + public Cec Cec { get; set; } public MonitorRole MonitorRole { get; set; } public Resolution Resolution { get; set; } } - public class Output3 + public class ConfigurationVideoOutput { - public List Connector { get; set; } + [JsonProperty("connector")] + public List Connectors { get; set; } } public class DefaultSource { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } @@ -1764,52 +1520,42 @@ public class Presentation public class FullscreenMode { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode35 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class OnMonitorRole { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class PIPPosition + public class PipPosition { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } public class Default { public FullscreenMode FullscreenMode { get; set; } - public Mode35 Mode { get; set; } + public Mode Mode { get; set; } public OnMonitorRole OnMonitorRole { get; set; } - public PIPPosition PIPPosition { get; set; } + public PipPosition PipPosition { get; set; } } public class Duration { - public string valueSpaceRef { get; set; } + public string Value { get; set; } } - public class Mode36 - { - public string valueSpaceRef { get; set; } - public string Value { get; set; } - } public class OnCall { public Duration Duration { get; set; } - public Mode36 Mode { get; set; } + public Mode Mode { get; set; } } public class Selfview @@ -1818,12 +1564,14 @@ public class Selfview public OnCall OnCall { get; set; } } - public class Video2 + public class ConfigurationVideo { public DefaultMainSource DefaultMainSource { get; set; } - public Input2 Input { get; set; } + [JsonProperty("input")] + public ConfigurationVideoInput ConfigurationVideoInput { get; set; } public Monitors Monitors { get; set; } - public Output3 Output { get; set; } + [JsonProperty("output")] + public ConfigurationVideoOutput ConfigurationVideoOutput { get; set; } public Presentation Presentation { get; set; } public Selfview Selfview { get; set; } } @@ -1834,27 +1582,30 @@ public class Configuration public Cameras Cameras { get; set; } public Conference Conference { get; set; } public H323 H323 { get; set; } - public List Network { get; set; } + [JsonProperty("network")] + public List Networks { get; set; } public NetworkServices NetworkServices { get; set; } public Peripherals Peripherals { get; set; } public Phonebook Phonebook { get; set; } public Provisioning Provisioning { get; set; } public Proximity Proximity { get; set; } public RoomAnalytics RoomAnalytics { get; set; } - public SIP2 SIP { get; set; } + [JsonProperty("sip")] + public SipConfiguration SipConfiguration { get; set; } public SerialPort SerialPort { get; set; } public Standby Standby { get; set; } public SystemUnit SystemUnit { get; set; } public Time Time { get; set; } public UserInterface UserInterface { get; set; } public UserManagement UserManagement { get; set; } - public Video2 Video { get; set; } + [JsonProperty("video")] + public ConfigurationVideo ConfigurationVideo { get; set; } public Configuration() { Audio = new Audio(); Conference = new Conference(); - Network = new List(); + Networks = new List(); } } diff --git a/src/xEvent.cs b/src/xEvent.cs index d0a7848..9995af2 100644 --- a/src/xEvent.cs +++ b/src/xEvent.cs @@ -1,4 +1,6 @@ -namespace epi_videoCodec_ciscoExtended +using Newtonsoft.Json; + +namespace epi_videoCodec_ciscoExtended { /// /// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode @@ -7,108 +9,124 @@ public class CiscoCodecEvents { public class CauseValue { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CauseType { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CauseString { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class OrigCallDirection { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } - public class RemoteURI + public class RemoteUri { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class DisplayName { - public string id { get; set; } + public string Id { get; set; } public string Value { get; set; } } public class CallId { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CauseCode { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CauseOrigin { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class Protocol { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class Duration { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CallType { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CallRate { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class Encryption { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } - public class RequestedURI + public class RequestedUri { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class PeopleCountAverage { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class CallDisconnect { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public CauseValue CauseValue { get; set; } public CauseType CauseType { get; set; } public CauseString CauseString { get; set; } public OrigCallDirection OrigCallDirection { get; set; } - public RemoteURI RemoteURI { get; set; } + public RemoteUri RemoteUri { get; set; } public DisplayName DisplayName { get; set; } public CallId CallId { get; set; } public CauseCode CauseCode { get; set; } @@ -118,32 +136,37 @@ public class CallDisconnect public CallType CallType { get; set; } public CallRate CallRate { get; set; } public Encryption Encryption { get; set; } - public RequestedURI RequestedURI { get; set; } + public RequestedUri RequestedUri { get; set; } public PeopleCountAverage PeopleCountAverage { get; set; } } public class UserInterface { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public Presentation Presentation { get; set; } } public class Presentation { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public ExternalSource ExternalSource { get; set; } } public class ExternalSource { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public Selected Selected { get; set; } } public class Selected { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public SourceIdentifier SourceIdentifier { get; set; } } public class SourceIdentifier { - public string id { get; set; } + [JsonProperty("id")] + public string Id { get; set; } public string Value { get; set; } } public class Event diff --git a/src/xStatus.cs b/src/xStatus.cs index baaaa8f..49c8c7b 100644 --- a/src/xStatus.cs +++ b/src/xStatus.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -using System.Runtime.InteropServices; -using Crestron.SimplSharp.Ssh; +using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Devices.Common.VideoCodec; using PepperDash.Essentials.Core.Presets; @@ -42,14 +41,16 @@ public class EcReferenceDelay public class Microphone { - public string id { get; set; } + [JsonProperty("MicrophoneId")] + public string MicrophoneId { get; set; } public ConnectionStatus ConnectionStatus { get; set; } public EcReferenceDelay EcReferenceDelay { get; set; } } public class Connectors { - public List Microphone { get; set; } + [JsonProperty("microphone")] + public List MicrophoneList { get; set; } } public class Input @@ -82,10 +83,6 @@ public Microphones() } } - public class ConnectionStatus2 - { - public string Value { get; set; } - } public class DelayMs { @@ -94,24 +91,27 @@ public class DelayMs public class Line { - public string id { get; set; } - public ConnectionStatus2 ConnectionStatus { get; set; } + [JsonProperty("LineId")] + public string LineId { get; set; } + public ConnectionStatus ConnectionStatus { get; set; } public DelayMs DelayMs { get; set; } } - public class Connectors2 + public class OutputConnectors { - public List Line { get; set; } + [JsonProperty("line")] + public List Lines { get; set; } } public class Output { - public Connectors2 Connectors { get; set; } + [JsonProperty("connectors")] + public OutputConnectors OutputConnectors { get; set; } } public class Volume : ValueProperty { - string _Value; + string _value; /// /// Sets Value and triggers the action when set @@ -120,11 +120,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -134,12 +134,8 @@ public string Value /// public int IntValue { - get - { - if (!string.IsNullOrEmpty(_Value)) - return Convert.ToInt32(_Value); - else - return 0; + get { + return !string.IsNullOrEmpty(_value) ? Convert.ToInt32(_value) : 0; } } } @@ -215,7 +211,7 @@ public class Flip public string Value { get; set; } } - public class HardwareID + public class HardwareId { public string Value { get; set; } } @@ -252,7 +248,7 @@ public class Position public Zoom Zoom { get; set; } } - public class SoftwareID + public class SoftwareId { public string Value { get; set; } } @@ -261,7 +257,7 @@ public class DectectedConnector { public string Value { get; set; } - public int ConnectorId + public int DetectedConnectorId { get { @@ -269,26 +265,26 @@ public int ConnectorId { return Convert.ToUInt16(Value); } - else - return -1; + return -1; } } } public class Camera { - public string id { get; set; } + [JsonProperty("CameraId")] + public string CameraId { get; set; } public Capabilities Capabilities { get; set; } public Connected Connected { get; set; } public DectectedConnector DetectedConnector { get; set; } public Flip Flip { get; set; } - public HardwareID HardwareID { get; set; } + public HardwareId HardwareId { get; set; } public MacAddress MacAddress { get; set; } public Manufacturer Manufacturer { get; set; } public Model Model { get; set; } public Position Position { get; set; } public SerialNumber SerialNumber { get; set; } - public SoftwareID SoftwareID { get; set; } + public SoftwareId SoftwareId { get; set; } public Camera() { @@ -300,19 +296,19 @@ public Camera() public class Availability : ValueProperty { - string _Value; + string _value; public bool BoolValue { get; private set; } public string Value { get { - return _Value; + return _value; } set { // If the incoming value is "Available" it sets the BoolValue true, otherwise sets it false - _Value = value; + _value = value; BoolValue = value.ToLower() == "available"; OnValueChanged(); @@ -322,7 +318,7 @@ public string Value public class CallStatus : ValueProperty { - string _Value; + string _value; public bool BoolValue { get; private set; } @@ -330,12 +326,12 @@ public string Value { get { - return _Value; + return _value; } set { // If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false - _Value = value; + _value = value; BoolValue = value == "Connected"; OnValueChanged(); } @@ -344,7 +340,7 @@ public string Value public class SpeakerTrackStatus : ValueProperty { - string _Value; + string _value; public bool BoolValue { get; private set; } public string StringValue { get; private set; } @@ -355,12 +351,12 @@ public string Value { get { - return _Value; + return _value; } set { // If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false - _Value = value; + _value = value; BoolValue = value.ToLower() == "active"; StringValue = value; OnValueChanged(); @@ -369,18 +365,19 @@ public string Value public SpeakerTrackStatus() { - SpeakerTrackStatusValues = new List() { "active", "inactive" }; + SpeakerTrackStatusValues = new List { "active", "inactive" }; } } public class SpeakerTrack { public Availability Availability { get; set; } - public SpeakerTrackStatus Status { get; set; } + [JsonProperty("status")] + public SpeakerTrackStatus SpeakerTrackStatus { get; set; } public SpeakerTrack() { - Status = new SpeakerTrackStatus(); + SpeakerTrackStatus = new SpeakerTrackStatus(); Availability = new Availability(); } } @@ -388,11 +385,12 @@ public SpeakerTrack() public class PresenterTrack { public Availability Availability { get; set; } - public PresenterTrackStatus Status { get; set; } + [JsonProperty("status")] + public PresenterTrackStatus PresenterTrackStatus { get; set; } public PresenterTrack() { - Status = new PresenterTrackStatus(); + PresenterTrackStatus = new PresenterTrackStatus(); Availability = new Availability(); } @@ -400,7 +398,7 @@ public PresenterTrack() public class PresenterTrackStatus : ValueProperty { - string _Value; + string _value; public string StringValue { get; private set; } public bool BoolValue { get; private set; } public List PresenterTrackStatusValues { get; private set; } @@ -409,12 +407,12 @@ public string Value { get { - return _Value; + return _value; } set { // If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false - _Value = value; + _value = value; StringValue = value; BoolValue = value.ToLower() == "off"; OnValueChanged(); @@ -423,21 +421,20 @@ public string Value public PresenterTrackStatus() { - PresenterTrackStatusValues = new List(){"off", "follow", "diagnostic", "background", "setup", "persistent"}; + PresenterTrackStatusValues = new List {"off", "follow", "diagnostic", "background", "setup", "persistent"}; } } public class Cameras { - // [JsonConverter(typeof(CameraConverter))] - public List Camera { get; set; } + [JsonProperty("camera")] + public List CameraList { get; set; } public SpeakerTrack SpeakerTrack { get; set; } public PresenterTrack PresenterTrack { get; set; } - //public CameraTrackingCapability CameraCapability { get; set; } public Cameras() { - Camera = new List(); + CameraList = new List(); SpeakerTrack = new SpeakerTrack(); PresenterTrack = new PresenterTrack(); //CameraCapability = new CameraTrackingCapability(SpeakerTrack, PresenterTrack); @@ -451,10 +448,11 @@ public class CameraTrackingCapability : ValueProperty private readonly PresenterTrack _presenterTrack; - public CameraTrackingCapability(SpeakerTrack speakerTrack, PresenterTrack presenterTrack) + public CameraTrackingCapability(SpeakerTrack speakerTrack, PresenterTrack presenterTrack, eCameraTrackingCapabilities cameraTrackingCapabilities) { _speakerTrack = speakerTrack; _presenterTrack = presenterTrack; + CameraTrackingCapabilities = cameraTrackingCapabilities; } protected Func CameraTrackingFeedbackFunc @@ -492,7 +490,7 @@ protected Func CameraTrackingFeedbackFunc // public override bool CanConvert(System.Type objectType) // { - // return true; // objectType == typeof(Camera) || objectType == typeof(List); // This should not be called but is required for implmentation + // return true; // objectType == typeof(CameraList) || objectType == typeof(List); // This should not be called but is required for implmentation // } // public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) @@ -501,11 +499,11 @@ protected Func CameraTrackingFeedbackFunc // { // if (reader.TokenType == JsonToken.StartArray) // { - // var l = new List(); + // var l = new List(); // reader.Read(); // while (reader.TokenType != JsonToken.EndArray) // { - // l.Add(reader.Value as Camera); + // l.Add(reader.Value as CameraList); // reader.Read(); // } // Debug.Console(1, "[xStatus]: Cameras converted as list"); @@ -513,15 +511,15 @@ protected Func CameraTrackingFeedbackFunc // } // else // { - // Debug.Console(1, "[xStatus]: Camera converted as single object and added to list"); - // return new List { reader.Value as Camera }; + // Debug.Console(1, "[xStatus]: CameraList converted as single object and added to list"); + // return new List { reader.Value as CameraList }; // } // } // catch (Exception e) // { // Debug.Console(1, "[xStatus]: Unable to convert JSON for camera objects: {0}", e); - // return new List(); + // return new List(); // } // } @@ -568,7 +566,7 @@ public class Conference public MaxVideoCalls MaxVideoCalls { get; set; } } - public class Capabilities2 + public class StatusCapabilities { public Conference Conference { get; set; } } @@ -585,7 +583,7 @@ public class ActiveSpeaker public class DoNotDisturb : ValueProperty { - string _Value; + string _value; public bool BoolValue { get; private set; } @@ -593,11 +591,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; // If the incoming value is "On" it sets the BoolValue true, otherwise sets it false BoolValue = value == "On" || value == "Active"; OnValueChanged(); @@ -615,14 +613,10 @@ public class Multipoint public Mode Mode { get; set; } } - public class CallId2 - { - public string Value { get; set; } - } - public class Mode2 : ValueProperty + public class ModeValueProperty : ValueProperty { - string _Value; + string _value; public bool BoolValue { get; private set; } @@ -630,11 +624,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; // If the incoming value is "Sending" it sets the BoolValue true, otherwise sets it false BoolValue = value == "Sending"; OnValueChanged(); @@ -642,10 +636,6 @@ public string Value } } - public class Mode3 - { - public string Value { get; set; } - } public class ReleaseFloorAvailability { @@ -659,14 +649,15 @@ public class RequestFloorAvailability public class Whiteboard { - public Mode3 Mode { get; set; } + public Mode Mode { get; set; } public ReleaseFloorAvailability ReleaseFloorAvailability { get; set; } public RequestFloorAvailability RequestFloorAvailability { get; set; } } - public class Source2 : ValueProperty + + public class SourceValueProperty : ValueProperty { - string _Value; + string _value; /// /// Sets Value and triggers the action when set @@ -675,11 +666,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -689,19 +680,15 @@ public string Value /// public int IntValue { - get - { - if (!string.IsNullOrEmpty(_Value)) - return Convert.ToInt32(_Value); - else - return 0; + get { + return !string.IsNullOrEmpty(_value) ? Convert.ToInt32(_value) : 0; } } } public class SendingMode : ValueProperty { - string _Value; + string _value; /// /// Sets Value and triggers the action when set @@ -710,11 +697,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -723,11 +710,11 @@ public bool LocalOnly { get { - if (string.IsNullOrEmpty(_Value)) + if (string.IsNullOrEmpty(_value)) return false; - return _Value.ToLower() == "localonly"; + return _value.ToLower() == "localonly"; } } @@ -735,10 +722,10 @@ public bool LocalRemote { get { - if (string.IsNullOrEmpty(_Value)) + if (string.IsNullOrEmpty(_value)) return false; - return _Value.ToLower() == "localremote"; + return _value.ToLower() == "localremote"; } } @@ -746,59 +733,56 @@ public bool Off { get { - if (string.IsNullOrEmpty(_Value)) + if (string.IsNullOrEmpty(_value)) return false; - return _Value.ToLower() == "off"; + return _value.ToLower() == "off"; } } } public class LocalInstance { - public string id { get; set; } - public string ghost { get; set; } + [JsonProperty("MessageId")] + public string LocalInstanceId { get; set; } + + public string Ghost { get; set; } public SendingMode SendingMode { get; set; } - public Source2 Source { get; set; } + [JsonProperty("source")] + public SourceValueProperty SourceValueProperty { get; set; } public LocalInstance() { - Source = new Source2(); + SourceValueProperty = new SourceValueProperty(); SendingMode = new SendingMode(); } } public class Presentation { - public CallId2 CallId { get; set; } - public Mode2 Mode { get; set; } + public CallId CallId { get; set; } + [JsonProperty("mode")] + public ModeValueProperty ModeValueProperty { get; set; } public Whiteboard Whiteboard { get; set; } - public List LocalInstance { get; set; } + [JsonProperty("localInstance")] + public List PresentationLocalInstances { get; set; } public Presentation() { - Mode = new Mode2(); - LocalInstance = new List(); + ModeValueProperty = new ModeValueProperty(); + PresentationLocalInstances = new List(); } } - public class CallId3 - { - public string Value { get; set; } - } - public class Mode4 - { - public string Value { get; set; } - } public class SpeakerLock { - public CallId3 CallId { get; set; } - public Mode4 Mode { get; set; } + public CallId CallId { get; set; } + public Mode Mode { get; set; } } - public class Conference2 + public class StatusConference { public ActiveSpeaker ActiveSpeaker { get; set; } public DoNotDisturb DoNotDisturb { get; set; } @@ -806,17 +790,13 @@ public class Conference2 public Presentation Presentation { get; set; } public SpeakerLock SpeakerLock { get; set; } - public Conference2() + public StatusConference() { Presentation = new Presentation(); DoNotDisturb = new DoNotDisturb(); } } - public class Description - { - public string Value { get; set; } - } public class Level { @@ -828,14 +808,10 @@ public class References public string Value { get; set; } } - public class Type - { - public string Value { get; set; } - } - public class Message { - public string id { get; set; } + + public string MessageId { get; set; } public Description Description { get; set; } public Level Level { get; set; } public References References { get; set; } @@ -844,16 +820,18 @@ public class Message public class Diagnostics { - public List Message { get; set; } + [JsonProperty("DiagnosticsMessage")] + public List DiagnosticsMessage { get; set; } } - public class Conference3 + public class ExperimentalConference { } public class Experimental { - public Conference3 Conference { get; set; } + [JsonProperty("ExperimentalConference")] + public ExperimentalConference ExperimentalConference { get; set; } } public class Address @@ -866,49 +844,41 @@ public class Port public string Value { get; set; } } - public class Reason - { - public string Value { get; set; } - } - public class Status3 - { - public string Value { get; set; } - } public class Gatekeeper { public Address Address { get; set; } public Port Port { get; set; } public Reason Reason { get; set; } - public Status3 Status { get; set; } + public Status Status { get; set; } } - public class Reason2 + public class Reason { public string Value { get; set; } } - public class Status4 - { - public string Value { get; set; } - } - public class Mode5 + + public class H323Mode { - public Reason2 Reason { get; set; } - public Status4 Status { get; set; } + public Reason Reason { get; set; } + public Status Status { get; set; } } + public class H323 { public Gatekeeper Gatekeeper { get; set; } - public Mode5 Mode { get; set; } + [JsonProperty("mode")] + public H323Mode H323Mode { get; set; } } public class Expression { - public string id { get; set; } + [JsonProperty("ExpressionId")] + public string ExpressionId { get; set; } public string Value { get; set; } } @@ -917,53 +887,50 @@ public class Format public string Value { get; set; } } - public class URL + public class Url { public string Value { get; set; } } public class HttpFeedback { - public string id { get; set; } - public List Expression { get; set; } + [JsonProperty("HttpFeedbackId")] + public string HttpFeedbackId { get; set; } + [JsonProperty("expression")] + public List HttpFedbackExpressions { get; set; } public Format Format { get; set; } - public URL URL { get; set; } + public Url Url { get; set; } } public class MediaChannels { - public List Call { get; set; } + [JsonProperty("call")] + public List MediaChannelCalls { get; set; } } - public class Call2 + public class MediaChannelCall { - public List Channel { get; set; } - public string Id { get; set; } + [JsonProperty("channel")] + public List Channels { get; set; } + [JsonProperty("ExpressionId")] + public string MediaChannelCallId { get; set; } } public class Channel { - public Video2 Video; - public Type6 Type { get; set; } + [JsonProperty("video")] + public ChannelVideo ChannelVideo; + public Type Type { get; set; } } - public class Video2 + public class ChannelVideo { public Protocol Protocol; } - public class Type6 - { - public string Value; - } - - public class Address2 - { - public string Value { get; set; } - } - public class Capabilities3 + public class CapabilitiesString { public string Value { get; set; } } @@ -983,7 +950,7 @@ public class Platform public string Value { get; set; } } - public class PortID + public class PortId { public string Value { get; set; } } @@ -998,12 +965,12 @@ public class SysName public string Value { get; set; } } - public class SysObjectID + public class SysObjectId { public string Value { get; set; } } - public class VTPMgmtDomain + public class VtpMgmtDomain { public string Value { get; set; } } @@ -1023,25 +990,26 @@ public string Value } } - public class VoIPApplianceVlanID + public class VoIpApplianceVlanId { public string Value { get; set; } } - public class CDP + public class Cdp { - public Address2 Address { get; set; } - public Capabilities3 Capabilities { get; set; } + public Address Address { get; set; } + [JsonProperty("capabilities")] + public CapabilitiesString CapabilitiesString { get; set; } public DeviceId DeviceId { get; set; } public Duplex Duplex { get; set; } public Platform Platform { get; set; } - public PortID PortID { get; set; } + public PortId PortId { get; set; } public PrimaryMgmtAddress PrimaryMgmtAddress { get; set; } public SysName SysName { get; set; } - public SysObjectID SysObjectID { get; set; } - public VTPMgmtDomain VTPMgmtDomain { get; set; } + public SysObjectId SysObjectId { get; set; } + public VtpMgmtDomain VtpMgmtDomain { get; set; } public Version Version { get; set; } - public VoIPApplianceVlanID VoIPApplianceVlanID { get; set; } + public VoIpApplianceVlanId VoIpApplianceVlanId { get; set; } } public class Name @@ -1054,21 +1022,19 @@ public class Domain public Name Name { get; set; } } - public class Address3 - { - public string Value { get; set; } - } public class Server { - public string id { get; set; } - public Address3 Address { get; set; } + [JsonProperty("NetworkId")] + public string ServerId { get; set; } + public Address Address { get; set; } } - public class DNS + public class Dns { public Domain Domain { get; set; } - public List Server { get; set; } + [JsonProperty("servers")] + public List Servers { get; set; } } public class MacAddress @@ -1087,10 +1053,6 @@ public class Ethernet public Speed Speed { get; set; } } - public class Address4 - { - public string Value { get; set; } - } public class Gateway { @@ -1102,32 +1064,26 @@ public class SubnetMask public string Value { get; set; } } +// ReSharper disable once InconsistentNaming public class IPv4 { - public Address4 Address { get; set; } + public Address Address { get; set; } public Gateway Gateway { get; set; } public SubnetMask SubnetMask { get; set; } public IPv4() { - Address = new Address4(); + Address = new Address(); } } - public class Address5 - { - public string Value { get; set; } - } - - public class Gateway2 - { - public string Value { get; set; } - } +// ReSharper disable once InconsistentNaming public class IPv6 { - public Address5 Address { get; set; } - public Gateway2 Gateway { get; set; } + public Address Address { get; set; } + [JsonProperty("gateway")] + public Gateway GatewayIPv6 { get; set; } } public class VlanId @@ -1140,20 +1096,23 @@ public class Voice public VlanId VlanId { get; set; } } - public class VLAN + public class Vlan { public Voice Voice { get; set; } } public class Network { - public string id { get; set; } - public CDP CDP { get; set; } - public DNS DNS { get; set; } + [JsonProperty("NetworkId")] + public string NetworkId { get; set; } + public Cdp Cdp { get; set; } + public Dns Dns { get; set; } public Ethernet Ethernet { get; set; } +// ReSharper disable once InconsistentNaming public IPv4 IPv4 { get; set; } +// ReSharper disable once InconsistentNaming public IPv6 IPv6 { get; set; } - public VLAN VLAN { get; set; } + public Vlan Vlan { get; set; } public Network() { @@ -1166,32 +1125,20 @@ public class CurrentAddress public string Value { get; set; } } - public class Address6 - { - public string Value { get; set; } - } - public class Server2 - { - public string id { get; set; } - public Address6 Address { get; set; } - } - public class Status5 - { - public string Value { get; set; } - } - public class NTP + public class Ntp { public CurrentAddress CurrentAddress { get; set; } - public List Server { get; set; } - public Status5 Status { get; set; } + [JsonProperty("server")] + public List Servers { get; set; } + public Status Status { get; set; } } public class NetworkServices { - public NTP NTP { get; set; } + public Ntp Ntp { get; set; } } public class HardwareInfo @@ -1199,30 +1146,14 @@ public class HardwareInfo public string Value { get; set; } } - public class ID2 - { - public string Value { get; set; } - } - public class Name2 - { - public string Value { get; set; } - } public class SoftwareInfo { public string Value { get; set; } } - public class Status6 - { - public string Value { get; set; } - } - public class Type2 - { - public string Value { get; set; } - } public class UpgradeStatus { @@ -1231,19 +1162,27 @@ public class UpgradeStatus public class ConnectedDevice { - public string id { get; set; } + [JsonProperty("id")] + public string ConnectedDeviceIdString { get; set; } public HardwareInfo HardwareInfo { get; set; } - public ID2 ID { get; set; } - public Name2 Name { get; set; } + [JsonProperty("id")] + public Id ConnectedDeviceId { get; set; } + public Name Name { get; set; } public SoftwareInfo SoftwareInfo { get; set; } - public Status6 Status { get; set; } - public Type2 Type { get; set; } + public Status Status { get; set; } + public Type Type { get; set; } public UpgradeStatus UpgradeStatus { get; set; } } + public class StatusString + { + public string Value { get; set; } + } + public class Peripherals { - public List ConnectedDevice { get; set; } + [JsonProperty("connectedDevice")] + public List ConnectedDevices { get; set; } } public class Enabled @@ -1268,7 +1207,7 @@ public class ExtensionMobility public LoggedIn LoggedIn { get; set; } } - public class CUCM + public class Cucm { public ExtensionMobility ExtensionMobility { get; set; } } @@ -1278,20 +1217,16 @@ public class CompletedAt public string Value { get; set; } } - public class URL2 - { - public string Value { get; set; } - } public class VersionId { public string Value { get; set; } } - public class Current2 + public class SoftwareCurrent { public CompletedAt CompletedAt { get; set; } - public URL2 URL { get; set; } + public Url Url { get; set; } public VersionId VersionId { get; set; } } @@ -1300,7 +1235,7 @@ public class LastChange public string Value { get; set; } } - public class Message2 + public class UpgradeStatusMessage { public string Value { get; set; } } @@ -1315,48 +1250,36 @@ public class SessionId public string Value { get; set; } } - public class Status7 - { - public string Value { get; set; } - } - public class URL3 - { - public string Value { get; set; } - } - public class VersionId2 - { - public string Value { get; set; } - } - public class UpgradeStatus2 + public class UpgradeStatusExpanded { public LastChange LastChange { get; set; } - public Message2 Message { get; set; } + [JsonProperty("message")] + public UpgradeStatusMessage UpgradeStatusMessage { get; set; } public Phase Phase { get; set; } public SessionId SessionId { get; set; } - public Status7 Status { get; set; } - public URL3 URL { get; set; } - public VersionId2 VersionId { get; set; } + public Status Status { get; set; } + public Url Url { get; set; } + [JsonProperty("versionId")] + public VersionId UgpradeStatusVersionId { get; set; } } public class Software { - public Current2 Current { get; set; } - public UpgradeStatus2 UpgradeStatus { get; set; } + [JsonProperty("current")] + public SoftwareCurrent SoftwareCurrent { get; set; } + [JsonProperty("upgradeStatus")] + public UpgradeStatusExpanded SoftwareUpgradeStatus { get; set; } } - public class Status8 - { - public string Value { get; set; } - } public class Provisioning { - public CUCM CUCM { get; set; } + public Cucm Cucm { get; set; } public Software Software { get; set; } - public Status8 Status { get; set; } + public Status Status { get; set; } } public class Availability2 @@ -1366,7 +1289,12 @@ public class Availability2 public class Services { - public Availability2 Availability { get; set; } + public Availability Availability { get; set; } + + public Services() + { + Availability = new Availability(); + } } public class Proximity @@ -1374,9 +1302,9 @@ public class Proximity public Services Services { get; set; } } - public class Current3 : ValueProperty + public class CurrentPeopleCount : ValueProperty { - string _Value; + string _value; /// /// Sets Value and triggers the action when set @@ -1385,11 +1313,11 @@ public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -1399,23 +1327,20 @@ public string Value /// public int IntValue { - get - { - if (!string.IsNullOrEmpty(_Value)) - return Convert.ToInt32(_Value); - else - return 0; + get { + return !string.IsNullOrEmpty(_value) ? Convert.ToInt32(_value) : 0; } } } public class PeopleCount { - public Current3 Current { get; set; } + [JsonProperty("current")] + public CurrentPeopleCount CurrentPeopleCount { get; set; } public PeopleCount() { - Current = new Current3(); + CurrentPeopleCount = new CurrentPeopleCount(); } } @@ -1448,19 +1373,19 @@ public RoomAnalytics() public class Primary { - public URI URI { get; set; } + public CiscoUri Uri { get; set; } public Primary() { - URI = new URI(); + Uri = new CiscoUri(); } } - public class AlternateURI + public class AlternateUri { public Primary Primary { get; set; } - public AlternateURI() + public AlternateUri() { Primary = new Primary(); } @@ -1489,12 +1414,8 @@ public string Value } } - public class Mode6 - { - public string Value { get; set; } - } - public class URI + public class CiscoUri { public string Value { get; set; } } @@ -1502,8 +1423,8 @@ public class URI public class CallForward { public DisplayName DisplayName { get; set; } - public Mode6 Mode { get; set; } - public URI URI { get; set; } + public Mode Mode { get; set; } + public CiscoUri Uri { get; set; } } public class MessagesWaiting @@ -1511,59 +1432,37 @@ public class MessagesWaiting public string Value { get; set; } } - public class URI2 - { - public string Value { get; set; } - } public class Mailbox { public MessagesWaiting MessagesWaiting { get; set; } - public URI2 URI { get; set; } + public CiscoUri Uri { get; set; } } - public class Address7 - { - public string Value { get; set; } - } - public class Status9 - { - public string Value { get; set; } - } public class Proxy { - public string id { get; set; } - public Address7 Address { get; set; } - public Status9 Status { get; set; } + [JsonProperty("id")] + public string ProxyId { get; set; } + public Address Address { get; set; } + public Status Status { get; set; } } - public class Reason3 - { - public string Value { get; set; } - } - public class Status10 - { - public string Value { get; set; } - } - public class URI3 - { - public string Value { get; set; } - } public class Registration { - public string id { get; set; } - public Reason3 Reason { get; set; } - public Status10 Status { get; set; } - public URI3 URI { get; set; } + [JsonProperty("id")] + public string StringId { get; set; } + public Reason Reason { get; set; } + public Status Status { get; set; } + public CiscoUri Uri { get; set; } public Registration() { - URI = new URI3(); + Uri = new CiscoUri(); } } @@ -1577,32 +1476,30 @@ public class Verified public string Value { get; set; } } - public class SIP + public class Sip { - public AlternateURI AlternateURI { get; set; } + public AlternateUri AlternateUri { get; set; } public Authentication Authentication { get; set; } public CallForward CallForward { get; set; } public Mailbox Mailbox { get; set; } - public List Proxy { get; set; } - public List Registration { get; set; } + [JsonProperty("proxy")] + public List Proxies { get; set; } + [JsonProperty("registration")] + public List Registrations { get; set; } public Secure Secure { get; set; } public Verified Verified { get; set; } - public SIP() + public Sip() { - AlternateURI = new AlternateURI(); - Registration = new List(); + AlternateUri = new AlternateUri(); + Registrations = new List(); } } - public class Mode7 - { - public string Value { get; set; } - } - public class FIPS + public class Fips { - public Mode7 Mode { get; set; } + public Mode Mode { get; set; } } public class CallHistory @@ -1615,7 +1512,7 @@ public class Configurations public string Value { get; set; } } - public class DHCP + public class Dhcp { public string Value { get; set; } } @@ -1634,14 +1531,14 @@ public class Persistency { public CallHistory CallHistory { get; set; } public Configurations Configurations { get; set; } - public DHCP DHCP { get; set; } + public Dhcp Dhcp { get; set; } public InternalLogging InternalLogging { get; set; } public LocalPhonebook LocalPhonebook { get; set; } } public class Security { - public FIPS FIPS { get; set; } + public Fips Fips { get; set; } public Persistency Persistency { get; set; } } @@ -1731,10 +1628,6 @@ public class DisplayName2 public string Value { get; set; } } - public class Name3 - { - public string Value { get; set; } - } public class Encryption { @@ -1776,15 +1669,15 @@ public class ReleaseDate } - public class Software2 + public class SystemUnitSoftware { public DisplayName DisplayName { get; set; } - public Name3 Name { get; set; } + public Name Name { get; set; } public OptionKeys OptionKeys { get; set; } public ReleaseDate ReleaseDate { get; set; } public Version Version { get; set; } - public Software2() + public SystemUnitSoftware() { OptionKeys = new OptionKeys(); Version = new Version(); @@ -1825,13 +1718,15 @@ public class SystemUnit public ProductId ProductId { get; set; } public ProductPlatform ProductPlatform { get; set; } public ProductType ProductType { get; set; } - public Software2 Software { get; set; } - public State2 State { get; set; } + [JsonProperty("software")] + public SystemUnitSoftware SystemUnitSoftware { get; set; } + [JsonProperty("state")] + public State2 SystemUnitState { get; set; } public Uptime Uptime { get; set; } public SystemUnit() { - Software = new Software2(); + SystemUnitSoftware = new SystemUnitSoftware(); Hardware = new Hardware(); } } @@ -1853,19 +1748,16 @@ public class Number public class ContactMethod { - public string id { get; set; } + [JsonProperty("id")] + public string ContactMethodId { get; set; } public Number Number { get; set; } } - public class Name4 - { - public string Value { get; set; } - } - public class ContactInfo { - public List ContactMethod { get; set; } - public Name4 Name { get; set; } + [JsonProperty("contactMethod")] + public List ContactMethods { get; set; } + public Name Name { get; set; } } public class UserInterface @@ -1873,20 +1765,12 @@ public class UserInterface public ContactInfo ContactInfo { get; set; } } - public class PIPPosition - { - public string Value { get; set; } - } - public class ActiveSpeaker2 + public class ActiveSpeakerPip { - public PIPPosition PIPPosition { get; set; } + public PipPosition PipPosition { get; set; } } - public class Connected2 - { - public string Value { get; set; } - } public class SignalState { @@ -1898,18 +1782,24 @@ public class SourceId public string Value { get; set; } } - public class Type3 + +#region Type + public class Type { public string Value { get; set; } } +#endregion + + public class Connector { - public string id { get; set; } - public Connected2 Connected { get; set; } + [JsonProperty("id")] + public string ConnectorIdString { get; set; } + public Connected Connected { get; set; } public SignalState SignalState { get; set; } public SourceId SourceId { get; set; } - public Type3 Type { get; set; } + public Type Type { get; set; } } public class MainVideoSource @@ -1977,7 +1867,8 @@ public class Resolution public class Source { - public string id { get; set; } + [JsonProperty("id")] + public string SourceIdString { get; set; } public ConnectorId ConnectorId { get; set; } public FormatStatus FormatStatus { get; set; } public FormatType FormatType { get; set; } @@ -1985,14 +1876,16 @@ public class Source public Resolution Resolution { get; set; } } - public class Input2 + public class VideoInput { - public List Connector { get; set; } + [JsonProperty("connector")] + public List InputConnectors { get; set; } public MainVideoSource MainVideoSource { get; set; } public MainVideoMute MainVideoMute { get; set; } - public List Source { get; set; } + [JsonProperty("source")] + public List InputSources { get; set; } - public Input2() + public VideoInput() { MainVideoMute = new MainVideoMute(); } @@ -2000,17 +1893,17 @@ public Input2() public class Local : ValueProperty { - string _Value; + string _value; public string Value // Valid values are On/Off { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -2049,19 +1942,15 @@ public class Connected3 public string Value { get; set; } } - public class Name5 - { - public string Value { get; set; } - } public class PreferredFormat { public string Value { get; set; } } - public class ConnectedDevice2 + public class VideoOutputConnectedDevice { - public Name5 Name { get; set; } + public Name Name { get; set; } public PreferredFormat PreferredFormat { get; set; } } @@ -2087,39 +1976,33 @@ public class Width2 public class Resolution2 { - public Height2 Height { get; set; } - public RefreshRate2 RefreshRate { get; set; } - public Width2 Width { get; set; } + public Height Height { get; set; } + public RefreshRate RefreshRate { get; set; } + public Width Width { get; set; } } - public class Type4 - { - public string Value { get; set; } - } - public class Connector2 + public class VideoOutputConnector { - public string id { get; set; } - public Connected3 Connected { get; set; } - public ConnectedDevice2 ConnectedDevice { get; set; } + [JsonProperty("id")] + public string VideoOutputConnectorId { get; set; } + public Connected Connected { get; set; } + [JsonProperty("connectedDevice")] + public VideoOutputConnectedDevice VideoOutputConnectedDevice { get; set; } public MonitorRole MonitorRole { get; set; } - public Resolution2 Resolution { get; set; } - public Type4 Type { get; set; } - } - - public class Output2 - { - public List Connector { get; set; } + public Resolution Resolution { get; set; } + public Type Type { get; set; } } - public class PIPPosition2 + public class VideoOutput { - public string Value { get; set; } + [JsonProperty("connector")] + public List VideoOutputConnectors { get; set; } } - public class Presentation2 + public class PresentationPip { - public PIPPosition2 PIPPosition { get; set; } + public PipPosition PipPosition { get; set; } } public class FullscreenMode @@ -2127,7 +2010,7 @@ public class FullscreenMode public string Value { get; set; } } - public class Mode8 : ValueProperty + public class SelfViewMode : ValueProperty { public bool BoolValue { get; private set; } @@ -2148,19 +2031,19 @@ public class OnMonitorRole public string Value { get; set; } } - public class PIPPosition3 : ValueProperty + public class PipPosition : ValueProperty { - string _Value; + string _value; public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -2169,32 +2052,37 @@ public string Value public class Selfview { public FullscreenMode FullscreenMode { get; set; } - public Mode8 Mode { get; set; } + [JsonProperty("mode")] + public SelfViewMode SelfViewMode { get; set; } public OnMonitorRole OnMonitorRole { get; set; } - public PIPPosition3 PIPPosition { get; set; } + public PipPosition PipPosition { get; set; } public Selfview() { - Mode = new Mode8(); - PIPPosition = new PIPPosition3(); + SelfViewMode = new SelfViewMode(); + PipPosition = new PipPosition(); } } public class Video { - public ActiveSpeaker2 ActiveSpeaker { get; set; } - public Input2 Input { get; set; } + [JsonProperty("activeSpeaker")] + public ActiveSpeakerPip ActiveSpeakerPip { get; set; } + [JsonProperty("input")] + public VideoInput VideoInput { get; set; } public Layout Layout { get; set; } public Monitors Monitors { get; set; } - public Output2 Output { get; set; } - public Presentation2 Presentation { get; set; } + [JsonProperty("output")] + public VideoOutput VideoOutput { get; set; } + [JsonProperty("presentation")] + public PresentationPip PresentationPip { get; set; } public Selfview Selfview { get; set; } public Video() { Selfview = new Selfview(); Layout = new Layout(); - Input = new Input2(); + VideoInput = new VideoInput(); } } @@ -2225,17 +2113,17 @@ public class Direction public class Duration : ValueProperty { - private string _Value; + private string _value; public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -2244,7 +2132,7 @@ public TimeSpan DurationValue { get { - return new TimeSpan(0, 0, Int32.Parse(_Value)); + return new TimeSpan(0, 0, Int32.Parse(_value)); } } } @@ -2296,7 +2184,8 @@ public class TransmitCallRate public class Call { - public string id { get; set; } + [JsonProperty("id")] + public string CallIdString { get; set; } public AnswerState AnswerState { get; set; } public CallType CallType { get; set; } public CallbackNumber CallbackNumber { get; set; } @@ -2306,41 +2195,39 @@ public class Call public Duration Duration { get; set; } public Encryption Encryption { get; set; } public FacilityServiceId FacilityServiceId { get; set; } - public string ghost { get; set; } + [JsonProperty("ghost")] + public string GhostString { get; set; } public HoldReason HoldReason { get; set; } public PlacedOnHold PlacedOnHold { get; set; } public Protocol Protocol { get; set; } public ReceiveCallRate ReceiveCallRate { get; set; } public RemoteNumber RemoteNumber { get; set; } - public CallStatus Status { get; set; } + [JsonProperty("status")] + public CallStatus CallStatus { get; set; } public TransmitCallRate TransmitCallRate { get; set; } public Call() { CallType = new CallType(); - Status = new CallStatus(); + CallStatus = new CallStatus(); Duration = new Duration(); } } - public class Type5 - { - public string Value { get; set; } - } - public class Description2 : ValueProperty + public class Description : ValueProperty { - string _Value; + string _value; public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -2364,7 +2251,7 @@ public string Value // Valid values are True/False /* public class RoomPreset { - public string id { get; set; } + public string CiscoCallId { get; set; } public Defined Defined { get; set; } public Description2 Description { get; set; } public Type5 Type { get; set; } @@ -2384,25 +2271,30 @@ public class Status { public Audio Audio { get; set; } public Bookings Bookings { get; set; } - public List Call { get; set; } + [JsonProperty("call")] + public List Calls { get; set; } public Cameras Cameras { get; set; } - public Capabilities2 Capabilities { get; set; } - public Conference2 Conference { get; set; } + [JsonProperty("capabilities")] + public StatusCapabilities StatusCapabilities { get; set; } + [JsonProperty("conference")] + public StatusConference StatusConference { get; set; } public Diagnostics Diagnostics { get; set; } public Experimental Experimental { get; set; } public H323 H323 { get; set; } - public List HttpFeedback { get; set; } + [JsonProperty("httpFeedback")] + public List HttpFeedbacks { get; set; } public MediaChannels MediaChannels { get; set; } - public List Network { get; set; } + [JsonProperty("network")] + public List Networks { get; set; } public NetworkServices NetworkServices { get; set; } public Peripherals Peripherals { get; set; } public Provisioning Provisioning { get; set; } public Proximity Proximity { get; set; } public RoomAnalytics RoomAnalytics { get; set; } + [JsonProperty("roomPreset")] + public List RoomPresets { get; set; } - public List RoomPreset { get; set; } - - public SIP SIP { get; set; } + public Sip Sip { get; set; } public Security Security { get; set; } public Standby Standby { get; set; } public SystemUnit SystemUnit { get; set; } @@ -2413,47 +2305,47 @@ public class Status public Status() { Audio = new Audio(); - Call = new List(); + Calls = new List(); Standby = new Standby(); Cameras = new Cameras(); RoomAnalytics = new RoomAnalytics(); - RoomPreset = new List(); - Conference = new Conference2(); + RoomPresets = new List(); + StatusConference = new StatusConference(); SystemUnit = new SystemUnit(); Video = new Video(); - Conference = new Conference2(); - Network = new List(); - SIP = new SIP(); + Networks = new List(); + Sip = new Sip(); } } public class RoomPreset : ConvertiblePreset { - public string id { get; set; } + [JsonProperty("id")] + public string RoomPresetId { get; set; } public Defined Defined { get; set; } - public Description2 Description { get; set; } - public Type5 Type { get; set; } + public Description Description { get; set; } + public Type Type { get; set; } public RoomPreset() { Defined = new Defined(); - Description = new Description2(); - Type = new Type5(); + Description = new Description(); + Type = new Type(); } public override PresetBase ConvertCodecPreset() { try { - var preset = new CodecRoomPreset(UInt16.Parse(id), Description.Value, Defined.BoolValue, true); + var preset = new CodecRoomPreset(UInt16.Parse(RoomPresetId), Description.Value, Defined.BoolValue, true); - Debug.Console(2, "Preset ID {0} Converted from Cisco Codec Preset to Essentials Preset", id); + Debug.Console(2, "Preset ID {0} Converted from Cisco Codec Preset to Essentials Preset", RoomPresetId); return preset; } catch (Exception e) { - Debug.Console(2, "Unable to convert preset: {0}. Error: {1}", id, e); + Debug.Console(2, "Unable to convert preset: {0}. Error: {1}", RoomPresetId, e); return null; } } @@ -2494,15 +2386,15 @@ public CurrentLayouts() public class AvailableLayoutsCount : ValueProperty { - private int _Value; + private int _value; public int Value { - get { return _Value; } + get { return _value; } set { //Debug.Console(0, "**************VALPROPERTY SET**********"); - _Value = value; + _value = value; OnValueChanged(); } } @@ -2510,17 +2402,17 @@ public int Value public class ActiveLayout : ValueProperty { - string _Value; + string _value; public string Value { get { - return _Value; + return _value; } set { - _Value = value; + _value = value; OnValueChanged(); } } @@ -2530,7 +2422,8 @@ public string Value public class LayoutData { - public string id { get; set; } + [JsonProperty("LocalInstanceId")] + public string StringId { get; set; } public LayoutName LayoutName { get; set; } } diff --git a/src/xStatusSparkPlus.cs b/src/xStatusSparkPlus.cs deleted file mode 100644 index bbd3027..0000000 --- a/src/xStatusSparkPlus.cs +++ /dev/null @@ -1,1576 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace epi_videoCodec_ciscoExtended -{ - public class xStatusSparkPlus - { - public class ConnectionStatus - { - public string Value { get; set; } - } - - public class EcReferenceDelay - { - public string Value { get; set; } - } - - public class Microphone - { - public string id { get; set; } - public ConnectionStatus ConnectionStatus { get; set; } - public EcReferenceDelay EcReferenceDelay { get; set; } - } - - public class Connectors - { - public List Microphone { get; set; } - } - - public class Input - { - public Connectors Connectors { get; set; } - } - - public class Mute - { - public string Value { get; set; } - } - - public class Microphones - { - public Mute Mute { get; set; } - } - - public class ConnectionStatus2 - { - public string Value { get; set; } - } - - public class DelayMs - { - public string Value { get; set; } - } - - public class Line - { - public string id { get; set; } - public ConnectionStatus2 ConnectionStatus { get; set; } - public DelayMs DelayMs { get; set; } - } - - public class Connectors2 - { - public List Line { get; set; } - } - - public class Output - { - public Connectors2 Connectors { get; set; } - } - - public class Volume - { - public string Value { get; set; } - } - - public class VolumeMute - { - public string Value { get; set; } - } - - public class Audio - { - public Input Input { get; set; } - public Microphones Microphones { get; set; } - public Output Output { get; set; } - public Volume Volume { get; set; } - public VolumeMute VolumeMute { get; set; } - } - - public class Id - { - public string Value { get; set; } - } - - public class Current - { - public Id Id { get; set; } - } - - public class Bookings - { - public Current Current { get; set; } - } - - public class Options - { - public string Value { get; set; } - } - - public class Capabilities - { - public Options Options { get; set; } - } - - public class Connected - { - public string Value { get; set; } - } - - public class Flip - { - public string Value { get; set; } - } - - public class HardwareID - { - public string Value { get; set; } - } - - public class MacAddress - { - public string Value { get; set; } - } - - public class Manufacturer - { - public string Value { get; set; } - } - - public class Model - { - public string Value { get; set; } - } - - public class Pan - { - public string Value { get; set; } - } - - public class Tilt - { - public string Value { get; set; } - } - - public class Zoom - { - public string Value { get; set; } - } - - public class Position - { - public Pan Pan { get; set; } - public Tilt Tilt { get; set; } - public Zoom Zoom { get; set; } - } - - public class SerialNumber - { - public string Value { get; set; } - } - - public class SoftwareID - { - public string Value { get; set; } - } - - public class Camera - { - public string id { get; set; } - public Capabilities Capabilities { get; set; } - public Connected Connected { get; set; } - public Flip Flip { get; set; } - public HardwareID HardwareID { get; set; } - public MacAddress MacAddress { get; set; } - public Manufacturer Manufacturer { get; set; } - public Model Model { get; set; } - public Position Position { get; set; } - public SerialNumber SerialNumber { get; set; } - public SoftwareID SoftwareID { get; set; } - } - - public class Availability - { - public string Value { get; set; } - } - - public class Status2 - { - public string Value { get; set; } - } - - public class SpeakerTrack - { - public Availability Availability { get; set; } - public Status2 Status { get; set; } - } - - public class Cameras - { - public List Camera { get; set; } - public SpeakerTrack SpeakerTrack { get; set; } - } - - public class MaxActiveCalls - { - public string Value { get; set; } - } - - public class MaxAudioCalls - { - public string Value { get; set; } - } - - public class MaxCalls - { - public string Value { get; set; } - } - - public class MaxVideoCalls - { - public string Value { get; set; } - } - - public class Conference - { - public MaxActiveCalls MaxActiveCalls { get; set; } - public MaxAudioCalls MaxAudioCalls { get; set; } - public MaxCalls MaxCalls { get; set; } - public MaxVideoCalls MaxVideoCalls { get; set; } - } - - public class Capabilities2 - { - public Conference Conference { get; set; } - } - - public class CallId - { - public string Value { get; set; } - } - - public class ActiveSpeaker - { - public CallId CallId { get; set; } - } - - public class DoNotDisturb - { - public string Value { get; set; } - } - - public class Mode - { - public string Value { get; set; } - } - - public class Line2 - { - public string id { get; set; } - public Mode Mode { get; set; } - } - - public class Mode2 - { - public string Value { get; set; } - } - - public class Multipoint - { - public Mode2 Mode { get; set; } - } - - public class CallId2 - { - public string Value { get; set; } - } - - public class SendingMode - { - public string Value { get; set; } - } - - public class Source - { - public string Value { get; set; } - } - - public class LocalInstance - { - public string id { get; set; } - public SendingMode SendingMode { get; set; } - public Source Source { get; set; } - } - - public class Mode3 - { - public string Value { get; set; } - } - - public class Mode4 - { - public string Value { get; set; } - } - - public class ReleaseFloorAvailability - { - public string Value { get; set; } - } - - public class RequestFloorAvailability - { - public string Value { get; set; } - } - - public class Whiteboard - { - public Mode4 Mode { get; set; } - public ReleaseFloorAvailability ReleaseFloorAvailability { get; set; } - public RequestFloorAvailability RequestFloorAvailability { get; set; } - } - - public class Presentation - { - public CallId2 CallId { get; set; } - public List LocalInstance { get; set; } - public Mode3 Mode { get; set; } - public Whiteboard Whiteboard { get; set; } - } - - public class CallId3 - { - public string Value { get; set; } - } - - public class Mode5 - { - public string Value { get; set; } - } - - public class SpeakerLock - { - public CallId3 CallId { get; set; } - public Mode5 Mode { get; set; } - } - - public class Conference2 - { - public ActiveSpeaker ActiveSpeaker { get; set; } - public DoNotDisturb DoNotDisturb { get; set; } - public List Line { get; set; } - public Multipoint Multipoint { get; set; } - public Presentation Presentation { get; set; } - public SpeakerLock SpeakerLock { get; set; } - } - - public class Conference3 - { - } - - public class Experimental - { - public Conference3 Conference { get; set; } - } - - public class Address - { - public string Value { get; set; } - } - - public class Port - { - public string Value { get; set; } - } - - public class Reason - { - public string Value { get; set; } - } - - public class Status3 - { - public string Value { get; set; } - } - - public class Gatekeeper - { - public Address Address { get; set; } - public Port Port { get; set; } - public Reason Reason { get; set; } - public Status3 Status { get; set; } - } - - public class Reason2 - { - public string Value { get; set; } - } - - public class Status4 - { - public string Value { get; set; } - } - - public class Mode6 - { - public Reason2 Reason { get; set; } - public Status4 Status { get; set; } - } - - public class H323 - { - public Gatekeeper Gatekeeper { get; set; } - public Mode6 Mode { get; set; } - } - - public class Expression - { - public string id { get; set; } - public string Value { get; set; } - } - - public class Format - { - public string Value { get; set; } - } - - public class URL - { - public string Value { get; set; } - } - - public class HttpFeedback - { - public string id { get; set; } - public List Expression { get; set; } - public Format Format { get; set; } - public URL URL { get; set; } - } - - public class MediaChannels - { - } - - public class Address2 - { - public string Value { get; set; } - } - - public class Capabilities3 - { - public string Value { get; set; } - } - - public class DeviceId - { - public string Value { get; set; } - } - - public class Duplex - { - public string Value { get; set; } - } - - public class Platform - { - public string Value { get; set; } - } - - public class PortID - { - public string Value { get; set; } - } - - public class PrimaryMgmtAddress - { - public string Value { get; set; } - } - - public class SysName - { - public string Value { get; set; } - } - - public class SysObjectID - { - public string Value { get; set; } - } - - public class VTPMgmtDomain - { - public string Value { get; set; } - } - - public class Version - { - public string Value { get; set; } - } - - public class VoIPApplianceVlanID - { - public string Value { get; set; } - } - - public class CDP - { - public Address2 Address { get; set; } - public Capabilities3 Capabilities { get; set; } - public DeviceId DeviceId { get; set; } - public Duplex Duplex { get; set; } - public Platform Platform { get; set; } - public PortID PortID { get; set; } - public PrimaryMgmtAddress PrimaryMgmtAddress { get; set; } - public SysName SysName { get; set; } - public SysObjectID SysObjectID { get; set; } - public VTPMgmtDomain VTPMgmtDomain { get; set; } - public Version Version { get; set; } - public VoIPApplianceVlanID VoIPApplianceVlanID { get; set; } - } - - public class Name - { - public string Value { get; set; } - } - - public class Domain - { - public Name Name { get; set; } - } - - public class Address3 - { - public string Value { get; set; } - } - - public class Server - { - public string id { get; set; } - public Address3 Address { get; set; } - } - - public class DNS - { - public Domain Domain { get; set; } - public List Server { get; set; } - } - - public class MacAddress2 - { - public string Value { get; set; } - } - - public class Speed - { - public string Value { get; set; } - } - - public class Ethernet - { - public MacAddress2 MacAddress { get; set; } - public Speed Speed { get; set; } - } - - public class Address4 - { - public string Value { get; set; } - } - - public class Gateway - { - public string Value { get; set; } - } - - public class SubnetMask - { - public string Value { get; set; } - } - - public class IPv4 - { - public Address4 Address { get; set; } - public Gateway Gateway { get; set; } - public SubnetMask SubnetMask { get; set; } - } - - public class Address5 - { - public string Value { get; set; } - } - - public class Gateway2 - { - public string Value { get; set; } - } - - public class IPv6 - { - public Address5 Address { get; set; } - public Gateway2 Gateway { get; set; } - } - - public class VlanId - { - public string Value { get; set; } - } - - public class Voice - { - public VlanId VlanId { get; set; } - } - - public class VLAN - { - public Voice Voice { get; set; } - } - - public class Network - { - public string id { get; set; } - public CDP CDP { get; set; } - public DNS DNS { get; set; } - public Ethernet Ethernet { get; set; } - public IPv4 IPv4 { get; set; } - public IPv6 IPv6 { get; set; } - public VLAN VLAN { get; set; } - } - - public class CurrentAddress - { - public string Value { get; set; } - } - - public class Address6 - { - public string Value { get; set; } - } - - public class Server2 - { - public string id { get; set; } - public Address6 Address { get; set; } - } - - public class Status5 - { - public string Value { get; set; } - } - - public class NTP - { - public CurrentAddress CurrentAddress { get; set; } - public List Server { get; set; } - public Status5 Status { get; set; } - } - - public class NetworkServices - { - public NTP NTP { get; set; } - } - - public class HardwareInfo - { - public string Value { get; set; } - } - - public class ID2 - { - public string Value { get; set; } - } - - public class Name2 - { - public string Value { get; set; } - } - - public class SoftwareInfo - { - public string Value { get; set; } - } - - public class Status6 - { - public string Value { get; set; } - } - - public class Type - { - public string Value { get; set; } - } - - public class UpgradeStatus - { - public string Value { get; set; } - } - - public class ConnectedDevice - { - public string id { get; set; } - public HardwareInfo HardwareInfo { get; set; } - public ID2 ID { get; set; } - public Name2 Name { get; set; } - public SoftwareInfo SoftwareInfo { get; set; } - public Status6 Status { get; set; } - public Type Type { get; set; } - public UpgradeStatus UpgradeStatus { get; set; } - } - - public class Peripherals - { - public List ConnectedDevice { get; set; } - } - - public class Enabled - { - public string Value { get; set; } - } - - public class LastLoggedInUserId - { - public string Value { get; set; } - } - - public class LoggedIn - { - public string Value { get; set; } - } - - public class ExtensionMobility - { - public Enabled Enabled { get; set; } - public LastLoggedInUserId LastLoggedInUserId { get; set; } - public LoggedIn LoggedIn { get; set; } - } - - public class CUCM - { - public ExtensionMobility ExtensionMobility { get; set; } - } - - public class CompletedAt - { - public string Value { get; set; } - } - - public class URL2 - { - public string Value { get; set; } - } - - public class VersionId - { - public string Value { get; set; } - } - - public class Current2 - { - public CompletedAt CompletedAt { get; set; } - public URL2 URL { get; set; } - public VersionId VersionId { get; set; } - } - - public class LastChange - { - public string Value { get; set; } - } - - public class Message - { - public string Value { get; set; } - } - - public class Phase - { - public string Value { get; set; } - } - - public class SessionId - { - public string Value { get; set; } - } - - public class Status7 - { - public string Value { get; set; } - } - - public class URL3 - { - public string Value { get; set; } - } - - public class VersionId2 - { - public string Value { get; set; } - } - - public class UpgradeStatus2 - { - public LastChange LastChange { get; set; } - public Message Message { get; set; } - public Phase Phase { get; set; } - public SessionId SessionId { get; set; } - public Status7 Status { get; set; } - public URL3 URL { get; set; } - public VersionId2 VersionId { get; set; } - } - - public class Software - { - public Current2 Current { get; set; } - public UpgradeStatus2 UpgradeStatus { get; set; } - } - - public class Status8 - { - public string Value { get; set; } - } - - public class Provisioning - { - public CUCM CUCM { get; set; } - public Software Software { get; set; } - public Status8 Status { get; set; } - } - - public class Availability2 - { - public string Value { get; set; } - } - - public class Services - { - public Availability2 Availability { get; set; } - } - - public class Proximity - { - public Services Services { get; set; } - } - - public class Current3 - { - public string Value { get; set; } - } - - public class PeopleCount - { - public Current3 Current { get; set; } - } - - public class PeoplePresence - { - public string Value { get; set; } - } - - public class RoomAnalytics - { - public PeopleCount PeopleCount { get; set; } - public PeoplePresence PeoplePresence { get; set; } - } - - public class URI - { - public string Value { get; set; } - } - - public class Primary - { - public URI URI { get; set; } - } - - public class AlternateURI - { - public Primary Primary { get; set; } - } - - public class Authentication - { - public string Value { get; set; } - } - - public class DisplayName - { - public string Value { get; set; } - } - - public class Mode7 - { - public string Value { get; set; } - } - - public class URI2 - { - public string Value { get; set; } - } - - public class CallForward - { - public DisplayName DisplayName { get; set; } - public Mode7 Mode { get; set; } - public URI2 URI { get; set; } - } - - public class MessagesWaiting - { - public string Value { get; set; } - } - - public class URI3 - { - public string Value { get; set; } - } - - public class Mailbox - { - public MessagesWaiting MessagesWaiting { get; set; } - public URI3 URI { get; set; } - } - - public class Address7 - { - public string Value { get; set; } - } - - public class Status9 - { - public string Value { get; set; } - } - - public class Proxy - { - public string id { get; set; } - public Address7 Address { get; set; } - public Status9 Status { get; set; } - } - - public class Reason3 - { - public string Value { get; set; } - } - - public class Status10 - { - public string Value { get; set; } - } - - public class URI4 - { - public string Value { get; set; } - } - - public class Registration - { - public string id { get; set; } - public Reason3 Reason { get; set; } - public Status10 Status { get; set; } - public URI4 URI { get; set; } - } - - public class Secure - { - public string Value { get; set; } - } - - public class Verified - { - public string Value { get; set; } - } - - public class SIP - { - public AlternateURI AlternateURI { get; set; } - public Authentication Authentication { get; set; } - public CallForward CallForward { get; set; } - public Mailbox Mailbox { get; set; } - public List Proxy { get; set; } - public List Registration { get; set; } - public Secure Secure { get; set; } - public Verified Verified { get; set; } - } - - public class Mode8 - { - public string Value { get; set; } - } - - public class FIPS - { - public Mode8 Mode { get; set; } - } - - public class CallHistory - { - public string Value { get; set; } - } - - public class Configurations - { - public string Value { get; set; } - } - - public class DHCP - { - public string Value { get; set; } - } - - public class InternalLogging - { - public string Value { get; set; } - } - - public class LocalPhonebook - { - public string Value { get; set; } - } - - public class Persistency - { - public CallHistory CallHistory { get; set; } - public Configurations Configurations { get; set; } - public DHCP DHCP { get; set; } - public InternalLogging InternalLogging { get; set; } - public LocalPhonebook LocalPhonebook { get; set; } - } - - public class Security - { - public FIPS FIPS { get; set; } - public Persistency Persistency { get; set; } - } - - public class State - { - public string Value { get; set; } - } - - public class Standby - { - public State State { get; set; } - } - - public class CompatibilityLevel - { - public string Value { get; set; } - } - - public class SerialNumber2 - { - public string Value { get; set; } - } - - public class Module - { - public CompatibilityLevel CompatibilityLevel { get; set; } - public SerialNumber2 SerialNumber { get; set; } - } - - public class Hardware - { - public Module Module { get; set; } - } - - public class ProductId - { - public string Value { get; set; } - } - - public class ProductPlatform - { - public string Value { get; set; } - } - - public class ProductType - { - public string Value { get; set; } - } - - public class DisplayName2 - { - public string Value { get; set; } - } - - public class Name3 - { - public string Value { get; set; } - } - - public class Encryption - { - public string Value { get; set; } - } - - public class MultiSite - { - public string Value { get; set; } - } - - public class RemoteMonitoring - { - public string Value { get; set; } - } - - public class OptionKeys - { - public Encryption Encryption { get; set; } - public MultiSite MultiSite { get; set; } - public RemoteMonitoring RemoteMonitoring { get; set; } - } - - public class ReleaseDate - { - public string Value { get; set; } - } - - public class Version2 - { - public string Value { get; set; } - } - - public class Software2 - { - public DisplayName2 DisplayName { get; set; } - public Name3 Name { get; set; } - public OptionKeys OptionKeys { get; set; } - public ReleaseDate ReleaseDate { get; set; } - public Version2 Version { get; set; } - } - - public class NumberOfActiveCalls - { - public string Value { get; set; } - } - - public class NumberOfInProgressCalls - { - public string Value { get; set; } - } - - public class NumberOfSuspendedCalls - { - public string Value { get; set; } - } - - public class State2 - { - public NumberOfActiveCalls NumberOfActiveCalls { get; set; } - public NumberOfInProgressCalls NumberOfInProgressCalls { get; set; } - public NumberOfSuspendedCalls NumberOfSuspendedCalls { get; set; } - } - - public class Uptime - { - public string Value { get; set; } - } - - public class SystemUnit - { - public Hardware Hardware { get; set; } - public ProductId ProductId { get; set; } - public ProductPlatform ProductPlatform { get; set; } - public ProductType ProductType { get; set; } - public Software2 Software { get; set; } - public State2 State { get; set; } - public Uptime Uptime { get; set; } - } - - public class SystemTime - { - public DateTime Value { get; set; } - } - - public class Time - { - public SystemTime SystemTime { get; set; } - } - - public class Number - { - public string Value { get; set; } - } - - public class ContactMethod - { - public string id { get; set; } - public Number Number { get; set; } - } - - public class Name4 - { - public string Value { get; set; } - } - - public class ContactInfo - { - public List ContactMethod { get; set; } - public Name4 Name { get; set; } - } - - public class UserInterface - { - public ContactInfo ContactInfo { get; set; } - } - - public class PIPPosition - { - public string Value { get; set; } - } - - public class ActiveSpeaker2 - { - public PIPPosition PIPPosition { get; set; } - } - - public class Connected2 - { - public string Value { get; set; } - } - - public class DeviceType - { - public string Value { get; set; } - } - - public class Name5 - { - public string Value { get; set; } - } - - public class PowerStatus - { - public string Value { get; set; } - } - - public class VendorId - { - public string Value { get; set; } - } - - public class CEC - { - public string id { get; set; } - public DeviceType DeviceType { get; set; } - public Name5 Name { get; set; } - public PowerStatus PowerStatus { get; set; } - public VendorId VendorId { get; set; } - } - - public class ConnectedDevice2 - { - public List CEC { get; set; } - } - - public class SignalState - { - public string Value { get; set; } - } - - public class SourceId - { - public string Value { get; set; } - } - - public class Type2 - { - public string Value { get; set; } - } - - public class Connector - { - public string id { get; set; } - public Connected2 Connected { get; set; } - public ConnectedDevice2 ConnectedDevice { get; set; } - public SignalState SignalState { get; set; } - public SourceId SourceId { get; set; } - public Type2 Type { get; set; } - } - - public class MainVideoSource - { - public string Value { get; set; } - } - - public class ConnectorId - { - public string Value { get; set; } - } - - public class FormatStatus - { - public string Value { get; set; } - } - - public class FormatType - { - public string Value { get; set; } - } - - public class MediaChannelId - { - public string Value { get; set; } - } - - public class Height - { - public string Value { get; set; } - } - - public class RefreshRate - { - public string Value { get; set; } - } - - public class Width - { - public string Value { get; set; } - } - - public class Resolution - { - public Height Height { get; set; } - public RefreshRate RefreshRate { get; set; } - public Width Width { get; set; } - } - - public class Source2 - { - public string id { get; set; } - public ConnectorId ConnectorId { get; set; } - public FormatStatus FormatStatus { get; set; } - public FormatType FormatType { get; set; } - public MediaChannelId MediaChannelId { get; set; } - public Resolution Resolution { get; set; } - } - - public class Input2 - { - public List Connector { get; set; } - public MainVideoSource MainVideoSource { get; set; } - public List Source { get; set; } - } - - public class Local - { - public string Value { get; set; } - } - - public class LayoutFamily - { - public Local Local { get; set; } - } - - public class Layout - { - public LayoutFamily LayoutFamily { get; set; } - public CurrentLayouts CurrentLayouts { get; set; } - } - - public class Monitors - { - public string Value { get; set; } - } - - public class Connected3 - { - public string Value { get; set; } - } - - public class DeviceType2 - { - public string Value { get; set; } - } - - public class Name6 - { - public string Value { get; set; } - } - - public class PowerStatus2 - { - public string Value { get; set; } - } - - public class VendorId2 - { - public string Value { get; set; } - } - - public class CEC2 - { - public string id { get; set; } - public DeviceType2 DeviceType { get; set; } - public Name6 Name { get; set; } - public PowerStatus2 PowerStatus { get; set; } - public VendorId2 VendorId { get; set; } - } - - public class Name7 - { - public string Value { get; set; } - } - - public class PreferredFormat - { - public string Value { get; set; } - } - - public class ConnectedDevice3 - { - public List CEC { get; set; } - public Name7 Name { get; set; } - public PreferredFormat PreferredFormat { get; set; } - } - - public class MonitorRole - { - public string Value { get; set; } - } - - public class Height2 - { - public string Value { get; set; } - } - - public class RefreshRate2 - { - public string Value { get; set; } - } - - public class Width2 - { - public string Value { get; set; } - } - - public class Resolution2 - { - public Height2 Height { get; set; } - public RefreshRate2 RefreshRate { get; set; } - public Width2 Width { get; set; } - } - - public class Type3 - { - public string Value { get; set; } - } - - public class Connector2 - { - public string id { get; set; } - public Connected3 Connected { get; set; } - public ConnectedDevice3 ConnectedDevice { get; set; } - public MonitorRole MonitorRole { get; set; } - public Resolution2 Resolution { get; set; } - public Type3 Type { get; set; } - } - - public class Output2 - { - public List Connector { get; set; } - } - - public class PIPPosition2 - { - public string Value { get; set; } - } - - public class Presentation2 - { - public PIPPosition2 PIPPosition { get; set; } - } - - public class FullscreenMode - { - public string Value { get; set; } - } - - public class Mode9 - { - public string Value { get; set; } - } - - public class OnMonitorRole - { - public string Value { get; set; } - } - - public class PIPPosition3 - { - public string Value { get; set; } - } - - public class Selfview - { - public FullscreenMode FullscreenMode { get; set; } - public Mode9 Mode { get; set; } - public OnMonitorRole OnMonitorRole { get; set; } - public PIPPosition3 PIPPosition { get; set; } - } - - public class Video - { - public ActiveSpeaker2 ActiveSpeaker { get; set; } - public Input2 Input { get; set; } - public Layout Layout { get; set; } - public Monitors Monitors { get; set; } - public Output2 Output { get; set; } - public Presentation2 Presentation { get; set; } - public Selfview Selfview { get; set; } - } - - public class Status - { - public Audio Audio { get; set; } - public Bookings Bookings { get; set; } - public Cameras Cameras { get; set; } - public Capabilities2 Capabilities { get; set; } - public Conference2 Conference { get; set; } - public Experimental Experimental { get; set; } - public H323 H323 { get; set; } - public List HttpFeedback { get; set; } - public MediaChannels MediaChannels { get; set; } - public List Network { get; set; } - public NetworkServices NetworkServices { get; set; } - public Peripherals Peripherals { get; set; } - public Provisioning Provisioning { get; set; } - public Proximity Proximity { get; set; } - public RoomAnalytics RoomAnalytics { get; set; } - public SIP SIP { get; set; } - public Security Security { get; set; } - public Standby Standby { get; set; } - public SystemUnit SystemUnit { get; set; } - public Time Time { get; set; } - public UserInterface UserInterface { get; set; } - public Video Video { get; set; } - } - - public class RootObject - { - public Status Status { get; set; } - } - - public class CurrentLayouts - { - public ActiveLayout ActiveLayout { get; set; } - - public List AvailableLayouts { get; set; } - - } - - public class ActiveLayout - { - string Value { get; set; } - } - - - public class LayoutData - { - public string id { get; set; } - public LayoutName LayoutName { get; set; } - } - - public class LayoutName - { - public string Value; - } - - } -} \ No newline at end of file