2#include "Design/Headers/ElevationService.h"
3#include "Base/Headers/Dictionary.h"
4#include "Base/Headers/Time.h"
5#include "Base/Headers/TimeSpan.h"
6#include <QNetworkRequest>
8class QNetworkAccessManager;
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
For a given coordinate, determines the elevation at that coordinate.
void createManager()
Creates the QNetworkAccessManager if not already created.
Dictionary< UUID, ElevationRequest * > m_pending_requests
Pending elevation requests keyed by UUID.
virtual void postRequest(const ElevationRequest &request) override
Submits an elevation request for asynchronous processing.
OpenElevationService()
Constructs an OpenElevationService.
Time m_last_send_time
Timestamp of the last sent request for rate limiting.
QNetworkRequest createRequest(UUID id, const String &url) const
Creates a single HTTP request with the given URL.
static void Initialize()
Registers this service as an available elevation provider.
Dictionary< UUID, Buffer< QNetworkRequest > > m_pending_queries
Queued network requests by request UUID.
void startRequest(ElevationRequest request)
Begins sending the network requests for an elevation query.
QNetworkAccessManager * m_network_manager
The network access manager for HTTP requests.
virtual Buffer< QNetworkRequest > createURLRequests(const ElevationRequest &request)
Creates the HTTP URL requests needed to fulfill an elevation request.
void onFinished()
Called when all network requests for a query have completed.
Dictionary< UUID, ProgressInfo * > m_pending_progress
Progress trackers for pending requests.
TimeSpan m_max_querry_time
Maximum allowed time for a query before timeout.
void processReply(QNetworkReply *reply)
Processes a completed network reply and extracts elevation data.
Used with InfoPipe to signal that the system will be using progress.
The core String class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
Represents a timestamp with utilities for manipulation and conversion.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
Stores options and receives data for determining the elevation at given coordinates.