mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
add config object to stop downloading large phonebooks
This commit is contained in:
@@ -39,10 +39,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
private int _previousVolumeLevel;
|
private int _previousVolumeLevel;
|
||||||
private CameraBase _selectedCamera;
|
private CameraBase _selectedCamera;
|
||||||
|
|
||||||
|
private readonly ZoomRoomPropertiesConfig _props;
|
||||||
|
|
||||||
public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
|
public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
|
||||||
: base(config)
|
: base(config)
|
||||||
{
|
{
|
||||||
var props = JsonConvert.DeserializeObject<ZoomRoomPropertiesConfig>(config.Properties.ToString());
|
_props = JsonConvert.DeserializeObject<ZoomRoomPropertiesConfig>(config.Properties.ToString());
|
||||||
|
|
||||||
// The queue that will collect the repsonses in the order they are received
|
// The queue that will collect the repsonses in the order they are received
|
||||||
_receiveQueue = new CrestronQueue<string>(1024);
|
_receiveQueue = new CrestronQueue<string>(1024);
|
||||||
@@ -52,10 +54,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
Communication = comm;
|
Communication = comm;
|
||||||
|
|
||||||
if (props.CommunicationMonitorProperties != null)
|
if (_props.CommunicationMonitorProperties != null)
|
||||||
{
|
{
|
||||||
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
|
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
|
||||||
props.CommunicationMonitorProperties);
|
_props.CommunicationMonitorProperties);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -625,7 +627,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
// zCommand
|
// zCommand
|
||||||
|
|
||||||
_syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
|
if (!_props.DisablePhonebookAutoDownload)
|
||||||
|
{
|
||||||
|
_syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
|
||||||
|
}
|
||||||
|
|
||||||
_syncState.AddQueryToQueue("zCommand Bookings List");
|
_syncState.AddQueryToQueue("zCommand Bookings List");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,5 +12,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public class ZoomRoomPropertiesConfig
|
public class ZoomRoomPropertiesConfig
|
||||||
{
|
{
|
||||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||||
|
|
||||||
|
public bool DisablePhonebookAutoDownload { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user