Skip to content

Commit de1463d

Browse files
authored
Add getter for OlpClientSettings (#1553)
Required for extensions that take an OlpClient instance to do some additional work. Relates-To: MINOR Signed-off-by: Harald Fernengel <harald.fernengel@here.com>
1 parent a88a0f2 commit de1463d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

olp-cpp-sdk-core/include/olp/core/client/OlpClient.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class CORE_API OlpClient {
107107
*/
108108
void SetSettings(const OlpClientSettings& settings);
109109

110+
/**
111+
* @brief Getter function to retrieve client settings.
112+
*
113+
* @return The client settings
114+
*/
115+
const OlpClientSettings& GetSettings() const;
116+
110117
/**
111118
* @brief Executes the HTTP request through the network stack.
112119
*

olp-cpp-sdk-core/src/client/OlpClient.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ class OlpClient::OlpClientImpl {
467467

468468
ParametersType& GetMutableDefaultHeaders();
469469
void SetSettings(const OlpClientSettings& settings);
470+
const OlpClientSettings& GetSettings() const { return settings_; }
470471

471472
CancellationToken CallApi(const std::string& path, const std::string& method,
472473
const ParametersType& query_params,
@@ -856,6 +857,10 @@ void OlpClient::SetSettings(const OlpClientSettings& settings) {
856857
impl_->SetSettings(settings);
857858
}
858859

860+
const OlpClientSettings& OlpClient::GetSettings() const {
861+
return impl_->GetSettings();
862+
}
863+
859864
CancellationToken OlpClient::CallApi(
860865
const std::string& path, const std::string& method,
861866
const ParametersType& query_params, const ParametersType& header_params,

0 commit comments

Comments
 (0)