From d33c19b3ac6803de4b5c8d475832efef131c1a45 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 30 Dec 2020 15:11:34 +0000 Subject: Revert "Hope it is fine" --- .../MachineUpdate/IMachineUpdateManager.cs | 59 ++++++++++++++++++---- 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/IMachineUpdateManager.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/IMachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/IMachineUpdateManager.cs index 85d61d4cc..7c835165f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/IMachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/IMachineUpdateManager.cs @@ -4,12 +4,27 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.PMR.Synchronization; +using Tango.PPC.Common.Publish; +using Tango.PPC.Common.UpdatePackages; using Tango.PPC.Common.Web; namespace Tango.PPC.Common.MachineUpdate { public interface IMachineUpdateManager { + /// + /// Occurs when an application update is available. + /// + event EventHandler UpdateAvailable; + + /// + /// Gets or sets a value indicating whether to automatically check for new application updates. + /// + bool EnableAutoCheckForUpdates { get; set; } + + /// + /// Gets the current machine update progress status. + /// MachineUpdateProgress Status { get; } /// @@ -23,46 +38,68 @@ namespace Tango.PPC.Common.MachineUpdate event EventHandler Progress; /// - /// Performs a machine update using the specified serial number and machine service address. + /// Performs a machine update. /// - /// The serial number. /// if set to true updates the embedded device firmware. /// if set to true updates the embedded device FPGA version and other parameters. /// - Task Update(String serialNumber, bool setupFirmware, bool setupFPGA); + Task Update(bool setupFirmware, bool setupFPGA); /// /// Performs a machine update using the specified software update package path. /// /// Name of the file. /// - Task UpdateFromTUP(String fileName); + Task UpdateFromTUP(String fileName, bool setupFirmware, bool setupFPGA); + + /// + /// Performs a firmware upgrade from the specified TFP file. + /// + /// Name of the file. + /// + Task UpdateFromTFP(String fileName); /// - /// Checks if any update are available for the specified machine serial number. + /// Checks if any update are available. /// - /// The serial number. /// - Task CheckForUpdate(String serialNumber); + Task CheckForUpdate(); /// /// Checks whether it is necessary to updates all the "overwrite-able" database tables. /// - /// The serial number. /// - Task UpdateDBCheck(String serialNumber); + Task UpdateDBCheck(); /// /// Updates all the "overwrite-able" database tables. /// /// - Task UpdateDB(DbCompareResult dbCompareResult, String serialNumber); + Task UpdateDB(DbCompareResult dbCompareResult); /// /// Gets the update package file information. /// /// The file path. /// - Task GetUpdatePackageFileInfo(String filePath); + Task GetUpdatePackageFileInfo(String filePath); + + /// + /// Checks whether any post update packages needs to be installed. + /// + /// + Task PostUpdatePackagesRequired(); + + /// + /// Runs all post update packages. + /// + /// + Task RunPostUpdatePackages(); + + /// + /// Restores the last database backup. + /// + /// + Task RestoreLastDatabaseBackup(); } } -- cgit v1.3.1