mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 01:04:56 +00:00
moving interfaces and base classes into Core from Devices Common
maybe too far down the rabbit hole?
This commit is contained in:
@@ -7,7 +7,7 @@ using Crestron.SimplSharp;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.AudioCodec
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Presets;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
using System.Text.RegularExpressions;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using Crestron.SimplSharp;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
|
||||
{
|
||||
public class CodecActiveCallItem
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
|
||||
{
|
||||
public enum eCodecCallDirection
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
{
|
||||
public enum eCodecCallStatus
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
|
||||
{
|
||||
public enum eCodecCallType
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
{
|
||||
public enum eMeetingPrivacy
|
||||
{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Devices.Core.Codec
|
||||
{
|
||||
/// <summary>
|
||||
/// Requirements for a device that has dialing capabilities
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
|
||||
@@ -99,9 +99,6 @@
|
||||
<Reference Include="System.Data" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AudioCodec\AudioCodecBase.cs" />
|
||||
<Compile Include="AudioCodec\Interfaces\IAudioCodecInfo.cs" />
|
||||
<Compile Include="AudioCodec\Interfaces\IHasAudioCodec.cs" />
|
||||
<Compile Include="AudioCodec\MockAC\MockAC.cs" />
|
||||
<Compile Include="AudioCodec\MockAC\MockAcPropertiesConfig.cs" />
|
||||
<Compile Include="Cameras\CameraBase.cs" />
|
||||
@@ -111,7 +108,6 @@
|
||||
<Compile Include="Codec\eCodecCallType.cs" />
|
||||
<Compile Include="Codec\eCodecCallStatus.cs" />
|
||||
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
||||
<Compile Include="Codec\iCodecAudio.cs" />
|
||||
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
||||
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
||||
<Compile Include="Occupancy\CenOdtOccupancySensorBaseController.cs" />
|
||||
@@ -125,13 +121,6 @@
|
||||
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
|
||||
<Compile Include="Cameras\CameraControl.cs" />
|
||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.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" />
|
||||
<Compile Include="Display\ComTcpDisplayBase.cs" />
|
||||
<Compile Include="Display\AvocorVTFDisplay.cs" />
|
||||
<Compile Include="Display\InputInterfaces.cs" />
|
||||
@@ -164,7 +153,6 @@
|
||||
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodec.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\CiscoSparkCodecPropertiesConfig.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xStatusSparkPlus.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasVideoCodec.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockCodecDirectory.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockVCCamera.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockVcPropertiesConfig.cs" />
|
||||
@@ -173,11 +161,8 @@
|
||||
<Compile Include="VideoCodec\CiscoCodec\xEvent.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\HttpApiServer.cs" />
|
||||
<Compile Include="Codec\CodecActiveCallItem.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasCodecLayouts.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasCodecSelfview.cs" />
|
||||
<Compile Include="VideoCodec\MockVC\MockVC.cs" />
|
||||
<Compile Include="VideoCodec\CiscoCodec\xStatus.cs" />
|
||||
<Compile Include="VideoCodec\VideoCodecBase.cs" />
|
||||
<Compile Include="VideoCodec\ZoomRoom\ResponseObjects.cs" />
|
||||
<Compile Include="VideoCodec\ZoomRoom\ZoomRoom.cs" />
|
||||
<Compile Include="VideoCodec\ZoomRoom\ZoomRoomCamera.cs" />
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
@@ -352,7 +352,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
foreach (Call c in b.DialInfo.Calls.Call)
|
||||
{
|
||||
meeting.Calls.Add(new PepperDash.Essentials.Devices.Common.Codec.Call()
|
||||
meeting.Calls.Add(new Essentials.Core.Devices.Codec.Call()
|
||||
{
|
||||
Number = c.Number.Value,
|
||||
Protocol = c.Protocol.Value,
|
||||
|
||||
@@ -10,11 +10,11 @@ using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Devices.VideoCodec;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.Occupancy;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
using PepperDash.Essentials.Devices.Core.VideoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
@@ -283,7 +283,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
|
||||
|
||||
var props = JsonConvert.DeserializeObject<Codec.CiscoSparkCodecPropertiesConfig>(config.Properties.ToString());
|
||||
var props = JsonConvert.DeserializeObject<Essentials.Core.Devices.Codec.CiscoSparkCodecPropertiesConfig>(config.Properties.ToString());
|
||||
|
||||
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
||||
PeopleCountFeedback = new IntFeedback(PeopleCountFeedbackFunc);
|
||||
@@ -395,6 +395,35 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
TieLineCollection.Default.Add(tl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a list of call history entries returned by a Cisco codec to the generic list type
|
||||
/// </summary>
|
||||
/// <param name="entries"></param>
|
||||
/// <returns></returns>
|
||||
public List<CodecCallHistory.CallHistoryEntry> ConvertCiscoCallHistoryToGeneric(List<CiscoCallHistory.Entry> entries)
|
||||
{
|
||||
var genericEntries = new List<CodecCallHistory.CallHistoryEntry>();
|
||||
|
||||
foreach (CiscoCallHistory.Entry entry in entries)
|
||||
{
|
||||
|
||||
genericEntries.Add(new CodecCallHistory.CallHistoryEntry()
|
||||
{
|
||||
Name = entry.DisplayName.Value,
|
||||
Number = entry.CallbackNumber.Value,
|
||||
StartTime = entry.LastOccurrenceStartTime.Value,
|
||||
OccurrenceHistoryId = entry.LastOccurrenceHistoryId.Value,
|
||||
OccurrenceType = ConvertToOccurenceTypeEnum(entry.OccurrenceType.Value)
|
||||
});
|
||||
}
|
||||
|
||||
// Check if list is empty and if so, add an item to display No Recent Calls
|
||||
if (genericEntries.Count == 0)
|
||||
genericEntries.Add(CallHistory.ListEmptyEntry);
|
||||
|
||||
return genericEntries;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the HTTP feedback server and syncronizes state of codec
|
||||
/// </summary>
|
||||
@@ -436,6 +465,31 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes the Cisco occurence type and converts it to the matching enum
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public eCodecOccurrenceType ConvertToOccurenceTypeEnum(string s)
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case "Placed":
|
||||
{
|
||||
return eCodecOccurrenceType.Placed;
|
||||
}
|
||||
case "Received":
|
||||
{
|
||||
return eCodecOccurrenceType.Received;
|
||||
}
|
||||
case "NoAnswer":
|
||||
{
|
||||
return eCodecOccurrenceType.NoAnswer;
|
||||
}
|
||||
default:
|
||||
return eCodecOccurrenceType.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
|
||||
/// </summary>
|
||||
@@ -1841,6 +1895,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
else
|
||||
InitialSyncComplete = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class CiscoSparkCodecFactory : EssentialsDeviceFactory<CiscoSparkCodec>
|
||||
|
||||
@@ -7,7 +7,7 @@ using Crestron.SimplSharp;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
namespace PepperDash.Essentials.Core.Devices.Codec
|
||||
{
|
||||
public class CiscoSparkCodecPropertiesConfig
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
@@ -240,7 +240,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
foreach (ContactMethod m in c.ContactMethod)
|
||||
{
|
||||
|
||||
var tempContactMethod = new PepperDash.Essentials.Devices.Common.Codec.ContactMethod();
|
||||
var tempContactMethod = new Essentials.Core.Devices.Codec.ContactMethod();
|
||||
|
||||
eContactMethodCallType callType = eContactMethodCallType.Unknown;
|
||||
if (!string.IsNullOrEmpty(m.CallType.Value))
|
||||
@@ -299,11 +299,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <returns></returns>
|
||||
public static CodecDirectory ConvertCiscoPhonebookToGeneric(PhonebookSearchResult result)
|
||||
{
|
||||
var directory = new Codec.CodecDirectory();
|
||||
var directory = new Essentials.Core.Devices.Codec.CodecDirectory();
|
||||
|
||||
var folders = new List<Codec.DirectoryItem>();
|
||||
var folders = new List<Essentials.Core.Devices.Codec.DirectoryItem>();
|
||||
|
||||
var contacts = new List<Codec.DirectoryItem>();
|
||||
var contacts = new List<Essentials.Core.Devices.Codec.DirectoryItem>();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -370,7 +370,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
device = eContactMethodDevice.Other;
|
||||
}
|
||||
|
||||
contact.ContactMethods.Add(new PepperDash.Essentials.Devices.Common.Codec.ContactMethod()
|
||||
contact.ContactMethods.Add(new Essentials.Core.Devices.Codec.ContactMethod()
|
||||
{
|
||||
Number = m.Number.Value,
|
||||
ContactMethodId = m.ContactMethodId.Value,
|
||||
|
||||
@@ -6,7 +6,7 @@ using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
@@ -8,7 +8,7 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -7,7 +7,7 @@ using Newtonsoft.Json;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Runtime.CompilerServices;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -255,9 +255,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
/// <returns></returns>
|
||||
public static CodecDirectory ConvertZoomContactsToGeneric(List<Contact> zoomContacts)
|
||||
{
|
||||
var directory = new Codec.CodecDirectory();
|
||||
var directory = new Essentials.Core.Devices.Codec.CodecDirectory();
|
||||
|
||||
var folders = new List<Codec.DirectoryItem>();
|
||||
var folders = new List<Essentials.Core.Devices.Codec.DirectoryItem>();
|
||||
|
||||
var roomFolder = new DirectoryFolder();
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@ using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Devices.VideoCodec;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
using PepperDash.Essentials.Devices.Common.Occupancy;
|
||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user