/// <summary> /// Helper method to update the full status of the camera /// </summary> void SendCameraFullMessageObject() { var presetList = new List <CameraPreset>(); // Build a list of camera presets based on the names and count if (EISC.GetBool(JoinMap.SupportsPresets.JoinNumber)) { var presetStart = JoinMap.PresetLabelStart.JoinNumber; var presetEnd = JoinMap.PresetLabelStart.JoinNumber + JoinMap.NumberOfPresets.JoinNumber; var presetId = 1; for (uint i = presetStart; i < presetEnd; i++) { var presetName = EISC.GetString(i); var preset = new CameraPreset(presetId, presetName, string.IsNullOrEmpty(presetName), true); presetList.Add(preset); presetId++; } } PostStatusMessage(new { cameraMode = GetCameraMode(), hasPresets = EISC.GetBool(JoinMap.SupportsPresets.JoinNumber), presets = presetList }); }
/// <summary> /// /// </summary> 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(), }); }