16 #ifndef ACSDKASSETSCOMMON_CURLWRAPPER_H_ 17 #define ACSDKASSETSCOMMON_CURLWRAPPER_H_ 21 #include <curl/curl.h> 36 namespace acsdkAssets {
55 static std::unique_ptr<CurlWrapper>
create(
57 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
69 std::ostream& response,
70 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj);
85 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj,
119 std::shared_ptr<ResponseSink> sink,
120 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj);
127 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> authDelegate,
150 std::ostream& responseStream,
151 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj);
165 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj);
176 std::shared_ptr<DownloadChunkQueue> downloadChunkQueue,
177 const std::weak_ptr<CurlProgressCallbackInterface>& callbackObj);
185 bool unpack(std::shared_ptr<DownloadChunkQueue> downloadChunkQueue,
const std::string& path);
205 char m_errorBuffer[CURL_ERROR_SIZE]{};
208 std::unique_ptr<curl_slist, void (*)(curl_slist*)> m_headers;
209 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface> m_authDelegate;
215 #endif // ACSDKASSETSCOMMON_CURLWRAPPER_H_
commonInterfaces::ResultCode getAndDownloadMultipart(const std::string &url, std::shared_ptr< ResponseSink > sink, const std::weak_ptr< CurlProgressCallbackInterface > &callbackObj)
HeaderResults getHeaders(const std::string &url)
commonInterfaces::ResultCode download(const std::string &url, const std::string &path, const std::weak_ptr< CurlProgressCallbackInterface > &callbackObj, bool unpack=false, size_t size=0)
::std::string string
Definition: gtest-port.h:1097
static std::string getValueFromHeaders(const std::string &headers, const std::string &key)
HeaderResults getHeadersAuthorized(const std::string &url)
static std::unique_ptr< CurlWrapper > create(bool isThrottled, std::shared_ptr< alexaClientSDK::avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, const std::string &certPath="")
Definition: CurlWrapper.h:43
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
ResultCode
Definition: ResultCode.h:24
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58