├── .clang-format
├── .github
├── ISSUE_TEMPLATE
│ └── bug_report.md
└── workflows
│ └── psv_pipelines.yml
├── .gitignore
├── CHANGELOG.md
├── CMakeLists.txt
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── cmake
├── SymlinkHelpers.cmake
├── android
│ ├── CMakeLists.txt.in
│ ├── android_test.sh.in
│ ├── gen_android_test.cmake
│ └── tester
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt.in
│ │ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle.in
│ │ ├── jni
│ │ │ ├── com_here_android_olp_TesterActivity.cpp
│ │ │ └── com_here_android_olp_TesterActivity.h
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── ServiceTest.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml.in
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── here
│ │ │ │ └── android
│ │ │ │ └── olp
│ │ │ │ └── TesterActivity.java.in
│ │ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── menu
│ │ │ └── menu_main.xml
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ └── settings.gradle
├── cmakeProjectConfig.cmake
├── common.cmake
├── core-config.cmake
├── coverage.cmake
├── ios
│ ├── CMakeLists.txt.in
│ ├── add_frameworks.cmake
│ ├── gen_ios_test.cmake
│ ├── ios_test.sh.in
│ ├── tester
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── Main.storyboard
│ │ ├── CMakeLists.txt.in
│ │ ├── Info.plist.in
│ │ ├── MyViewController.h
│ │ ├── MyViewController.mm
│ │ └── main.mm
│ └── xcodebuild_filter.awk
├── pkg-config.pc.in
├── toolchains
│ └── iOS.cmake
└── uninstall.cmake
├── codecov.yml
├── docs
├── CMakeLists.txt
├── OverallArchitecture.md
├── authenticate.md
├── create-platform-client-settings.md
├── dataservice-cache-example.md
├── dataservice-read-catalog-example.md
├── dataservice-read-from-stream-layer-example.md
├── dataservice-write-example.md
├── diagrams
│ ├── sdk-module-overview.png
│ └── sdk-module-overview.puml
├── get-started.md
└── work-with-data-apis.md
├── examples
├── .gitignore
├── CMakeLists.txt
├── Examples.h
├── Options.h
├── ProtectedCacheExample.cpp
├── ProtectedCacheExample.h
├── ReadExample.cpp
├── ReadExample.h
├── StreamLayerReadExample.cpp
├── StreamLayerReadExample.h
├── WriteExample.cpp
├── WriteExample.h
├── android
│ ├── app
│ │ ├── CMakeLists.txt.in
│ │ ├── build.gradle.in
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml.in
│ │ │ ├── cpp
│ │ │ └── MainActivityNative.cpp.in
│ │ │ ├── java
│ │ │ └── MainActivity.java.in
│ │ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml.in
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── cmake
│ ├── gen_android_example.cmake.in
│ └── gen_ios_example.cmake.in
├── ios
│ ├── AppDelegate.h
│ ├── AppDelegate.mm
│ ├── CMakeLists.txt.in
│ ├── Info.plist.in
│ ├── ViewController.h
│ ├── ViewController.mm
│ ├── main.mm
│ └── resources
│ │ └── Main.storyboard
└── main.cpp
├── external
├── CMakeLists.txt
├── boost
│ ├── CMakeLists.txt
│ └── CMakeLists.txt.boost.in
├── curl
│ ├── CMakeLists.txt
│ ├── CMakeLists.txt.curl.in
│ ├── CurlAndroidCrossCompile.cmake
│ └── openssl
│ │ ├── CMakeLists.txt
│ │ ├── cmake
│ │ └── Config.cmake.in
│ │ ├── crypto
│ │ ├── CMakeLists.txt
│ │ └── buildinf.h.cmake
│ │ └── ssl
│ │ └── CMakeLists.txt
├── googletest
│ ├── CMakeLists.txt
│ └── CMakeLists.txt.googletest.in
├── leveldb
│ ├── CMakeLists-leveldb.txt
│ ├── CMakeLists.txt
│ └── CMakeLists.txt.leveldb.in
├── lmdb
│ ├── CMakeLists-lmdb.txt
│ ├── CMakeLists.txt
│ ├── CMakeLists.txt.lmdb.in
│ └── lmdbConfig.cmake.in
└── rapidjson
│ ├── CMakeLists.txt
│ └── CMakeLists.txt.rapidjson.in
├── olp-cpp-sdk-authentication
├── CMakeLists.txt
├── include
│ └── olp
│ │ └── authentication
│ │ ├── AppleSignInProperties.h
│ │ ├── AuthenticationApi.h
│ │ ├── AuthenticationClient.h
│ │ ├── AuthenticationCredentials.h
│ │ ├── AuthenticationSettings.h
│ │ ├── AuthorizeRequest.h
│ │ ├── AuthorizeResult.h
│ │ ├── Crypto.h
│ │ ├── ErrorResponse.h
│ │ ├── IntrospectAppResult.h
│ │ ├── Settings.h
│ │ ├── SignInResult.h
│ │ ├── SignInUserResult.h
│ │ ├── SignOutResult.h
│ │ ├── SignUpResult.h
│ │ ├── TokenProvider.h
│ │ ├── TokenResult.h
│ │ ├── Types.h
│ │ └── UserAccountInfoResponse.h
├── src
│ ├── AuthenticationClient.cpp
│ ├── AuthenticationClientImpl.cpp
│ ├── AuthenticationClientImpl.h
│ ├── AuthenticationClientUtils.cpp
│ ├── AuthenticationClientUtils.h
│ ├── AuthenticationCredentials.cpp
│ ├── AuthorizeRequest.cpp
│ ├── AutoRefreshingToken.cpp
│ ├── AutoRefreshingToken.h
│ ├── BaseResult.cpp
│ ├── BaseResult.h
│ ├── Constants.cpp
│ ├── Constants.h
│ ├── Crypto.cpp
│ ├── ResponseFromJsonBuilder.h
│ ├── Settings.cpp
│ ├── SignInResult.cpp
│ ├── SignInResultImpl.cpp
│ ├── SignInResultImpl.h
│ ├── SignInUserResult.cpp
│ ├── SignInUserResultImpl.cpp
│ ├── SignInUserResultImpl.h
│ ├── SignOutResult.cpp
│ ├── SignOutResultImpl.cpp
│ ├── SignOutResultImpl.h
│ ├── SignUpResult.cpp
│ ├── SignUpResultImpl.cpp
│ ├── SignUpResultImpl.h
│ ├── TokenEndpoint.cpp
│ ├── TokenEndpoint.h
│ ├── TokenEndpointImpl.cpp
│ ├── TokenEndpointImpl.h
│ ├── TokenProvider.cpp
│ ├── TokenRequest.cpp
│ ├── TokenRequest.h
│ └── TokenResult.cpp
└── tests
│ ├── AuthenticationClientTest.cpp
│ ├── AuthenticationCredentialsTest.cpp
│ ├── CMakeLists.txt
│ ├── CryptoTest.cpp
│ ├── DecisionApiClientTest.cpp
│ └── SignInResultImplTest.cpp
├── olp-cpp-sdk-core
├── CMakeLists.txt
├── cmake
│ ├── CompileChecks.cmake
│ ├── GetAndroidVariables.cmake
│ ├── android.cmake
│ ├── curl.cmake
│ ├── ios.cmake
│ ├── offline.cmake
│ └── winhttp.cmake
├── configs
│ └── ConfigNetwork.cmake
├── include
│ └── olp
│ │ └── core
│ │ ├── Config.h.in
│ │ ├── CoreApi.h
│ │ ├── cache
│ │ ├── CacheSettings.h
│ │ ├── DefaultCache.h
│ │ ├── KeyGenerator.h
│ │ └── KeyValueCache.h
│ │ ├── client
│ │ ├── ApiError.h
│ │ ├── ApiLookupClient.h
│ │ ├── ApiNoResult.h
│ │ ├── ApiResponse.h
│ │ ├── BackdownStrategy.h
│ │ ├── CancellationContext.h
│ │ ├── CancellationContext.inl
│ │ ├── CancellationToken.h
│ │ ├── Condition.h
│ │ ├── DefaultLookupEndpointProvider.h
│ │ ├── ErrorCode.h
│ │ ├── FetchOptions.h
│ │ ├── HRN.h
│ │ ├── HttpResponse.h
│ │ ├── OauthToken.h
│ │ ├── OlpClient.h
│ │ ├── OlpClientFactory.h
│ │ ├── OlpClientSettings.h
│ │ ├── OlpClientSettingsFactory.h
│ │ ├── PendingRequests.h
│ │ ├── RetrySettings.h
│ │ ├── TaskContext.h
│ │ └── model
│ │ │ └── Api.h
│ │ ├── context
│ │ ├── Context.h
│ │ └── EnterBackgroundSubscriber.h
│ │ ├── generated
│ │ ├── parser
│ │ │ ├── JsonParser.h
│ │ │ └── ParserWrapper.h
│ │ └── serializer
│ │ │ └── SerializerWrapper.h
│ │ ├── geo
│ │ ├── Types.h
│ │ ├── coordinates
│ │ │ ├── GeoCoordinates.h
│ │ │ ├── GeoCoordinates3d.h
│ │ │ ├── GeoPoint.h
│ │ │ └── GeoRectangle.h
│ │ ├── projection
│ │ │ ├── EarthConstants.h
│ │ │ ├── EquirectangularProjection.h
│ │ │ ├── IProjection.h
│ │ │ ├── IdentityProjection.h
│ │ │ ├── SphereProjection.h
│ │ │ └── WebMercatorProjection.h
│ │ └── tiling
│ │ │ ├── HalfQuadTreeSubdivisionScheme.h
│ │ │ ├── ISubdivisionScheme.h
│ │ │ ├── ITilingScheme.h
│ │ │ ├── PathTiling.h
│ │ │ ├── QuadTreeSubdivisionScheme.h
│ │ │ ├── SubTiles.h
│ │ │ ├── TileKey.h
│ │ │ ├── TileKeyUtils.h
│ │ │ ├── TileTreeTraverse.h
│ │ │ ├── TilingScheme.h
│ │ │ └── TilingSchemeRegistry.h
│ │ ├── http
│ │ ├── CertificateSettings.h
│ │ ├── HttpStatusCode.h
│ │ ├── Network.h
│ │ ├── NetworkConstants.h
│ │ ├── NetworkInitializationSettings.h
│ │ ├── NetworkProxySettings.h
│ │ ├── NetworkRequest.h
│ │ ├── NetworkResponse.h
│ │ ├── NetworkSettings.h
│ │ ├── NetworkTypes.h
│ │ ├── NetworkUtils.h
│ │ └── adapters
│ │ │ └── HarCaptureAdapter.h
│ │ ├── logging
│ │ ├── Appender.h
│ │ ├── Configuration.h
│ │ ├── ConsoleAppender.h
│ │ ├── DebugAppender.h
│ │ ├── FileAppender.h
│ │ ├── FilterGroup.h
│ │ ├── Format.h
│ │ ├── Level.h
│ │ ├── Log.h
│ │ ├── LogContext.h
│ │ ├── LogMessage.h
│ │ └── MessageFormatter.h
│ │ ├── math
│ │ ├── AlignedBox.h
│ │ ├── Math.h
│ │ ├── Size.h
│ │ ├── Types.h
│ │ └── Vector.h
│ │ ├── porting
│ │ ├── deprecated.h
│ │ ├── export.h
│ │ ├── make_unique.h
│ │ ├── platform.h
│ │ ├── shared_mutex.h
│ │ ├── try_emplace.h
│ │ └── warning_disable.h
│ │ ├── thread
│ │ ├── Atomic.h
│ │ ├── Continuation.h
│ │ ├── Continuation.inl
│ │ ├── ExecutionContext.h
│ │ ├── SyncQueue.h
│ │ ├── SyncQueue.inl
│ │ ├── TaskContinuation.h
│ │ ├── TaskContinuation.inl
│ │ ├── TaskScheduler.h
│ │ ├── ThreadPoolTaskScheduler.h
│ │ └── TypeHelpers.h
│ │ └── utils
│ │ ├── Base64.h
│ │ ├── Config.h
│ │ ├── Credentials.h
│ │ ├── Dir.h
│ │ ├── LruCache.h
│ │ ├── Thread.h
│ │ ├── Url.h
│ │ └── WarningWorkarounds.h
├── src
│ ├── cache
│ │ ├── DefaultCache.cpp
│ │ ├── DefaultCacheImpl.cpp
│ │ ├── DefaultCacheImpl.h
│ │ ├── DiskCache.cpp
│ │ ├── DiskCache.h
│ │ ├── DiskCacheEnv.cpp
│ │ ├── DiskCacheEnv.h
│ │ ├── DiskCacheSizeLimitEnv.cpp
│ │ ├── DiskCacheSizeLimitEnv.h
│ │ ├── DiskCacheSizeLimitWritableFile.cpp
│ │ ├── DiskCacheSizeLimitWritableFile.h
│ │ ├── InMemoryCache.cpp
│ │ ├── InMemoryCache.h
│ │ ├── KeyGenerator.cpp
│ │ ├── ProtectedKeyList.cpp
│ │ ├── ProtectedKeyList.h
│ │ ├── ReadOnlyEnv.cpp
│ │ ├── ReadOnlyEnv.h
│ │ └── SizeCountingEnv.h
│ ├── client
│ │ ├── ApiLookupClient.cpp
│ │ ├── ApiLookupClientImpl.cpp
│ │ ├── ApiLookupClientImpl.h
│ │ ├── CancellationToken.cpp
│ │ ├── DefaultLookupEndpointProvider.cpp
│ │ ├── HRN.cpp
│ │ ├── OauthToken.cpp
│ │ ├── OlpClient.cpp
│ │ ├── OlpClientFactory.cpp
│ │ ├── OlpClientSettingsFactory.cpp
│ │ ├── PendingRequests.cpp
│ │ ├── PendingUrlRequests.cpp
│ │ ├── PendingUrlRequests.h
│ │ ├── RetrySettings.cpp
│ │ ├── Tokenizer.h
│ │ ├── api
│ │ │ ├── JsonResultParser.h
│ │ │ ├── PlatformApi.cpp
│ │ │ ├── PlatformApi.h
│ │ │ ├── ResourcesApi.cpp
│ │ │ └── ResourcesApi.h
│ │ ├── parser
│ │ │ ├── ApiParser.cpp
│ │ │ └── ApiParser.h
│ │ └── repository
│ │ │ ├── ApiCacheRepository.cpp
│ │ │ └── ApiCacheRepository.h
│ ├── context
│ │ ├── Context.cpp
│ │ ├── ContextInternal.cpp
│ │ ├── ContextInternal.h
│ │ └── ios
│ │ │ └── ContextInternal.mm
│ ├── geo
│ │ ├── coordinates
│ │ │ ├── GeoCoordinates.cpp
│ │ │ ├── GeoCoordinates3d.cpp
│ │ │ └── GeoRectangle.cpp
│ │ ├── projection
│ │ │ ├── EquirectangularProjection.cpp
│ │ │ ├── IdentityProjection.cpp
│ │ │ ├── SphereProjection.cpp
│ │ │ └── WebMercatorProjection.cpp
│ │ └── tiling
│ │ │ ├── HalfQuadTreeSubdivisionScheme.cpp
│ │ │ ├── QuadTreeSubdivisionScheme.cpp
│ │ │ ├── TileKey.cpp
│ │ │ ├── TileKeyUtils.cpp
│ │ │ └── TileTreeTraverse.cpp
│ ├── http
│ │ ├── DefaultNetwork.cpp
│ │ ├── DefaultNetwork.h
│ │ ├── Network.cpp
│ │ ├── NetworkProxySettings.cpp
│ │ ├── NetworkRequest.cpp
│ │ ├── NetworkResponse.cpp
│ │ ├── NetworkSettings.cpp
│ │ ├── NetworkTypes.cpp
│ │ ├── NetworkUtils.cpp
│ │ ├── adapters
│ │ │ └── HarCaptureAdapter.cpp
│ │ ├── android
│ │ │ ├── HttpClient.java
│ │ │ ├── NetworkAndroid.cpp
│ │ │ ├── NetworkAndroid.h
│ │ │ └── utils
│ │ │ │ ├── JNIScopedLocalReference.h
│ │ │ │ └── JNIThreadBinder.h
│ │ ├── curl
│ │ │ ├── NetworkCurl.cpp
│ │ │ └── NetworkCurl.h
│ │ ├── ios
│ │ │ ├── OLPHttpClient+Internal.h
│ │ │ ├── OLPHttpClient.h
│ │ │ ├── OLPHttpClient.mm
│ │ │ ├── OLPHttpTask+Internal.h
│ │ │ ├── OLPHttpTask.h
│ │ │ ├── OLPHttpTask.mm
│ │ │ ├── OLPNetworkConstants.h
│ │ │ ├── OLPNetworkConstants.mm
│ │ │ ├── OLPNetworkIOS.h
│ │ │ └── OLPNetworkIOS.mm
│ │ ├── offline
│ │ │ ├── NetworkOffline.cpp
│ │ │ └── NetworkOffline.h
│ │ └── winhttp
│ │ │ ├── NetworkWinHttp.cpp
│ │ │ └── NetworkWinHttp.h
│ ├── logging
│ │ ├── Configuration.cpp
│ │ ├── ConsoleAppender.cpp
│ │ ├── DebugAppender.cpp
│ │ ├── FileAppender.cpp
│ │ ├── FilterGroup.cpp
│ │ ├── Format.cpp
│ │ ├── Log.cpp
│ │ ├── LogContext.cpp
│ │ ├── MessageFormatter.cpp
│ │ ├── ThreadId.cpp
│ │ └── ThreadId.h
│ ├── thread
│ │ ├── Continuation.cpp
│ │ ├── ExecutionContext.cpp
│ │ ├── PriorityQueueExtended.h
│ │ └── ThreadPoolTaskScheduler.cpp
│ └── utils
│ │ ├── Base64.cpp
│ │ ├── BoostExceptionHandle.cpp
│ │ ├── Credentials.cpp
│ │ ├── Dir.cpp
│ │ ├── Thread.cpp
│ │ └── Url.cpp
└── tests
│ ├── CMakeLists.txt
│ ├── cache
│ ├── DefaultCacheImplTest.cpp
│ ├── DefaultCacheTest.cpp
│ ├── Helpers.cpp
│ ├── Helpers.h
│ ├── InMemoryCacheTest.cpp
│ ├── KeyGeneratorTest.cpp
│ └── ProtectedKeyListTest.cpp
│ ├── client
│ ├── ApiLookupClientImplTest.cpp
│ ├── ApiResponseTest.cpp
│ ├── BackdownStrategyTest.cpp
│ ├── CancellationContextTest.cpp
│ ├── ConditionTest.cpp
│ ├── DefaultLookupEndpointProviderTest.cpp
│ ├── HRNTest.cpp
│ ├── OlpClientSettingsFactoryTest.cpp
│ ├── OlpClientTest.cpp
│ ├── PendingUrlRequestsTest.cpp
│ └── TaskContextTest.cpp
│ ├── context
│ └── ContextTest.cpp
│ ├── geo
│ ├── coordinates
│ │ ├── GeoCoordinates3dTest.cpp
│ │ ├── GeoCoordinatesTest.cpp
│ │ ├── GeoPointTest.cpp
│ │ └── GeoRectangleTest.cpp
│ ├── projection
│ │ ├── EquirectangularProjectionTest.cpp
│ │ ├── IdentityProjectionTest.cpp
│ │ ├── SphereProjectionTest.cpp
│ │ └── WebMercatorProjectionTest.cpp
│ ├── testutil
│ │ ├── CompareGeoCoordinates.h
│ │ ├── CompareGeoCoordinates3d.h
│ │ └── CompareGeoRectangle.h
│ └── tiling
│ │ ├── PathTilingTest.cpp
│ │ ├── SubTilesTest.cpp
│ │ ├── SubdivisionSchemeTest.cpp
│ │ ├── TileKeyTest.cpp
│ │ └── TileKeyUtilsTest.cpp
│ ├── http
│ ├── NetworkSettingsTest.cpp
│ └── NetworkUtils.cpp
│ ├── logging
│ ├── ConfigurationTest.cpp
│ ├── DisabledLoggingTest.cpp
│ ├── FileAppenderTest.cpp
│ ├── FilterGroupTest.cpp
│ ├── FormatTest.cpp
│ ├── LogTest.cpp
│ ├── MessageFormatterTest.cpp
│ ├── MockAppender.cpp
│ └── MockAppender.h
│ ├── thread
│ ├── ContinuationTest.cpp
│ ├── ExecutionContextTest.cpp
│ ├── PriorityQueueExtendedTest.cpp
│ ├── SyncQueueTest.cpp
│ ├── TaskContinuationTest.cpp
│ └── ThreadPoolTaskSchedulerTest.cpp
│ └── utils
│ └── UtilsTest.cpp
├── olp-cpp-sdk-dataservice-read
├── CMakeLists.txt
├── include
│ └── olp
│ │ └── dataservice
│ │ └── read
│ │ ├── AggregatedDataResult.h
│ │ ├── CatalogClient.h
│ │ ├── CatalogRequest.h
│ │ ├── CatalogVersionRequest.h
│ │ ├── CompatibleVersionsRequest.h
│ │ ├── ConsumerProperties.h
│ │ ├── DataRequest.h
│ │ ├── DataServiceReadApi.h
│ │ ├── FetchOptions.h
│ │ ├── PartitionsRequest.h
│ │ ├── PrefetchPartitionsRequest.h
│ │ ├── PrefetchPartitionsResult.h
│ │ ├── PrefetchStatus.h
│ │ ├── PrefetchTileResult.h
│ │ ├── PrefetchTilesRequest.h
│ │ ├── SeekRequest.h
│ │ ├── StreamLayerClient.h
│ │ ├── SubscribeRequest.h
│ │ ├── TileRequest.h
│ │ ├── Types.h
│ │ ├── VersionedLayerClient.h
│ │ ├── VersionsRequest.h
│ │ ├── VolatileLayerClient.h
│ │ └── model
│ │ ├── Catalog.h
│ │ ├── CatalogVersion.h
│ │ ├── Data.h
│ │ ├── Messages.h
│ │ ├── Partitions.h
│ │ ├── StreamOffsets.h
│ │ ├── VersionDependency.h
│ │ ├── VersionInfo.h
│ │ ├── VersionInfos.h
│ │ ├── VersionResponse.h
│ │ ├── VersionsResponse.h
│ │ └── VersionsResponseEntry.h
├── src
│ ├── ApiClientLookup.cpp
│ ├── ApiClientLookup.h
│ ├── BlobDataReader.h
│ ├── BlobDataWriter.h
│ ├── CatalogClient.cpp
│ ├── CatalogClientImpl.cpp
│ ├── CatalogClientImpl.h
│ ├── Common.h
│ ├── DownloadItemsJob.h
│ ├── ExtendedApiResponse.h
│ ├── ExtendedApiResponseHelpers.h
│ ├── JsonResultParser.h
│ ├── PrefetchPartitionsHelper.cpp
│ ├── PrefetchPartitionsHelper.h
│ ├── PrefetchTilesHelper.h
│ ├── ProtectDependencyResolver.cpp
│ ├── ProtectDependencyResolver.h
│ ├── QueryMetadataJob.h
│ ├── QueryPartitionsJob.h
│ ├── ReleaseDependencyResolver.cpp
│ ├── ReleaseDependencyResolver.h
│ ├── StreamLayerClient.cpp
│ ├── StreamLayerClientImpl.cpp
│ ├── StreamLayerClientImpl.h
│ ├── TaskSink.cpp
│ ├── TaskSink.h
│ ├── VersionedLayerClient.cpp
│ ├── VersionedLayerClientImpl.cpp
│ ├── VersionedLayerClientImpl.h
│ ├── VolatileLayerClient.cpp
│ ├── VolatileLayerClientImpl.cpp
│ ├── VolatileLayerClientImpl.h
│ ├── generated
│ │ ├── api
│ │ │ ├── BlobApi.cpp
│ │ │ ├── BlobApi.h
│ │ │ ├── ConfigApi.cpp
│ │ │ ├── ConfigApi.h
│ │ │ ├── MetadataApi.cpp
│ │ │ ├── MetadataApi.h
│ │ │ ├── PlatformApi.cpp
│ │ │ ├── PlatformApi.h
│ │ │ ├── QueryApi.cpp
│ │ │ ├── QueryApi.h
│ │ │ ├── ResourcesApi.cpp
│ │ │ ├── ResourcesApi.h
│ │ │ ├── StreamApi.cpp
│ │ │ ├── StreamApi.h
│ │ │ ├── VolatileBlobApi.cpp
│ │ │ └── VolatileBlobApi.h
│ │ ├── model
│ │ │ ├── Api.h
│ │ │ ├── Index.h
│ │ │ ├── LayerVersions.h
│ │ │ └── SubscribeResponse.h
│ │ ├── parser
│ │ │ ├── ApiParser.cpp
│ │ │ ├── ApiParser.h
│ │ │ ├── CatalogParser.cpp
│ │ │ ├── CatalogParser.h
│ │ │ ├── IndexParser.cpp
│ │ │ ├── IndexParser.h
│ │ │ ├── LayerVersionsParser.cpp
│ │ │ ├── LayerVersionsParser.h
│ │ │ ├── MessagesParser.cpp
│ │ │ ├── MessagesParser.h
│ │ │ ├── PartitionsParser.cpp
│ │ │ ├── PartitionsParser.h
│ │ │ ├── StreamOffsetParser.cpp
│ │ │ ├── StreamOffsetParser.h
│ │ │ ├── SubscribeResponseParser.cpp
│ │ │ ├── SubscribeResponseParser.h
│ │ │ ├── VersionInfosParser.cpp
│ │ │ ├── VersionInfosParser.h
│ │ │ ├── VersionResponseParser.cpp
│ │ │ ├── VersionResponseParser.h
│ │ │ ├── VersionsResponseParser.cpp
│ │ │ └── VersionsResponseParser.h
│ │ └── serializer
│ │ │ ├── ApiSerializer.cpp
│ │ │ ├── ApiSerializer.h
│ │ │ ├── ByteVectorBuffer.h
│ │ │ ├── CatalogSerializer.cpp
│ │ │ ├── CatalogSerializer.h
│ │ │ ├── CatalogVersionsSerializer.h
│ │ │ ├── ConsumerPropertiesSerializer.h
│ │ │ ├── JsonSerializer.h
│ │ │ ├── LayerVersionsSerializer.cpp
│ │ │ ├── LayerVersionsSerializer.h
│ │ │ ├── PartitionsSerializer.cpp
│ │ │ ├── PartitionsSerializer.h
│ │ │ ├── StreamOffsetsSerializer.cpp
│ │ │ ├── StreamOffsetsSerializer.h
│ │ │ ├── VersionInfosSerializer.cpp
│ │ │ ├── VersionInfosSerializer.h
│ │ │ ├── VersionResponseSerializer.cpp
│ │ │ └── VersionResponseSerializer.h
│ └── repositories
│ │ ├── ApiCacheRepository.cpp
│ │ ├── ApiCacheRepository.h
│ │ ├── AsyncJsonStream.cpp
│ │ ├── AsyncJsonStream.h
│ │ ├── CatalogCacheRepository.cpp
│ │ ├── CatalogCacheRepository.h
│ │ ├── CatalogRepository.cpp
│ │ ├── CatalogRepository.h
│ │ ├── DataCacheRepository.cpp
│ │ ├── DataCacheRepository.h
│ │ ├── DataRepository.cpp
│ │ ├── DataRepository.h
│ │ ├── NamedMutex.cpp
│ │ ├── NamedMutex.h
│ │ ├── PartitionsCacheRepository.cpp
│ │ ├── PartitionsCacheRepository.h
│ │ ├── PartitionsRepository.cpp
│ │ ├── PartitionsRepository.h
│ │ ├── PartitionsSaxHandler.cpp
│ │ ├── PartitionsSaxHandler.h
│ │ ├── PrefetchTilesRepository.cpp
│ │ ├── PrefetchTilesRepository.h
│ │ ├── QuadTreeIndex.cpp
│ │ └── QuadTreeIndex.h
└── tests
│ ├── ApiClientLookupTest.cpp
│ ├── AsyncJsonStreamTest.cpp
│ ├── CMakeLists.txt
│ ├── CatalogCacheRepositoryTest.cpp
│ ├── CatalogClientTest.cpp
│ ├── CatalogRepositoryTest.cpp
│ ├── DataCacheRepositoryTest.cpp
│ ├── DataRepositoryTest.cpp
│ ├── JsonResultParserTest.cpp
│ ├── MetadataApiTest.cpp
│ ├── NamedMutexTest.cpp
│ ├── ParserTest.cpp
│ ├── PartitionsCacheRepositoryTest.cpp
│ ├── PartitionsRepositoryTest.cpp
│ ├── PartitionsSaxHandlerTest.cpp
│ ├── PrefetchRepositoryTest.cpp
│ ├── PrefetchTilesRequestTest.cpp
│ ├── QuadTreeIndexTest.cpp
│ ├── QueryApiTest.cpp
│ ├── SerializerTest.cpp
│ ├── StreamApiTest.cpp
│ ├── StreamLayerClientImplTest.cpp
│ ├── VersionedLayerClientImplTest.cpp
│ ├── VolatileLayerClientImplTest.cpp
│ └── VolatileLayerClientTest.cpp
├── olp-cpp-sdk-dataservice-write
├── CMakeLists.txt
├── include
│ └── olp
│ │ └── dataservice
│ │ └── write
│ │ ├── DataServiceWriteApi.h
│ │ ├── IndexLayerClient.h
│ │ ├── StreamLayerClient.h
│ │ ├── StreamLayerClientSettings.h
│ │ ├── VersionedLayerClient.h
│ │ ├── VolatileLayerClient.h
│ │ ├── generated
│ │ └── model
│ │ │ ├── Details.h
│ │ │ ├── Index.h
│ │ │ ├── Publication.h
│ │ │ ├── ResponseOk.h
│ │ │ ├── ResponseOkSingle.h
│ │ │ └── VersionDependency.h
│ │ └── model
│ │ ├── CheckDataExistsRequest.h
│ │ ├── DeleteIndexDataRequest.h
│ │ ├── FlushRequest.h
│ │ ├── PublishDataRequest.h
│ │ ├── PublishIndexRequest.h
│ │ ├── PublishPartitionDataRequest.h
│ │ ├── PublishSdiiRequest.h
│ │ ├── StartBatchRequest.h
│ │ ├── UpdateIndexRequest.h
│ │ └── VersionResponse.h
├── src
│ ├── ApiClientLookup.cpp
│ ├── ApiClientLookup.h
│ ├── AutoFlushController.cpp
│ ├── AutoFlushController.h
│ ├── AutoFlushSettings.h
│ ├── BackgroundTaskCollection.cpp
│ ├── BackgroundTaskCollection.h
│ ├── CancellationTokenList.cpp
│ ├── CancellationTokenList.h
│ ├── CatalogSettings.cpp
│ ├── CatalogSettings.h
│ ├── Common.h
│ ├── DefaultFlushEventListener.cpp
│ ├── DefaultFlushEventListener.h
│ ├── FlushEventListener.h
│ ├── FlushMetrics.h
│ ├── IndexLayerClient.cpp
│ ├── IndexLayerClientImpl.cpp
│ ├── IndexLayerClientImpl.h
│ ├── JsonResultParser.h
│ ├── StreamLayerClient.cpp
│ ├── StreamLayerClientImpl.cpp
│ ├── StreamLayerClientImpl.h
│ ├── TimeUtils.cpp
│ ├── TimeUtils.h
│ ├── VersionedLayerClient.cpp
│ ├── VersionedLayerClientImpl.cpp
│ ├── VersionedLayerClientImpl.h
│ ├── VolatileLayerClient.cpp
│ ├── VolatileLayerClientImpl.cpp
│ ├── VolatileLayerClientImpl.h
│ └── generated
│ │ ├── BlobApi.cpp
│ │ ├── BlobApi.h
│ │ ├── ConfigApi.cpp
│ │ ├── ConfigApi.h
│ │ ├── IndexApi.cpp
│ │ ├── IndexApi.h
│ │ ├── IngestApi.cpp
│ │ ├── IngestApi.h
│ │ ├── MetadataApi.cpp
│ │ ├── MetadataApi.h
│ │ ├── PlatformApi.cpp
│ │ ├── PlatformApi.h
│ │ ├── PublishApi.cpp
│ │ ├── PublishApi.h
│ │ ├── QueryApi.cpp
│ │ ├── QueryApi.h
│ │ ├── ResourcesApi.cpp
│ │ ├── ResourcesApi.h
│ │ ├── model
│ │ ├── Api.h
│ │ ├── Catalog.h
│ │ ├── LayerVersions.h
│ │ ├── Partitions.h
│ │ ├── PublishPartition.h
│ │ └── PublishPartitions.h
│ │ ├── parser
│ │ ├── ApiParser.cpp
│ │ ├── ApiParser.h
│ │ ├── CatalogParser.cpp
│ │ ├── CatalogParser.h
│ │ ├── DetailsParser.cpp
│ │ ├── DetailsParser.h
│ │ ├── LayerVersionsParser.cpp
│ │ ├── LayerVersionsParser.h
│ │ ├── PartitionParser.h
│ │ ├── PartitionsParser.cpp
│ │ ├── PartitionsParser.h
│ │ ├── PublicationParser.cpp
│ │ ├── PublicationParser.h
│ │ ├── PublishDataRequestParser.cpp
│ │ ├── PublishDataRequestParser.h
│ │ ├── PublishPartitionParser.cpp
│ │ ├── PublishPartitionParser.h
│ │ ├── PublishPartitionsParser.cpp
│ │ ├── PublishPartitionsParser.h
│ │ ├── ResponseOkParser.cpp
│ │ ├── ResponseOkParser.h
│ │ ├── ResponseOkSingleParser.cpp
│ │ ├── ResponseOkSingleParser.h
│ │ ├── VersionDependencyParser.cpp
│ │ ├── VersionDependencyParser.h
│ │ ├── VersionResponseParser.cpp
│ │ └── VersionResponseParser.h
│ │ └── serializer
│ │ ├── ApiSerializer.cpp
│ │ ├── ApiSerializer.h
│ │ ├── CatalogSerializer.cpp
│ │ ├── CatalogSerializer.h
│ │ ├── IndexInfoSerializer.cpp
│ │ ├── IndexInfoSerializer.h
│ │ ├── JsonSerializer.h
│ │ ├── PublicationSerializer.cpp
│ │ ├── PublicationSerializer.h
│ │ ├── PublishDataRequestSerializer.cpp
│ │ ├── PublishDataRequestSerializer.h
│ │ ├── PublishPartitionSerializer.cpp
│ │ ├── PublishPartitionSerializer.h
│ │ ├── PublishPartitionsSerializer.cpp
│ │ ├── PublishPartitionsSerializer.h
│ │ ├── UpdateIndexRequestSerializer.cpp
│ │ └── UpdateIndexRequestSerializer.h
└── tests
│ ├── ApiClientLookupTest.cpp
│ ├── CMakeLists.txt
│ ├── CancellationTokenListTest.cpp
│ ├── ParserTest.cpp
│ ├── SerializerTest.cpp
│ ├── StartBatchRequestTest.cpp
│ ├── StreamLayerClientImplTest.cpp
│ ├── TimeUtilsTest.cpp
│ ├── VersionedLayerClientImplPublishToBatchTest.cpp
│ └── VersionedLayerClientImplTest.cpp
├── scripts
├── android
│ └── build.sh
├── ios
│ └── azure_ios_build_psv.sh
├── linux-armhf
│ └── fv
│ │ └── build_armhf_fv.sh
├── linux
│ ├── fv
│ │ ├── build_fv.sh
│ │ ├── olp-common.variables
│ │ ├── olp-cpp-sdk-authentication-test.sh
│ │ ├── olp-cpp-sdk-authentication-test.variables
│ │ ├── olp-cpp-sdk-core-test.sh
│ │ ├── olp-cpp-sdk-core-test.variables
│ │ ├── olp-cpp-sdk-dataservice-read-test.sh
│ │ ├── olp-cpp-sdk-dataservice-read-test.variables
│ │ ├── olp-cpp-sdk-dataservice-write-test.sh
│ │ ├── olp-cpp-sdk-dataservice-write-test.variables
│ │ ├── olp-cpp-sdk-functional-network-test.sh
│ │ ├── olp-cpp-sdk-functional-test.sh
│ │ ├── olp-cpp-sdk-functional-test.variables
│ │ ├── olp-cpp-sdk-integration-test.sh
│ │ ├── olp-cpp-sdk-integration-test.variables
│ │ ├── test_fv.sh
│ │ └── tsan_suppression.txt
│ ├── nv
│ │ ├── build_valgrind.sh
│ │ ├── cppcheck_and_upload_sonar.sh
│ │ ├── sonar-project.propertiesValgrind
│ │ ├── test_performance.sh
│ │ └── test_valgrind.sh
│ ├── psv
│ │ ├── build_psv.sh
│ │ ├── build_psv_no_cache.sh
│ │ └── test_psv.sh
│ └── weekly
│ │ ├── build_perf_tests.sh
│ │ ├── performance_tests.json
│ │ ├── reports
│ │ └── index.html
│ │ ├── run_perf_test_metrics.sh
│ │ └── run_performance_test_metrics.py
├── macos
│ └── psv
│ │ └── azure_macos_build_psv.sh
├── misc
│ ├── api_compliance.sh
│ ├── artifactory_upload.sh
│ ├── commit_checker.sh
│ ├── commit_message_recom.txt
│ └── cpplint_ci.sh
└── windows
│ └── build.sh
└── tests
├── common
├── ApiDefaultResponses.cpp
├── ApiDefaultResponses.h
├── CMakeLists.txt
├── KeyValueCacheTestable.h
├── PlatformUrlsGenerator.cpp
├── PlatformUrlsGenerator.h
├── ReadDefaultResponses.cpp
├── ReadDefaultResponses.h
├── ResponseGenerator.cpp
├── ResponseGenerator.h
├── TypesToStream.h
├── WriteDefaultResponses.h
├── matchers
│ └── NetworkUrlMatchers.h
└── mocks
│ ├── CacheMock.cpp
│ ├── CacheMock.h
│ ├── NetworkMock.cpp
│ ├── NetworkMock.h
│ └── TaskSchedulerMock.h
├── custom-params
├── CMakeLists.txt
├── include
│ └── testutils
│ │ └── CustomParameters.hpp
└── src
│ └── CustomParameters.cpp
├── functional
├── CMakeLists.txt
├── network
│ ├── CMakeLists.txt
│ ├── ConcurrencyTest.cpp
│ ├── DataCallbackTest.cpp
│ ├── DestructionTest.cpp
│ ├── NetworkTestBase.cpp
│ ├── NetworkTestBase.h
│ └── TimeoutTest.cpp
├── olp-cpp-sdk-authentication
│ ├── ArcGisAuthenticationTest.cpp
│ ├── AuthenticationClientTest.cpp
│ ├── AuthenticationCommonTestFixture.cpp
│ ├── AuthenticationCommonTestFixture.h
│ ├── AuthenticationProductionTest.cpp
│ ├── AuthenticationTestUtils.cpp
│ ├── AuthenticationTestUtils.h
│ ├── DecisionApiTest.cpp
│ ├── FacebookAuthenticationTest.cpp
│ ├── FederatedAuthenticationTest.cpp
│ ├── HereAccountOauth2ProductionTest.cpp
│ └── TestConstants.h
├── olp-cpp-sdk-core
│ ├── DirTest.cpp
│ └── OlpClientDefaultAsyncHttpTest.cpp
├── olp-cpp-sdk-dataservice-read
│ ├── ApiTest.cpp
│ ├── CatalogClientTest.cpp
│ ├── DataserviceReadVersionedLayerClientTest.cpp
│ ├── DataserviceReadVolatileLayerClientTest.cpp
│ ├── VersionedLayerClientGetDataTest.cpp
│ ├── VersionedLayerClientPrefetchTest.cpp
│ ├── VersionedLayerClientProtectTest.cpp
│ ├── VersionedLayerClientTest.cpp
│ ├── VersionedLayerTestBase.cpp
│ └── VersionedLayerTestBase.h
├── olp-cpp-sdk-dataservice-write
│ ├── DataserviceWriteIndexLayerClientTest.cpp
│ ├── DataserviceWriteStreamLayerClientCacheTest.cpp
│ ├── DataserviceWriteStreamLayerClientTest.cpp
│ ├── DataserviceWriteVersionedLayerClientTest.cpp
│ └── DataserviceWriteVolatileLayerClientTest.cpp
└── utils
│ ├── MockServerHelper.cpp
│ ├── MockServerHelper.h
│ ├── SetupMockServer.h
│ └── Utils.h
├── integration
├── CMakeLists.txt
├── olp-cpp-sdk-authentication
│ ├── AuthenticationClientTest.cpp
│ ├── AuthenticationMockedResponses.h
│ ├── HereAccountOauth2Test.cpp
│ ├── TokenEndpointTest.cpp
│ └── TokenProviderTest.cpp
├── olp-cpp-sdk-core
│ ├── ApiLookupClientTest.cpp
│ ├── DefaultCacheTest.cpp
│ └── DefaultNetworkTest.cpp
├── olp-cpp-sdk-dataservice-read
│ ├── CatalogClientCacheTest.cpp
│ ├── CatalogClientTest.cpp
│ ├── CatalogClientTestBase.cpp
│ ├── CatalogClientTestBase.h
│ ├── HttpResponses.h
│ ├── StreamLayerClientTest.cpp
│ ├── VersionedLayerClientCacheTest.cpp
│ ├── VersionedLayerClientPrefetchPartitionsTest.cpp
│ ├── VersionedLayerClientTest.cpp
│ ├── VersionedLayerGetAggregatedDataTest.cpp
│ ├── VersionedLayerPrefetch.cpp
│ ├── VersionedLayerTestBase.cpp
│ ├── VersionedLayerTestBase.h
│ ├── VolatileLayerClientCacheTest.cpp
│ └── VolatileLayerClientTest.cpp
└── olp-cpp-sdk-dataservice-write
│ ├── HttpResponses.h
│ ├── IndexLayerClientTest.cpp
│ ├── StreamLayerClientCacheTest.cpp
│ ├── StreamLayerClientTest.cpp
│ ├── VersionedLayerClientPublishToBatchTest.cpp
│ ├── VersionedLayerClientTest.cpp
│ └── VolatileLayerClientTest.cpp
├── performance
├── CMakeLists.txt
├── MemoryTest.cpp
├── MemoryTestBase.h
├── NetworkWrapper.h
└── PrefetchTest.cpp
└── utils
├── mock-server-client
├── Client.h
├── Expectation.h
├── JsonHelpers.h
└── Status.h
└── olp_server
├── README.md
├── blob_service.js
├── config_service.js
├── errors_generator.js
├── lookup_service.js
├── metadata_service.js
├── query_service.js
├── server.js
└── urls.js
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | BasedOnStyle: Google
4 |
5 | AccessModifierOffset: -1
6 | AllowShortFunctionsOnASingleLine: All
7 | AllowShortIfStatementsOnASingleLine: false
8 | AllowShortLoopsOnASingleLine: false
9 | AlwaysBreakAfterDefinitionReturnType: None
10 | BinPackParameters: true
11 | BreakBeforeBinaryOperators: None
12 | BreakBeforeBraces: Attach
13 | BreakBeforeTernaryOperators: true
14 | BreakConstructorInitializersBeforeComma: false
15 | ColumnLimit: 80
16 | ConstructorInitializerAllOnOneLineOrOnePerLine: true
17 | DerivePointerAlignment: true
18 | IndentCaseLabels: true
19 | IndentWidth: 2
20 | IncludeBlocks: Preserve
21 | IncludeCategories:
22 | - Regex: '^<.*\.h>'
23 | Priority: 1
24 | - Regex: '^<.*'
25 | Priority: 2
26 | - Regex: '.*'
27 | Priority: 3
28 | PenaltyBreakComment: 300
29 | SortIncludes: true
30 | SortUsingDeclarations: true
31 | SpaceInEmptyParentheses: false
32 | SpacesInAngles: false
33 | SpacesInParentheses: false
34 | SpacesInSquareBrackets: false
35 |
36 | ---
37 | Language: ObjC
38 | BasedOnStyle: Google
39 | ColumnLimit: 80
40 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[BUG]"
5 | labels: ''
6 | assignees: andescu
7 |
8 | ---
9 |
10 | ### Describe the bug
11 |
12 | ### Which version/tag/hash of the HERE OLP SDK are you using?
13 |
14 | ### What compiler are you using? What version of the compiler?
15 |
16 | ### What are the CMake arguments?
17 |
18 | ### Steps to reproduce the issue
19 |
20 | ### Expected behavior
21 |
22 | ### Can you provide any TRACE level logs?
23 | *Please strip sensitive data prior to upload!*
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | CMakeCache.txt
2 | CMakeFiles
3 | Makefile
4 | cmake_install.cmake
5 | install_manifest.txt
6 | CMakeLists.txt.user
7 | build*/
8 | *.doap
9 | .repo
10 | .cache
11 | .local
12 | .bash_history
13 |
14 | # Compiled Object files
15 | *.slo
16 | *.lo
17 | *.o
18 |
19 | # Compiled Dynamic libraries
20 | *.so
21 | *.dylib
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 |
28 |
29 | # vim backup files
30 | *.swp
31 | *~
32 | *.tmp
33 |
34 | # MacOS
35 | .DS_Store
36 |
37 | # files generated by cmake on Windows
38 | *.filters
39 | *.vcxproj
40 | *.sln
41 | *.sdf
42 | *.opensdf
43 | *.suo
44 | *.dir
45 | header_*.cpp
46 | Doxyfile
47 | CTestTestfile.cmake
48 | [Dd]ebug/
49 | html/
50 |
51 | # Visual Studio Code
52 | .vscode/
53 |
54 | # Visual Studio
55 | .vs/
56 | CMakeSettings.json
57 | .devcontainer/
58 |
59 | # Android Studio
60 | !build.gradle*
61 |
62 | # CLion
63 | .idea/
64 | cmake-build-*
65 |
--------------------------------------------------------------------------------
/cmake/android/CMakeLists.txt.in:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 | if (NOT ANDROID)
18 | return()
19 | endif()
20 |
21 | add_subdirectory(@SERVICE_TEST_LIB_NAME@-tester)
22 |
--------------------------------------------------------------------------------
/cmake/android/tester/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | /src/main/aidl
9 | /src/main/jniLibs
10 | .externalNativeBuild
11 | /libs
12 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/build.gradle.in:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 |
6 | defaultConfig {
7 | applicationId "com.here.android.olp.@PACKAGE_NAME@"
8 | minSdkVersion 15
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | implementation fileTree(dir: 'libs', include: ['*.jar'])
24 | api 'com.android.support:appcompat-v7:23.0.1'
25 | api 'com.android.support:support-annotations:24.0.0'
26 | androidTestImplementation 'com.android.support:support-annotations:24.0.0'
27 | androidTestImplementation 'com.android.support.test:runner:0.5'
28 | androidTestImplementation 'com.android.support.test:rules:0.5'
29 | }
30 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/afollestad/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heremaps/here-data-sdk-cpp/478cb38569370efa9fb3333ffb2c8ccf4ad7551a/cmake/android/tester/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | OLP CPP SDK Tester
3 | Run tests...
4 |
5 |
--------------------------------------------------------------------------------
/cmake/android/tester/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cmake/android/tester/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:3.1.3'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | google()
14 | jcenter()
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/cmake/android/tester/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/cmake/android/tester/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heremaps/here-data-sdk-cpp/478cb38569370efa9fb3333ffb2c8ccf4ad7551a/cmake/android/tester/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/cmake/android/tester/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/cmake/android/tester/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/cmake/cmakeProjectConfig.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 | include(CMakeFindDependencyMacro)
18 | find_dependency(olp-cpp-sdk-core)
19 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
20 |
--------------------------------------------------------------------------------
/cmake/core-config.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
18 |
--------------------------------------------------------------------------------
/cmake/coverage.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | ##
19 | ## Add a new build type "coverage". Use -DCMAKE_BUILD_TYPE=COVERAGE in order to
20 | ## create build with COVERAGE support.
21 | ##
22 |
23 | set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS} -O0 --coverage")
24 | set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS} -O0 --coverage")
25 |
--------------------------------------------------------------------------------
/cmake/ios/CMakeLists.txt.in:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 | if (NOT IOS)
18 | return()
19 | endif()
20 |
21 | add_subdirectory(@SERVICE_NAME@-tester)
22 |
--------------------------------------------------------------------------------
/cmake/ios/add_frameworks.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 | function(add_frameworks appname)
18 | foreach(framework ${ARGN})
19 | find_library(FRAMEWORK_${framework} ${framework})
20 | if(FRAMEWORK_${framework})
21 | message(STATUS "***** Framework ${framework} found at ${FRAMEWORK_${framework}}")
22 | target_link_libraries(${appname}
23 | PUBLIC
24 | ${FRAMEWORK_${framework}})
25 | else()
26 | message(FATAL_ERROR "Framework ${framework} not found")
27 | endif()
28 | endforeach()
29 | endfunction()
30 |
--------------------------------------------------------------------------------
/cmake/ios/tester/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import
23 |
24 | @interface AppDelegate : UIResponder
25 |
26 | @property (strong, nonatomic) UIWindow *window;
27 |
28 |
29 | @end
30 |
31 |
--------------------------------------------------------------------------------
/cmake/ios/tester/MyViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import
23 |
24 | @interface MyViewController : UIViewController
25 |
26 | @property (nonatomic) BOOL testDone;
27 |
28 | - (void)runTest;
29 | - (void)waitForTestDone;
30 |
31 | @end
32 |
33 |
--------------------------------------------------------------------------------
/cmake/ios/tester/main.mm:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #import
21 | #import
22 |
23 | #import "AppDelegate.h"
24 |
25 | int main(int argc, char * argv[]) {
26 | @autoreleasepool {
27 | NSLog(@"Starting gtest...");
28 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/cmake/pkg-config.pc.in:
--------------------------------------------------------------------------------
1 | includedir=@CMAKE_INSTALL_PREFIX@/@INCLUDE_DIRECTORY@
2 | libdir=@CMAKE_INSTALL_PREFIX@/@LIBRARY_DIRECTORY@
3 |
4 | Name: @PROJECT_NAME@
5 | Description: @DESCRIPTION@
6 | Version: @PROJECT_VERSION@
7 | Cflags: -I${includedir} -std=gnu++@CMAKE_CXX_STANDARD@
8 | Libs: -L${libdir} -l@PROJECT_NAME@
9 | Libs.private: @SDK_CONFIG_LIBS@
10 | Requires: @PROJECT_LIBS@
11 |
--------------------------------------------------------------------------------
/cmake/uninstall.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | # Make uninstall
19 | set (INSTALL_MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt)
20 | if (NOT EXISTS ${INSTALL_MANIFEST})
21 | message (FATAL_ERROR "Cannot find install manifest file: ${INSTALL_MANIFEST}")
22 | endif()
23 | file(STRINGS ${INSTALL_MANIFEST} InstalledFiles)
24 | foreach(file ${InstalledFiles})
25 | message(STATUS "Uninstalling: ${file}")
26 | if (EXISTS "${file}")
27 | file(REMOVE ${file})
28 | if (EXISTS "${file}")
29 | message (FATAL_ERROR "Cannot remove ${file}. Please check permissions.")
30 | endif()
31 | endif()
32 | endforeach()
33 |
--------------------------------------------------------------------------------
/docs/diagrams/sdk-module-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heremaps/here-data-sdk-cpp/478cb38569370efa9fb3333ffb2c8ccf4ad7551a/docs/diagrams/sdk-module-overview.png
--------------------------------------------------------------------------------
/docs/diagrams/sdk-module-overview.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | skinparam componentStyle uml2
4 |
5 | [authentication] --> [core] : uses
6 | [dataservice-read] --> [core] : uses
7 | [dataservice-write] --> [core] : uses
8 |
9 | cloud "HERE Cloud" {
10 | [AAA]
11 | note bottom of AAA : offers HERE Authentication and\n Authorization API
12 | [HERE platform]
13 | note bottom of HERE platform : offers Data API
14 | }
15 | [core] --> [AAA]
16 | [core] --> [HERE platform]
17 |
18 | @enduml
19 |
--------------------------------------------------------------------------------
/examples/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Android Studio
3 | *.iml
4 | .gradle
5 | .idea
6 | local.properties
7 | captures/
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/examples/Examples.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | struct AccessKey
25 | {
26 | std::string id; // Your here.access.key.id
27 | std::string secret; // Your here.access.key.secret
28 | };
29 |
--------------------------------------------------------------------------------
/examples/ProtectedCacheExample.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "Examples.h"
23 |
24 | /**
25 | * @brief Dataservice cache example.
26 | *
27 | * Gets the partition data using the HERE Open Location Platform with mutable cache.
28 | * Makes the mutable cache path
29 | * protected. Reads the same data from the protected cache.
30 | * @param access_key Your access key ID and access key secret.
31 | * @param The HERE Resource Name (HRN) of the catalog from which you want to read data.
32 | * @return 0 if data was published successfully.
33 | */
34 | int RunExampleProtectedCache(const AccessKey& access_key, const std::string& catalog);
35 |
--------------------------------------------------------------------------------
/examples/WriteExample.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "Examples.h"
23 |
24 | /**
25 | * @brief Dataservice write example. Authenticate client using access key id and
26 | * secret. Publish data to some layer in HRN catalog.
27 | * @param access_key Your access key ID and access key secret.
28 | * @param The HERE Resource Name (HRN) of the catalog to which you want to publish data.
29 | * @param layer_id The layer ID of the catalog to which you want to publish data.
30 | * @return result of publish data(0 - if succeed)
31 | */
32 | int RunExampleWrite(const AccessKey& access_key, const std::string& catalog,
33 | const std::string& layer_id);
34 |
--------------------------------------------------------------------------------
/examples/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/AndroidManifest.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/strings.xml.in:
--------------------------------------------------------------------------------
1 |
2 | @OLP_SDK_EXAMPLE_PACKAGE_NAME@
3 | Example is running - waiting for response...
4 |
5 |
6 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:4.1.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/examples/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heremaps/here-data-sdk-cpp/478cb38569370efa9fb3333ffb2c8ccf4ad7551a/examples/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed May 22 19:28:07 EEST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
7 |
--------------------------------------------------------------------------------
/examples/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/examples/ios/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import
23 |
24 | @interface AppDelegate : UIResponder
25 |
26 | @property(strong, nonatomic) UIWindow *window;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/examples/ios/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #import "AppDelegate.h"
21 |
22 | @interface AppDelegate ()
23 |
24 | @end
25 |
26 | @implementation AppDelegate
27 |
28 | - (BOOL)application:(UIApplication *)application
29 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
30 | // Override point for customization after application launch.
31 | return YES;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/examples/ios/ViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import
23 |
24 | @interface ViewController : UIViewController
25 |
26 | - (void)runExampleProgram;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/examples/ios/main.mm:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #import
21 |
22 | #import "AppDelegate.h"
23 |
24 | int main(int argc, char* argv[]) {
25 | @autoreleasepool {
26 | NSString* exampleName = NSBundle.mainBundle.infoDictionary[@"CFBundleName"];
27 | NSLog(@"Running example: %@... ", exampleName);
28 | return UIApplicationMain(argc, argv, nil,
29 | NSStringFromClass([AppDelegate class]));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/external/curl/CurlAndroidCrossCompile.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2022 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | SET( HAVE_GLIBC_STRERROR_R 1 CACHE STRING "Result from TRY_RUN" FORCE)
19 | SET( HAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
20 |
21 | SET( HAVE_POLL_FINE_EXITCODE 0 CACHE STRING "Result from TRY_RUN" FORCE )
22 | SET( HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
23 |
24 | SET( HAVE_POSIX_STRERROR_R 0 CACHE STRING "Result from TRY_RUN" FORCE)
25 | SET( HAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
26 | SET( HAVE_POSIX_FALLOCATE 0 CACHE STRING "Result from TRY_RUN" FORCE)
27 | SET( HAVE_POSIX_FALLOCATE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
28 |
--------------------------------------------------------------------------------
/external/curl/openssl/cmake/Config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 |
3 | include("${CMAKE_CURRENT_LIST_DIR}/OpenSSLTargets.cmake")
4 | check_required_components(OpenSSL)
5 |
6 | set(OPENSSL_FOUND TRUE)
7 | set(OPENSSL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
8 | set(OPENSSL_LIBRARIES ssl crypto)
9 | set(OPENSSL_CRYPTO_LIBRARY crypto)
10 | set(OPENSSL_SSL_LIBRARY ssl)
11 |
--------------------------------------------------------------------------------
/external/curl/openssl/crypto/buildinf.h.cmake:
--------------------------------------------------------------------------------
1 | /* auto-generated for crypto/cversion.c */
2 | #define CFLAGS "compiler: @CMAKE_C_COMPILER_ID@ @CMAKE_C_FLAGS@"
3 | #define PLATFORM "platform: @CMAKE_SYSTEM_NAME@"
4 | #define DATE "built on: @BUILDINF_DATE@"
5 | static const char *compiler_flags = CFLAGS;
6 |
--------------------------------------------------------------------------------
/external/googletest/CMakeLists.txt.googletest.in:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | cmake_minimum_required(VERSION 3.9)
19 |
20 | project(googletest-download NONE)
21 |
22 | include(ExternalProject)
23 | ExternalProject_Add(googletest
24 | GIT_REPOSITORY @OLP_SDK_CPP_GOOGLETEST_URL@
25 | GIT_TAG @OLP_SDK_CPP_GOOGLETEST_TAG@
26 | GIT_SHALLOW 1
27 | SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
28 | BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
29 | CONFIGURE_COMMAND ""
30 | BUILD_COMMAND ""
31 | INSTALL_COMMAND ""
32 | TEST_COMMAND ""
33 | )
34 |
--------------------------------------------------------------------------------
/external/lmdb/lmdbConfig.cmake.in:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | include("${CMAKE_CURRENT_LIST_DIR}/lmdbTargets.cmake")
19 |
--------------------------------------------------------------------------------
/external/rapidjson/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019-2021 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | # RapidJSON
19 | # Download and unpack rapidjson at configure time
20 |
21 | configure_file(CMakeLists.txt.rapidjson.in download/CMakeLists.txt)
22 |
23 | execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . ${COMMON_GENERATE_FLAGS}
24 | RESULT_VARIABLE result
25 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/download)
26 | if(result)
27 | message(FATAL_ERROR "CMake step for rapidjson failed: ${result}")
28 | endif()
29 |
30 | execute_process(COMMAND ${CMAKE_COMMAND} --build .
31 | RESULT_VARIABLE result
32 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/download)
33 | if(result)
34 | message(FATAL_ERROR "Build step for rapidjson failed: ${result}")
35 | endif()
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/include/olp/authentication/AuthenticationApi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "olp/core/porting/export.h"
23 |
24 | #ifdef AUTHENTICATION_SHARED_LIBRARY
25 | #ifdef AUTHENTICATION_LIBRARY
26 | #define AUTHENTICATION_API OLP_CPP_SDK_DECL_EXPORT
27 | #else
28 | #define AUTHENTICATION_API OLP_CPP_SDK_DECL_IMPORT
29 | #endif // AUTHENTICATION_LIBRARY
30 | #else
31 | #define AUTHENTICATION_API
32 | #endif // AUTHENTICATION_SHARED_LIBRARY
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/src/AuthorizeRequest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "olp/authentication/AuthorizeRequest.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace authentication {
26 |
27 | std::string AuthorizeRequest::CreateKey() const {
28 | std::stringstream out;
29 | out << service_id_;
30 | if (GetContractId()) {
31 | out << "[" << GetContractId().get() << "]";
32 | }
33 | return out.str();
34 | }
35 |
36 | } // namespace authentication
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/src/Settings.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "olp/authentication/Settings.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace authentication {
26 |
27 | Settings::Settings(AuthenticationCredentials credentials)
28 | : credentials(std::move(credentials)),
29 | token_endpoint_url{this->credentials.GetEndpointUrl().empty()
30 | ? kHereAccountProductionTokenUrl
31 | : this->credentials.GetEndpointUrl()} {}
32 |
33 | } // namespace authentication
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/src/SignOutResultImpl.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "SignOutResultImpl.h"
21 |
22 | #include "Constants.h"
23 | #include "olp/core/http/HttpStatusCode.h"
24 |
25 | namespace olp {
26 | namespace authentication {
27 |
28 | SignOutResultImpl::SignOutResultImpl() noexcept
29 | : SignOutResultImpl(http::HttpStatusCode::SERVICE_UNAVAILABLE,
30 | Constants::ERROR_HTTP_SERVICE_UNAVAILABLE) {}
31 |
32 | SignOutResultImpl::SignOutResultImpl(
33 | int status, std::string error,
34 | std::shared_ptr json_document) noexcept
35 | : BaseResult(status, std::move(error), json_document) {}
36 |
37 | SignOutResultImpl::~SignOutResultImpl() = default;
38 |
39 | } // namespace authentication
40 | } // namespace olp
41 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/src/SignOutResultImpl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #include "BaseResult.h"
27 |
28 | namespace olp {
29 | namespace authentication {
30 | class SignOutResultImpl : public BaseResult {
31 | public:
32 | SignOutResultImpl() noexcept;
33 |
34 | SignOutResultImpl(
35 | int status, std::string error,
36 | std::shared_ptr json_document = nullptr) noexcept;
37 |
38 | ~SignOutResultImpl() override;
39 | };
40 | } // namespace authentication
41 | } // namespace olp
42 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-authentication/src/TokenRequest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "TokenRequest.h"
21 |
22 | namespace olp {
23 | namespace authentication {
24 | TokenRequest::TokenRequest(const std::chrono::seconds& expires_in)
25 | : expires_in_(expires_in) {}
26 |
27 | std::chrono::seconds TokenRequest::GetExpiresIn() const { return expires_in_; }
28 |
29 | } // namespace authentication
30 | } // namespace olp
31 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/cmake/CompileChecks.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019-2021 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | function(porting_do_checks)
19 | include(CheckCXXSourceCompiles)
20 |
21 | # run the cxx compile test with c++xx flags and pthreads library
22 | set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_EXTENSION_COMPILE_OPTION}")
23 | set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
24 |
25 | set(HAVE_PTHREAD_SETNAME_NP OFF PARENT_SCOPE)
26 | check_cxx_source_compiles(
27 | "#define _GNU_SOURCE 1
28 | #include
29 | int main() { pthread_t thread; pthread_setname_np(thread, NULL); }"
30 | HAVE_PTHREAD_SETNAME_NP)
31 | endfunction(porting_do_checks)
32 |
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/cmake/offline.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 |
19 | set(OLP_SDK_HTTP_OFFLINE_SOURCES
20 | "${CMAKE_CURRENT_LIST_DIR}/../src/http/offline/NetworkOffline.cpp"
21 | "${CMAKE_CURRENT_LIST_DIR}/../src/http/offline/NetworkOffline.h"
22 | )
23 |
24 | add_definitions(-DOLP_SDK_NETWORK_OFFLINE)
25 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/configs/ConfigNetwork.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | if(NOT NETWORK_LOG4CPLUS)
19 | set(NETWORK_NO_LOG4CPLUS TRUE)
20 | endif()
21 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/Config.h.in:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #cmakedefine OLP_SDK_ENABLE_DEFAULT_CACHE
21 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/CoreApi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "olp/core/porting/export.h"
23 |
24 | #ifdef CORE_SHARED_LIBRARY
25 | #ifdef CORE_LIBRARY
26 | #define CORE_API OLP_CPP_SDK_DECL_EXPORT
27 | #else
28 | #define CORE_API OLP_CPP_SDK_DECL_IMPORT
29 | #endif // CORE_LIBRARY
30 | #else
31 | #define CORE_API
32 | #endif // CORE_SHARED_LIBRARY
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/client/ApiNoResult.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace client {
27 |
28 | /**
29 | * @brief Used when `ApiResponse` does not contain result data.
30 | *
31 | * Example: the HTTP 200 response with no response body.
32 | */
33 | class ApiNoResult {};
34 |
35 | /// An alias for the response without result.
36 | using ApiNoResponse = ApiResponse;
37 |
38 | } // namespace client
39 | } // namespace olp
40 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/client/DefaultLookupEndpointProvider.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace client {
28 |
29 | /**
30 | * @brief The default implementation of the lookup API endpoint provider.
31 | *
32 | * It returns the default lookup API endpoint URLs based on the partition
33 | * HRN.
34 | */
35 | struct CORE_API DefaultLookupEndpointProvider {
36 | public:
37 | /**
38 | * @brief The funcion call operator.
39 | *
40 | * @param partition The partition HRN.
41 | *
42 | * @return The default lookup API endpoint URLs.
43 | */
44 | std::string operator()(const std::string& partition);
45 | };
46 |
47 | } // namespace client
48 | } // namespace olp
49 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/context/EnterBackgroundSubscriber.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | namespace olp {
23 | namespace context {
24 |
25 | /**
26 | * @brief Used only for the iOS environment to be informed that the application
27 | * is entering or exiting background.
28 | */
29 | class EnterBackgroundSubscriber {
30 | public:
31 | /**
32 | * @brief Called when `Context` is entering background mode.
33 | */
34 | virtual void OnEnterBackground() = 0;
35 |
36 | /**
37 | * @brief Called when `Context` is exiting background mode.
38 | */
39 | virtual void OnExitBackground() = 0;
40 | };
41 |
42 | } // namespace context
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/geo/tiling/ITilingScheme.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace geo {
26 |
27 | /**
28 | * @brief Represents how data is tiled.
29 | */
30 | class CORE_API ITilingScheme {
31 | public:
32 | virtual ~ITilingScheme() = default;
33 | /**
34 | * @brief Gets the subdivision scheme.
35 | *
36 | * @return The subdivision scheme.
37 | */
38 | virtual const ISubdivisionScheme& GetSubdivisionScheme() const = 0;
39 |
40 | /**
41 | * @brief Gets the identity projection.
42 | *
43 | * @return The identity projection.
44 | */
45 | virtual const IProjection& GetProjection() const = 0;
46 | };
47 |
48 | } // namespace geo
49 | } // namespace olp
50 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/http/CertificateSettings.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "olp/core/CoreApi.h"
25 |
26 | namespace olp {
27 | namespace http {
28 |
29 | /**
30 | * @brief Settings for custom network certificate.
31 | */
32 | struct CORE_API CertificateSettings {
33 | /**
34 | * @brief The client certificate file as blob.
35 | */
36 | std::string client_cert_file_blob;
37 |
38 | /**
39 | * @brief The client key file as blob.
40 | */
41 | std::string client_key_file_blob;
42 |
43 | /**
44 | * @brief The CA file as blob.
45 | */
46 | std::string cert_file_blob;
47 | };
48 |
49 | } // namespace http
50 | } // namespace olp
51 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/http/NetworkConstants.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace http {
27 |
28 | /**
29 | * @brief The HTTP headers.
30 | */
31 | static constexpr auto kAuthorizationHeader = "Authorization";
32 | static constexpr auto kContentTypeHeader = "Content-Type";
33 | static constexpr auto kUserAgentHeader = "User-Agent";
34 |
35 | /**
36 | * @brief The custom constants.
37 | */
38 | static constexpr auto kBearer = "Bearer";
39 | static constexpr auto kOlpSdkUserAgent =
40 | "OLP-CPP-SDK/" OLP_SDK_VERSION_STRING " (" OLP_SDK_PLATFORM_NAME ")";
41 |
42 | } // namespace http
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/http/NetworkInitializationSettings.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "olp/core/CoreApi.h"
23 | #include "olp/core/http/CertificateSettings.h"
24 |
25 | namespace olp {
26 | namespace http {
27 |
28 | /**
29 | * @brief Settings for network initialization.
30 | */
31 | struct CORE_API NetworkInitializationSettings {
32 | /**
33 | * @brief The maximum number of requests that can be sent simultaneously.
34 | */
35 | size_t max_requests_count = 30u;
36 |
37 | /**
38 | * @brief The custom certificate settings.
39 | */
40 | CertificateSettings certificate_settings;
41 | };
42 |
43 | } // namespace http
44 | } // namespace olp
45 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/logging/Appender.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace logging {
26 | /**
27 | * @brief Appends a message to the log.
28 | *
29 | * To automatically register the type, base subclasses on
30 | * `Appender` instead of `IAppender`.
31 | */
32 | class CORE_API IAppender {
33 | public:
34 | virtual ~IAppender() = default;
35 |
36 | /**
37 | * @brief Appends the message using char strings.
38 | *
39 | * @param message The message to append.
40 | */
41 | virtual IAppender& append(const LogMessage& message) = 0;
42 | };
43 |
44 | } // namespace logging
45 | } // namespace olp
46 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/logging/DebugAppender.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace logging {
27 | /**
28 | * @brief An appender that prints messages to the debug output.
29 | */
30 | class CORE_API DebugAppender : public IAppender {
31 | public:
32 | /**
33 | * @brief Checks whether this platform has the debug appender implemented.
34 | *
35 | * @return True if this platform has the debug appender; false otherwise.
36 | */
37 | static bool isImplemented();
38 |
39 | IAppender& append(const LogMessage& message) override;
40 | };
41 |
42 | } // namespace logging
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/logging/Level.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | namespace olp {
23 | namespace logging {
24 | /**
25 | * @brief Severity levels for log messages.
26 | */
27 | enum class Level { Trace, Debug, Info, Warning, Error, Fatal, Off };
28 |
29 | /**
30 | * @brief The valid number of log levels.
31 | */
32 | static const unsigned int levelCount =
33 | static_cast(Level::Fatal) + 1;
34 |
35 | } // namespace logging
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/math/Types.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | namespace olp {
23 | namespace math {
24 |
25 | template
26 | struct Vector3;
27 | using Vector3d = Vector3;
28 |
29 | // AlignedBox
30 | template
31 | class AlignedBox;
32 |
33 | template
34 | using AlignedBox3 = AlignedBox;
35 | using AlignedBox3d = AlignedBox;
36 |
37 | // Size
38 | template
39 | class Size2;
40 | using Size2u = Size2;
41 |
42 | } // namespace math
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/porting/deprecated.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #if defined(__GNUC__) || defined(__clang__)
23 | #define OLP_SDK_DEPRECATED(text) __attribute__((deprecated(text)))
24 | #elif defined(_MSC_VER)
25 | #define OLP_SDK_DEPRECATED(text) __declspec(deprecated(text))
26 | #else
27 | #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
28 | #define OLP_SDK_DEPRECATED(text)
29 | #endif
30 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/porting/export.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #if defined(_MSC_VER)
23 | #define OLP_CPP_SDK_DECL_EXPORT __declspec(dllexport)
24 | #define OLP_CPP_SDK_DECL_IMPORT __declspec(dllimport)
25 | #elif defined(__GNUC__) || defined(__clang__)
26 | #define OLP_CPP_SDK_DECL_EXPORT __attribute__((visibility("default")))
27 | #define OLP_CPP_SDK_DECL_IMPORT
28 | #else
29 | #define OLP_CPP_SDK_DECL_EXPORT
30 | #define OLP_CPP_SDK_DECL_IMPORT
31 | #endif // _MSC_VER
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/porting/platform.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #if defined(EMSCRIPTEN)
23 | #define PORTING_PLATFORM_EMSCRIPTEN
24 | #elif defined(__ANDROID__)
25 | #define PORTING_PLATFORM_ANDROID
26 | #elif defined(__linux)
27 | #define PORTING_PLATFORM_LINUX
28 | #elif defined(_WIN32)
29 | #define PORTING_PLATFORM_WINDOWS
30 | #elif defined(__APPLE__)
31 | #define PORTING_PLATFORM_MAC
32 | #include "TargetConditionals.h"
33 | #if TARGET_OS_IPHONE
34 | #define PORTING_PLATFORM_IOS
35 | #endif
36 | #elif defined(__QNX__)
37 | #define PORTING_PLATFORM_QNX
38 | #else
39 | #warning Cannot determine platform
40 | #endif
41 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/utils/Credentials.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace utils {
26 | /**
27 | * Censores app_id and app_code parameter's values in the URL.
28 | * @param[in] url The URL to be censored.
29 | * @return An URL with censored app_id and app_code.
30 | */
31 | std::string CensorCredentialsInUrl(std::string url);
32 |
33 | } // namespace utils
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/include/olp/core/utils/Thread.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 | #include
22 | #include
23 |
24 | namespace olp {
25 | namespace utils {
26 |
27 | /** @brief Manages threads.
28 | */
29 | class CORE_API Thread {
30 | public:
31 | /**
32 | * @brief Set the name of current thread.
33 | *
34 | * @param name The new name of thread.
35 | *
36 | */
37 | static void SetCurrentThreadName(const std::string& name);
38 | };
39 |
40 | } // namespace utils
41 | } // namespace olp
42 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/cache/DiskCacheEnv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021-2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace cache {
28 |
29 | /// The wrapper for a leveldb default environment
30 | class DiskCacheEnv {
31 | public:
32 | static std::shared_ptr CreateEnv(bool extended_permissions);
33 | };
34 |
35 | } // namespace cache
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/cache/SizeCountingEnv.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace cache {
26 |
27 | class SizeCountingEnv : public leveldb::EnvWrapper {
28 | public:
29 | explicit SizeCountingEnv(leveldb::Env* env) : leveldb::EnvWrapper(env) {}
30 |
31 | virtual uint64_t Size() const { return 0; }
32 | };
33 |
34 | } // namespace cache
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/client/CancellationToken.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "olp/core/client/CancellationToken.h"
21 |
22 | namespace olp {
23 | namespace client {
24 |
25 | CancellationToken::CancellationToken(CancelFuncType func)
26 | : func_(std::move(func)) {}
27 |
28 | void CancellationToken::Cancel() const {
29 | if (func_) {
30 | func_();
31 | }
32 | }
33 |
34 | } // namespace client
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/client/OlpClientFactory.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2024 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "olp/core/client/OlpClientFactory.h"
21 |
22 | #include "olp/core/client/OlpClient.h"
23 | #include "olp/core/client/OlpClientSettings.h"
24 |
25 | namespace olp {
26 | namespace client {
27 |
28 | std::shared_ptr OlpClientFactory::Create(
29 | const OlpClientSettings& settings) {
30 | const auto kEmptyBaseUrl = std::string();
31 | auto olp_client = std::make_shared(settings, kEmptyBaseUrl);
32 | return olp_client;
33 | }
34 |
35 | } // namespace client
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/client/parser/ApiParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ApiParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value, olp::client::Api& x) {
27 | x.SetApi(parse(value, "api"));
28 | x.SetVersion(parse(value, "version"));
29 | x.SetBaseUrl(parse(value, "baseURL"));
30 | x.SetParameters(
31 | parse >(value, "parameters"));
32 | }
33 |
34 | } // namespace parser
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/client/parser/ApiParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace parser {
27 | void from_json(const rapidjson::Value& value, olp::client::Api& x);
28 |
29 | } // namespace parser
30 | } // namespace olp
31 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/context/ContextInternal.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ContextInternal.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace context {
26 |
27 | std::shared_ptr Instance() {
28 | // Static initialization is thread safe.
29 | // Shared pointer allows to extend the life of ContextData
30 | // until all Scope objects are destroyed.
31 | static std::shared_ptr g_setup_vectors =
32 | std::make_shared();
33 | return g_setup_vectors;
34 | }
35 |
36 | } // namespace context
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/http/ios/OLPHttpTask+Internal.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2023 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import "OLPHttpTask.h"
23 |
24 | #import
25 |
26 | /**
27 | @brief Internal category, which extends OLPHttpTask with internal methods,
28 | which shouldn't be exposed as public API.
29 | */
30 | @interface OLPHttpTask (Internal)
31 |
32 | - (void)didReceiveResponse:(NSURLResponse*)response;
33 |
34 | - (void)didReceiveData:(NSData*)data withWholeData:(bool)wholeData;
35 |
36 | - (void)didCompleteWithError:(NSError*)error;
37 |
38 | - (NSString*)createTaskDescription;
39 |
40 | - (OLPHttpTaskStatus)restart;
41 |
42 | - (OLPHttpTaskStatus)restartInBackground:(NSURLSession*)session;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/http/ios/OLPNetworkConstants.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #import
23 |
24 | FOUNDATION_EXPORT NSString* const OLPHttpMethodGet;
25 | FOUNDATION_EXPORT NSString* const OLPHttpMethodPost;
26 | FOUNDATION_EXPORT NSString* const OLPHttpMethodHead;
27 | FOUNDATION_EXPORT NSString* const OLPHttpMethodPut;
28 | FOUNDATION_EXPORT NSString* const OLPHttpMethodDelete;
29 | FOUNDATION_EXPORT NSString* const OLPHttpMethodPatch;
30 | FOUNDATION_EXPORT NSString* const OLPHttpMethodOptions;
31 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/http/ios/OLPNetworkConstants.mm:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #import "OLPNetworkConstants.h"
21 |
22 | NSString* const OLPHttpMethodGet = @"GET";
23 | NSString* const OLPHttpMethodPost = @"POST";
24 | NSString* const OLPHttpMethodHead = @"HEAD";
25 | NSString* const OLPHttpMethodPut = @"PUT";
26 | NSString* const OLPHttpMethodDelete = @"DELETE";
27 | NSString* const OLPHttpMethodPatch = @"PATCH";
28 | NSString* const OLPHttpMethodOptions = @"OPTIONS";
29 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/logging/Configuration.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "olp/core/logging/Configuration.h"
21 |
22 | #include
23 |
24 | #include "olp/core/logging/ConsoleAppender.h"
25 | #include "olp/core/logging/DebugAppender.h"
26 |
27 | namespace olp {
28 | namespace logging {
29 |
30 | Configuration Configuration::createDefault() {
31 | Configuration configuration;
32 |
33 | configuration.addAppender(
34 | std::make_shared(MessageFormatter::createDefault()));
35 |
36 | if (DebugAppender::isImplemented()) {
37 | configuration.addAppender(std::make_shared());
38 | }
39 |
40 | return configuration;
41 | }
42 |
43 | } // namespace logging
44 | } // namespace olp
45 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/logging/ThreadId.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | namespace olp {
23 | namespace logging {
24 | // When possible, this thread ID will match what is available in the debugger.
25 | unsigned long getThreadId();
26 |
27 | } // namespace logging
28 | } // namespace olp
29 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/src/utils/BoostExceptionHandle.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 | #include
22 |
23 | #if defined(OLP_SDK_BOOST_THROW_EXCEPTION)
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | namespace {
30 | constexpr auto kLogTag = "BoostExceptionHandle";
31 | }
32 |
33 | namespace boost {
34 |
35 | OLP_CPP_SDK_DECL_EXPORT void throw_exception(const std::exception& e) {
36 | OLP_SDK_LOG_ABORT_F(kLogTag, "Exception occurred: '%s'", e.what());
37 | }
38 |
39 | } // namespace boost
40 | #endif
41 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/cache/Helpers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace helpers {
25 | /**
26 | * @brief Makes directories content readonly or read-write
27 | *
28 | * @param path Path to the directory.
29 | * @param readonly Readonly if true, read-write if false
30 | *
31 | * @return \c true if any file with the given path exists, \c false otherwise.
32 | */
33 | bool MakeDirectoryAndContentReadonly(const std::string& path, bool readonly);
34 | } // namespace helpers
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/geo/coordinates/GeoPointTest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 | #include
22 |
23 | namespace olp {
24 | namespace geo {
25 | // used to output test failures
26 | std::ostream& operator<<(std::ostream& os, const geo::GeoPoint& pt) {
27 | return os << "(" << pt.x << ", " << pt.y << ")";
28 | }
29 |
30 | TEST(GeoPointTest, Operators) {
31 | GeoPoint pt1 = {1, 2};
32 | GeoPoint pt2 = pt1;
33 | GeoPoint pt3 = {2, 4};
34 |
35 | EXPECT_EQ(pt1, pt2);
36 | EXPECT_NE(pt1, pt3);
37 |
38 | pt1 += pt2;
39 | EXPECT_EQ(pt1, pt3);
40 | }
41 |
42 | } // namespace geo
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/geo/testutil/CompareGeoCoordinates3d.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace geo {
28 | inline void EXPECT_GEOCOORDINATES3D_EQ(const GeoCoordinates3d& expected,
29 | const GeoCoordinates3d& actual) {
30 | EXPECT_DOUBLE_EQ(expected.GetLatitude(), actual.GetLatitude());
31 | EXPECT_DOUBLE_EQ(expected.GetLongitude(), actual.GetLongitude());
32 | EXPECT_NEAR(expected.GetAltitude(), actual.GetAltitude(), 1e-5);
33 | }
34 |
35 | } // namespace geo
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/geo/testutil/CompareGeoRectangle.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include "CompareGeoCoordinates.h"
25 |
26 | namespace olp {
27 | namespace geo {
28 | inline void EXPECT_GEORECTANGLE_EQ(const GeoRectangle& expected,
29 | const GeoRectangle& actual) {
30 | EXPECT_GEOCOORDINATES_EQ(expected.SouthEast(), actual.SouthEast());
31 | EXPECT_GEOCOORDINATES_EQ(expected.NorthWest(), actual.NorthWest());
32 | }
33 |
34 | } // namespace geo
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/logging/MockAppender.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "MockAppender.h"
21 |
22 | namespace testing {
23 |
24 | using namespace olp::logging;
25 |
26 | IAppender& MockAppender::append(const LogMessage& message) {
27 | MockAppender::MessageData message_data;
28 | message_data.level_ = message.level;
29 | message_data.tag_ = message.tag;
30 | message_data.message_ = message.message;
31 | message_data.file_ = message.file;
32 | message_data.line_ = message.line;
33 | message_data.function_ = message.function;
34 | messages_.emplace_back(message_data);
35 |
36 | return *this;
37 | }
38 |
39 | } // namespace testing
40 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-core/tests/logging/MockAppender.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | #include
26 |
27 | namespace testing {
28 |
29 | using namespace olp::logging;
30 |
31 | class MockAppender : public IAppender {
32 | public:
33 | struct MessageData {
34 | Level level_;
35 | std::string tag_;
36 | std::string message_;
37 | std::string file_;
38 | unsigned int line_;
39 | std::string function_;
40 | };
41 |
42 | IAppender& append(const LogMessage& message) override;
43 |
44 | std::vector messages_;
45 | };
46 |
47 | } // namespace testing
48 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/include/olp/dataservice/read/DataServiceReadApi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #ifdef DATASERVICE_READ_SHARED_LIBRARY
25 | #ifdef DATASERVICE_READ_LIBRARY
26 | #define DATASERVICE_READ_API OLP_CPP_SDK_DECL_EXPORT
27 | #else
28 | #define DATASERVICE_READ_API OLP_CPP_SDK_DECL_IMPORT
29 | #endif // DATASERVICE_READ_LIBRARY
30 | #else
31 | #define DATASERVICE_READ_API
32 | #endif // DATASERVICE_READ_SHARED_LIBRARY
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/include/olp/dataservice/read/model/Data.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace dataservice {
27 | namespace read {
28 | namespace model {
29 | /**
30 | * @brief A container for large amounts of binary data.
31 | */
32 | using Data = std::shared_ptr>;
33 |
34 | } // namespace model
35 | } // namespace read
36 | } // namespace dataservice
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/ExtendedApiResponse.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2022 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace dataservice {
26 | namespace read {
27 |
28 | template
29 | using ExtendedApiResponse = client::ApiResponse;
30 |
31 | } // namespace read
32 | } // namespace dataservice
33 | } // namespace olp
34 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/ExtendedApiResponseHelpers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "ExtendedApiResponse.h"
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace dataservice {
28 | namespace read {
29 |
30 | template
31 | inline const client::NetworkStatistics& GetNetworkStatistics(
32 | const ExtendedApiResponse&
33 | response) {
34 | return response.GetPayload();
35 | }
36 |
37 | } // namespace read
38 | } // namespace dataservice
39 | } // namespace olp
40 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/ApiParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ApiParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value,
27 | olp::dataservice::read::model::Api& x) {
28 | x.SetApi(parse(value, "api"));
29 | x.SetVersion(parse(value, "version"));
30 | x.SetBaseUrl(parse(value, "baseURL"));
31 | x.SetParameters(
32 | parse >(value, "parameters"));
33 | }
34 |
35 | } // namespace parser
36 |
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/ApiParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/Api.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value, olp::dataservice::read::model::Api& x);
30 |
31 | } // namespace parser
32 |
33 | } // namespace olp
34 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/IndexParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/Index.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 |
30 | void from_json(const rapidjson::Value& value,
31 | std::shared_ptr& x);
32 | void from_json(const rapidjson::Value& value,
33 | std::shared_ptr& x);
34 | void from_json(const rapidjson::Value& value,
35 | olp::dataservice::read::model::Index& x);
36 | } // namespace parser
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/LayerVersionsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/LayerVersions.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::read::model::LayerVersion& x);
31 |
32 | void from_json(const rapidjson::Value& value,
33 | olp::dataservice::read::model::LayerVersions& x);
34 |
35 | } // namespace parser
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/MessagesParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace parser {
27 |
28 | void from_json(const rapidjson::Value& value,
29 | olp::dataservice::read::model::Metadata& x);
30 |
31 | void from_json(const rapidjson::Value& value,
32 | olp::dataservice::read::model::Message& x);
33 |
34 | void from_json(const rapidjson::Value& value,
35 | olp::dataservice::read::model::Messages& x);
36 |
37 | } // namespace parser
38 | } // namespace olp
39 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/PartitionsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "olp/dataservice/read/model/Partitions.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::read::model::Partition& x);
31 |
32 | void from_json(const rapidjson::Value& value,
33 | olp::dataservice::read::model::Partitions& x);
34 |
35 | } // namespace parser
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/StreamOffsetParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "StreamOffsetParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | using namespace olp::dataservice::read;
27 |
28 | void from_json(const rapidjson::Value& value, model::StreamOffset& x) {
29 | x.SetPartition(parse(value, "partition"));
30 | x.SetOffset(parse(value, "offset"));
31 | }
32 |
33 | } // namespace parser
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/StreamOffsetParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace parser {
27 |
28 | void from_json(const rapidjson::Value& value,
29 | olp::dataservice::read::model::StreamOffset& x);
30 |
31 | } // namespace parser
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/SubscribeResponseParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "SubscribeResponseParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | using namespace olp::dataservice::read;
27 |
28 | void from_json(const rapidjson::Value& value, model::SubscribeResponse& x) {
29 | x.SetNodeBaseURL(parse(value, "nodeBaseURL"));
30 | x.SetSubscriptionId(parse(value, "subscriptionId"));
31 | }
32 |
33 | } // namespace parser
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/SubscribeResponseParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/SubscribeResponse.h"
24 |
25 | namespace olp {
26 | namespace parser {
27 |
28 | void from_json(const rapidjson::Value& value,
29 | olp::dataservice::read::model::SubscribeResponse& x);
30 |
31 | } // namespace parser
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/VersionInfosParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "olp/dataservice/read/model/VersionInfos.h"
24 |
25 | namespace olp {
26 | namespace parser {
27 | void from_json(const rapidjson::Value& value,
28 | olp::dataservice::read::model::VersionDependency& x);
29 |
30 | void from_json(const rapidjson::Value& value,
31 | olp::dataservice::read::model::VersionInfo& x);
32 |
33 | void from_json(const rapidjson::Value& value,
34 | olp::dataservice::read::model::VersionInfos& x);
35 |
36 | } // namespace parser
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/VersionResponseParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "VersionResponseParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | using namespace olp::dataservice::read;
27 |
28 | void from_json(const rapidjson::Value& value, model::VersionResponse& x) {
29 | x.SetVersion(parse(value, "version"));
30 | }
31 |
32 | } // namespace parser
33 |
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/VersionResponseParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "olp/dataservice/read/model/VersionResponse.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::read::model::VersionResponse& x);
31 |
32 | } // namespace parser
33 | } // namespace olp
34 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/parser/VersionsResponseParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 | #include "olp/dataservice/read/model/VersionsResponse.h"
26 |
27 |
28 | namespace olp {
29 | namespace parser {
30 |
31 | void from_json(const rapidjson::Value& value,
32 | olp::dataservice::read::model::CatalogVersion& x);
33 | void from_json(const rapidjson::Value& value,
34 | olp::dataservice::read::model::VersionsResponseEntry& x);
35 | void from_json(const rapidjson::Value& value,
36 | olp::dataservice::read::model::VersionsResponse& x);
37 |
38 | } // namespace parser
39 | } // namespace olp
40 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/ApiSerializer.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 |
22 | #include "ApiSerializer.h"
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::read::model::Api& x, rapidjson::Value& value,
29 | rapidjson::Document::AllocatorType& allocator) {
30 | value.SetObject();
31 | serialize("api", x.GetApi(), value, allocator);
32 | serialize("version", x.GetVersion(), value, allocator);
33 | serialize("baseURL", x.GetBaseUrl(), value, allocator);
34 | serialize("parameters", x.GetParameters(), value, allocator);
35 | }
36 | } // namespace serializer
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/ApiSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 | #include "generated/model/Api.h"
26 |
27 | namespace olp {
28 | namespace serializer {
29 | void to_json(const dataservice::read::model::Api& x,
30 | rapidjson::Value& value,
31 | rapidjson::Document::AllocatorType& allocator);
32 |
33 | } // namespace serializer
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/LayerVersionsSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "generated/model/LayerVersions.h"
25 |
26 |
27 | namespace olp {
28 | namespace serializer {
29 | void to_json(const dataservice::read::model::LayerVersion& x,
30 | rapidjson::Value& value,
31 | rapidjson::Document::AllocatorType& allocator);
32 |
33 | void to_json(const dataservice::read::model::LayerVersions& x,
34 | rapidjson::Value& value,
35 | rapidjson::Document::AllocatorType& allocator);
36 | } // namespace serializer
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/PartitionsSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "olp/dataservice/read/model/Partitions.h"
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::read::model::Partition& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 |
32 | void to_json(const dataservice::read::model::Partitions& x,
33 | rapidjson::Value& value,
34 | rapidjson::Document::AllocatorType& allocator);
35 | } // namespace serializer
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/StreamOffsetsSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | namespace olp {
26 | namespace serializer {
27 |
28 | void to_json(const dataservice::read::model::StreamOffset& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 |
32 | void to_json(const dataservice::read::model::StreamOffsets& x,
33 | rapidjson::Value& value,
34 | rapidjson::Document::AllocatorType& allocator);
35 |
36 | } // namespace serializer
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/VersionResponseSerializer.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 |
22 | #include "VersionResponseSerializer.h"
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::read::model::VersionResponse& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator) {
31 | value.SetObject();
32 | serialize("version", x.GetVersion(), value, allocator);
33 | }
34 | } // namespace serializer
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/src/generated/serializer/VersionResponseSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "olp/dataservice/read/model/VersionResponse.h"
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::read::model::VersionResponse& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 | } // namespace serializer
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/tests/CatalogClientTest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | namespace {
25 | using namespace olp::dataservice::read;
26 | using namespace ::testing;
27 |
28 | TEST(CatalogClientTest, CanBeMoved) {
29 | CatalogClient client_a(olp::client::HRN(), {});
30 | CatalogClient client_b(std::move(client_a));
31 | CatalogClient client_c(olp::client::HRN(), {});
32 | client_c = std::move(client_b);
33 | }
34 |
35 | } // namespace
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-read/tests/VolatileLayerClientTest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 | #include
22 |
23 | namespace {
24 | using namespace olp::dataservice::read;
25 | using namespace ::testing;
26 |
27 | TEST(VolatileLayerClientTest, CanBeMoved) {
28 | VolatileLayerClient client_a(olp::client::HRN(), "", {});
29 | VolatileLayerClient client_b(std::move(client_a));
30 | VolatileLayerClient client_c(olp::client::HRN(), "", {});
31 | client_c = std::move(client_b);
32 | }
33 |
34 | } // namespace
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/include/olp/dataservice/write/DataServiceWriteApi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include "olp/core/porting/export.h"
23 |
24 | #ifdef DATASERVICE_WRITE_SHARED_LIBRARY
25 | #ifdef DATASERVICE_WRITE_LIBRARY
26 | #define DATASERVICE_WRITE_API OLP_CPP_SDK_DECL_EXPORT
27 | #else
28 | #define DATASERVICE_WRITE_API OLP_CPP_SDK_DECL_IMPORT
29 | #endif // DATASERVICE_WRITE_LIBRARY
30 | #else
31 | #define DATASERVICE_WRITE_API
32 | #endif // DATASERVICE_WRITE_SHARED_LIBRARY
33 |
34 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/include/olp/dataservice/write/StreamLayerClientSettings.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace dataservice {
29 | namespace write {
30 |
31 | /// Configures the behavior of the `StreamLayerClient` specific logic.
32 | struct DATASERVICE_WRITE_API StreamLayerClientSettings {
33 | /**
34 | * @brief The maximum number of requests that can be stored.
35 | *
36 | * Make sure it is a positive number.
37 | */
38 | size_t maximum_requests = std::numeric_limits::max();
39 | };
40 |
41 | } // namespace write
42 | } // namespace dataservice
43 | } // namespace olp
44 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/CancellationTokenList.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #include
27 |
28 | namespace olp {
29 | namespace dataservice {
30 | namespace write {
31 |
32 | class CancellationTokenList {
33 | public:
34 | void AddTask(int id, olp::client::CancellationToken token);
35 | void CancelAll();
36 | int GetNextId() const;
37 | void RemoveTask(int id);
38 |
39 | private:
40 | std::vector GetTaskIdList() const;
41 |
42 | mutable std::mutex mut_;
43 | std::vector> tokenList_;
44 | };
45 |
46 | } // namespace write
47 | } // namespace dataservice
48 | } // namespace olp
49 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/TimeUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace dataservice {
26 | namespace write {
27 | std::chrono::seconds getSecondsToNextHour(int tm_min, int tm_sec);
28 | std::chrono::seconds getSecondsToNextDay(int tm_hour, int tm_min, int tm_sec);
29 | std::chrono::seconds getSecondsToNextWeek(int tm_wday, int tm_hour, int tm_min,
30 | int tm_sec);
31 |
32 | } // namespace write
33 | } // namespace dataservice
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ApiParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ApiParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value,
27 | olp::dataservice::write::model::Api& x) {
28 | x.SetApi(parse(value, "api"));
29 | x.SetVersion(parse(value, "version"));
30 | x.SetBaseUrl(parse(value, "baseURL"));
31 | x.SetParameters(
32 | parse >(value, "parameters"));
33 | }
34 |
35 | } // namespace parser
36 |
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ApiParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/Api.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::Api& x);
31 |
32 | } // namespace parser
33 |
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/DetailsParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "DetailsParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value,
27 | olp::dataservice::write::model::Details& x) {
28 | x.SetState(parse(value, "state"));
29 | x.SetMessage(parse(value, "message"));
30 | x.SetStarted(parse(value, "started"));
31 | x.SetModified(parse(value, "modified"));
32 | x.SetExpires(parse(value, "expires"));
33 | }
34 |
35 | } // namespace parser
36 |
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/DetailsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::Details& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/LayerVersionsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/LayerVersions.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::LayerVersion& x);
31 |
32 | void from_json(const rapidjson::Value& value,
33 | olp::dataservice::write::model::LayerVersions& x);
34 |
35 | } // namespace parser
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PartitionParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "olp/dataservice/write/model/Partitions.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::Partition& x);
31 |
32 | void from_json(const rapidjson::Value& value,
33 | olp::dataservice::write::model::Partitions& x);
34 |
35 | } // namespace parser
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PartitionsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "generated/model/Partitions.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::Partition& x);
31 |
32 | void from_json(const rapidjson::Value& value,
33 | olp::dataservice::write::model::Partitions& x);
34 |
35 | } // namespace parser
36 | } // namespace olp
37 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PublicationParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::Publication& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PublishDataRequestParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::PublishDataRequest& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PublishPartitionParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "generated/model/PublishPartition.h"
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::PublishPartition& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PublishPartitionsParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "PublishPartitionsParser.h"
21 |
22 | // clang-format off
23 | #include
24 | #include
25 | // clang-format on
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::PublishPartitions& x) {
31 | x.SetPartitions(
32 | parse>(
33 | value, "partitions"));
34 | }
35 |
36 | } // namespace parser
37 |
38 | } // namespace olp
39 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/PublishPartitionsParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "generated/model/PublishPartitions.h"
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::PublishPartitions& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ResponseOkParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ResponseOkParser.h"
21 |
22 | #include
23 |
24 | using namespace olp::dataservice::write::model;
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value, TraceID& x) {
29 | x.SetParentID(parse(value, "ParentID"));
30 | x.SetGeneratedIDs(parse >(value, "GeneratedIDs"));
31 | }
32 |
33 | void from_json(const rapidjson::Value& value, ResponseOk& x) {
34 | x.SetTraceID(parse(value, "TraceID"));
35 | }
36 |
37 | } // namespace parser
38 | } // namespace olp
39 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ResponseOkParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::TraceID& x);
30 |
31 | void from_json(const rapidjson::Value& value,
32 | dataservice::write::model::ResponseOk& x);
33 |
34 | } // namespace parser
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ResponseOkSingleParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "ResponseOkSingleParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value,
27 | dataservice::write::model::ResponseOkSingle& x) {
28 | x.SetTraceID(parse(value, "TraceID"));
29 | }
30 |
31 | } // namespace parser
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/ResponseOkSingleParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::ResponseOkSingle& x);
30 |
31 | } // namespace parser
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/VersionDependencyParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "VersionDependencyParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | void from_json(const rapidjson::Value& value,
27 | olp::dataservice::write::model::VersionDependency& x) {
28 | x.SetDirect(parse(value, "direct"));
29 | x.SetHrn(parse(value, "hrn"));
30 | x.SetVersion(parse(value, "version"));
31 | }
32 |
33 | } // namespace parser
34 |
35 | } // namespace olp
36 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/VersionDependencyParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace parser {
28 | void from_json(const rapidjson::Value& value,
29 | dataservice::write::model::VersionDependency& x);
30 | } // namespace parser
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/VersionResponseParser.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "VersionResponseParser.h"
21 |
22 | #include
23 |
24 | namespace olp {
25 | namespace parser {
26 | using namespace olp::dataservice::write;
27 |
28 | void from_json(const rapidjson::Value& value, model::VersionResponse& x) {
29 | x.SetVersion(parse(value, "version"));
30 | }
31 |
32 | } // namespace parser
33 |
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/parser/VersionResponseParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include "olp/dataservice/write/model/VersionResponse.h"
24 |
25 | #include
26 |
27 | namespace olp {
28 | namespace parser {
29 | void from_json(const rapidjson::Value& value,
30 | olp::dataservice::write::model::VersionResponse& x);
31 |
32 | } // namespace parser
33 | } // namespace olp
34 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/ApiSerializer.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include
21 |
22 | #include "ApiSerializer.h"
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::Api& x, rapidjson::Value& value,
29 | rapidjson::Document::AllocatorType& allocator) {
30 | value.SetObject();
31 | serialize("api", x.GetApi(), value, allocator);
32 | serialize("version", x.GetVersion(), value, allocator);
33 | serialize("baseURL", x.GetBaseUrl(), value, allocator);
34 | serialize("parameters", x.GetParameters(), value, allocator);
35 | }
36 | } // namespace serializer
37 | } // namespace olp
38 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/ApiSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 | #include "generated/model/Api.h"
26 |
27 | namespace olp {
28 | namespace serializer {
29 | void to_json(const dataservice::write::model::Api& x,
30 | rapidjson::Value& value,
31 | rapidjson::Document::AllocatorType& allocator);
32 |
33 | } // namespace serializer
34 | } // namespace olp
35 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/IndexInfoSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::Index& x, rapidjson::Value& value,
29 | rapidjson::Document::AllocatorType& allocator);
30 | } // namespace serializer
31 | } // namespace olp
32 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/JsonSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | template
29 | inline std::string serialize(const T& object) {
30 | rapidjson::Document doc;
31 | auto& allocator = doc.GetAllocator();
32 |
33 | doc.SetObject();
34 | to_json(object, doc, allocator);
35 |
36 | rapidjson::StringBuffer buffer;
37 | rapidjson::Writer writer(buffer);
38 | doc.Accept(writer);
39 | return buffer.GetString();
40 | }
41 |
42 | } // namespace serializer
43 |
44 | } // namespace olp
45 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/PublicationSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::Publication& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 | } // namespace serializer
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/PublishDataRequestSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::PublishDataRequest& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 | } // namespace serializer
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/PublishPartitionSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "generated/model/PublishPartition.h"
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::PublishPartition& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 | } // namespace serializer
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/PublishPartitionsSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "generated/model/PublishPartitions.h"
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::PublishPartitions& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 | } // namespace serializer
32 | } // namespace olp
33 |
--------------------------------------------------------------------------------
/olp-cpp-sdk-dataservice-write/src/generated/serializer/UpdateIndexRequestSerializer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace olp {
27 | namespace serializer {
28 | void to_json(const dataservice::write::model::UpdateIndexRequest& x,
29 | rapidjson::Value& value,
30 | rapidjson::Document::AllocatorType& allocator);
31 |
32 | } // namespace serializer
33 | } // namespace olp
34 |
--------------------------------------------------------------------------------
/scripts/linux-armhf/fv/build_armhf_fv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2025 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 | # This script should run on special docker image with armhf packages installed.
21 | # Compiler setup for ARM
22 | export CC=arm-linux-gnueabihf-gcc-7
23 | export CXX=arm-linux-gnueabihf-g++-7
24 | export LD=arm-linux-gnueabihf-ld
25 |
26 | mkdir -p build && cd build
27 | cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -OLP_SDK_BUILD_EXAMPLES=OFF -DOLP_SDK_ENABLE_TESTING=OFF ..
28 | make -j$(nproc)
29 | echo "ARM HF build succeeded."
30 |
--------------------------------------------------------------------------------
/scripts/linux/fv/build_fv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | mkdir -p build && cd build
22 | cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -OLP_SDK_BUILD_EXAMPLES=ON -DOLP_SDK_BUILD_DOC=ON -DBUILD_SHARED_LIBS=ON -DOLP_SDK_ENABLE_TESTING=ON ..
23 | make -j$(nproc)
24 | make docs
25 | cd ..
26 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-common.variables:
--------------------------------------------------------------------------------
1 | export endpoint="https://account.api.here.com/oauth2/token"
2 | export layer="olp-cpp-sdk-ingestion-test-stream-layer"
3 | export layer2="olp-cpp-sdk-ingestion-test-stream-layer-2"
4 | export layer_sdii="olp-cpp-sdk-ingestion-test-stream-layer-sdii"
5 | export versioned_layer="olp-cpp-sdk-ingestion-test-versioned-layer"
6 | export volatile_layer="olp-cpp-sdk-ingestion-test-volatile-layer"
7 | export index_layer="olp-cpp-sdk-ingestion-test-index-layer"
8 | ###
9 | #variables below are defined previously as protected value
10 | ###
11 | export service_id="${appid}"
12 | export service_secret="${secret}"
13 | export production_service_id="${production_service_id}"
14 | export production_service_secret="${production_service_secret}"
15 | export facebook_access_token="${facebook_access_token}"
16 | export facebook_app_id="${facebook_app_id}"
17 | export google_client_id="${google_client_id}"
18 | export google_client_secret="${google_client_secret}"
19 | export google_client_token="${google_client_token}"
20 | export arcgis_app_id="${arcgis_app_id}"
21 | export arcgis_access_token="${arcgis_access_token}"
22 | export integration_production_service_id="${integration_production_service_id}"
23 | export integration_production_service_secret="${integration_production_service_secret}"
24 |
25 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-authentication-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | echo ">>> Core - Authentication Test ... >>>"
22 | $REPO_HOME/build/olp-cpp-sdk-authentication/tests/olp-cpp-sdk-authentication-tests \
23 | --gtest_output="xml:$REPO_HOME/reports/olp-authentication-test-report.xml"
24 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-authentication-test.variables:
--------------------------------------------------------------------------------
1 | #to be added soon if required
2 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-core-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | echo ">>> Core Test ... >>>"
22 | $REPO_HOME/build/olp-cpp-sdk-core/tests/olp-cpp-sdk-core-tests \
23 | --gtest_output="xml:$REPO_HOME/reports/olp-core-test-report.xml"
24 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-core-test.variables:
--------------------------------------------------------------------------------
1 | #to be added soon if required
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-dataservice-read-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | echo ">>> Core - SOURCE DATASERVICE READ Test ... >>>"
22 | $REPO_HOME/build/olp-cpp-sdk-dataservice-read/tests/olp-cpp-sdk-dataservice-read-tests \
23 | --gtest_output="xml:$REPO_HOME/reports/olp-dataservice-read-test-report.xml"
24 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-dataservice-read-test.variables:
--------------------------------------------------------------------------------
1 | export dataservice_read_test_secret="${dataservice_read_test_secret}" #defined previously as protected value
2 | export dataservice_read_test_appid="${dataservice_read_test_appid}" #defined previously as protected value
3 | export dataservice_read_test_catalog="hrn:here:data::olp-here-test:hereos-internal-test-v2"
4 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-dataservice-write-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | echo ">>> Core - SOURCE DATASERVICE WRITE Test ... >>>"
22 | $REPO_HOME/build/olp-cpp-sdk-dataservice-write/tests/olp-cpp-sdk-dataservice-write-tests \
23 | --gtest_output="xml:$REPO_HOME/reports/olp-dataservice-write-test-report.xml"
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-dataservice-write-test.variables:
--------------------------------------------------------------------------------
1 | export dataservice_write_test_secret="${dataservice_write_test_secret}" #defined previously as protected value
2 | export dataservice_write_test_appid="${dataservice_write_test_appid}" #defined previously as protected value
3 | export dataservice_write_test_catalog="hrn:here:data::olp-here-test:olp-cpp-sdk-ingestion-test-catalog"
4 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-integration-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | echo ">>> Integration Test ... >>>"
22 | $REPO_HOME/build/tests/integration/olp-cpp-sdk-integration-tests \
23 | --gtest_output="xml:$REPO_HOME/reports/olp-integration-test-report.xml"
24 |
--------------------------------------------------------------------------------
/scripts/linux/fv/olp-cpp-sdk-integration-test.variables:
--------------------------------------------------------------------------------
1 | export dataservice_read_test_secret="${dataservice_read_test_secret}" #defined previously as protected value
2 | export dataservice_read_test_appid="${dataservice_read_test_appid}" #defined previously as protected value
3 | export dataservice_read_test_catalog="hrn:here:data::olp-here-test:hereos-internal-test-v2"
4 | export dataservice_write_test_secret="${dataservice_write_test_secret}" #defined previously as protected value
5 | export dataservice_write_test_appid="${dataservice_write_test_appid}" #defined previously as protected value
6 | export dataservice_write_test_catalog="hrn:here:data::olp-here-test:olp-cpp-sdk-ingestion-test-catalog"
7 |
--------------------------------------------------------------------------------
/scripts/linux/fv/tsan_suppression.txt:
--------------------------------------------------------------------------------
1 | {
2 | leveldb_schedule
3 | Memcheck:Leak
4 | match-leak-kinds: reachable
5 | ...
6 | fun:_ZN7leveldb10EnvWrapper8ScheduleEPFvPvES1_
7 | ...
8 | }
9 | {
10 | leveldb_env
11 | Memcheck:Leak
12 | match-leak-kinds: reachable
13 | ...
14 | fun:_ZN7leveldb3Env7DefaultEv
15 | ...
16 | }
17 | {
18 | False positive leak on tls allocation
19 | Memcheck:Leak
20 | match-leak-kinds: possible
21 | ...
22 | fun:_dl_allocate_tls
23 | ...
24 | }
25 |
--------------------------------------------------------------------------------
/scripts/linux/nv/build_valgrind.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2025 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | mkdir -p build && cd build
22 | cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOLP_SDK_NO_EXCEPTION=ON -DOLP_SDK_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DOLP_SDK_ENABLE_TESTING=ON ..
23 | make -j$(nproc)
24 |
--------------------------------------------------------------------------------
/scripts/linux/nv/sonar-project.propertiesValgrind:
--------------------------------------------------------------------------------
1 | sonar.projectKey=com.here.edge-platform:olp-cpp-sdk-Valgrind
2 | sonar.projectName=olp-cpp-sdk-Valgrind
3 | sonar.projectVersion=data-sdk-cpp-${env.CI_COMMIT_BRANCH}:${env.CI_COMMIT_SHORT_SHA}-${env.CI_PIPELINE_ID}
4 | sonar.sources=./olp-cpp-sdk-authentication/src/,./olp-cpp-sdk-core/src/,./olp-cpp-sdk-dataservice-read/src/,./olp-cpp-sdk-dataservice-write/src/,./olp-cpp-sdk-authentication/include/,./olp-cpp-sdk-core/include/,./olp-cpp-sdk-dataservice-read/include/,./olp-cpp-sdk-dataservice-write/include/
5 | sonar.tests=./olp-cpp-sdk-authentication/tests/,./olp-cpp-sdk-core/tests/,./olp-cpp-sdk-dataservice-read/tests/,./olp-cpp-sdk-dataservice-write/tests/
6 | sonar.test.exclusions=./olp-cpp-sdk-authentication/tests/,./olp-cpp-sdk-core/tests/,./olp-cpp-sdk-dataservice-read/tests/,./olp-cpp-sdk-dataservice-write/tests/
7 | sonar.exclusions=**/*.java
8 | sonar.sourceEncoding=UTF-8
9 | sonar.cxx.file.suffixes=.cxx,.cpp,.cc,.hxx,.hpp,.hh,.h
10 | sonar.cxx.cppcheck.reportPaths=./reports/cppcheck/cppcheck.xml
11 | sonar.cxx.xunit.reportPaths=./reports/*report.xml
12 | sonar.cxx.valgrind.reportPaths=./reports/valgrind/*memcheck.xml
13 | sonar.scm.exclusions.disabled=true
14 |
--------------------------------------------------------------------------------
/scripts/linux/psv/build_psv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -ex
2 | #
3 | # Copyright (C) 2019-2020 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 | # Show initial ccache data
21 | ccache -s
22 |
23 | # For core dump backtrace
24 | ulimit -c unlimited
25 |
26 | mkdir -p build
27 | cd build
28 | cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
29 | -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror $CXXFLAGS" \
30 | -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
31 | -DOLP_SDK_BUILD_EXAMPLES=ON \
32 | -DBUILD_SHARED_LIBS=ON \
33 | ..
34 |
35 | make -j$(nproc)
36 |
37 | # Show last ccache data
38 | ccache -s
39 |
--------------------------------------------------------------------------------
/scripts/linux/psv/build_psv_no_cache.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -ex
2 | #
3 | # Copyright (C) 2021-2022 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 | mkdir -p build
21 | cd build
22 |
23 | cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
24 | -DOLP_SDK_ENABLE_TESTING=OFF \
25 | -DOLP_SDK_ENABLE_DEFAULT_CACHE=OFF \
26 | -DOLP_SDK_ENABLE_DEFAULT_CACHE_LMDB=OFF \
27 | -DBUILD_SHARED_LIBS=ON \
28 | ..
29 |
30 | cmake --build . -- -j$(nproc)
31 |
--------------------------------------------------------------------------------
/scripts/linux/weekly/build_perf_tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -ex
2 | #
3 | # Copyright (C) 2021 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 | # Script will build olp-cpp-sdk-performance-tests for further execution with CPU/RAM metrics
21 |
22 | mkdir -p build && cd build
23 |
24 | cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOLP_SDK_NO_EXCEPTION=ON -DBUILD_SHARED_LIBS=ON -DOLP_SDK_ENABLE_TESTING=ON ..
25 |
26 | cmake --build . --target olp-cpp-sdk-performance-tests
27 |
--------------------------------------------------------------------------------
/scripts/linux/weekly/performance_tests.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "MemoryUsage/MemoryTest.ReadNPartitionsFromVersionedLayer/15m_test",
4 | "repeat": 1,
5 | "metric_infos": [
6 | {
7 | "name": "Performance",
8 | "metrics": [
9 | "max_mem",
10 | "avg_mem",
11 | "max_cpu",
12 | "avg_cpu",
13 | "total_written_to_disk_bytes"
14 | ]
15 | }
16 | ],
17 | "charts" : [
18 | {
19 | "name": "ReadNPartitionsFromVersionedLayer/15m_test",
20 | "source": "Performance",
21 | "charts": [
22 | {
23 | "name": "CPU usage",
24 | "units": "Percentage ( CPU model: sed_cpu_model sed_mhz. Core: sed_n_core. )",
25 | "values": [
26 | {"Maximum": "max_cpu"},
27 | {"Average": "avg_cpu"}
28 | ]
29 | },
30 | {
31 | "name": "RAM usage",
32 | "units": "MB ( Total: sed_memory_total )",
33 | "values": [
34 | {"Maximum": "max_mem"},
35 | {"Average": "avg_mem"}
36 | ]
37 | },
38 | {
39 | "name": "Disk usage",
40 | "units": "MB",
41 | "values": [
42 | {"Total": "total_written_to_disk_mb"}
43 | ]
44 | }
45 | ]
46 | }
47 | ]
48 | }
49 | ]
--------------------------------------------------------------------------------
/scripts/macos/psv/azure_macos_build_psv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 |
21 | mkdir -p build
22 | cd build
23 | cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
24 | -DOLP_SDK_BUILD_EXAMPLES=ON \
25 | -DBUILD_SHARED_LIBS=ON \
26 | -DOLP_SDK_ENABLE_TESTING=NO \
27 | ..
28 | make -j
29 | cd ..
30 |
--------------------------------------------------------------------------------
/scripts/windows/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | #
3 | # Copyright (C) 2019-2024 HERE Europe B.V.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | # SPDX-License-Identifier: Apache-2.0
18 | # License-Filename: LICENSE
19 |
20 | env
21 | [[ -d "build" ]] && rm -rf build
22 | mkdir build && cd build
23 | cmake .. -G "${GENERATOR}" -A x64 \
24 | -DBUILD_TYPE=$BUILD_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
25 | cmake --build . --config $BUILD_TYPE
26 |
--------------------------------------------------------------------------------
/tests/common/ResponseGenerator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #include
27 | #include
28 |
29 | class ResponseGenerator {
30 | public:
31 | static std::string ResourceApis(const std::string& catalog);
32 | static std::string ResourceApis(const olp::client::Apis& apis);
33 | static std::string Version(uint32_t version);
34 | static std::string Partitions(
35 | const olp::dataservice::read::model::Partitions& partitions_response);
36 | };
37 |
--------------------------------------------------------------------------------
/tests/common/mocks/CacheMock.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "CacheMock.h"
21 |
22 | CacheMock::CacheMock() = default;
23 |
24 | CacheMock::~CacheMock() = default;
25 |
--------------------------------------------------------------------------------
/tests/common/mocks/TaskSchedulerMock.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 |
25 | class TaskSchedulerMock : public olp::thread::TaskScheduler {
26 | public:
27 | MOCK_METHOD(void, EnqueueTask, (olp::thread::TaskScheduler::CallFuncType &&),
28 | (override));
29 |
30 | MOCK_METHOD(void, EnqueueTask, (CallFuncType&&, uint32_t), (override));
31 | };
32 |
--------------------------------------------------------------------------------
/tests/custom-params/include/testutils/CustomParameters.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2021 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | /// Class that provides access to global variables that are used during tests.
25 | class CustomParameters {
26 | public:
27 | // Used to get a variable by key.
28 | // Returns variable for a key if it is set, the empty string otherwise.
29 | static std::string getArgument(const std::string& name);
30 | };
31 |
--------------------------------------------------------------------------------
/tests/custom-params/src/CustomParameters.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #include "testutils/CustomParameters.hpp"
21 |
22 | std::string CustomParameters::getArgument(const std::string& name) {
23 | // TODO: add support for iOS via [[NSProcessInfo processInfo] environment]
24 | const char* env = getenv(name.c_str());
25 | if (env) {
26 | return env;
27 | }
28 | return "";
29 | }
30 |
--------------------------------------------------------------------------------
/tests/functional/network/NetworkTestBase.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include
25 |
26 | #include
27 | #include
28 |
29 | #include "Client.h"
30 |
31 | class NetworkTestBase : public ::testing::Test {
32 | void SetUp() override;
33 |
34 | protected:
35 | std::shared_ptr network_;
36 | olp::http::NetworkSettings settings_;
37 | std::shared_ptr mock_server_client_;
38 | };
39 |
--------------------------------------------------------------------------------
/tests/functional/utils/Utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 | #include
24 | #include "olp/core/client/ApiError.h"
25 |
26 | namespace {
27 |
28 | #define EXPECT_SUCCESS(response) \
29 | EXPECT_TRUE((response).IsSuccessful()) \
30 | << "ERROR: code: " \
31 | << static_cast((response).GetError().GetErrorCode()) \
32 | << ", status: " << (response).GetError().GetHttpStatusCode() \
33 | << ", message: " << (response).GetError().GetMessage();
34 |
35 | } // namespace
36 |
--------------------------------------------------------------------------------
/tests/performance/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2019-2021 HERE Europe B.V.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # SPDX-License-Identifier: Apache-2.0
16 | # License-Filename: LICENSE
17 |
18 | if (ANDROID OR IOS)
19 | message(STATUS "Currently the performance test runner for mobile platforms is not supported")
20 | return()
21 | endif()
22 |
23 | set(OLP_SDK_PERFORMANCE_TESTS_SOURCES
24 | ./MemoryTest.cpp
25 | ./MemoryTestBase.h
26 | ./NetworkWrapper.h
27 | ./PrefetchTest.cpp
28 | )
29 |
30 | add_executable(olp-cpp-sdk-performance-tests ${OLP_SDK_PERFORMANCE_TESTS_SOURCES})
31 | target_link_libraries(olp-cpp-sdk-performance-tests
32 | PRIVATE
33 | custom-params
34 | gtest_main
35 | olp-cpp-sdk-authentication
36 | olp-cpp-sdk-dataservice-read
37 | )
38 |
--------------------------------------------------------------------------------
/tests/utils/mock-server-client/Status.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | #pragma once
21 |
22 | #include
23 |
24 | #include "JsonHelpers.h"
25 |
26 | namespace mockserver {
27 |
28 | struct Status {
29 | using Ports = std::vector;
30 |
31 | Ports ports;
32 | };
33 |
34 | void from_json(const rapidjson::Value& value, Status& x);
35 |
36 | inline void from_json(const rapidjson::Value& value, Status& x) {
37 | x.ports = parse(value, "ports");
38 | }
39 |
40 | } // namespace mockserver
41 |
--------------------------------------------------------------------------------
/tests/utils/olp_server/README.md:
--------------------------------------------------------------------------------
1 | # Local OLP server
2 |
3 | This folder contains sources of a server that mimics the OLP services.
4 |
5 | Supported operations:
6 |
7 | * Lookup API
8 | * Retrieve catalog configuration
9 | * Retrieve catalog latest version
10 | * Retrieve layers versions
11 | * Retrieve layer metadata (partitions)
12 | * Retrieve data from a blob service
13 |
14 | Requests are always valid (no validation performed).
15 | Blob service returns generated text data (400-500 kb. size)
16 |
17 | ## How to run a server
18 |
19 | To run a server execute the script:
20 |
21 | ```shell
22 | node server.js
23 | ```
24 |
25 | The server implemented as a proxy between the client and the OLP. Clients can connect to it directly; no authorization required.
26 | Note: server supports HTTP protocol only.
--------------------------------------------------------------------------------
/tests/utils/olp_server/urls.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 HERE Europe B.V.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | * SPDX-License-Identifier: Apache-2.0
17 | * License-Filename: LICENSE
18 | */
19 |
20 | exports.lookup = "api-lookup.data.api.platform.here.com";
21 | exports.config = "config_service.com"
22 | exports.metadata = "metadata_service.com"
23 | exports.query = "query_service.com"
24 | exports.blob = "blob_service.com"
25 |
--------------------------------------------------------------------------------