using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Tango.Telemetry
{
///
/// Represents a telemetry source that provides historical telemetry data.
///
public interface ITelemetryHistorySource : ITelemetrySource
{
///
/// Gets the direction in which historical telemetry data should be published — either from oldest to newest, or vice versa.
///
/// When the direction is set to ,
/// only past data will be published. New data will not be published unless streamed from another source.
///
/// When an calls or
/// for the first time and no checkpoints have been saved:
///
/// - will be used if the direction is .
/// - will be used if the direction is .
///
///
TelemetryHistorySourceDirection Direction { get; }
///
/// Determines whether historical telemetry data can be requested starting from the specified timestamp.
///
/// The start time for the historical data request.
///
/// A task that represents the asynchronous operation.
/// The task result contains true if history can be requested from the given time; otherwise, false.
///
Task CanRequestHistory(DateTime from);
///
/// Requests historical telemetry data starting from the specified timestamp.
///
/// The start time for the telemetry history request.
///
/// A task that represents the asynchronous operation.
/// The task result contains a collection of historical telemetry records.
///
Task> RequestHistory(DateTime from);
}
}