Skip to content

Commit

Permalink
ci: update github workflows
Browse files Browse the repository at this point in the history
ci: update nuspec
  • Loading branch information
Trevor Payne committed Oct 4, 2022
1 parent fe3829c commit 5794c3d
Show file tree
Hide file tree
Showing 11 changed files with 1,063 additions and 3,013 deletions.
53 changes: 28 additions & 25 deletions src/BookingsDataClasses.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Devices.Common.Codec;

Expand All @@ -27,11 +28,9 @@ public DateTime Value
{
get
{
DateTime _valueDateTime;
try
{
_valueDateTime = DateTime.Parse(_value);
return _valueDateTime;
return DateTime.Parse(_value);
}
catch
{
Expand All @@ -40,7 +39,7 @@ public DateTime Value
}
set
{
_value = value.ToString();
_value = value.ToString(CultureInfo.InvariantCulture);
}
}
}
Expand Down Expand Up @@ -80,17 +79,14 @@ public class Email
public string Value { get; set; }
}

public class Id2
{
public string Value { get; set; }
}

public class Organizer
{
public FirstName FirstName { get; set; }
public LastName LastName { get; set; }
public Email Email { get; set; }
public Id2 Id { get; set; }
[JsonProperty("CiscoCallId")]
public Id OrganizerId { get; set; }

public Organizer()
{
Expand Down Expand Up @@ -230,7 +226,8 @@ public class CallType

public class CiscoCall
{
public string id { get; set; }
[JsonProperty("CiscoCallId")]
public string CiscoCallId { get; set; }
public Number Number { get; set; }
public Protocol Protocol { get; set; }
public CallRate CallRate { get; set; }
Expand Down Expand Up @@ -261,7 +258,8 @@ public DialInfo()

public class Booking
{
public string id { get; set; }
[JsonProperty("LocalInstanceId")]
public string StringId { get; set; }
public Id Id { get; set; }
public Title Title { get; set; }
public Agenda Agenda { get; set; }
Expand Down Expand Up @@ -292,10 +290,12 @@ public Booking()

public class BookingsListResult
{
public string status { get; set; }

public string Status { get; set; }
public ResultInfo ResultInfo { get; set; }
//public LastUpdated LastUpdated { get; set; }
public List<Booking> Booking { get; set; }
[JsonProperty("booking")]
public List<Booking> BookingsListResultBooking { get; set; }
}

public class CommandResponse
Expand All @@ -309,19 +309,29 @@ public class RootObject
}

/// <summary>
/// Extracts the necessary meeting values from the Cisco bookings response ans converts them to the generic class
/// Extracts the necessary meeting values from the Cisco bookings response and converts them to the generic class
/// </summary>
/// <param name="bookings"></param>
/// <param name="joinableCooldownSeconds">How many seconds must be between now and booked time to allow the meeting to be joined</param>
/// <returns></returns>
public static List<Meeting> GetGenericMeetingsFromBookingResult(List<Booking> bookings, int joinableCooldownSeconds)
{
var meetings = new List<Meeting>();


foreach (Booking b in bookings)
foreach (var b in bookings)
{
var meeting = new Meeting(joinableCooldownSeconds);

if (b.Time == null) continue;

meeting.StartTime = b.Time.StartTime.Value;
meeting.MinutesBeforeMeeting = Int32.Parse(b.Time.StartTimeBuffer.Value) / 60;
meeting.EndTime = b.Time.EndTime.Value;

if (meeting.EndTime <= DateTime.Now) continue;


if (b.Id != null)
meeting.Id = b.Id.Value;

Expand All @@ -334,13 +344,6 @@ public static List<Meeting> GetGenericMeetingsFromBookingResult(List<Booking> bo
if (b.Agenda != null)
meeting.Agenda = b.Agenda.Value;

if (b.Time != null)
{
meeting.StartTime = b.Time.StartTime.Value;
meeting.MinutesBeforeMeeting = Int32.Parse(b.Time.StartTimeBuffer.Value) / 60;
meeting.EndTime = b.Time.EndTime.Value;
}

if (b.Privacy != null)
meeting.Privacy = CodecCallPrivacy.ConvertToDirectionEnum(b.Privacy.Value);

Expand All @@ -352,9 +355,9 @@ public static List<Meeting> GetGenericMeetingsFromBookingResult(List<Booking> bo
if (b.DialInfo.Calls.Call != null)
{

foreach (CiscoCall c in b.DialInfo.Calls.Call)
foreach (var c in b.DialInfo.Calls.Call)
{
meeting.Calls.Add(new Call()
meeting.Calls.Add(new Call
{
Number = c.Number.Value,
Protocol = c.Protocol.Value,
Expand Down
42 changes: 21 additions & 21 deletions src/CiscoCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public void PositionHome()

public void PanLeft()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Left CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Left CallId: {0}", CallId));
}

public void PanRight()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Right CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Right CallId: {0}", CallId));
}

public void PanStop()
Expand All @@ -56,12 +56,12 @@ public void PanStop()

public void TiltDown()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Down CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Down CallId: {0}", CallId));
}

public void TiltUp()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Up CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Up CallId: {0}", CallId));
}

public void TiltStop()
Expand All @@ -75,12 +75,12 @@ public void TiltStop()

public void ZoomIn()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomIn CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: ZoomIn CallId: {0}", CallId));
}

public void ZoomOut()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomOut CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: ZoomOut CallId: {0}", CallId));
}

public void ZoomStop()
Expand All @@ -93,7 +93,7 @@ public void ZoomStop()

void Stop()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Stop CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Stop CallId: {0}", CallId));
}

public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
Expand Down Expand Up @@ -185,7 +185,7 @@ public void SetCapabilites(string capabilites)

public void PositionHome()
{
// Not supported on Internal Spark Camera
// Not supported on Internal Spark CameraList


}
Expand All @@ -198,7 +198,7 @@ public void PanLeft()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Left PanSpeed: {1}", CameraId, PanSpeed));
isPanning = true;
}
}
Expand All @@ -207,14 +207,14 @@ public void PanRight()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Right PanSpeed: {1}", CameraId, PanSpeed));
isPanning = true;
}
}

public void PanStop()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Pan: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Pan: Stop", CameraId));
isPanning = false;
}

Expand All @@ -228,7 +228,7 @@ public void TiltDown()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Down TiltSpeed: {1}", CameraId, TiltSpeed));
isTilting = true;
}
}
Expand All @@ -237,14 +237,14 @@ public void TiltUp()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Up TiltSpeed: {1}", CameraId, TiltSpeed));
isTilting = true;
}
}

public void TiltStop()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Tilt: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Tilt: Stop", CameraId));
isTilting = false;
}

Expand All @@ -256,7 +256,7 @@ public void ZoomIn()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: In ZoomSpeed: {1}", CameraId, ZoomSpeed));
isZooming = true;
}
}
Expand All @@ -265,14 +265,14 @@ public void ZoomOut()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: Out ZoomSpeed: {1}", CameraId, ZoomSpeed));
isZooming = true;
}
}

public void ZoomStop()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Zoom: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Zoom: Stop", CameraId));
isZooming = false;
}

Expand All @@ -284,7 +284,7 @@ public void FocusNear()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Near", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Near", CameraId));
isFocusing = true;
}
}
Expand All @@ -293,20 +293,20 @@ public void FocusFar()
{
if (!isMoving)
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Far", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Far", CameraId));
isFocusing = true;
}
}

public void FocusStop()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera Ramp CameraId: {0} Focus: Stop", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList Ramp CameraId: {0} Focus: Stop", CameraId));
isFocusing = false;
}

public void TriggerAutoFocus()
{
ParentCodec.EnqueueCommand(string.Format("xCommand Camera TriggerAutofocus CameraId: {0}", CameraId));
ParentCodec.EnqueueCommand(string.Format("xCommand CameraList TriggerAutofocus CameraId: {0}", CameraId));
}

#endregion
Expand Down
12 changes: 6 additions & 6 deletions src/CiscoCodecJoinMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Activates Do Not Disturb Mode. FB High if active.",
Description = "Activates Do Not Disturb H323Mode. FB High if active.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -202,7 +202,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Deactivates Do Not Disturb Mode. FB High if deactivated.",
Description = "Deactivates Do Not Disturb H323Mode. FB High if deactivated.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -216,7 +216,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Toggles Do Not Disturb Mode.",
Description = "Toggles Do Not Disturb H323Mode.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -230,7 +230,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Activates Standby Mode. FB High if active.",
Description = "Activates Standby H323Mode. FB High if active.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -244,7 +244,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Deactivates Standby Mode. FB High if deactivated.",
Description = "Deactivates Standby H323Mode. FB High if deactivated.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -258,7 +258,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Activates Half Wake Mode. FB High if active.",
Description = "Activates Half Wake H323Mode. FB High if active.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand Down
Loading

0 comments on commit 5794c3d

Please sign in to comment.