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

The client namespace. More...

Classes

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...
 

Typedefs

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...
 

Enumerations

enum class  ErrorCode {
  Unknown = 0 , Cancelled , InvalidArgument , RequestTimeout ,
  InternalFailure , ServiceUnavailable , AccessDenied , BadRequest ,
  PreconditionFailed , NotFound , SlowDown , NetworkConnection ,
  CacheIO
}
 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...
 

Functions

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.

Enumerator
Unknown 

An unknown error. See the error message for details.

Cancelled 

The request was cancelled (usually by the user).

InvalidArgument 

The request passed invalid arguments.

RequestTimeout 

The request exceeded the timeout limit.

InternalFailure 

An internal server failure.

ServiceUnavailable 

The requested service is not available.

AccessDenied 

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

BadRequest 

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

PreconditionFailed 

The conditions required to access the service are not met.

NotFound 

The requested resource was not found.

SlowDown 

Too many requests sent in a given amount of time.

NetworkConnection 

The network connection error.

CacheIO 

A failed cache IO operation.

◆ FetchOptions

Fetch options that control how requests are handled.

Enumerator
OnlineIfNotFound 

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

OnlineOnly 

Skips cache lookups and queries the network right away.

CacheOnly 

Returns immediately if a cache lookup fails.

CacheWithUpdate 

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

Note
Do not use it for versioned layer client requests.