Replaced incallfeedback with activecallcount....

This commit is contained in:
Heath Volmer
2017-09-18 14:27:49 -06:00
parent 8df353ab75
commit 95a6f3948f
16 changed files with 4857 additions and 4766 deletions

View File

@@ -11,11 +11,40 @@ using PepperDash.Essentials.Devices.Common.VideoCodec;
namespace PepperDash.Essentials
{
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange, IPrivacy
{
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
public event SourceInfoChangeHandler CurrentSingleSourceChange;
//************************
// Call-related stuff
public BoolFeedback InCallFeedback { get; private set; }
/// <summary>
/// Make this more specific
/// </summary>
public List<CodecActiveCallItem> ActiveCalls { get; private set; }
/// <summary>
/// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis
/// </summary>
public IntFeedback CallTypeFeedback { get; private set; }
/// <summary>
///
/// </summary>
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
/// <summary>
/// When something in the room is sharing with the far end or through other means
/// </summary>
public BoolFeedback IsSharingFeedback { get; private set; }
//************************
protected override Func<bool> OnFeedbackFunc
{
get
@@ -162,6 +191,7 @@ namespace PepperDash.Essentials
DefaultDisplay = defaultDisplay;
VideoCodec = vc;
DefaultAudioDevice = defaultAudio;
if (defaultAudio is IBasicVolumeControls)
DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
else if (defaultAudio is IHasVolumeDevice)
@@ -195,6 +225,12 @@ namespace PepperDash.Essentials
(DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
};
}
InCallFeedback = new BoolFeedback(() => false); //###################################################
IsSharingFeedback = new BoolFeedback(() => false); //##########################################################
PrivacyModeIsOnFeedback = new BoolFeedback(() => false); //####################################################
CallTypeFeedback = new IntFeedback(() => 0); //######################################################
SourceListKey = "default";
EnablePowerOnToLastSource = true;
@@ -401,5 +437,25 @@ namespace PepperDash.Essentials
foreach (var room in allRooms)
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
}
}
#region IPrivacy Members
public void PrivacyModeOff()
{
// Turn off privacy on all things (codec only for now)
}
public void PrivacyModeOn()
{
// Turn on ...
}
public void PrivacyModeToggle()
{
}
#endregion
}
}

View File

@@ -93,7 +93,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
DialStringBackspaceVisibleFeedback
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible]);
Codec.InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
Codec.ActiveCallCountFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
}
/// <summary>
@@ -190,7 +190,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary>
void ConnectPress()
{
if (Codec.InCallFeedback.BoolValue)
if (Codec.IsInCall)
Codec.EndCall();
else
Codec.Dial(DialStringBuilder.ToString());
@@ -201,13 +201,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary>
void InCallFeedback_OutputChange(object sender, EventArgs e)
{
var inCall = Codec.InCallFeedback.BoolValue;
var inCall = Codec.IsInCall;
Debug.Console(1, "*#* Codec Driver InCallFeedback change={0}", InCall);
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(inCall ? 1 : 0);
StagingBarInterlock.ShowInterlocked(
inCall ? UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
if (Codec.InCallFeedback.BoolValue) // Call is starting
if (Codec.IsInCall) // Call is starting
{
// Header icon
// Volume bar needs to have mic mute