olp-cpp-sdk  1.19.0
Classes | Typedefs | Enumerations | Functions
olp::client Namespace Reference

The client namespace. More...


class  ApiError
 A wrapper around an internal error or HTTP status code. More...
class  ApiLookupClient
 A client for API lookup requests. More...
class  ApiNoResult
 Used when ApiResponse does not contain result data. More...
class  ResponseExtension
class  ResponseExtension< void >
 The ApiResponse extension class specialization without any payload. More...
class  ApiResponse
 Represents a request outcome. More...
class  CancellableFuture
 A wrapper template that you can use to cancel a request or wait for it to finalize. More...
struct  ExponentialBackdownStrategy
 Computes wait time for the next retry attempt via the exponential backoff with the added jitter. More...
struct  EqualJitterBackdownStrategy
 Computes wait time for the next retry attempt via the exponential backoff with the added jitter. More...
class  CancellationContext
 A wrapper that manages the cancellation state of an asynchronous operation in a thread-safe way. More...
struct  CancellationContextHash
 A helper for unordered containers. More...
class  CancellationToken
 Cancels service requests. More...
class  Condition
 A helper class that allows one thread to call and wait for a notification in the other thread. More...
struct  DefaultLookupEndpointProvider
 The default implementation of the lookup API endpoint provider. More...
class  HRN
 Allows a Here Resource Name (HRN) to be passed to the operations that require it. More...
class  NetworkStatistics
 Network statistics with information on the outbound and inbound trafic during API calls. More...
class  HttpResponse
 This class represents the HTTP response created from the NetworkResponse and the request body. More...
class  Api
 The API Services provided by the HERE platform. More...
class  OauthToken
 A parsed response received from the OAuth2.0 token endpoint. More...
class  OlpClient
 Executes HTTP requests by using the base url and the provided parameters and body. This class will handle retries based on the RetrySettings and will merge all similar URL requests into one. More...
class  OlpClientFactory
 Creates the OlpClient instances that are used for every HTTP request. More...
struct  AuthenticationSettings
 A set of settings that manages the TokenProviderCallback and TokenProviderCancelCallback functions. More...
struct  ApiLookupSettings
 Settings to provide URLs for API lookup requests. More...
struct  OlpClientSettings
 Configures the behavior of the OlpClient class. More...
class  OlpClientSettingsFactory
 Fills in the OlpClientSettings structure with default handlers. More...
class  PendingRequests
 A container for requests that have not finished yet. More...
struct  RetrySettings
 A collection of settings that controls how failed requests should be treated by the Data SDK. More...
class  TaskContext
 Encapsulates the execution of an asynchronous task and invocation of a callback in a guaranteed manner. More...
struct  TaskContextHash
 A helper for unordered containers. More...


using ApiNoResponse = ApiResponse< ApiNoResult, ApiError >
 An alias for the response without result.
using Apis = std::vector< Api >
 An alias for the platform base URLs.
using OauthTokenResponse = ApiResponse< OauthToken, ApiError >
 An alias for the OAuth token response.
using NetworkAsyncCallback = std::function< void(HttpResponse)>
 An alias for the asynchronous network callback. More...
using NetworkAsyncCancel = std::function< void()>
 An alias for the cancel function. More...


enum class  ErrorCode {
  Unknown = 0 , Cancelled , InvalidArgument , RequestTimeout ,
  InternalFailure , ServiceUnavailable , AccessDenied , BadRequest ,
  PreconditionFailed , NotFound , SlowDown , NetworkConnection ,
 Represents all possible errors that might happen during a user request. More...
enum  FetchOptions { OnlineIfNotFound , OnlineOnly , CacheOnly , CacheWithUpdate }
 Fetch options that control how requests are handled. More...


CORE_API bool DefaultRetryCondition (const olp::client::HttpResponse &response)
 The default retry condition that disables retries.

Detailed Description

The client namespace.

Typedef Documentation

◆ NetworkAsyncCallback

using olp::client::NetworkAsyncCallback = typedef std::function<void(HttpResponse)>

An alias for the asynchronous network callback.

Used to receive the HttpResponse instance.

◆ NetworkAsyncCancel

using olp::client::NetworkAsyncCancel = typedef std::function<void()>

An alias for the cancel function.

Used to cancel the asynchronous network operation.

Enumeration Type Documentation

◆ ErrorCode

Represents all possible errors that might happen during a user request.


An unknown error. See the error message for details.


The request was cancelled (usually by the user).


The request passed invalid arguments.


The request exceeded the timeout limit.


An internal server failure.


The requested service is not available.


The access to the service was denied due to insufficient credentials.


The URL malformed or some data parameters are not formed correctly.


The conditions required to access the service are not met.


The requested resource was not found.


Too many requests sent in a given amount of time.


The network connection error.


A failed cache IO operation.

◆ FetchOptions

Fetch options that control how requests are handled.


(Default) Queries the network if the requested resource is not found in the cache.


Skips cache lookups and queries the network right away.


Returns immediately if a cache lookup fails.


Returns the requested cached resource if it is found and updates the cache in the background.

Do not use it for versioned layer client requests.