AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::acsdkAssets::common::ResponseSink Class Reference

#include <ResponseSink.h>

Public Member Functions

 ResponseSink (const std::shared_ptr< commonInterfaces::DavsRequest > &request, const std::string &workingDirectory)
 
virtual ~ResponseSink ()=default
 
std::shared_ptr< commonInterfaces::VendableArtifactgetArtifact ()
 
std::string getArtifactPath ()
 
bool onHeader (const std::string &header)
 
bool parser (std::shared_ptr< DownloadChunkQueue > &downloadChunkQueue)
 

Detailed Description

Handle Multipart DAVS Responses.

Constructor & Destructor Documentation

◆ ResponseSink()

alexaClientSDK::acsdkAssets::common::ResponseSink::ResponseSink ( const std::shared_ptr< commonInterfaces::DavsRequest > &  request,
const std::string &  workingDirectory 
)

Constructor.

◆ ~ResponseSink()

virtual alexaClientSDK::acsdkAssets::common::ResponseSink::~ResponseSink ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getArtifact()

std::shared_ptr<commonInterfaces::VendableArtifact> alexaClientSDK::acsdkAssets::common::ResponseSink::getArtifact ( )

get m_artifact

Returns
NULLABLE, returns m_artifact

◆ getArtifactPath()

std::string alexaClientSDK::acsdkAssets::common::ResponseSink::getArtifactPath ( )

get the full path to the artifact if it's downloaded properly

Returns
path to the artifact, empty if not downloaded or error

◆ onHeader()

bool alexaClientSDK::acsdkAssets::common::ResponseSink::onHeader ( const std::string &  header)

When we receive a header line search for boundary. If we find the boundary set m_boundary and notify waiting threads.

Parameters
headerthe header line which we search for the boundary.
Returns

◆ parser()

bool alexaClientSDK::acsdkAssets::common::ResponseSink::parser ( std::shared_ptr< DownloadChunkQueue > &  downloadChunkQueue)

Wrapper around the multipart Parser, used to set the parsers callbacks and feed it data.

Parameters
downloadChunkQueuehandles streaming data chunk by chunk.
Returns
true if parsing of response succeeds

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0