using BomLocalService.Models; namespace BomLocalService.Services.Interfaces; /// /// Main service interface for BOM radar screenshot operations. /// Orchestrates cache management, browser automation, and web scraping to provide radar screenshots for Australian locations. /// public interface IBomRadarService { /// /// Gets a cached radar screenshot for a location. /// Returns the screenshot response if available in cache, otherwise returns null. /// /// The suburb name (e.g., "Pomona", "Brisbane") /// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC") /// Cancellation token to cancel the operation /// Radar screenshot response with image path and metadata, or null if not cached Task GetCachedScreenshotAsync(string suburb, string state, CancellationToken cancellationToken = default); /// /// Triggers a cache update for a location. /// If cache is missing or expired, initiates a background update and returns status information. /// /// The suburb name (e.g., "Pomona", "Brisbane") /// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC") /// Cancellation token to cancel the operation /// Status information about the cache update operation Task TriggerCacheUpdateAsync(string suburb, string state, CancellationToken cancellationToken = default); /// /// Gets metadata about the cached radar data for a location. /// Returns observation time, forecast time, weather station, and distance information. /// /// The suburb name (e.g., "Pomona", "Brisbane") /// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC") /// Cancellation token to cancel the operation /// Last updated information, or null if no cached data exists Task GetLastUpdatedInfoAsync(string suburb, string state, CancellationToken cancellationToken = default); /// /// Gets the file system path to the cached screenshot for a location. /// Returns empty string if no cached screenshot exists. /// /// The suburb name (e.g., "Pomona", "Brisbane") /// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC") /// Cancellation token to cancel the operation /// File system path to the cached screenshot, or empty string if not found Task GetCachedScreenshotPathAsync(string suburb, string state, CancellationToken cancellationToken = default); /// /// Deletes all cached files (screenshot and metadata) for a location. /// /// The suburb name (e.g., "Pomona", "Brisbane") /// The Australian state abbreviation (e.g., "QLD", "NSW", "VIC") /// Cancellation token to cancel the operation /// True if files were deleted, false if no cached files existed Task DeleteCachedLocationAsync(string suburb, string state, CancellationToken cancellationToken = default); }