26 #include <olp/core/client/ApiError.h>
27 #include <olp/core/client/ApiResponse.h>
28 #include <olp/core/client/CancellationToken.h>
29 #include <olp/core/client/HRN.h>
30 #include <olp/core/client/OlpClientSettings.h>
31 #include <olp/dataservice/read/DataRequest.h>
32 #include <olp/dataservice/read/DataServiceReadApi.h>
33 #include <olp/dataservice/read/PartitionsRequest.h>
34 #include <olp/dataservice/read/PrefetchPartitionsRequest.h>
35 #include <olp/dataservice/read/PrefetchTileResult.h>
36 #include <olp/dataservice/read/PrefetchTilesRequest.h>
37 #include <olp/dataservice/read/TileRequest.h>
38 #include <olp/dataservice/read/Types.h>
39 #include <boost/optional.hpp>
42 namespace dataservice {
44 class VersionedLayerClientImpl;
126 boost::optional<int64_t> catalog_version,
170 DataResponseCallback callback);
213 DataResponseCallback callback);
250 TileRequest request, AggregatedDataResponseCallback callback);
283 PartitionsResponseCallback callback);
304 PartitionsStreamCallback partition_stream_callback,
305 CallbackNoResult callback);
343 PartitionsResponseCallback callback);
372 PrefetchStatusCallback status_callback =
nullptr);
400 PrefetchStatusCallback status_callback =
nullptr);
426 PrefetchPartitionsResponseCallback callback,
427 PrefetchPartitionsStatusCallback status_callback =
nullptr);
452 PrefetchPartitionsStatusCallback status_callback =
nullptr);
512 bool IsCached(
const std::string& partition_id)
const;
574 bool Protect(
const std::string& partition_id);
597 bool Protect(
const std::vector<std::string>& partition_ids);
639 bool Release(
const std::string& partition_id);
660 bool Release(
const std::vector<std::string>& partition_ids);
663 std::unique_ptr<VersionedLayerClientImpl> impl_;
Represents a request outcome.
Definition: ApiResponse.h:65
A wrapper template that you can use to cancel a request or wait for it to finalize.
Definition: ApiResponse.h:281
Cancels service requests.
Definition: CancellationToken.h:33
Allows a Here Resource Name (HRN) to be passed to the operations that require it.
Definition: HRN.h:34
Encapsulates the fields required to request data for the given catalog, layer, and partition.
Definition: DataRequest.h:43
Encapsulates the fields required to request a list of partitions for the given catalog and layer.
Definition: PartitionsRequest.h:40
Encapsulates the fields required to prefetch a list of partitions for the given catalog and layer.
Definition: PrefetchPartitionsRequest.h:40
Encapsulates the fields required to prefetch the specified layers, tiles, and levels.
Definition: PrefetchTilesRequest.h:47
Encapsulates the fields required to request tile for the given key.
Definition: TileRequest.h:42
Gets data from a versioned layer of the HERE platform.
Definition: VersionedLayerClient.h:98
VersionedLayerClient(VersionedLayerClient &&other) noexcept
A default move constructor.
bool CancelPendingRequests()
Cancels all active and pending requests.
client::CancellationToken GetAggregatedData(TileRequest request, AggregatedDataResponseCallback callback)
Fetches data of a tile or its closest ancestor.
client::CancellableFuture< AggregatedDataResponse > GetAggregatedData(TileRequest request)
Fetches data of a tile or its closest ancestor.
VersionedLayerClient(const VersionedLayerClient &other)=delete
A copy constructor.
client::CancellationToken PrefetchTiles(PrefetchTilesRequest request, PrefetchTilesResponseCallback callback, PrefetchStatusCallback status_callback=nullptr)
Prefetches a set of tiles asynchronously.
client::CancellationToken QuadTreeIndex(TileRequest tile_request, PartitionsResponseCallback callback)
Fetches a list of partitions including data size, checksum and crc asynchronously.
bool Protect(const std::vector< std::string > &partition_ids)
Protect partitions from eviction.
client::CancellableFuture< PrefetchTilesResponse > PrefetchTiles(PrefetchTilesRequest request, PrefetchStatusCallback status_callback=nullptr)
Prefetches a set of tiles asynchronously.
client::CancellationToken GetData(DataRequest data_request, DataResponseCallback callback)
Fetches data asynchronously using a partition ID or data handle.
bool Release(const std::string &partition_id)
Removes partition from protection.
VersionedLayerClient & operator=(const VersionedLayerClient &other)=delete
A copy assignment operator.
bool Release(const std::vector< std::string > &partition_ids)
Removes partitions from protection.
bool RemoveFromCache(const std::string &partition_id)
Removes the partition from the mutable disk cache.
bool Protect(const TileKeys &tiles)
Protects tile keys from eviction.
bool IsCached(const std::string &partition_id) const
Checks whether the partition is cached.
bool RemoveFromCache(const geo::TileKey &tile)
Removes the tile from the mutable disk cache.
client::CancellationToken PrefetchPartitions(PrefetchPartitionsRequest request, PrefetchPartitionsResponseCallback callback, PrefetchPartitionsStatusCallback status_callback=nullptr)
Prefetches a set of partitions asynchronously.
client::CancellationToken GetPartitions(PartitionsRequest partitions_request, PartitionsResponseCallback callback)
Fetches a list of partitions of the given generic layer asynchronously.
bool Protect(const std::string &partition_id)
Protect partition from eviction.
client::CancellableFuture< PrefetchPartitionsResponse > PrefetchPartitions(PrefetchPartitionsRequest request, PrefetchPartitionsStatusCallback status_callback=nullptr)
Prefetches a set of partitions asynchronously.
VersionedLayerClient & operator=(VersionedLayerClient &&other) noexcept
A move assignment operator.
client::CancellationToken StreamLayerPartitions(PartitionsRequest partitions_request, PartitionsStreamCallback partition_stream_callback, CallbackNoResult callback)
Fetches a list of partitions of the given generic layer asynchronously. Client does not cache the par...
bool Release(const TileKeys &tiles)
Removes a list of tiles from protection.
client::CancellableFuture< DataResponse > GetData(DataRequest data_request)
Fetches data asynchronously using a partition ID or data handle.
client::ApiNoResponse DeleteFromCache(const std::string &partition_id)
Removes the partition from the mutable disk cache.
VersionedLayerClient(client::HRN catalog, std::string layer_id, boost::optional< int64_t > catalog_version, client::OlpClientSettings settings)
Creates the VersionedLayerClient instance with the specified catalog version.
client::CancellableFuture< DataResponse > GetData(TileRequest request)
Fetches data asynchronously using a TileKey.
client::CancellationToken GetData(TileRequest request, DataResponseCallback callback)
Fetches data asynchronously using a TileKey.
bool IsCached(const geo::TileKey &tile, bool aggregated=false) const
Checks whether the tile is cached.
client::ApiNoResponse DeleteFromCache(const geo::TileKey &tile)
Removes the tile from the mutable disk cache.
client::CancellableFuture< PartitionsResponse > GetPartitions(PartitionsRequest partitions_request)
Fetches a list of partitions of the given generic layer asynchronously.
Addresses a tile in a quadtree.
Definition: TileKey.h:63
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24
Configures the behavior of the OlpClient class.
Definition: OlpClientSettings.h:180