mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
Replaced incallfeedback with activecallcount....
This commit is contained in:
@@ -127,13 +127,14 @@
|
||||
<Compile Include="SetTopBox\IRSetTopBoxBase.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Streaming\Roku.cs" />
|
||||
<Compile Include="VC\CiscoCodec\CiscoCodec.cs" />
|
||||
<Compile Include="VC\CiscoCodec\xConfiguration.cs" />
|
||||
<Compile Include="VC\CiscoCodec\xEvent.cs" />
|
||||
<Compile Include="VC\CiscoCodec\HttpApiServer.cs" />
|
||||
<Compile Include="VC\MockVC\MockVC.cs" />
|
||||
<Compile Include="VC\CiscoCodec\xStatus.cs" />
|
||||
<Compile Include="VC\VideoCodecBase.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\CiscoCodec.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xConfiguration.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xEvent.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\HttpApiServer.cs" />
|
||||
<Compile Include="VideoCodec\CodecActiveCallItem.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockVC.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xStatus.cs" />
|
||||
<Compile Include="VideoCodec\VideoCodecBase.cs" />
|
||||
<None Include="Properties\ControlSystem.cfg" />
|
||||
</ItemGroup>
|
||||
<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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Net.Http;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
public class HttpApiServer
|
||||
{
|
||||
public static Dictionary<string, string> ExtensionContentTypes;
|
||||
|
||||
public event EventHandler<OnHttpRequestArgs> ApiRequest;
|
||||
public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; }
|
||||
|
||||
public string HtmlRoot { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SIMPL+ can only execute the default constructor. If you have variables that require initialization, please
|
||||
/// use an Initialize method
|
||||
/// </summary>
|
||||
public HttpApiServer()
|
||||
{
|
||||
ExtensionContentTypes = new Dictionary<string, string>
|
||||
{
|
||||
{ ".css", "text/css" },
|
||||
{ ".htm", "text/html" },
|
||||
{ ".html", "text/html" },
|
||||
{ ".jpg", "image/jpeg" },
|
||||
{ ".jpeg", "image/jpeg" },
|
||||
{ ".js", "application/javascript" },
|
||||
{ ".json", "application/json" },
|
||||
{ ".xml", "text/xml" },
|
||||
{ ".map", "application/x-navimap" },
|
||||
{ ".pdf", "application.pdf" },
|
||||
{ ".png", "image/png" },
|
||||
{ ".txt", "text/plain" },
|
||||
};
|
||||
HtmlRoot = @"\HTML";
|
||||
}
|
||||
|
||||
|
||||
public void Start(int port)
|
||||
{
|
||||
// TEMP - this should be inserted by configuring class
|
||||
|
||||
HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer();
|
||||
HttpServer.ServerName = "Cisco API Server";
|
||||
HttpServer.KeepAlive = true;
|
||||
HttpServer.Port = port;
|
||||
HttpServer.OnHttpRequest += Server_Request;
|
||||
HttpServer.Open();
|
||||
|
||||
CrestronEnvironment.ProgramStatusEventHandler += (a) =>
|
||||
{
|
||||
if (a == eProgramStatusEventType.Stopping)
|
||||
{
|
||||
HttpServer.Close();
|
||||
Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void Server_Request(object sender, OnHttpRequestArgs args)
|
||||
{
|
||||
if (args.Request.Header.RequestType == "OPTIONS")
|
||||
{
|
||||
Debug.Console(2, "Asking for OPTIONS");
|
||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
|
||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
string path = Uri.UnescapeDataString(args.Request.Path);
|
||||
var host = args.Request.DataConnection.RemoteEndPointAddress;
|
||||
//string authToken;
|
||||
|
||||
Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host);
|
||||
|
||||
// ----------------------------------- ADD AUTH HERE
|
||||
if (path.StartsWith("/cisco/api"))
|
||||
{
|
||||
var handler = ApiRequest;
|
||||
if (ApiRequest != null)
|
||||
ApiRequest(this, args);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetContentType(string extension)
|
||||
{
|
||||
string type;
|
||||
if (ExtensionContentTypes.ContainsKey(extension))
|
||||
type = ExtensionContentTypes[extension];
|
||||
else
|
||||
type = "text/plain";
|
||||
return type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Net.Http;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
public class HttpApiServer
|
||||
{
|
||||
public static Dictionary<string, string> ExtensionContentTypes;
|
||||
|
||||
public event EventHandler<OnHttpRequestArgs> ApiRequest;
|
||||
public Crestron.SimplSharp.Net.Http.HttpServer HttpServer { get; private set; }
|
||||
|
||||
public string HtmlRoot { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SIMPL+ can only execute the default constructor. If you have variables that require initialization, please
|
||||
/// use an Initialize method
|
||||
/// </summary>
|
||||
public HttpApiServer()
|
||||
{
|
||||
ExtensionContentTypes = new Dictionary<string, string>
|
||||
{
|
||||
{ ".css", "text/css" },
|
||||
{ ".htm", "text/html" },
|
||||
{ ".html", "text/html" },
|
||||
{ ".jpg", "image/jpeg" },
|
||||
{ ".jpeg", "image/jpeg" },
|
||||
{ ".js", "application/javascript" },
|
||||
{ ".json", "application/json" },
|
||||
{ ".xml", "text/xml" },
|
||||
{ ".map", "application/x-navimap" },
|
||||
{ ".pdf", "application.pdf" },
|
||||
{ ".png", "image/png" },
|
||||
{ ".txt", "text/plain" },
|
||||
};
|
||||
HtmlRoot = @"\HTML";
|
||||
}
|
||||
|
||||
|
||||
public void Start(int port)
|
||||
{
|
||||
// TEMP - this should be inserted by configuring class
|
||||
|
||||
HttpServer = new Crestron.SimplSharp.Net.Http.HttpServer();
|
||||
HttpServer.ServerName = "Cisco API Server";
|
||||
HttpServer.KeepAlive = true;
|
||||
HttpServer.Port = port;
|
||||
HttpServer.OnHttpRequest += Server_Request;
|
||||
HttpServer.Open();
|
||||
|
||||
CrestronEnvironment.ProgramStatusEventHandler += (a) =>
|
||||
{
|
||||
if (a == eProgramStatusEventType.Stopping)
|
||||
{
|
||||
HttpServer.Close();
|
||||
Debug.Console(1, "Shutting down HTTP Server on port {0}", HttpServer.Port);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void Server_Request(object sender, OnHttpRequestArgs args)
|
||||
{
|
||||
if (args.Request.Header.RequestType == "OPTIONS")
|
||||
{
|
||||
Debug.Console(2, "Asking for OPTIONS");
|
||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Origin", "*");
|
||||
args.Response.Header.SetHeaderValue("Access-Control-Allow-Methods", "GET, POST, PATCH, PUT, DELETE, OPTIONS");
|
||||
return;
|
||||
}
|
||||
|
||||
string path = Uri.UnescapeDataString(args.Request.Path);
|
||||
var host = args.Request.DataConnection.RemoteEndPointAddress;
|
||||
//string authToken;
|
||||
|
||||
Debug.Console(2, "HTTP Request: {2}: Path='{0}' ?'{1}'", path, args.Request.QueryString, host);
|
||||
|
||||
// ----------------------------------- ADD AUTH HERE
|
||||
if (path.StartsWith("/cisco/api"))
|
||||
{
|
||||
var handler = ApiRequest;
|
||||
if (ApiRequest != null)
|
||||
ApiRequest(this, args);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetContentType(string extension)
|
||||
{
|
||||
string type;
|
||||
if (ExtensionContentTypes.ContainsKey(extension))
|
||||
type = ExtensionContentTypes[extension];
|
||||
else
|
||||
type = "text/plain";
|
||||
return type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,138 +1,138 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
public class CiscoCodecEvents
|
||||
{
|
||||
public class CauseValue
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseType
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseString
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class OrigCallDirection
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RemoteURI
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class DisplayName
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallId
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseCode
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseOrigin
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Protocol
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Duration
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallType
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallRate
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Encryption
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RequestedURI
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class PeopleCountAverage
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallDisconnect
|
||||
{
|
||||
public string id { get; set; }
|
||||
public CauseValue CauseValue { get; set; }
|
||||
public CauseType CauseType { get; set; }
|
||||
public CauseString CauseString { get; set; }
|
||||
public OrigCallDirection OrigCallDirection { get; set; }
|
||||
public RemoteURI RemoteURI { get; set; }
|
||||
public DisplayName DisplayName { get; set; }
|
||||
public CallId CallId { get; set; }
|
||||
public CauseCode CauseCode { get; set; }
|
||||
public CauseOrigin CauseOrigin { get; set; }
|
||||
public Protocol Protocol { get; set; }
|
||||
public Duration Duration { get; set; }
|
||||
public CallType CallType { get; set; }
|
||||
public CallRate CallRate { get; set; }
|
||||
public Encryption Encryption { get; set; }
|
||||
public RequestedURI RequestedURI { get; set; }
|
||||
public PeopleCountAverage PeopleCountAverage { get; set; }
|
||||
}
|
||||
|
||||
public class Event
|
||||
{
|
||||
public CallDisconnect CallDisconnect { get; set; }
|
||||
}
|
||||
|
||||
public class RootObject
|
||||
{
|
||||
public Event Event { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
public class CiscoCodecEvents
|
||||
{
|
||||
public class CauseValue
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseType
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseString
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class OrigCallDirection
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RemoteURI
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class DisplayName
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallId
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseCode
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CauseOrigin
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Protocol
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Duration
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallType
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallRate
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Encryption
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RequestedURI
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class PeopleCountAverage
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class CallDisconnect
|
||||
{
|
||||
public string id { get; set; }
|
||||
public CauseValue CauseValue { get; set; }
|
||||
public CauseType CauseType { get; set; }
|
||||
public CauseString CauseString { get; set; }
|
||||
public OrigCallDirection OrigCallDirection { get; set; }
|
||||
public RemoteURI RemoteURI { get; set; }
|
||||
public DisplayName DisplayName { get; set; }
|
||||
public CallId CallId { get; set; }
|
||||
public CauseCode CauseCode { get; set; }
|
||||
public CauseOrigin CauseOrigin { get; set; }
|
||||
public Protocol Protocol { get; set; }
|
||||
public Duration Duration { get; set; }
|
||||
public CallType CallType { get; set; }
|
||||
public CallRate CallRate { get; set; }
|
||||
public Encryption Encryption { get; set; }
|
||||
public RequestedURI RequestedURI { get; set; }
|
||||
public PeopleCountAverage PeopleCountAverage { get; set; }
|
||||
}
|
||||
|
||||
public class Event
|
||||
{
|
||||
public CallDisconnect CallDisconnect { get; set; }
|
||||
}
|
||||
|
||||
public class RootObject
|
||||
{
|
||||
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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
public class MockVC : VideoCodecBase
|
||||
{
|
||||
public MockVC(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
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);
|
||||
//ReceiveLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveLevel={0}", _ReceiveLevel);
|
||||
//ReceiveMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveMute={0}", _ReceiveMute);
|
||||
//TransmitLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitLevel={0}", _TransmitLevel);
|
||||
//TransmitMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitMute={0}", _TransmitMute);
|
||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
||||
}
|
||||
|
||||
protected override Func<bool> InCallFeedbackFunc
|
||||
{
|
||||
get { return () => _InCall; }
|
||||
}
|
||||
bool _InCall;
|
||||
|
||||
protected override Func<bool> IncomingCallFeedbackFunc
|
||||
{
|
||||
get { return () => _IncomingCall; }
|
||||
}
|
||||
bool _IncomingCall;
|
||||
|
||||
//protected override Func<int> TransmitLevelFeedbackFunc
|
||||
//{
|
||||
// get { return () => _TransmitLevel; }
|
||||
//}
|
||||
//int _TransmitLevel;
|
||||
|
||||
//protected override Func<bool> TransmitMuteFeedbackFunc
|
||||
//{
|
||||
// get { return () => _TransmitMute; }
|
||||
//}
|
||||
//bool _TransmitMute;
|
||||
|
||||
//protected override Func<int> ReceiveLevelFeedbackFunc
|
||||
//{
|
||||
// get { return () => _ReceiveLevel; }
|
||||
//}
|
||||
//int _ReceiveLevel;
|
||||
|
||||
//protected override Func<bool> ReceiveMuteFeedbackFunc
|
||||
//{
|
||||
// get { return () => _ReceiveMute; }
|
||||
//}
|
||||
//bool _ReceiveMute;
|
||||
|
||||
protected override Func<bool> PrivacyModeFeedbackFunc
|
||||
{
|
||||
get { return () => _PrivacyModeIsOn; }
|
||||
}
|
||||
bool _PrivacyModeIsOn;
|
||||
|
||||
protected override Func<int> VolumeLevelFeedbackFunc
|
||||
{
|
||||
get { return () => _VolumeLevel; }
|
||||
}
|
||||
int _VolumeLevel;
|
||||
|
||||
protected override Func<bool> MuteFeedbackFunc
|
||||
{
|
||||
get { return () => _IsMuted; }
|
||||
}
|
||||
bool _IsMuted;
|
||||
|
||||
protected override Func<string> SharingSourceFeedbackFunc
|
||||
{
|
||||
get { return () => _SharingSource; }
|
||||
}
|
||||
string _SharingSource;
|
||||
|
||||
/// <summary>
|
||||
/// Dials, yo!
|
||||
/// </summary>
|
||||
public override void Dial(string s)
|
||||
{
|
||||
Debug.Console(1, this, "Dial: {0}", s);
|
||||
|
||||
_InCall = true;
|
||||
InCallFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void EndCall()
|
||||
{
|
||||
Debug.Console(1, this, "EndCall");
|
||||
_InCall = false;
|
||||
InCallFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For a call from the test methods below
|
||||
/// </summary>
|
||||
public override void AcceptCall()
|
||||
{
|
||||
Debug.Console(1, this, "AcceptCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For a call from the test methods below
|
||||
/// </summary>
|
||||
public override void RejectCall()
|
||||
{
|
||||
Debug.Console(1, this, "RejectCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes horrible tones go out on the wire!
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public override void SendDtmf(string s)
|
||||
{
|
||||
Debug.Console(1, this, "SendDTMF: {0}", s);
|
||||
}
|
||||
|
||||
public override void StartSharing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void StopSharing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by routing to make it happen
|
||||
/// </summary>
|
||||
/// <param name="selector"></param>
|
||||
public override void ExecuteSwitch(object selector)
|
||||
{
|
||||
Debug.Console(1, this, "ExecuteSwitch");
|
||||
_SharingSource = selector.ToString();
|
||||
|
||||
}
|
||||
|
||||
public override void MuteOff()
|
||||
{
|
||||
_IsMuted = false;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteOn()
|
||||
{
|
||||
_IsMuted = true;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteToggle()
|
||||
{
|
||||
_IsMuted = !_IsMuted;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void SetVolume(ushort level)
|
||||
{
|
||||
_VolumeLevel = level;
|
||||
VolumeLevelFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void VolumeDown(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
public override void VolumeUp(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
//public override void ReceiveMuteOff()
|
||||
//{
|
||||
// Debug.Console(1, this, "ReceiveMuteOff");
|
||||
|
||||
// if (!_ReceiveMute)
|
||||
// return;
|
||||
// _ReceiveMute = false;
|
||||
// ReceiveMuteIsOnFeedback.FireUpdate();
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
//public override void ReceiveMuteOn()
|
||||
//{
|
||||
// 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()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOn");
|
||||
if (_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = true;
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
|
||||
}
|
||||
|
||||
public override void PrivacyModeOff()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOff");
|
||||
if (!_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = false;
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void PrivacyModeToggle()
|
||||
{
|
||||
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
||||
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
//********************************************************
|
||||
// SIMULATION METHODS
|
||||
|
||||
public void TestIncomingCall(string url)
|
||||
{
|
||||
Debug.Console(1, this, "TestIncomingCall");
|
||||
|
||||
_IncomingCall = true;
|
||||
IncomingCallFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public void TestFarEndHangup()
|
||||
{
|
||||
Debug.Console(1, this, "TestFarEndHangup");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
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.VideoCodec
|
||||
{
|
||||
public class MockVC : VideoCodecBase
|
||||
{
|
||||
public MockVC(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||
ActiveCallCountFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", _ActiveCallCount);
|
||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||
//ReceiveLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveLevel={0}", _ReceiveLevel);
|
||||
//ReceiveMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "ReceiveMute={0}", _ReceiveMute);
|
||||
//TransmitLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitLevel={0}", _TransmitLevel);
|
||||
//TransmitMuteIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "TransmitMute={0}", _TransmitMute);
|
||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
||||
}
|
||||
|
||||
protected override Func<int> ActiveCallCountFeedbackFunc
|
||||
{
|
||||
get { return () => _ActiveCallCount; }
|
||||
}
|
||||
int _ActiveCallCount;
|
||||
|
||||
protected override Func<bool> IncomingCallFeedbackFunc
|
||||
{
|
||||
get { return () => _IncomingCall; }
|
||||
}
|
||||
bool _IncomingCall;
|
||||
|
||||
//protected override Func<int> TransmitLevelFeedbackFunc
|
||||
//{
|
||||
// get { return () => _TransmitLevel; }
|
||||
//}
|
||||
//int _TransmitLevel;
|
||||
|
||||
//protected override Func<bool> TransmitMuteFeedbackFunc
|
||||
//{
|
||||
// get { return () => _TransmitMute; }
|
||||
//}
|
||||
//bool _TransmitMute;
|
||||
|
||||
//protected override Func<int> ReceiveLevelFeedbackFunc
|
||||
//{
|
||||
// get { return () => _ReceiveLevel; }
|
||||
//}
|
||||
//int _ReceiveLevel;
|
||||
|
||||
//protected override Func<bool> ReceiveMuteFeedbackFunc
|
||||
//{
|
||||
// get { return () => _ReceiveMute; }
|
||||
//}
|
||||
//bool _ReceiveMute;
|
||||
|
||||
protected override Func<bool> PrivacyModeIsOnFeedbackFunc
|
||||
{
|
||||
get { return () => _PrivacyModeIsOn; }
|
||||
}
|
||||
bool _PrivacyModeIsOn;
|
||||
|
||||
protected override Func<int> VolumeLevelFeedbackFunc
|
||||
{
|
||||
get { return () => _VolumeLevel; }
|
||||
}
|
||||
int _VolumeLevel;
|
||||
|
||||
protected override Func<bool> MuteFeedbackFunc
|
||||
{
|
||||
get { return () => _IsMuted; }
|
||||
}
|
||||
bool _IsMuted;
|
||||
|
||||
protected override Func<string> SharingSourceFeedbackFunc
|
||||
{
|
||||
get { return () => _SharingSource; }
|
||||
}
|
||||
string _SharingSource;
|
||||
|
||||
/// <summary>
|
||||
/// Dials, yo!
|
||||
/// </summary>
|
||||
public override void Dial(string s)
|
||||
{
|
||||
Debug.Console(1, this, "Dial: {0}", s);
|
||||
|
||||
//_InCall = true;
|
||||
//IsInCall.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void EndCall()
|
||||
{
|
||||
Debug.Console(1, this, "EndCall");
|
||||
//_InCall = false;
|
||||
//IsInCall.FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For a call from the test methods below
|
||||
/// </summary>
|
||||
public override void AcceptCall()
|
||||
{
|
||||
Debug.Console(1, this, "AcceptCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For a call from the test methods below
|
||||
/// </summary>
|
||||
public override void RejectCall()
|
||||
{
|
||||
Debug.Console(1, this, "RejectCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes horrible tones go out on the wire!
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public override void SendDtmf(string s)
|
||||
{
|
||||
Debug.Console(1, this, "SendDTMF: {0}", s);
|
||||
}
|
||||
|
||||
public override void StartSharing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void StopSharing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by routing to make it happen
|
||||
/// </summary>
|
||||
/// <param name="selector"></param>
|
||||
public override void ExecuteSwitch(object selector)
|
||||
{
|
||||
Debug.Console(1, this, "ExecuteSwitch");
|
||||
_SharingSource = selector.ToString();
|
||||
|
||||
}
|
||||
|
||||
public override void MuteOff()
|
||||
{
|
||||
_IsMuted = false;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteOn()
|
||||
{
|
||||
_IsMuted = true;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteToggle()
|
||||
{
|
||||
_IsMuted = !_IsMuted;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void SetVolume(ushort level)
|
||||
{
|
||||
_VolumeLevel = level;
|
||||
VolumeLevelFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void VolumeDown(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
public override void VolumeUp(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
//public override void ReceiveMuteOff()
|
||||
//{
|
||||
// Debug.Console(1, this, "ReceiveMuteOff");
|
||||
|
||||
// if (!_ReceiveMute)
|
||||
// return;
|
||||
// _ReceiveMute = false;
|
||||
// ReceiveMuteIsOnFeedback.FireUpdate();
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
//public override void ReceiveMuteOn()
|
||||
//{
|
||||
// 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()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOn");
|
||||
if (_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = true;
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
|
||||
}
|
||||
|
||||
public override void PrivacyModeOff()
|
||||
{
|
||||
Debug.Console(1, this, "PrivacyMuteOff");
|
||||
if (!_PrivacyModeIsOn)
|
||||
return;
|
||||
_PrivacyModeIsOn = false;
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void PrivacyModeToggle()
|
||||
{
|
||||
_PrivacyModeIsOn = !_PrivacyModeIsOn;
|
||||
Debug.Console(1, this, "PrivacyMuteToggle: {0}", _PrivacyModeIsOn);
|
||||
PrivacyModeIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
//********************************************************
|
||||
// SIMULATION METHODS
|
||||
|
||||
public void TestIncomingCall(string url)
|
||||
{
|
||||
Debug.Console(1, this, "TestIncomingCall");
|
||||
|
||||
_IncomingCall = true;
|
||||
IncomingCallFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public void TestFarEndHangup()
|
||||
{
|
||||
Debug.Console(1, this, "TestFarEndHangup");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,134 +1,140 @@
|
||||
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.VideoCodec
|
||||
{
|
||||
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
|
||||
{
|
||||
#region IUsageTracking Members
|
||||
|
||||
/// <summary>
|
||||
/// This object can be added by outside users of this class to provide usage tracking
|
||||
/// for various services
|
||||
/// </summary>
|
||||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingInputs Members
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public BoolFeedback InCallFeedback { get; private set; }
|
||||
public BoolFeedback IncomingCallFeedback { get; private set; }
|
||||
|
||||
abstract protected Func<bool> InCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> PrivacyModeFeedbackFunc { get; }
|
||||
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
||||
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
||||
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
|
||||
|
||||
public VideoCodecBase(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
InCallFeedback = new BoolFeedback(InCallFeedbackFunc);
|
||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeFeedbackFunc);
|
||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
||||
SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc);
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
|
||||
InCallFeedback.OutputChange += new EventHandler<EventArgs>(InCallFeedback_OutputChange);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void InCallFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
if (UsageTracker != null)
|
||||
{
|
||||
if (InCallFeedback.BoolValue)
|
||||
UsageTracker.StartDeviceUsage();
|
||||
else
|
||||
UsageTracker.EndDeviceUsage();
|
||||
}
|
||||
}
|
||||
#region IHasDialer Members
|
||||
|
||||
public abstract void Dial(string s);
|
||||
public abstract void EndCall();
|
||||
public abstract void AcceptCall();
|
||||
public abstract void RejectCall();
|
||||
public abstract void SendDtmf(string s);
|
||||
|
||||
#endregion
|
||||
|
||||
public virtual List<Feedback> Feedbacks
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<Feedback>
|
||||
{
|
||||
InCallFeedback,
|
||||
IncomingCallFeedback,
|
||||
PrivacyModeIsOnFeedback,
|
||||
SharingSourceFeedback
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void ExecuteSwitch(object selector);
|
||||
|
||||
#region ICodecAudio Members
|
||||
|
||||
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
|
||||
|
||||
public abstract void StartSharing();
|
||||
public abstract void StopSharing();
|
||||
|
||||
public StringFeedback SharingSourceFeedback { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
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.VideoCodec
|
||||
{
|
||||
public abstract class VideoCodecBase : Device, IRoutingSinkWithSwitching, IUsageTracking, IHasDialer, IHasSharing, ICodecAudio
|
||||
{
|
||||
#region IUsageTracking Members
|
||||
|
||||
/// <summary>
|
||||
/// This object can be added by outside users of this class to provide usage tracking
|
||||
/// for various services
|
||||
/// </summary>
|
||||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingInputs Members
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public bool IsInCall { get { return ActiveCallCountFeedback.IntValue > 0; } }
|
||||
|
||||
public BoolFeedback IncomingCallFeedback { get; private set; }
|
||||
|
||||
public IntFeedback ActiveCallCountFeedback { get; private set; }
|
||||
|
||||
abstract protected Func<int> ActiveCallCountFeedbackFunc { get; }
|
||||
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> PrivacyModeIsOnFeedbackFunc { get; }
|
||||
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
||||
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
||||
abstract protected Func<string> SharingSourceFeedbackFunc { get; }
|
||||
|
||||
public List<CodecActiveCallItem> ActiveCalls { get; set; }
|
||||
|
||||
public VideoCodecBase(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
ActiveCallCountFeedback = new IntFeedback(ActiveCallCountFeedbackFunc);
|
||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc);
|
||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
||||
SharingSourceFeedback = new StringFeedback(SharingSourceFeedbackFunc);
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
|
||||
ActiveCallCountFeedback.OutputChange += new EventHandler<EventArgs>(ActiveCallCountFeedback_OutputChange);
|
||||
|
||||
ActiveCalls = new List<CodecActiveCallItem>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void ActiveCallCountFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
if (UsageTracker != null)
|
||||
{
|
||||
if (IsInCall)
|
||||
UsageTracker.StartDeviceUsage();
|
||||
else
|
||||
UsageTracker.EndDeviceUsage();
|
||||
}
|
||||
}
|
||||
#region IHasDialer Members
|
||||
|
||||
public abstract void Dial(string s);
|
||||
public abstract void EndCall();
|
||||
public abstract void AcceptCall();
|
||||
public abstract void RejectCall();
|
||||
public abstract void SendDtmf(string s);
|
||||
|
||||
#endregion
|
||||
|
||||
public virtual List<Feedback> Feedbacks
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<Feedback>
|
||||
{
|
||||
IncomingCallFeedback,
|
||||
PrivacyModeIsOnFeedback,
|
||||
SharingSourceFeedback
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void ExecuteSwitch(object selector);
|
||||
|
||||
#region ICodecAudio Members
|
||||
|
||||
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
|
||||
|
||||
public abstract void StartSharing();
|
||||
public abstract void StopSharing();
|
||||
|
||||
public StringFeedback SharingSourceFeedback { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user