Files
Aaru/Aaru.Core/Delegates.cs

88 lines
4.1 KiB
C#
Raw Normal View History

// /***************************************************************************
2020-02-27 12:31:25 +00:00
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
// Filename : Delegates.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Core algorithms.
//
// --[ Description ] ----------------------------------------------------------
//
// Delegates to communicate with user interface.
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2020-01-03 17:51:30 +00:00
// Copyright © 2011-2020 Natalia Portillo
// ****************************************************************************/
2020-02-27 00:33:26 +00:00
namespace Aaru.Core
{
2020-02-29 18:03:35 +00:00
/// <summary>Initializates a progress indicator (e.g. makes a progress bar visible)</summary>
public delegate void InitProgressHandler();
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Updates a progress indicator with text</summary>
public delegate void UpdateProgressHandler(string text, long current, long maximum);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Pulses a progress indicator with indeterminate boundaries</summary>
public delegate void PulseProgressHandler(string text);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Uninitializates a progress indicator (e.g. adds a newline to the console)</summary>
public delegate void EndProgressHandler();
2020-02-29 18:03:35 +00:00
/// <summary>Initializates a secondary progress indicator (e.g. makes a progress bar visible)</summary>
public delegate void InitProgressHandler2();
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Updates a secondary progress indicator with text</summary>
public delegate void UpdateProgressHandler2(string text, long current, long maximum);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Pulses a secondary progress indicator with indeterminate boundaries</summary>
public delegate void PulseProgressHandler2(string text);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Uninitializates a secondary progress indicator (e.g. adds a newline to the console)</summary>
public delegate void EndProgressHandler2();
2020-02-29 18:03:35 +00:00
/// <summary>Initializates two progress indicators (e.g. makes a progress bar visible)</summary>
public delegate void InitTwoProgressHandler();
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Updates two progress indicators with text</summary>
2017-12-19 20:33:03 +00:00
public delegate void UpdateTwoProgressHandler(string text, long current, long maximum, string text2, long current2,
2020-02-29 18:03:35 +00:00
long maximum2);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Pulses a progress indicator with indeterminate boundaries</summary>
public delegate void PulseTwoProgressHandler(string text, string text2);
2017-12-19 20:33:03 +00:00
2020-02-29 18:03:35 +00:00
/// <summary>Uninitializates a progress indicator (e.g. adds a newline to the console)</summary>
public delegate void EndTwoProgressHandler();
2020-02-29 18:03:35 +00:00
/// <summary>Updates a status indicator</summary>
public delegate void UpdateStatusHandler(string text);
2019-04-19 17:35:01 +01:00
2020-02-29 18:03:35 +00:00
/// <summary>Shows an error message</summary>
2019-04-19 17:35:01 +01:00
public delegate void ErrorMessageHandler(string text);
public delegate void InitBlockMapHandler(ulong blocks, ulong blockSize, ulong blocksToRead, ushort currentProfile);
2020-02-29 18:03:35 +00:00
/// <summary>Updates lists of time taken on scanning from the specified sector</summary>
/// <param name="duration">Time in milliseconds</param>
public delegate void ScanTimeHandler(ulong sector, double duration);
2020-02-29 18:03:35 +00:00
/// <summary>Specified a number of blocks could not be read on scan</summary>
public delegate void ScanUnreadableHandler(ulong sector);
public delegate void ScanSpeedHandler(ulong sector, double currentSpeed);
2017-12-19 20:33:03 +00:00
}