mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 12:37:07 +00:00
Finishes converting all existing types to new DeviceFactory mechanism. #106
This commit is contained in:
parent
2170a79399
commit
4f6ae386b4
29 changed files with 626 additions and 334 deletions
|
|
@ -10,7 +10,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
|||
|
||||
namespace PepperDash.Essentials.Devices.Common.AudioCodec
|
||||
{
|
||||
public abstract class AudioCodecBase : Device, IHasDialer, IUsageTracking, IAudioCodecInfo
|
||||
public abstract class AudioCodecBase : EssentialsDevice, IHasDialer, IUsageTracking, IAudioCodecInfo
|
||||
{
|
||||
|
||||
public event EventHandler<CodecCallStatusItemChangeEventArgs> CallStatusChange;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Crestron.SimplSharp;
|
|||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.AudioCodec
|
||||
|
|
@ -111,4 +112,20 @@ namespace PepperDash.Essentials.Devices.Common.AudioCodec
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MockACFactory : EssentialsDeviceFactory<MockAC>
|
||||
{
|
||||
public MockACFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "mockac" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new MockAc Device");
|
||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<AudioCodec.MockAcPropertiesConfig>(dc.Properties.ToString());
|
||||
return new AudioCodec.MockAC(dc.Key, dc.Name, props);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue