16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2REQUESTCONFIG_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2REQUESTCONFIG_H_ 30 #ifdef ACSDK_EMIT_SENSITIVE_LOGS 31 #define ACSDK_EMIT_CURL_LOGS 158 std::shared_ptr<HTTP2RequestSourceInterface>
getSource()
const;
165 std::shared_ptr<HTTP2ResponseSinkInterface>
getSink()
const;
188 static const uint8_t DEFAULT_PRIORITY = 16;
192 std::chrono::milliseconds m_connectionTimeout;
196 std::chrono::milliseconds m_transferTimeout;
200 std::chrono::milliseconds m_activityTimeout;
208 std::shared_ptr<HTTP2RequestSourceInterface> m_source;
211 std::shared_ptr<HTTP2ResponseSinkInterface> m_sink;
215 bool m_isIntermittentTransferExpected;
228 m_connectionTimeout{std::chrono::milliseconds::zero()},
229 m_transferTimeout{std::chrono::milliseconds::zero()},
230 m_activityTimeout{std::chrono::milliseconds::zero()},
231 m_priority{DEFAULT_PRIORITY},
232 m_isIntermittentTransferExpected{
false} {
233 static std::atomic<uint64_t> nextId{1};
234 m_id = idPrefix + std::to_string(std::atomic_fetch_add(&nextId, uint64_t{2}));
238 m_connectionTimeout = timeout;
242 m_transferTimeout = timeout;
246 m_activityTimeout = timeout;
250 m_priority = priority;
262 m_isIntermittentTransferExpected =
true;
278 return m_connectionTimeout;
282 return m_transferTimeout;
286 return m_activityTimeout;
302 return m_isIntermittentTransferExpected;
310 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2REQUESTCONFIG_H_
void setResponseSink(std::shared_ptr< HTTP2ResponseSinkInterface > sink)
Definition: HTTP2RequestConfig.h:257
Definition: HTTP2RequestConfig.h:42
::std::string string
Definition: gtest-port.h:1097
std::chrono::milliseconds getConnectionTimeout() const
Definition: HTTP2RequestConfig.h:277
void setLogicalStreamIdPrefix(std::string logicalStreamIdPrefix)
HTTP2RequestType getRequestType() const
Definition: HTTP2RequestConfig.h:269
std::string getId() const
Definition: HTTP2RequestConfig.h:265
void setActivityTimeout(std::chrono::milliseconds timeout)
Definition: HTTP2RequestConfig.h:245
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::chrono::milliseconds getActivityTimeout() const
Definition: HTTP2RequestConfig.h:285
void setIntermittentTransferExpected()
Definition: HTTP2RequestConfig.h:261
std::string getUrl() const
Definition: HTTP2RequestConfig.h:273
void setTransferTimeout(std::chrono::milliseconds timeout)
Definition: HTTP2RequestConfig.h:241
HTTP2RequestConfig(HTTP2RequestType type, const std::string &url, const std::string &idPrefix)
Definition: HTTP2RequestConfig.h:222
type
Definition: upload.py:443
void setConnectionTimeout(std::chrono::milliseconds timeout)
Definition: HTTP2RequestConfig.h:237
std::chrono::milliseconds getTransferTimeout() const
Definition: HTTP2RequestConfig.h:281
std::shared_ptr< HTTP2ResponseSinkInterface > getSink() const
Definition: HTTP2RequestConfig.h:297
void setPriority(uint8_t priority)
Definition: HTTP2RequestConfig.h:249
uint8_t getPriority() const
Definition: HTTP2RequestConfig.h:289
void setRequestSource(std::shared_ptr< HTTP2RequestSourceInterface > source)
Definition: HTTP2RequestConfig.h:253
std::shared_ptr< HTTP2RequestSourceInterface > getSource() const
Definition: HTTP2RequestConfig.h:293
const T & move(const T &t)
Definition: gtest-port.h:1317
bool isIntermittentTransferExpected() const
Definition: HTTP2RequestConfig.h:301
HTTP2RequestType
Definition: HTTP2RequestType.h:29