Rebuit Changes from dead ecs-541 branch

This commit is contained in:
Neil Dorin
2017-10-22 10:05:26 -06:00
parent 4685850eff
commit 2e98e8d146
11 changed files with 60 additions and 30 deletions

View File

@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Indicates that the device has the capability to share sources outside the local room
/// </summary>
public interface IHasSharing
{
void StartSharing();
void StopSharing();
StringFeedback SharingSourceFeedback { get; }
}
}

View File

@@ -104,7 +104,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Devices\CodecInterfaces.cs" />
<Compile Include="Devices\IHasSharing.cs" />
<Compile Include="Global\JobTimer.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.Codec
{
public interface IHasContentSharing
{
BoolFeedback SharingContentIsOnFeedback { get; }
StringFeedback SharingSourceFeedback { get; }
bool AutoShareContentWhileInCall { get; }
void StartSharing();
void StopSharing();
}
}

View File

@@ -103,6 +103,7 @@
<Compile Include="Codec\iCodecInfo.cs" />
<Compile Include="Codec\iHasCallFavorites.cs" />
<Compile Include="Codec\iHasCallHistory.cs" />
<Compile Include="Codec\iHasContentSharing.cs" />
<Compile Include="Codec\iHasDialer.cs" />
<Compile Include="Codec\iHasDirectory.cs" />
<Compile Include="Codec\iHasScheduleAwareness.cs" />

View File

@@ -130,6 +130,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
protected override Func<bool> SharingContentIsOnFeedbackFunc
{
get
{
return () => CodecStatus.Status.Conference.Presentation.Mode.BoolValue;
}
}
protected override Func<bool> MuteFeedbackFunc
{
get

View File

@@ -319,7 +319,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
contact.Name = c.Name.Value;
contact.ContactId = c.ContactId.Value;
contact.Title = c.Title.Value;
if (c.Title != null)
contact.Title = c.Title.Value;
if(c.FolderId != null)
{

View File

@@ -366,8 +366,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
set
{
// If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false
BoolValue = value == "On";
// If the incoming value is "Sending" it sets the BoolValue true, otherwise sets it false
BoolValue = value == "Sending";
OnValueChanged();
}
}

View File

@@ -81,6 +81,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
}
string _SharingSource;
protected override Func<bool> SharingContentIsOnFeedbackFunc
{
get { return () => _SharingIsOn; }
}
bool _SharingIsOn;
protected override Func<int> VolumeLevelFeedbackFunc
{
get { return () => _VolumeLevel; }
@@ -180,6 +186,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
/// </summary>
public override void StartSharing()
{
_SharingIsOn = true;
}
/// <summary>
@@ -187,11 +194,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
/// </summary>
public override void StopSharing()
{
_SharingIsOn = false;
SharingContentIsOnFeedback.FireUpdate();
}
public override void StandbyActivate()
{
_StandbyIsOn = true;
SharingContentIsOnFeedback.FireUpdate();
}
public override void StandbyDeactivate()

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
public abstract class VideoCodecBase : Device, IRoutingInputsOutputs,
IUsageTracking, IHasDialer, IHasSharing, ICodecAudio, iCodecInfo
IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iCodecInfo
{
/// <summary>
/// Fires when the status of any active, dialing, or incoming call changes or is new
@@ -47,7 +47,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
abstract protected Func<bool> PrivacyModeIsOnFeedbackFunc { get; }
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
abstract protected Func<bool> MuteFeedbackFunc { get; }
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
abstract protected Func<bool> StandbyIsOnFeedbackFunc { get; }
public List<CodecActiveCallItem> ActiveCalls { get; set; }
@@ -56,7 +55,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public bool ShowSelfViewByDefault { get; protected set; }
public bool AutoShareContentWhileInCall { get; protected set; }
public bool IsReady { get; protected set; }
@@ -68,6 +66,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc);
SharingContentIsOnFeedback = new BoolFeedback(SharingContentIsOnFeedbackFunc);
InputPorts = new RoutingPortCollection<RoutingInputPort>();
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
@@ -170,7 +169,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public abstract void StartSharing();
public abstract void StopSharing();
public bool AutoShareContentWhileInCall { get; protected set; }
public StringFeedback SharingSourceFeedback { get; private set; }
public BoolFeedback SharingContentIsOnFeedback { get; private set; }
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
abstract protected Func<bool> SharingContentIsOnFeedbackFunc { get; }
#endregion

View File

@@ -30,8 +30,8 @@ namespace PepperDash.Essentials
/// </summary>
public override void InitializeSystem()
{
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
// ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
ConsoleAccessLevelEnum.AccessOperator);
//CrestronConsole.AddNewConsoleCommand(s => TearDown(), "ungo", "Unloads configuration file",
// ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
@@ -41,7 +41,7 @@ namespace PepperDash.Essentials
},
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
GoWithLoad();
//GoWithLoad();
}
/// <summary>

View File

@@ -214,7 +214,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// <param name="e"></param>
void SharingSourceFeedback_OutputChange(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty((sender as IHasSharing).SharingSourceFeedback.StringValue))
if (!string.IsNullOrEmpty((sender as IHasContentSharing).SharingSourceFeedback.StringValue))
{
// Source is being shared