mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-22 08:05:00 +00:00
50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Crestron.SimplSharp;
|
|
|
|
namespace PepperDash.Essentials.Devices.Common.Codec
|
|
|
|
{
|
|
/// <summary>
|
|
/// Enumeration of eCodecCallDirection values
|
|
/// </summary>
|
|
public enum eCodecCallDirection
|
|
{
|
|
Unknown = 0, Incoming, Outgoing
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents a CodecCallDirection
|
|
/// </summary>
|
|
public class CodecCallDirection
|
|
{
|
|
/// <summary>
|
|
/// Takes the Cisco call type and converts to the matching enum
|
|
/// </summary>
|
|
/// <param name="s"></param>
|
|
/// <returns></returns>
|
|
/// <summary>
|
|
/// ConvertToDirectionEnum method
|
|
/// </summary>
|
|
public static eCodecCallDirection ConvertToDirectionEnum(string s)
|
|
{
|
|
switch (s.ToLower())
|
|
{
|
|
case "incoming":
|
|
{
|
|
return eCodecCallDirection.Incoming;
|
|
}
|
|
case "outgoing":
|
|
{
|
|
return eCodecCallDirection.Outgoing;
|
|
}
|
|
default:
|
|
return eCodecCallDirection.Unknown;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
} |