Skip to content

Commit

Permalink
fix: various fixes to incorrect names
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Payne committed Oct 17, 2022
1 parent 5794c3d commit 1cc370f
Show file tree
Hide file tree
Showing 9 changed files with 1,670 additions and 531 deletions.
30 changes: 25 additions & 5 deletions src/BookingsDataClasses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class TotalRows
public class ResultInfo
{
public TotalRows TotalRows { get; set; }

public ResultInfo()
{
TotalRows = new TotalRows();
}
}

public class LastUpdated
Expand Down Expand Up @@ -237,6 +242,11 @@ public class CiscoCall
public class Calls
{
public List<CiscoCall> Call { get; set; }

public Calls()
{
Call = new List<CiscoCall>();
}
}

public class ConnectMode
Expand All @@ -258,8 +268,9 @@ public DialInfo()

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

public class BookingsListResult
{

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

public BookingsListResult()
{
BookingsListResultBooking = new List<Booking>();
ResultInfo = new ResultInfo();
}
}

public class CommandResponse
Expand All @@ -318,6 +335,10 @@ public static List<Meeting> GetGenericMeetingsFromBookingResult(List<Booking> bo
{
var meetings = new List<Meeting>();

if (bookings == null || bookings.Count == 0)
{
return meetings;
}

foreach (var b in bookings)
{
Expand All @@ -332,8 +353,7 @@ public static List<Meeting> GetGenericMeetingsFromBookingResult(List<Booking> bo
if (meeting.EndTime <= DateTime.Now) continue;


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

if (b.Organizer != null)
meeting.Organizer = string.Format("{0}, {1}", b.Organizer.LastName.Value, b.Organizer.FirstName.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 MediaChannelCalls FarEndControl CameraList Move Value: Left CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Left CallId: {0}", CallId));
}

public void PanRight()
{
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Right CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera 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 MediaChannelCalls FarEndControl CameraList Move Value: Down CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: Down CallId: {0}", CallId));
}

public void TiltUp()
{
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: Up CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera 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 MediaChannelCalls FarEndControl CameraList Move Value: ZoomIn CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera Move Value: ZoomIn CallId: {0}", CallId));
}

public void ZoomOut()
{
ParentCodec.EnqueueCommand(string.Format("xCommand MediaChannelCalls FarEndControl CameraList Move Value: ZoomOut CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera 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 MediaChannelCalls FarEndControl CameraList Stop CallId: {0}", CallId));
ParentCodec.EnqueueCommand(string.Format("xCommand Call FarEndControl Camera 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 CameraList
// Not supported on Internal Spark Camera


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

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

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

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

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

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

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

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

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

#endregion
Expand Down
24 changes: 1 addition & 23 deletions src/CiscoCodecFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class CiscoCodecFactory : EssentialsPluginDeviceFactory<CiscoCodec>
{
public CiscoCodecFactory()
{
MinimumEssentialsFrameworkVersion = "1.11.0";
MinimumEssentialsFrameworkVersion = "1.12.0";

TypeNames = new List<string>() { "ciscoRoomOS" };
}
Expand All @@ -23,26 +23,4 @@ public override EssentialsDevice BuildDevice(DeviceConfig dc)
return new CiscoCodec(dc, comm);
}
}

public class CiscoCodecDevelopmentFactory : EssentialsPluginDevelopmentDeviceFactory<CiscoCodec>
{
public CiscoCodecDevelopmentFactory()
{
MinimumEssentialsFrameworkVersion = "1.11.0";

DevelopmentEssentialsFrameworkVersions = new List<string>() {"1.11.0-rc-1935"};

TypeNames = new List<string>() { "ciscoRoomOS-development" };
}

public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Cisco RoomOs Development Device");

var comm = CommFactory.CreateCommForDevice(dc);
return new CiscoCodec(dc, comm);
}
}


}
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 H323Mode. FB High if active.",
Description = "Activates Do Not Disturb Mode. 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 H323Mode. FB High if deactivated.",
Description = "Deactivates Do Not Disturb Mode. 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 H323Mode.",
Description = "Toggles Do Not Disturb Mode.",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
Expand All @@ -230,7 +230,7 @@ public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
},
new JoinMetadata
{
Description = "Activates Standby H323Mode. FB High if active.",
Description = "Activates Standby Mode. 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 H323Mode. FB High if deactivated.",
Description = "Deactivates Standby Mode. 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 H323Mode. FB High if active.",
Description = "Activates Half Wake Mode. FB High if active.",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
Expand Down
Loading

0 comments on commit 1cc370f

Please sign in to comment.