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

#include <DownloadStream.h>

Public Member Functions

virtual ~DownloadStream ()
bool write (const char *data, size_t size)
bool downloadSucceeded () const

Static Public Member Functions

static std::shared_ptr< DownloadStreamcreate (const std::string &path, size_t expectedSize)

Constructor & Destructor Documentation

◆ ~DownloadStream()

virtual alexaClientSDK::acsdkAssets::common::DownloadStream::~DownloadStream ( )

Member Function Documentation

◆ create()

static std::shared_ptr<DownloadStream> alexaClientSDK::acsdkAssets::common::DownloadStream::create ( const std::string &  path,
size_t  expectedSize 

Create download file object with expected size

pathfile path to write to
expectedSizeexpected download file size
downloadStream object or null if file path invalid

◆ downloadSucceeded()

bool alexaClientSDK::acsdkAssets::common::DownloadStream::downloadSucceeded ( ) const

◆ write()

bool alexaClientSDK::acsdkAssets::common::DownloadStream::write ( const char *  data,
size_t  size 

Write data chunk into the output stream

datapointer for data chunk
sizenumber of bytes in the data chunk
true when successful, false for invalid argument or if accumulated size exceeds expectedSize

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

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