mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 11:44:54 +00:00
feat: Update some internal Essentials devices to use Initialize method
This commit is contained in:
committed by
Andrew Welker
parent
5940ec17c2
commit
b71c83bac0
@@ -88,11 +88,6 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
else
|
else
|
||||||
Debug.Console(0, this, "Unable to add Red LED device");
|
Debug.Console(0, this, "Unable to add Red LED device");
|
||||||
|
|
||||||
DeviceManager.AllDevicesActivated += (o, a) =>
|
|
||||||
{
|
|
||||||
CheckPrivacyMode();
|
|
||||||
};
|
|
||||||
|
|
||||||
AddPostActivationAction(() => {
|
AddPostActivationAction(() => {
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
@@ -103,6 +98,15 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Overrides of Device
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
CheckPrivacyMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
||||||
{
|
{
|
||||||
PrivacyDevice = privacyDevice;
|
PrivacyDevice = privacyDevice;
|
||||||
|
|||||||
@@ -551,6 +551,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Overrides of Device
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
var socket = Communication as ISocketStatus;
|
var socket = Communication as ISocketStatus;
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
@@ -559,9 +566,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
Communication.Connect();
|
Communication.Connect();
|
||||||
|
|
||||||
CommunicationMonitor.Start();
|
CommunicationMonitor.Start();
|
||||||
|
|
||||||
string prefix = "xFeedback register ";
|
const string prefix = "xFeedback register ";
|
||||||
|
|
||||||
CliFeedbackRegistrationExpression =
|
CliFeedbackRegistrationExpression =
|
||||||
prefix + "/Configuration" + Delimiter +
|
prefix + "/Configuration" + Delimiter +
|
||||||
@@ -576,14 +583,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Status/Video/Layout" + Delimiter +
|
prefix + "/Status/Video/Layout" + Delimiter +
|
||||||
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
||||||
prefix + "/Bookings" + Delimiter +
|
prefix + "/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||||
prefix + "/Event/Bookings" + Delimiter +
|
prefix + "/Event/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||||
|
|
||||||
return base.CustomActivate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -791,7 +791,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
|
||||||
"Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
"Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
var socket = Communication as ISocketStatus;
|
|
||||||
|
|
||||||
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Overrides of Device
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
var socket = Communication as ISocketStatus;
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
{
|
{
|
||||||
socket.ConnectionChange += socket_ConnectionChange;
|
socket.ConnectionChange += socket_ConnectionChange;
|
||||||
@@ -802,11 +811,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Communication.Connect();
|
Communication.Connect();
|
||||||
|
|
||||||
CommunicationMonitor.Start();
|
CommunicationMonitor.Start();
|
||||||
|
}
|
||||||
|
|
||||||
return base.CustomActivate();
|
#endregion
|
||||||
}
|
|
||||||
|
|
||||||
public void SetCommDebug(string s)
|
public void SetCommDebug(string s)
|
||||||
{
|
{
|
||||||
if (s == "1")
|
if (s == "1")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user