mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-30 12:54:54 +00:00
Updated ICodecAudio interface to break out individual functions to their own interfaces and not assume all to be applied to VideoCodecBase. Updated affected classes as a result.
This commit is contained in:
@@ -27,6 +27,52 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines minimum volume controls for a codec device with dialing capabilities
|
||||
/// </summary>
|
||||
public interface ICodecAudio : IBasicVolumeWithFeedback, ICodecPrivacy
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec receive volume
|
||||
/// </summary>
|
||||
public interface ICodecReceiveVolume
|
||||
{
|
||||
// Break this out into 3 interfaces
|
||||
void SetReceiveVolume(ushort level);
|
||||
void ReceiveMuteOn();
|
||||
void ReceiveMuteOff();
|
||||
void ReceiveMuteToggle();
|
||||
IntFeedback ReceiveLevelFeedback { get; }
|
||||
BoolFeedback ReceiveMuteIsOnFeedback { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec transmit volume
|
||||
/// </summary>
|
||||
public interface ICodecTransmitVolume
|
||||
{
|
||||
void SetTransmitVolume(ushort level);
|
||||
void TransmitMuteOn();
|
||||
void TransmitMuteOff();
|
||||
void TransmitMuteToggle();
|
||||
IntFeedback TransmitLevelFeedback { get; }
|
||||
BoolFeedback TransmitMuteIsOnFeedback { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec privacy function (microphone mute)
|
||||
/// </summary>
|
||||
public interface ICodecPrivacy
|
||||
{
|
||||
void PrivacyModeOn();
|
||||
void PrivacyModeOff();
|
||||
void PrivacyModeToggle();
|
||||
BoolFeedback PrivacyModeIsOnFeedback { get; }
|
||||
}
|
||||
|
||||
public interface IHasCallHistory
|
||||
{
|
||||
// Add recent calls list
|
||||
|
||||
@@ -68,37 +68,6 @@ namespace PepperDash.Essentials.Core
|
||||
IntFeedback DefaultVolumeFeedback { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines minimum volume controls for a codec device with dialing capabilities
|
||||
/// </summary>
|
||||
public interface ICodecAudio
|
||||
{
|
||||
// ICodecReceiveVolume
|
||||
// Break this out into 3 interfaces
|
||||
void SetReceiveVolume(ushort level);
|
||||
void ReceiveMuteOn();
|
||||
void ReceiveMuteOff();
|
||||
void ReceiveMuteToggle();
|
||||
IntFeedback ReceiveLevelFeedback { get; }
|
||||
BoolFeedback ReceiveMuteIsOnFeedback { get; }
|
||||
|
||||
// ICodecTransmitVolume
|
||||
void SetTransmitVolume(ushort level);
|
||||
void TransmitMuteOn();
|
||||
void TransmitMuteOff();
|
||||
void TransmitMuteToggle();
|
||||
IntFeedback TransmitLevelFeedback { get; }
|
||||
BoolFeedback TransmitMuteIsOnFeedback { get; }
|
||||
|
||||
// ICodecPrivacy
|
||||
void PrivacyModeOn();
|
||||
void PrivacyModeOff();
|
||||
void PrivacyModeToggle();
|
||||
BoolFeedback PrivacyModeIsOnFeedback { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A class that implements this, contains a reference to an IBasicVolumeControls device.
|
||||
/// For example, speakers attached to an audio zone. The speakers can provide reference
|
||||
|
||||
@@ -490,10 +490,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
protected override Func<bool> IncomingCallFeedbackFunc { get { return () => false; } }
|
||||
|
||||
protected override Func<bool> TransmitMuteFeedbackFunc { get { return () => false; } }
|
||||
|
||||
protected override Func<bool> ReceiveMuteFeedbackFunc { get { return () => false; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the first CallId or returns null
|
||||
/// </summary>
|
||||
@@ -579,46 +575,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SendText(string.Format("xCommand Presentation Stop PresentationSource: {0}", PresentationSource));
|
||||
}
|
||||
|
||||
public override void ReceiveMuteOff()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ReceiveMuteOn()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ReceiveMuteToggle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SetReceiveVolume(ushort level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void TransmitMuteOff()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void TransmitMuteOn()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void TransmitMuteToggle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SetTransmitVolume(ushort level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
SendText("xCommand Audio Microphones Mute");
|
||||
@@ -708,22 +664,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
SendText("xCommand SystemUnit Boot Action: Restart");
|
||||
}
|
||||
|
||||
public override void MuteOff()
|
||||
{
|
||||
}
|
||||
|
||||
public override void MuteOn()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SetVolume(ushort level)
|
||||
{
|
||||
}
|
||||
|
||||
public override void MuteToggle()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||
InCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", _InCall);
|
||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||
TransmitLevelFeedback.OutputChange += (o,a)=> Debug.Console(1, this, "TransmitLevel={0}", _tra
|
||||
}
|
||||
|
||||
protected override Func<bool> InCallFeedbackFunc
|
||||
@@ -33,19 +32,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
bool _IncomingCall;
|
||||
|
||||
|
||||
|
||||
protected override Func<bool> TransmitMuteFeedbackFunc
|
||||
{
|
||||
get { return () => _TransmitMute; }
|
||||
}
|
||||
bool _TransmitMute;
|
||||
|
||||
protected override Func<bool> ReceiveMuteFeedbackFunc
|
||||
{
|
||||
get { return () => _ReceiveMute; }
|
||||
}
|
||||
bool _ReceiveMute;
|
||||
|
||||
protected override Func<bool> PrivacyModeFeedbackFunc
|
||||
{
|
||||
@@ -155,86 +141,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
VolumeLevelFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void ReceiveMuteOff()
|
||||
public override void VolumeDown(bool pressRelease)
|
||||
{
|
||||
Debug.Console(1, this, "ReceiveMuteOff");
|
||||
|
||||
if (!_ReceiveMute)
|
||||
return;
|
||||
_ReceiveMute = false;
|
||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void ReceiveMuteOn()
|
||||
public override void VolumeUp(bool pressRelease)
|
||||
{
|
||||
Debug.Console(1, this, "ReceiveMuteOn");
|
||||
if (_ReceiveMute)
|
||||
return;
|
||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void ReceiveMuteToggle()
|
||||
{
|
||||
Debug.Console(1, this, "ReceiveMuteToggle");
|
||||
|
||||
_ReceiveMute = !_ReceiveMute;
|
||||
ReceiveMuteIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="level"></param>
|
||||
public override void SetReceiveVolume(ushort level)
|
||||
{
|
||||
Debug.Console(1, this, "SetReceiveVolume: {0}", level);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void TransmitMuteOff()
|
||||
{
|
||||
Debug.Console(1, this, "TransmitMuteOff");
|
||||
|
||||
if (!_TransmitMute)
|
||||
return;
|
||||
_TransmitMute = false;
|
||||
TransmitMuteIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void TransmitMuteOn()
|
||||
{
|
||||
Debug.Console(1, this, "TransmitMuteOn");
|
||||
if (_TransmitMute)
|
||||
return;
|
||||
TransmitMuteIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void TransmitMuteToggle()
|
||||
{
|
||||
_TransmitMute = !_TransmitMute;
|
||||
Debug.Console(1, this, "TransmitMuteToggle: {0}", _TransmitMute);
|
||||
TransmitMuteIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void SetTransmitVolume(ushort level)
|
||||
{
|
||||
Debug.Console(1, this, "SetTransmitVolume: {0}", level);
|
||||
|
||||
}
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
|
||||
@@ -9,7 +9,7 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, IBasicVolumeWithFeedback //, ICodecAudio
|
||||
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
|
||||
{
|
||||
#region IUsageTracking Members
|
||||
|
||||
@@ -28,8 +28,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
abstract protected Func<bool> InCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> TransmitMuteFeedbackFunc { get; }
|
||||
abstract protected Func<bool> ReceiveMuteFeedbackFunc { get; }
|
||||
abstract protected Func<bool> PrivacyModeFeedbackFunc { get; }
|
||||
|
||||
#warning WILL ADD TRANSMIT AND REVEICE LEVEL FUNCS AFTER MERGE
|
||||
@@ -41,8 +39,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
InCallFeedback = new BoolFeedback(InCallFeedbackFunc);
|
||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||
ReceiveMuteIsOnFeedback = new BoolFeedback(ReceiveMuteFeedbackFunc);
|
||||
TransmitMuteIsOnFeedback = new BoolFeedback(TransmitMuteFeedbackFunc);
|
||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeFeedbackFunc);
|
||||
#warning ADDING TX/RX FEEDBACKS HERE
|
||||
|
||||
@@ -82,8 +78,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
InCallFeedback,
|
||||
IncomingCallFeedback,
|
||||
ReceiveMuteIsOnFeedback,
|
||||
TransmitMuteIsOnFeedback,
|
||||
PrivacyModeIsOnFeedback
|
||||
};
|
||||
}
|
||||
@@ -93,25 +87,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
#region ICodecAudio Members
|
||||
|
||||
public IntFeedback ReceiveLevelFeedback { get; private set; }
|
||||
public BoolFeedback ReceiveMuteIsOnFeedback { get; private set; }
|
||||
public abstract void ReceiveMuteOff();
|
||||
public abstract void ReceiveMuteOn();
|
||||
public abstract void ReceiveMuteToggle();
|
||||
public abstract void SetReceiveVolume(ushort level);
|
||||
|
||||
public IntFeedback TransmitLevelFeedback { get; private set; }
|
||||
public BoolFeedback TransmitMuteIsOnFeedback { get; private set; }
|
||||
public abstract void TransmitMuteOff();
|
||||
public abstract void TransmitMuteOn();
|
||||
public abstract void TransmitMuteToggle();
|
||||
public abstract void SetTransmitVolume(ushort level);
|
||||
|
||||
public abstract void PrivacyModeOn();
|
||||
public abstract void PrivacyModeOff();
|
||||
public abstract void PrivacyModeToggle();
|
||||
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
|
||||
|
||||
|
||||
public BoolFeedback MuteFeedback { get; private set; }
|
||||
|
||||
public abstract void MuteOff();
|
||||
|
||||
public abstract void MuteOn();
|
||||
|
||||
public abstract void SetVolume(ushort level);
|
||||
|
||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||
|
||||
public abstract void MuteToggle();
|
||||
|
||||
public abstract void VolumeDown(bool pressRelease);
|
||||
|
||||
|
||||
public abstract void VolumeUp(bool pressRelease);
|
||||
|
||||
#endregion
|
||||
|
||||
#region IHasSharing Members
|
||||
@@ -123,30 +121,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
#endregion
|
||||
|
||||
#region IBasicVolumeWithFeedback Members
|
||||
|
||||
public BoolFeedback MuteFeedback { get; private set; }
|
||||
|
||||
public abstract void MuteOff();
|
||||
|
||||
public abstract void MuteOn();
|
||||
|
||||
public abstract void SetVolume(ushort level);
|
||||
|
||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IBasicVolumeControls Members
|
||||
|
||||
public abstract void MuteToggle();
|
||||
|
||||
public abstract void VolumeDown(bool pressRelease);
|
||||
|
||||
|
||||
public abstract void VolumeUp(bool pressRelease);
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user