mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Replaced incallfeedback with activecallcount....
This commit is contained in:
@@ -20,7 +20,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
void SendDtmf(string digit);
|
void SendDtmf(string digit);
|
||||||
|
|
||||||
BoolFeedback InCallFeedback { get; }
|
IntFeedback ActiveCallCountFeedback { get; }
|
||||||
BoolFeedback IncomingCallFeedback { get; }
|
BoolFeedback IncomingCallFeedback { get; }
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines minimum volume controls for a codec device with dialing capabilities
|
/// Defines minimum volume controls for a codec device with dialing capabilities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ICodecAudio : IBasicVolumeWithFeedback, ICodecPrivacy
|
public interface ICodecAudio : IBasicVolumeWithFeedback, IPrivacy
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds control of codec receive volume
|
/// Adds control of codec receive volume
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ICodecReceiveVolume
|
public interface IReceiveVolume
|
||||||
{
|
{
|
||||||
// Break this out into 3 interfaces
|
// Break this out into 3 interfaces
|
||||||
void SetReceiveVolume(ushort level);
|
void SetReceiveVolume(ushort level);
|
||||||
@@ -52,7 +52,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds control of codec transmit volume
|
/// Adds control of codec transmit volume
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ICodecTransmitVolume
|
public interface ITransmitVolume
|
||||||
{
|
{
|
||||||
void SetTransmitVolume(ushort level);
|
void SetTransmitVolume(ushort level);
|
||||||
void TransmitMuteOn();
|
void TransmitMuteOn();
|
||||||
@@ -65,7 +65,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds control of codec privacy function (microphone mute)
|
/// Adds control of codec privacy function (microphone mute)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ICodecPrivacy
|
public interface IPrivacy
|
||||||
{
|
{
|
||||||
void PrivacyModeOn();
|
void PrivacyModeOn();
|
||||||
void PrivacyModeOff();
|
void PrivacyModeOff();
|
||||||
|
|||||||
@@ -127,13 +127,14 @@
|
|||||||
<Compile Include="SetTopBox\IRSetTopBoxBase.cs" />
|
<Compile Include="SetTopBox\IRSetTopBoxBase.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Streaming\Roku.cs" />
|
<Compile Include="Streaming\Roku.cs" />
|
||||||
<Compile Include="VC\CiscoCodec\CiscoCodec.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\CiscoCodec.cs" />
|
||||||
<Compile Include="VC\CiscoCodec\xConfiguration.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\xConfiguration.cs" />
|
||||||
<Compile Include="VC\CiscoCodec\xEvent.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\xEvent.cs" />
|
||||||
<Compile Include="VC\CiscoCodec\HttpApiServer.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\HttpApiServer.cs" />
|
||||||
<Compile Include="VC\MockVC\MockVC.cs" />
|
<Compile Include="VideoCodec\CodecActiveCallItem.cs" />
|
||||||
<Compile Include="VC\CiscoCodec\xStatus.cs" />
|
<Compile Include="VideoCodec\MockVC\MockVC.cs" />
|
||||||
<Compile Include="VC\VideoCodecBase.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\xStatus.cs" />
|
||||||
|
<Compile Include="VideoCodec\VideoCodecBase.cs" />
|
||||||
<None Include="Properties\ControlSystem.cfg" />
|
<None Include="Properties\ControlSystem.cfg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +1,106 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharp.Net.Http;
|
using Crestron.SimplSharp.Net.Http;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
{
|
{
|
||||||
public class HttpApiServer
|
public class HttpApiServer
|
||||||
{
|
{
|
||||||
public static Dictionary<string, string> ExtensionContentTypes;
|
public static Dictionary<string, string> ExtensionContentTypes;
|
||||||
|
|
||||||
public event EventHandler<OnHttpRequestArgs> ApiRequest;
|
public event EventHandler<OnHttpRequestArgs> ApiRequest;
|
||||||
public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; }
|
public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; }
|
||||||
|
|
||||||
public string HtmlRoot { get; set; }
|
public string HtmlRoot { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SIMPL+ can only execute the default constructor. If you have variables that require initialization, please
|
/// SIMPL+ can only execute the default constructor. If you have variables that require initialization, please
|
||||||
/// use an Initialize method
|
/// use an Initialize method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public HttpApiServer()
|
public HttpApiServer()
|
||||||
{
|
{
|
||||||
ExtensionContentTypes = new Dictionary<string, string>
|
ExtensionContentTypes = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ ".css", "text/css" },
|
{ ".css", "text/css" },
|
||||||
{ ".htm", "text/html" },
|
{ ".htm", "text/html" },
|
||||||
{ ".html", "text/html" },
|
{ ".html", "text/html" },
|
||||||
{ ".jpg", "image/jpeg" },
|
{ ".jpg", "image/jpeg" },
|
||||||
{ ".jpeg", "image/jpeg" },
|
{ ".jpeg", "image/jpeg" },
|
||||||
{ ".js", "application/javascript" },
|
{ ".js", "application/javascript" },
|
||||||
{ ".json", "application/json" },
|
{ ".json", "application/json" },
|
||||||
{ ".xml", "text/xml" },
|
{ ".xml", "text/xml" },
|
||||||
{ ".map", "application/x-navimap" },
|
{ ".map", "application/x-navimap" },
|
||||||
{ ".pdf", "application.pdf" },
|
{ ".pdf", "application.pdf" },
|
||||||
{ ".png", "image/png" },
|
{ ".png", "image/png" },
|
||||||
{ ".txt", "text/plain" },
|
{ ".txt", "text/plain" },
|
||||||
};
|
};
|
||||||
HtmlRoot = @"\HTML";
|
HtmlRoot = @"\HTML";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Start(int port)
|
public void Start(int port)
|
||||||
{
|
{
|
||||||
// TEMP - this should be inserted by configuring class
|
// TEMP - this should be inserted by configuring class
|
||||||
|
|
||||||
HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer();
|
HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer();
|
||||||
HttpServer.ServerName = "Cisco API Server";
|
HttpServer.ServerName = "Cisco API Server";
|
||||||
HttpServer.KeepAlive = true;
|
HttpServer.KeepAlive = true;
|
||||||
HttpServer.Port = port;
|
HttpServer.Port = port;
|
||||||
HttpServer.OnHttpRequest += Server_Request;
|
HttpServer.OnHttpRequest += Server_Request;
|
||||||
HttpServer.Open();
|
HttpServer.Open();
|
||||||
|
|
||||||
CrestronEnvironment.ProgramStatusEventHandler += (a) =>
|
CrestronEnvironment.ProgramStatusEventHandler += (a) =>
|
||||||
{
|
{
|
||||||
if (a == eProgramStatusEventType.Stopping)
|
if (a == eProgramStatusEventType.Stopping)
|
||||||
{
|
{
|
||||||
HttpServer.Close();
|
HttpServer.Close();
|
||||||
Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port);
|
Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void Server_Request(object sender, OnHttpRequestArgs args)
|
void Server_Request(object sender, OnHttpRequestArgs args)
|
||||||
{
|
{
|
||||||
if (args.Request.Header.RequestType == "OPTIONS")
|
if (args.Request.Header.RequestType == "OPTIONS")
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Asking for OPTIONS");
|
Debug.Console(2, "Asking for OPTIONS");
|
||||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
|
args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
|
||||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
|
args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string path = Uri.UnescapeDataString(args.Request.Path);
|
string path = Uri.UnescapeDataString(args.Request.Path);
|
||||||
var host = args.Request.DataConnection.RemoteEndPointAddress;
|
var host = args.Request.DataConnection.RemoteEndPointAddress;
|
||||||
//string authToken;
|
//string authToken;
|
||||||
|
|
||||||
Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host);
|
Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host);
|
||||||
|
|
||||||
// ----------------------------------- ADD AUTH HERE
|
// ----------------------------------- ADD AUTH HERE
|
||||||
if (path.StartsWith("/cisco/api"))
|
if (path.StartsWith("/cisco/api"))
|
||||||
{
|
{
|
||||||
var handler = ApiRequest;
|
var handler = ApiRequest;
|
||||||
if (ApiRequest != null)
|
if (ApiRequest != null)
|
||||||
ApiRequest(this, args);
|
ApiRequest(this, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetContentType(string extension)
|
public static string GetContentType(string extension)
|
||||||
{
|
{
|
||||||
string type;
|
string type;
|
||||||
if (ExtensionContentTypes.ContainsKey(extension))
|
if (ExtensionContentTypes.ContainsKey(extension))
|
||||||
type = ExtensionContentTypes[extension];
|
type = ExtensionContentTypes[extension];
|
||||||
else
|
else
|
||||||
type = "text/plain";
|
type = "text/plain";
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,138 +1,138 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
{
|
{
|
||||||
public class CiscoCodecEvents
|
public class CiscoCodecEvents
|
||||||
{
|
{
|
||||||
public class CauseValue
|
public class CauseValue
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CauseType
|
public class CauseType
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CauseString
|
public class CauseString
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OrigCallDirection
|
public class OrigCallDirection
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RemoteURI
|
public class RemoteURI
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DisplayName
|
public class DisplayName
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CallId
|
public class CallId
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CauseCode
|
public class CauseCode
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CauseOrigin
|
public class CauseOrigin
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Protocol
|
public class Protocol
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Duration
|
public class Duration
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CallType
|
public class CallType
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CallRate
|
public class CallRate
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Encryption
|
public class Encryption
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RequestedURI
|
public class RequestedURI
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PeopleCountAverage
|
public class PeopleCountAverage
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CallDisconnect
|
public class CallDisconnect
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public CauseValue CauseValue { get; set; }
|
public CauseValue CauseValue { get; set; }
|
||||||
public CauseType CauseType { get; set; }
|
public CauseType CauseType { get; set; }
|
||||||
public CauseString CauseString { get; set; }
|
public CauseString CauseString { get; set; }
|
||||||
public OrigCallDirection OrigCallDirection { get; set; }
|
public OrigCallDirection OrigCallDirection { get; set; }
|
||||||
public RemoteURI RemoteURI { get; set; }
|
public RemoteURI RemoteURI { get; set; }
|
||||||
public DisplayName DisplayName { get; set; }
|
public DisplayName DisplayName { get; set; }
|
||||||
public CallId CallId { get; set; }
|
public CallId CallId { get; set; }
|
||||||
public CauseCode CauseCode { get; set; }
|
public CauseCode CauseCode { get; set; }
|
||||||
public CauseOrigin CauseOrigin { get; set; }
|
public CauseOrigin CauseOrigin { get; set; }
|
||||||
public Protocol Protocol { get; set; }
|
public Protocol Protocol { get; set; }
|
||||||
public Duration Duration { get; set; }
|
public Duration Duration { get; set; }
|
||||||
public CallType CallType { get; set; }
|
public CallType CallType { get; set; }
|
||||||
public CallRate CallRate { get; set; }
|
public CallRate CallRate { get; set; }
|
||||||
public Encryption Encryption { get; set; }
|
public Encryption Encryption { get; set; }
|
||||||
public RequestedURI RequestedURI { get; set; }
|
public RequestedURI RequestedURI { get; set; }
|
||||||
public PeopleCountAverage PeopleCountAverage { get; set; }
|
public PeopleCountAverage PeopleCountAverage { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
public CallDisconnect CallDisconnect { get; set; }
|
public CallDisconnect CallDisconnect { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RootObject
|
public class RootObject
|
||||||
{
|
{
|
||||||
public Event Event { get; set; }
|
public Event Event { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
|
|
||||||
|
{
|
||||||
|
public class CodecActiveCallItem
|
||||||
|
{
|
||||||
|
public string Name { get; private set; }
|
||||||
|
|
||||||
|
public string Number { get; private set; }
|
||||||
|
|
||||||
|
public eCodecCallType Type { get; private set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum eCodecCallType
|
||||||
|
{
|
||||||
|
None, Audio, Video
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,306 +1,306 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public class MockVC : VideoCodecBase
|
public class MockVC : VideoCodecBase
|
||||||
{
|
{
|
||||||
public MockVC(string key, string name)
|
public MockVC(string key, string name)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||||
InCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", _InCall);
|
ActiveCallCountFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", _ActiveCallCount);
|
||||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||||
//ReceiveLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveLevel={0}", _ReceiveLevel);
|
//ReceiveLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveLevel={0}", _ReceiveLevel);
|
||||||
//ReceiveMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveMute={0}", _ReceiveMute);
|
//ReceiveMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveMute={0}", _ReceiveMute);
|
||||||
//TransmitLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitLevel={0}", _TransmitLevel);
|
//TransmitLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitLevel={0}", _TransmitLevel);
|
||||||
//TransmitMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitMute={0}", _TransmitMute);
|
//TransmitMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitMute={0}", _TransmitMute);
|
||||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Func<bool> InCallFeedbackFunc
|
protected override Func<int> ActiveCallCountFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _InCall; }
|
get { return () => _ActiveCallCount; }
|
||||||
}
|
}
|
||||||
bool _InCall;
|
int _ActiveCallCount;
|
||||||
|
|
||||||
protected override Func<bool> IncomingCallFeedbackFunc
|
protected override Func<bool> IncomingCallFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _IncomingCall; }
|
get { return () => _IncomingCall; }
|
||||||
}
|
}
|
||||||
bool _IncomingCall;
|
bool _IncomingCall;
|
||||||
|
|
||||||
//protected override Func<int> TransmitLevelFeedbackFunc
|
//protected override Func<int> TransmitLevelFeedbackFunc
|
||||||
//{
|
//{
|
||||||
// get { return () => _TransmitLevel; }
|
// get { return () => _TransmitLevel; }
|
||||||
//}
|
//}
|
||||||
//int _TransmitLevel;
|
//int _TransmitLevel;
|
||||||
|
|
||||||
//protected override Func<bool> TransmitMuteFeedbackFunc
|
//protected override Func<bool> TransmitMuteFeedbackFunc
|
||||||
//{
|
//{
|
||||||
// get { return () => _TransmitMute; }
|
// get { return () => _TransmitMute; }
|
||||||
//}
|
//}
|
||||||
//bool _TransmitMute;
|
//bool _TransmitMute;
|
||||||
|
|
||||||
//protected override Func<int> ReceiveLevelFeedbackFunc
|
//protected override Func<int> ReceiveLevelFeedbackFunc
|
||||||
//{
|
//{
|
||||||
// get { return () => _ReceiveLevel; }
|
// get { return () => _ReceiveLevel; }
|
||||||
//}
|
//}
|
||||||
//int _ReceiveLevel;
|
//int _ReceiveLevel;
|
||||||
|
|
||||||
//protected override Func<bool> ReceiveMuteFeedbackFunc
|
//protected override Func<bool> ReceiveMuteFeedbackFunc
|
||||||
//{
|
//{
|
||||||
// get { return () => _ReceiveMute; }
|
// get { return () => _ReceiveMute; }
|
||||||
//}
|
//}
|
||||||
//bool _ReceiveMute;
|
//bool _ReceiveMute;
|
||||||
|
|
||||||
protected override Func<bool> PrivacyModeFeedbackFunc
|
protected override Func<bool> PrivacyModeIsOnFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _PrivacyModeIsOn; }
|
get { return () => _PrivacyModeIsOn; }
|
||||||
}
|
}
|
||||||
bool _PrivacyModeIsOn;
|
bool _PrivacyModeIsOn;
|
||||||
|
|
||||||
protected override Func<int> VolumeLevelFeedbackFunc
|
protected override Func<int> VolumeLevelFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _VolumeLevel; }
|
get { return () => _VolumeLevel; }
|
||||||
}
|
}
|
||||||
int _VolumeLevel;
|
int _VolumeLevel;
|
||||||
|
|
||||||
protected override Func<bool> MuteFeedbackFunc
|
protected override Func<bool> MuteFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _IsMuted; }
|
get { return () => _IsMuted; }
|
||||||
}
|
}
|
||||||
bool _IsMuted;
|
bool _IsMuted;
|
||||||
|
|
||||||
protected override Func<string> SharingSourceFeedbackFunc
|
protected override Func<string> SharingSourceFeedbackFunc
|
||||||
{
|
{
|
||||||
get { return () => _SharingSource; }
|
get { return () => _SharingSource; }
|
||||||
}
|
}
|
||||||
string _SharingSource;
|
string _SharingSource;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dials, yo!
|
/// Dials, yo!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Dial(string s)
|
public override void Dial(string s)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Dial: {0}", s);
|
Debug.Console(1, this, "Dial: {0}", s);
|
||||||
|
|
||||||
_InCall = true;
|
//_InCall = true;
|
||||||
InCallFeedback.FireUpdate();
|
//IsInCall.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void EndCall()
|
public override void EndCall()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "EndCall");
|
Debug.Console(1, this, "EndCall");
|
||||||
_InCall = false;
|
//_InCall = false;
|
||||||
InCallFeedback.FireUpdate();
|
//IsInCall.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For a call from the test methods below
|
/// For a call from the test methods below
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void AcceptCall()
|
public override void AcceptCall()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "AcceptCall");
|
Debug.Console(1, this, "AcceptCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For a call from the test methods below
|
/// For a call from the test methods below
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void RejectCall()
|
public override void RejectCall()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "RejectCall");
|
Debug.Console(1, this, "RejectCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Makes horrible tones go out on the wire!
|
/// Makes horrible tones go out on the wire!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="s"></param>
|
/// <param name="s"></param>
|
||||||
public override void SendDtmf(string s)
|
public override void SendDtmf(string s)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "SendDTMF: {0}", s);
|
Debug.Console(1, this, "SendDTMF: {0}", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void StartSharing()
|
public override void StartSharing()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void StopSharing()
|
public override void StopSharing()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called by routing to make it happen
|
/// Called by routing to make it happen
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="selector"></param>
|
/// <param name="selector"></param>
|
||||||
public override void ExecuteSwitch(object selector)
|
public override void ExecuteSwitch(object selector)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "ExecuteSwitch");
|
Debug.Console(1, this, "ExecuteSwitch");
|
||||||
_SharingSource = selector.ToString();
|
_SharingSource = selector.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MuteOff()
|
public override void MuteOff()
|
||||||
{
|
{
|
||||||
_IsMuted = false;
|
_IsMuted = false;
|
||||||
MuteFeedback.FireUpdate();
|
MuteFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MuteOn()
|
public override void MuteOn()
|
||||||
{
|
{
|
||||||
_IsMuted = true;
|
_IsMuted = true;
|
||||||
MuteFeedback.FireUpdate();
|
MuteFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MuteToggle()
|
public override void MuteToggle()
|
||||||
{
|
{
|
||||||
_IsMuted = !_IsMuted;
|
_IsMuted = !_IsMuted;
|
||||||
MuteFeedback.FireUpdate();
|
MuteFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetVolume(ushort level)
|
public override void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
_VolumeLevel = level;
|
_VolumeLevel = level;
|
||||||
VolumeLevelFeedback.FireUpdate();
|
VolumeLevelFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void VolumeDown(bool pressRelease)
|
public override void VolumeDown(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void VolumeUp(bool pressRelease)
|
public override void VolumeUp(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public override void ReceiveMuteOff()
|
//public override void ReceiveMuteOff()
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "ReceiveMuteOff");
|
// Debug.Console(1, this, "ReceiveMuteOff");
|
||||||
|
|
||||||
// if (!_ReceiveMute)
|
// if (!_ReceiveMute)
|
||||||
// return;
|
// return;
|
||||||
// _ReceiveMute = false;
|
// _ReceiveMute = false;
|
||||||
// ReceiveMuteIsOnFeedback.FireUpdate();
|
// ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public override void ReceiveMuteOn()
|
//public override void ReceiveMuteOn()
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "ReceiveMuteOn");
|
// Debug.Console(1, this, "ReceiveMuteOn");
|
||||||
// if (_ReceiveMute)
|
// if (_ReceiveMute)
|
||||||
// return;
|
// return;
|
||||||
// ReceiveMuteIsOnFeedback.FireUpdate();
|
// ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public override void ReceiveMuteToggle()
|
//public override void ReceiveMuteToggle()
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "ReceiveMuteToggle");
|
// Debug.Console(1, this, "ReceiveMuteToggle");
|
||||||
|
|
||||||
// _ReceiveMute = !_ReceiveMute;
|
// _ReceiveMute = !_ReceiveMute;
|
||||||
// ReceiveMuteIsOnFeedback.FireUpdate();
|
// ReceiveMuteIsOnFeedback.FireUpdate();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
///// <param name="level"></param>
|
///// <param name="level"></param>
|
||||||
//public override void SetReceiveVolume(ushort level)
|
//public override void SetReceiveVolume(ushort level)
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "SetReceiveVolume: {0}", level);
|
// Debug.Console(1, this, "SetReceiveVolume: {0}", level);
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public override void TransmitMuteOff()
|
//public override void TransmitMuteOff()
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "TransmitMuteOff");
|
// Debug.Console(1, this, "TransmitMuteOff");
|
||||||
|
|
||||||
// if (!_TransmitMute)
|
// if (!_TransmitMute)
|
||||||
// return;
|
// return;
|
||||||
// _TransmitMute = false;
|
// _TransmitMute = false;
|
||||||
// TransmitMuteIsOnFeedback.FireUpdate();
|
// TransmitMuteIsOnFeedback.FireUpdate();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
/////
|
/////
|
||||||
///// </summary>
|
///// </summary>
|
||||||
//public override void TransmitMuteOn()
|
//public override void TransmitMuteOn()
|
||||||
//{
|
//{
|
||||||
// Debug.Console(1, this, "TransmitMuteOn");
|
// Debug.Console(1, this, "TransmitMuteOn");
|
||||||
// if (_TransmitMute)
|
// if (_TransmitMute)
|
||||||
// return;
|
// return;
|
||||||
// TransmitMuteIsOnFeedback.FireUpdate();
|
// TransmitMuteIsOnFeedback.FireUpdate();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//public override void TransmitMuteToggle()
|
//public override void TransmitMuteToggle()
|
||||||
//{
|
//{
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public override void PrivacyModeOn()
|
public override void PrivacyModeOn()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "PrivacyMuteOn");
|
Debug.Console(1, this, "PrivacyMuteOn");
|
||||||
if (_PrivacyModeIsOn)
|
if (_PrivacyModeIsOn)
|
||||||
return;
|
return;
|
||||||
_PrivacyModeIsOn = true;
|
_PrivacyModeIsOn = true;
|
||||||
PrivacyModeIsOnFeedback.FireUpdate();
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrivacyModeOff()
|
public override void PrivacyModeOff()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "PrivacyMuteOff");
|
Debug.Console(1, this, "PrivacyMuteOff");
|
||||||
if (!_PrivacyModeIsOn)
|
if (!_PrivacyModeIsOn)
|
||||||
return;
|
return;
|
||||||
_PrivacyModeIsOn = false;
|
_PrivacyModeIsOn = false;
|
||||||
PrivacyModeIsOnFeedback.FireUpdate();
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PrivacyModeToggle()
|
public override void PrivacyModeToggle()
|
||||||
{
|
{
|
||||||
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
||||||
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||||
PrivacyModeIsOnFeedback.FireUpdate();
|
PrivacyModeIsOnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************************
|
//********************************************************
|
||||||
// SIMULATION METHODS
|
// SIMULATION METHODS
|
||||||
|
|
||||||
public void TestIncomingCall(string url)
|
public void TestIncomingCall(string url)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "TestIncomingCall");
|
Debug.Console(1, this, "TestIncomingCall");
|
||||||
|
|
||||||
_IncomingCall = true;
|
_IncomingCall = true;
|
||||||
IncomingCallFeedback.FireUpdate();
|
IncomingCallFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TestFarEndHangup()
|
public void TestFarEndHangup()
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "TestFarEndHangup");
|
Debug.Console(1, this, "TestFarEndHangup");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,134 +1,140 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
|
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
|
||||||
{
|
{
|
||||||
#region IUsageTracking Members
|
#region IUsageTracking Members
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This object can be added by outside users of this class to provide usage tracking
|
/// This object can be added by outside users of this class to provide usage tracking
|
||||||
/// for various services
|
/// for various services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UsageTracking UsageTracker { get; set; }
|
public UsageTracking UsageTracker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRoutingInputs Members
|
#region IRoutingInputs Members
|
||||||
|
|
||||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public BoolFeedback InCallFeedback { get; private set; }
|
public bool IsInCall { get { return ActiveCallCountFeedback.IntValue > 0; } }
|
||||||
public BoolFeedback IncomingCallFeedback { get; private set; }
|
|
||||||
|
public BoolFeedback IncomingCallFeedback { get; private set; }
|
||||||
abstract protected Func<bool> InCallFeedbackFunc { get; }
|
|
||||||
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
public IntFeedback ActiveCallCountFeedback { get; private set; }
|
||||||
abstract protected Func<bool> PrivacyModeFeedbackFunc { get; }
|
|
||||||
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
abstract protected Func<int> ActiveCallCountFeedbackFunc { get; }
|
||||||
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
||||||
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
|
abstract protected Func<bool> PrivacyModeIsOnFeedbackFunc { get; }
|
||||||
|
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
||||||
public VideoCodecBase(string key, string name)
|
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
||||||
: base(key, name)
|
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
|
||||||
{
|
|
||||||
InCallFeedback = new BoolFeedback(InCallFeedbackFunc);
|
public List<CodecActiveCallItem> ActiveCalls { get; set; }
|
||||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
|
||||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeFeedbackFunc);
|
public VideoCodecBase(string key, string name)
|
||||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
: base(key, name)
|
||||||
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
{
|
||||||
SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc);
|
ActiveCallCountFeedback = new IntFeedback(ActiveCallCountFeedbackFunc);
|
||||||
|
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc);
|
||||||
|
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||||
InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
|
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
||||||
}
|
SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc);
|
||||||
|
|
||||||
/// <summary>
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
///
|
|
||||||
/// </summary>
|
ActiveCallCountFeedback.OutputChange += new EventHandler<EventArgs>(ActiveCallCountFeedback_OutputChange);
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
ActiveCalls = new List<CodecActiveCallItem>();
|
||||||
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
}
|
||||||
{
|
|
||||||
if (UsageTracker != null)
|
/// <summary>
|
||||||
{
|
///
|
||||||
if (InCallFeedback.BoolValue)
|
/// </summary>
|
||||||
UsageTracker.StartDeviceUsage();
|
/// <param name="sender"></param>
|
||||||
else
|
/// <param name="e"></param>
|
||||||
UsageTracker.EndDeviceUsage();
|
void ActiveCallCountFeedback_OutputChange(object sender, EventArgs e)
|
||||||
}
|
{
|
||||||
}
|
if (UsageTracker != null)
|
||||||
#region IHasDialer Members
|
{
|
||||||
|
if (IsInCall)
|
||||||
public abstract void Dial(string s);
|
UsageTracker.StartDeviceUsage();
|
||||||
public abstract void EndCall();
|
else
|
||||||
public abstract void AcceptCall();
|
UsageTracker.EndDeviceUsage();
|
||||||
public abstract void RejectCall();
|
}
|
||||||
public abstract void SendDtmf(string s);
|
}
|
||||||
|
#region IHasDialer Members
|
||||||
#endregion
|
|
||||||
|
public abstract void Dial(string s);
|
||||||
public virtual List<Feedback> Feedbacks
|
public abstract void EndCall();
|
||||||
{
|
public abstract void AcceptCall();
|
||||||
get
|
public abstract void RejectCall();
|
||||||
{
|
public abstract void SendDtmf(string s);
|
||||||
return new List<Feedback>
|
|
||||||
{
|
#endregion
|
||||||
InCallFeedback,
|
|
||||||
IncomingCallFeedback,
|
public virtual List<Feedback> Feedbacks
|
||||||
PrivacyModeIsOnFeedback,
|
{
|
||||||
SharingSourceFeedback
|
get
|
||||||
};
|
{
|
||||||
}
|
return new List<Feedback>
|
||||||
}
|
{
|
||||||
|
IncomingCallFeedback,
|
||||||
public abstract void ExecuteSwitch(object selector);
|
PrivacyModeIsOnFeedback,
|
||||||
|
SharingSourceFeedback
|
||||||
#region ICodecAudio Members
|
};
|
||||||
|
}
|
||||||
public abstract void PrivacyModeOn();
|
}
|
||||||
public abstract void PrivacyModeOff();
|
|
||||||
public abstract void PrivacyModeToggle();
|
public abstract void ExecuteSwitch(object selector);
|
||||||
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
|
|
||||||
|
#region ICodecAudio Members
|
||||||
|
|
||||||
public BoolFeedback MuteFeedback { get; private set; }
|
public abstract void PrivacyModeOn();
|
||||||
|
public abstract void PrivacyModeOff();
|
||||||
public abstract void MuteOff();
|
public abstract void PrivacyModeToggle();
|
||||||
|
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
|
||||||
public abstract void MuteOn();
|
|
||||||
|
|
||||||
public abstract void SetVolume(ushort level);
|
public BoolFeedback MuteFeedback { get; private set; }
|
||||||
|
|
||||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
public abstract void MuteOff();
|
||||||
|
|
||||||
public abstract void MuteToggle();
|
public abstract void MuteOn();
|
||||||
|
|
||||||
public abstract void VolumeDown(bool pressRelease);
|
public abstract void SetVolume(ushort level);
|
||||||
|
|
||||||
|
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||||
public abstract void VolumeUp(bool pressRelease);
|
|
||||||
|
public abstract void MuteToggle();
|
||||||
#endregion
|
|
||||||
|
public abstract void VolumeDown(bool pressRelease);
|
||||||
#region IHasSharing Members
|
|
||||||
|
|
||||||
public abstract void StartSharing();
|
public abstract void VolumeUp(bool pressRelease);
|
||||||
public abstract void StopSharing();
|
|
||||||
|
#endregion
|
||||||
public StringFeedback SharingSourceFeedback { get; private set; }
|
|
||||||
|
#region IHasSharing Members
|
||||||
#endregion
|
|
||||||
|
public abstract void StartSharing();
|
||||||
|
public abstract void StopSharing();
|
||||||
}
|
|
||||||
|
public StringFeedback SharingSourceFeedback { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,11 +11,40 @@ using PepperDash.Essentials.Devices.Common.VideoCodec;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange
|
public class EssentialsHuddleVtc1Room : EssentialsRoomBase, IHasCurrentSourceInfoChange, IPrivacy
|
||||||
{
|
{
|
||||||
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
|
||||||
public event SourceInfoChangeHandler CurrentSingleSourceChange;
|
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
|
protected override Func<bool> OnFeedbackFunc
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -162,6 +191,7 @@ namespace PepperDash.Essentials
|
|||||||
DefaultDisplay = defaultDisplay;
|
DefaultDisplay = defaultDisplay;
|
||||||
VideoCodec = vc;
|
VideoCodec = vc;
|
||||||
DefaultAudioDevice = defaultAudio;
|
DefaultAudioDevice = defaultAudio;
|
||||||
|
|
||||||
if (defaultAudio is IBasicVolumeControls)
|
if (defaultAudio is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
|
DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
|
||||||
else if (defaultAudio is IHasVolumeDevice)
|
else if (defaultAudio is IHasVolumeDevice)
|
||||||
@@ -195,6 +225,12 @@ namespace PepperDash.Essentials
|
|||||||
(DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
(DefaultDisplay as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InCallFeedback = new BoolFeedback(() => false); //###################################################
|
||||||
|
IsSharingFeedback = new BoolFeedback(() => false); //##########################################################
|
||||||
|
PrivacyModeIsOnFeedback = new BoolFeedback(() => false); //####################################################
|
||||||
|
CallTypeFeedback = new IntFeedback(() => 0); //######################################################
|
||||||
|
|
||||||
|
|
||||||
SourceListKey = "default";
|
SourceListKey = "default";
|
||||||
EnablePowerOnToLastSource = true;
|
EnablePowerOnToLastSource = true;
|
||||||
@@ -401,5 +437,25 @@ namespace PepperDash.Essentials
|
|||||||
foreach (var room in allRooms)
|
foreach (var room in allRooms)
|
||||||
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
|
(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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
DialStringBackspaceVisibleFeedback
|
DialStringBackspaceVisibleFeedback
|
||||||
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible]);
|
.LinkInputSig(TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible]);
|
||||||
|
|
||||||
Codec.InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
|
Codec.ActiveCallCountFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -190,7 +190,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ConnectPress()
|
void ConnectPress()
|
||||||
{
|
{
|
||||||
if (Codec.InCallFeedback.BoolValue)
|
if (Codec.IsInCall)
|
||||||
Codec.EndCall();
|
Codec.EndCall();
|
||||||
else
|
else
|
||||||
Codec.Dial(DialStringBuilder.ToString());
|
Codec.Dial(DialStringBuilder.ToString());
|
||||||
@@ -201,13 +201,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
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);
|
Debug.Console(1, "*#* Codec Driver InCallFeedback change={0}", InCall);
|
||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(inCall ? 1 : 0);
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(inCall ? 1 : 0);
|
||||||
StagingBarInterlock.ShowInterlocked(
|
StagingBarInterlock.ShowInterlocked(
|
||||||
inCall ? UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
inCall ? UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||||
|
|
||||||
if (Codec.InCallFeedback.BoolValue) // Call is starting
|
if (Codec.IsInCall) // Call is starting
|
||||||
{
|
{
|
||||||
// Header icon
|
// Header icon
|
||||||
// Volume bar needs to have mic mute
|
// Volume bar needs to have mic mute
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user