diff --git a/PepperDashEssentials/AppServer/Messengers/CameraBaseMessenger.cs b/PepperDashEssentials/AppServer/Messengers/CameraBaseMessenger.cs
new file mode 100644
index 00000000..043341a9
--- /dev/null
+++ b/PepperDashEssentials/AppServer/Messengers/CameraBaseMessenger.cs
@@ -0,0 +1,174 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Devices.Common.Cameras;
+
+namespace PepperDash.Essentials.AppServer.Messengers
+{
+ public class CameraBaseMessenger : MessengerBase
+ {
+ ///
+ /// Device being bridged
+ ///
+ public CameraBase Camera { get; set; }
+
+ ///
+ /// Constructor
+ ///
+ ///
+ ///
+ ///
+ public CameraBaseMessenger(string key, CameraBase camera, string messagePath)
+ : base(key, messagePath)
+ {
+ if (camera == null)
+ throw new ArgumentNullException("camera");
+
+ Camera = camera;
+
+ var presetsCamera = Camera as IHasCameraPresets;
+
+ if (presetsCamera != null)
+ {
+ presetsCamera.PresetsListHasChanged += new EventHandler(presetsCamera_PresetsListHasChanged);
+ }
+
+ }
+
+ void presetsCamera_PresetsListHasChanged(object sender, EventArgs e)
+ {
+ var presetsCamera = Camera as IHasCameraPresets;
+
+ var presetList = new List();
+
+ if (presetsCamera != null)
+ presetList = presetsCamera.Presets;
+
+ PostStatusMessage(new
+ {
+ presets = presetList
+ });
+ }
+
+ protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
+ {
+ appServerController.AddAction(MessagePath + "/fullStatus", new Action(SendCameraFullMessageObject));
+
+ var ptzCamera = Camera as IHasCameraPtzControl;
+
+ if (ptzCamera != null)
+ {
+
+ // Need to evaluate how to pass through these P&H actions. Need a method that takes a bool maybe?
+ AppServerController.AddAction(MessagePath + "/cameraUp", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.TiltUp();
+ else
+ ptzCamera.TiltStop();
+ }));
+ AppServerController.AddAction(MessagePath + "/cameraDown", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.TiltDown();
+ else
+ ptzCamera.TiltStop();
+ }));
+ AppServerController.AddAction(MessagePath + "/cameraLeft", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.PanLeft();
+ else
+ ptzCamera.PanStop();
+ }));
+ AppServerController.AddAction(MessagePath + "/cameraRight", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.PanRight();
+ else
+ ptzCamera.PanStop();
+ }));
+ AppServerController.AddAction(MessagePath + "/cameraZoomIn", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.ZoomIn();
+ else
+ ptzCamera.ZoomStop();
+ }));
+ AppServerController.AddAction(MessagePath + "/cameraZoomOut", new PressAndHoldAction((b) =>
+ {
+ if (b)
+ ptzCamera.ZoomOut();
+ else
+ ptzCamera.ZoomStop();
+ }));
+ }
+
+ if (Camera is IHasCameraAutoMode)
+ {
+ appServerController.AddAction(MessagePath + "/cameraModeAuto", new Action((Camera as IHasCameraAutoMode).CameraAutoModeOn));
+ appServerController.AddAction(MessagePath + "/cameraModeManual", new Action((Camera as IHasCameraAutoMode).CameraAutoModeOff));
+ }
+
+ if (Camera is IPower)
+ {
+ appServerController.AddAction(MessagePath + "/cameraModeOff", new Action((Camera as IPower).PowerOff));
+ }
+
+ var presetsCamera = Camera as IHasCameraPresets;
+
+ if (presetsCamera != null)
+ {
+ for(int i = 1; i <= 6; i++)
+ {
+ var preset = i;
+ appServerController.AddAction(MessagePath + "/cameraPreset" + i, new Action((p) => presetsCamera.PresetSelect(preset)));
+ }
+ }
+ }
+
+ ///
+ /// Helper method to update the full status of the camera
+ ///
+ void SendCameraFullMessageObject()
+ {
+ var presetsCamera = Camera as IHasCameraPresets;
+
+ var presetList = new List();
+
+ if (presetsCamera != null)
+ presetList = presetsCamera.Presets;
+
+ PostStatusMessage(new
+ {
+ cameraMode = GetCameraMode(),
+ hasPresets = Camera is IHasCameraPresets,
+ presets = presetList
+ });
+ }
+
+ ///
+ /// Computes the current camera mode
+ ///
+ ///
+ string GetCameraMode()
+ {
+ string m;
+ if (Camera is IHasCameraAutoMode && (Camera as IHasCameraAutoMode).CameraAutoModeIsOnFeedback.BoolValue)
+ m = eCameraControlMode.Auto.ToString().ToLower();
+ else if (Camera is IPower && !(Camera as IPower).PowerIsOnFeedback.BoolValue)
+ m = eCameraControlMode.Off.ToString().ToLower();
+ else
+ m = eCameraControlMode.Manual.ToString().ToLower();
+ return m;
+ }
+ }
+}
\ No newline at end of file
diff --git a/PepperDashEssentials/AppServer/Messengers/Ddvc01AtcMessenger.cs b/PepperDashEssentials/AppServer/Messengers/Ddvc01AtcMessenger.cs
deleted file mode 100644
index eee94350..00000000
--- a/PepperDashEssentials/AppServer/Messengers/Ddvc01AtcMessenger.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.EthernetCommunication;
-
-using PepperDash.Core;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Devices.Common.Codec;
-
-namespace PepperDash.Essentials.AppServer.Messengers
-{
- public class Ddvc01AtcMessenger : MessengerBase
- {
- BasicTriList EISC;
-
- ///
- /// 221
- ///
- const uint BDialHangupOnHook = 221;
-
- ///
- /// 251
- ///
- const uint BIncomingAnswer = 251;
- ///
- /// 252
- ///
- const uint BIncomingReject = 252;
- ///
- /// 241
- ///
- const uint BSpeedDial1 = 241;
- ///
- /// 242
- ///
- const uint BSpeedDial2 = 242;
- ///
- /// 243
- ///
- const uint BSpeedDial3 = 243;
- ///
- /// 244
- ///
- const uint BSpeedDial4 = 244;
-
- ///
- /// 201
- ///
- const uint SCurrentDialString = 201;
- ///
- /// 211
- ///
- const uint SCurrentCallNumber = 211;
- ///
- /// 212
- ///
- const uint SCurrentCallName = 212;
- ///
- /// 221
- ///
- const uint SHookState = 221;
- ///
- /// 222
- ///
- const uint SCallDirection = 222;
-
- ///
- /// 201-212 0-9*#
- ///
- Dictionary DTMFMap = new Dictionary
- {
- { "1", 201 },
- { "2", 202 },
- { "3", 203 },
- { "4", 204 },
- { "5", 205 },
- { "6", 206 },
- { "7", 207 },
- { "8", 208 },
- { "9", 209 },
- { "0", 210 },
- { "*", 211 },
- { "#", 212 },
- };
-
- ///
- ///
- ///
- CodecActiveCallItem CurrentCallItem;
-
-
- ///
- ///
- ///
- ///
- ///
- public Ddvc01AtcMessenger(string key, BasicTriList eisc, string messagePath)
- : base(key, messagePath)
- {
- EISC = eisc;
-
- CurrentCallItem = new CodecActiveCallItem();
- CurrentCallItem.Type = eCodecCallType.Audio;
- CurrentCallItem.Id = "-audio-";
- }
-
- ///
- ///
- ///
- void SendFullStatus()
- {
-
-
- this.PostStatusMessage(new
- {
- calls = GetCurrentCallList(),
- currentCallString = EISC.GetString(SCurrentCallNumber),
- currentDialString = EISC.GetString(SCurrentDialString),
- isInCall = EISC.GetString(SHookState) == "Connected"
- });
- }
-
- ///
- ///
- ///
- ///
- protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
- {
- //EISC.SetStringSigAction(SCurrentDialString, s => PostStatusMessage(new { currentDialString = s }));
-
- EISC.SetStringSigAction(SHookState, s =>
- {
- CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
- //GetCurrentCallList();
- SendFullStatus();
- });
-
- EISC.SetStringSigAction(SCurrentCallNumber, s =>
- {
- CurrentCallItem.Number = s;
- SendCallsList();
- });
-
- EISC.SetStringSigAction(SCurrentCallName, s =>
- {
- CurrentCallItem.Name = s;
- SendCallsList();
- });
-
- EISC.SetStringSigAction(SCallDirection, s =>
- {
- CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
- SendCallsList();
- });
-
- // Add press and holds using helper
- Action addPHAction = (s, u) =>
- AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
-
- // Add straight pulse calls
- Action addAction = (s, u) =>
- AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
- addAction("/endCallById", BDialHangupOnHook);
- addAction("/endAllCalls", BDialHangupOnHook);
- addAction("/acceptById", BIncomingAnswer);
- addAction("/rejectById", BIncomingReject);
- addAction("/speedDial1", BSpeedDial1);
- addAction("/speedDial2", BSpeedDial2);
- addAction("/speedDial3", BSpeedDial3);
- addAction("/speedDial4", BSpeedDial4);
-
- // Get status
- AppServerController.AddAction(MessagePath + "/fullStatus", new Action(SendFullStatus));
- // Dial on string
- AppServerController.AddAction(MessagePath + "/dial", new Action(s => EISC.SetString(SCurrentDialString, s)));
- // Pulse DTMF
- AppServerController.AddAction(MessagePath + "/dtmf", new Action(s =>
- {
- if (DTMFMap.ContainsKey(s))
- {
- EISC.PulseBool(DTMFMap[s], 100);
- }
- }));
- }
-
- ///
- ///
- ///
- void SendCallsList()
- {
- PostStatusMessage(new
- {
- calls = GetCurrentCallList(),
- });
- }
-
- ///
- /// Turns the
- ///
- ///
- List GetCurrentCallList()
- {
- if (CurrentCallItem.Status == eCodecCallStatus.Disconnected)
- {
- return new List();
- }
- else
- {
- return new List() { CurrentCallItem };
- }
- }
- }
-}
\ No newline at end of file
diff --git a/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs b/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs
deleted file mode 100644
index e3de11d0..00000000
--- a/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs
+++ /dev/null
@@ -1,648 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.EthernetCommunication;
-
-using PepperDash.Core;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Devices.Common.Codec;
-
-namespace PepperDash.Essentials.AppServer.Messengers
-{
- public class Ddvc01VtcMessenger : MessengerBase
- {
- BasicTriList EISC;
-
- /********* Bools *********/
- ///
- /// 724
- ///
- const uint BDialHangup = 724;
- ///
- /// 750
- ///
- const uint BCallIncoming = 750;
- ///
- /// 751
- ///
- const uint BIncomingAnswer = 751;
- ///
- /// 752
- ///
- const uint BIncomingReject = 752;
- ///
- /// 741
- ///
- const uint BSpeedDial1 = 741;
- ///
- /// 742
- ///
- const uint BSpeedDial2 = 742;
- ///
- /// 743
- ///
- const uint BSpeedDial3 = 743;
- ///
- /// 744
- ///
- const uint BSpeedDial4 = 744;
- ///
- /// 800
- ///
- const uint BDirectorySearchBusy = 800;
- ///
- /// 801
- ///
- const uint BDirectoryLineSelected = 801;
- ///
- /// 801 when selected entry is a contact
- ///
- const uint BDirectoryEntryIsContact = 801;
- ///
- /// 802 To show/hide back button
- ///
- const uint BDirectoryIsRoot = 802;
- ///
- /// 803 Pulse from system to inform us when directory is ready
- ///
- const uint DDirectoryHasChanged = 803;
- ///
- /// 804
- ///
- const uint BDirectoryRoot = 804;
- ///
- /// 805
- ///
- const uint BDirectoryFolderBack = 805;
- ///
- /// 806
- ///
- const uint BDirectoryDialSelectedLine = 806;
- ///
- /// 811
- ///
- const uint BCameraControlUp = 811;
- ///
- /// 812
- ///
- const uint BCameraControlDown = 812;
- ///
- /// 813
- ///
- const uint BCameraControlLeft = 813;
- ///
- /// 814
- ///
- const uint BCameraControlRight = 814;
- ///
- /// 815
- ///
- const uint BCameraControlZoomIn = 815;
- ///
- /// 816
- ///
- const uint BCameraControlZoomOut = 816;
- ///
- /// 821 - 826
- ///
- const uint BCameraPresetStart = 821;
-
- ///
- /// 831
- ///
- const uint BCameraModeAuto = 831;
- ///
- /// 832
- ///
- const uint BCameraModeManual = 832;
- ///
- /// 833
- ///
- const uint BCameraModeOff = 833;
-
- ///
- /// 841
- ///
- const uint BCameraSelfView = 841;
-
- ///
- /// 842
- ///
- const uint BCameraLayout = 842;
- ///
- /// 843
- ///
- const uint BCameraSupportsAutoMode = 843;
- ///
- /// 844
- ///
- const uint BCameraSupportsOffMode = 844;
-
-
- /********* Ushorts *********/
- ///
- /// 760
- ///
- const uint UCameraNumberSelect = 760;
- ///
- /// 801
- ///
- const uint UDirectorySelectRow = 801;
- ///
- /// 801
- ///
- const uint UDirectoryRowCount = 801;
-
-
-
- /********* Strings *********/
- ///
- /// 701
- ///
- const uint SCurrentDialString = 701;
- ///
- /// 702
- ///
- const uint SCurrentCallName = 702;
- ///
- /// 703
- ///
- const uint SCurrentCallNumber = 703;
- ///
- /// 731
- ///
- const uint SHookState = 731;
- ///
- /// 722
- ///
- const uint SCallDirection = 722;
- ///
- /// 751
- ///
- const uint SIncomingCallName = 751;
- ///
- /// 752
- ///
- const uint SIncomingCallNumber = 752;
-
- ///
- /// 800
- ///
- const uint SDirectorySearchString = 800;
- ///
- /// 801-1055
- ///
- const uint SDirectoryEntriesStart = 801;
- ///
- /// 1056
- ///
- const uint SDirectoryEntrySelectedName = 1056;
- ///
- /// 1057
- ///
- const uint SDirectoryEntrySelectedNumber = 1057;
- ///
- /// 1058
- ///
- const uint SDirectorySelectedFolderName = 1058;
-
-
- ///
- /// 701-712 0-9*#
- ///
- Dictionary DTMFMap = new Dictionary
- {
- { "1", 701 },
- { "2", 702 },
- { "3", 703 },
- { "4", 704 },
- { "5", 705 },
- { "6", 706 },
- { "7", 707 },
- { "8", 708 },
- { "9", 709 },
- { "0", 710 },
- { "*", 711 },
- { "#", 712 },
- };
-
- CodecActiveCallItem CurrentCallItem;
- CodecActiveCallItem IncomingCallItem;
-
- ushort PreviousDirectoryLength = 0;
-
- ///
- ///
- ///
- ///
- ///
- public Ddvc01VtcMessenger(string key, BasicTriList eisc, string messagePath)
- : base(key, messagePath)
- {
- EISC = eisc;
-
- CurrentCallItem = new CodecActiveCallItem();
- CurrentCallItem.Type = eCodecCallType.Video;
- CurrentCallItem.Id = "-video-";
- }
-
- ///
- ///
- ///
- ///
- protected override void CustomRegisterWithAppServer(MobileControlSystemController appServerController)
- {
- var asc = appServerController;
- EISC.SetStringSigAction(SHookState, s =>
- {
- CurrentCallItem.Status = (eCodecCallStatus)Enum.Parse(typeof(eCodecCallStatus), s, true);
- PostFullStatus(); // SendCallsList();
- });
-
- EISC.SetStringSigAction(SCurrentCallNumber, s =>
- {
- CurrentCallItem.Number = s;
- PostCallsList();
- });
-
- EISC.SetStringSigAction(SCurrentCallName, s =>
- {
- CurrentCallItem.Name = s;
- PostCallsList();
- });
-
- EISC.SetStringSigAction(SCallDirection, s =>
- {
- CurrentCallItem.Direction = (eCodecCallDirection)Enum.Parse(typeof(eCodecCallDirection), s, true);
- PostCallsList();
- });
-
- EISC.SetBoolSigAction(BCallIncoming, b =>
- {
- if (b)
- {
- var ica = new CodecActiveCallItem()
- {
- Direction = eCodecCallDirection.Incoming,
- Id = "-video-incoming",
- Name = EISC.GetString(SIncomingCallName),
- Number = EISC.GetString(SIncomingCallNumber),
- Status = eCodecCallStatus.Ringing,
- Type = eCodecCallType.Video
- };
- IncomingCallItem = ica;
- }
- else
- {
- IncomingCallItem = null;
- }
- PostCallsList();
- });
-
- EISC.SetBoolSigAction(BCameraSupportsAutoMode, b =>
- {
- PostStatusMessage(new
- {
- cameraSupportsAutoMode = b
- });
- });
- EISC.SetBoolSigAction(BCameraSupportsOffMode, b =>
- {
- PostStatusMessage(new
- {
- cameraSupportsOffMode = b
- });
- });
-
- // Directory insanity
- EISC.SetUShortSigAction(UDirectoryRowCount, u =>
- {
- // The length of the list comes in before the list does.
- // Splice the sig change operation onto the last string sig that will be changing
- // when the directory entries make it through.
- if (PreviousDirectoryLength > 0)
- {
- EISC.ClearStringSigAction(SDirectoryEntriesStart + PreviousDirectoryLength - 1);
- }
- EISC.SetStringSigAction(SDirectoryEntriesStart + u - 1, s => PostDirectory());
- PreviousDirectoryLength = u;
- });
-
- EISC.SetStringSigAction(SDirectoryEntrySelectedName, s =>
- {
- PostStatusMessage(new
- {
- directoryContactSelected = new
- {
- name = EISC.GetString(SDirectoryEntrySelectedName),
- }
- });
- });
-
- EISC.SetStringSigAction(SDirectoryEntrySelectedNumber, s =>
- {
- PostStatusMessage(new
- {
- directoryContactSelected = new
- {
- number = EISC.GetString(SDirectoryEntrySelectedNumber),
- }
- });
- });
-
- EISC.SetStringSigAction(SDirectorySelectedFolderName, s => PostStatusMessage(new
- {
- directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName)
- }));
-
- EISC.SetSigTrueAction(BCameraModeAuto, () => PostCameraMode());
- EISC.SetSigTrueAction(BCameraModeManual, () => PostCameraMode());
- EISC.SetSigTrueAction(BCameraModeOff, () => PostCameraMode());
-
- EISC.SetBoolSigAction(BCameraSelfView, b => PostStatusMessage(new
- {
- cameraSelfView = b
- }));
-
- EISC.SetUShortSigAction(UCameraNumberSelect, (u) => PostSelectedCamera());
-
-
- // Add press and holds using helper action
- Action addPHAction = (s, u) =>
- AppServerController.AddAction(MessagePath + s, new PressAndHoldAction(b => EISC.SetBool(u, b)));
- addPHAction("/cameraUp", BCameraControlUp);
- addPHAction("/cameraDown", BCameraControlDown);
- addPHAction("/cameraLeft", BCameraControlLeft);
- addPHAction("/cameraRight", BCameraControlRight);
- addPHAction("/cameraZoomIn", BCameraControlZoomIn);
- addPHAction("/cameraZoomOut", BCameraControlZoomOut);
-
- // Add straight pulse calls using helper action
- Action addAction = (s, u) =>
- AppServerController.AddAction(MessagePath + s, new Action(() => EISC.PulseBool(u, 100)));
- addAction("/endCallById", BDialHangup);
- addAction("/endAllCalls", BDialHangup);
- addAction("/acceptById", BIncomingAnswer);
- addAction("/rejectById", BIncomingReject);
- addAction("/speedDial1", BSpeedDial1);
- addAction("/speedDial2", BSpeedDial2);
- addAction("/speedDial3", BSpeedDial3);
- addAction("/speedDial4", BSpeedDial4);
- addAction("/cameraModeAuto", BCameraModeAuto);
- addAction("/cameraModeManual", BCameraModeManual);
- addAction("/cameraModeOff", BCameraModeOff);
- addAction("/cameraSelfView", BCameraSelfView);
- addAction("/cameraLayout", BCameraLayout);
-
- asc.AddAction("/cameraSelect", new Action(SelectCamera));
-
- // camera presets
- for(uint i = 0; i < 6; i++)
- {
- addAction("/cameraPreset" + (i + 1), BCameraPresetStart + i);
- }
-
- asc.AddAction(MessagePath + "/isReady", new Action(PostIsReady));
- // Get status
- asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
- // Dial on string
- asc.AddAction(MessagePath + "/dial", new Action(s =>
- EISC.SetString(SCurrentDialString, s)));
- // Pulse DTMF
- asc.AddAction(MessagePath + "/dtmf", new Action(s =>
- {
- if (DTMFMap.ContainsKey(s))
- {
- EISC.PulseBool(DTMFMap[s], 100);
- }
- }));
-
- // Directory madness
- asc.AddAction(MessagePath + "/directoryRoot", new Action(() => EISC.PulseBool(BDirectoryRoot)));
- asc.AddAction(MessagePath + "/directoryBack", new Action(() => EISC.PulseBool(BDirectoryFolderBack)));
- asc.AddAction(MessagePath + "/directoryById", new Action(s =>
- {
- // the id should contain the line number to forward to simpl
- try
- {
- var u = ushort.Parse(s);
- EISC.SetUshort(UDirectorySelectRow, u);
- EISC.PulseBool(BDirectoryLineSelected);
- }
- catch (Exception)
- {
- Debug.Console(1, this, Debug.ErrorLogLevel.Warning,
- "/directoryById request contains non-numeric ID incompatible with DDVC bridge");
- }
-
- }));
- asc.AddAction(MessagePath + "/directorySelectContact", new Action(s =>
- {
- try
- {
- var u = ushort.Parse(s);
- EISC.SetUshort(UDirectorySelectRow, u);
- EISC.PulseBool(BDirectoryLineSelected);
- }
- catch
- {
-
- }
- }));
- asc.AddAction(MessagePath + "/directoryDialContact", new Action(() => {
- EISC.PulseBool(BDirectoryDialSelectedLine);
- }));
- asc.AddAction(MessagePath + "/getDirectory", new Action(() =>
- {
- if (EISC.GetUshort(UDirectoryRowCount) > 0)
- {
- PostDirectory();
- }
- else
- {
- EISC.PulseBool(BDirectoryRoot);
- }
- }));
- }
-
- ///
- ///
- ///
- void PostFullStatus()
- {
- this.PostStatusMessage(new
- {
- calls = GetCurrentCallList(),
- cameraMode = GetCameraMode(),
- cameraSelfView = EISC.GetBool(BCameraSelfView),
- cameraSupportsAutoMode = EISC.GetBool(BCameraSupportsAutoMode),
- cameraSupportsOffMode = EISC.GetBool(BCameraSupportsOffMode),
- currentCallString = EISC.GetString(SCurrentCallNumber),
- currentDialString = EISC.GetString(SCurrentDialString),
- directoryContactSelected = new
- {
- name = EISC.GetString(SDirectoryEntrySelectedName),
- number = EISC.GetString(SDirectoryEntrySelectedNumber)
- },
- directorySelectedFolderName = EISC.GetString(SDirectorySelectedFolderName),
- isInCall = EISC.GetString(SHookState) == "Connected",
- hasDirectory = true,
- hasDirectorySearch = false,
- hasRecents = !EISC.BooleanOutput[502].BoolValue,
- hasCameras = true,
- showCamerasWhenNotInCall = EISC.BooleanOutput[503].BoolValue,
- selectedCamera = GetSelectedCamera(),
- });
- }
-
- ///
- ///
- ///
- void PostDirectory()
- {
- var u = EISC.GetUshort(UDirectoryRowCount);
- var items = new List