diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-08 00:19:54 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-08 00:19:54 +0200 |
| commit | 3cd59dd3b04168ad91cb1fe51231e9b3ddd74705 (patch) | |
| tree | b7431f7fcdf3336a1811140a4e84d3660009d5f1 /Software/Visual_Studio/PPC/Tango.PPC.Common/Web | |
| parent | 00f7facd947e0e8ce05a43d4f9d036e8f9a6a69e (diff) | |
| download | Tango-3cd59dd3b04168ad91cb1fe51231e9b3ddd74705.tar.gz Tango-3cd59dd3b04168ad91cb1fe51231e9b3ddd74705.zip | |
Implemented fast database update detection of RMLL, Hardware Versions & Color Catalogs.
Related Work Items: #1622
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Web')
3 files changed, 49 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateRequest.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateRequest.cs index b98848e4f..0feb32aaf 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateRequest.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateRequest.cs @@ -11,5 +11,16 @@ namespace Tango.PPC.Common.Web { public String SerialNumber { get; set; } public String Version { get; set; } + + public List<UpdatedEntity> Rmls { get; set; } + public List<UpdatedEntity> HardwareVersions { get; set; } + public List<UpdatedEntity> Catalogs { get; set; } + + public CheckForUpdateRequest() + { + Rmls = new List<UpdatedEntity>(); + HardwareVersions = new List<UpdatedEntity>(); + Catalogs = new List<UpdatedEntity>(); + } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateResponse.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateResponse.cs index 370c0f5ea..63d870834 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateResponse.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/CheckForUpdateResponse.cs @@ -10,8 +10,15 @@ namespace Tango.PPC.Common.Web public class CheckForUpdateResponse : WebResponseMessage { public bool IsUpdateAvailable { get; set; } + public bool IsDatabaseUpdateAvailable { get; set; } public String Version { get; set; } public bool SetupFirmware { get; set; } public bool SetupFPGA { get; set; } + public UpdateDBResponse UpdateDBResponse { get; set; } + + public CheckForUpdateResponse() + { + UpdateDBResponse = new UpdateDBResponse(); + } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/UpdatedEntity.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/UpdatedEntity.cs new file mode 100644 index 000000000..faee20678 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Web/UpdatedEntity.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; + +namespace Tango.PPC.Common.Web +{ + public class UpdatedEntity + { + public UpdatedEntity() + { + + } + + public UpdatedEntity(IObservableEntity entity) : this() + { + Guid = entity.Guid; + LastUpdated = entity.LastUpdated; + } + + public String Guid { get; set; } + public DateTime LastUpdated { get; set; } + + public override string ToString() + { + return $"{Guid} | {LastUpdated}"; + } + } +} |
