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::commonInterfaces::UrlRequest Class Reference

#include <UrlRequest.h>

Inheritance diagram for alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest:
Collaboration graph
[legend]

Public Member Functions

const std::string & getUrl () const
 
const std::string & getFilename () const
 
const std::string & getCertPath () const
 
{ ArtifactRequest methods.
Type getRequestType () const override
 
bool needsUnpacking () const override
 
std::string getSummary () const override
 
std::string toJsonString () const override
 
- Public Member Functions inherited from alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest
virtual ~ArtifactRequest ()=default
 

Static Public Member Functions

static std::shared_ptr< UrlRequestcreate (std::string url, std::string filename, bool unpack=false, std::string certPath="")
 

Additional Inherited Members

- Static Public Attributes inherited from alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest
static constexpr auto UNPACK = true
 

Member Function Documentation

◆ create()

static std::shared_ptr<UrlRequest> alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::create ( std::string  url,
std::string  filename,
bool  unpack = false,
std::string  certPath = "" 
)
static

Creates an Artifact Request that will contain all the necessary info to download a file using a url.

Parameters
urlREQUIRED, url used to download the desired artifact.
filenameREQUIRED, name of the resource to be stored on the device.
unpackOPTIONAL, if true, then artifact will be unpacked and the directory will be provided.
certPathOPTIONAL, if not-emtpy, then the download request will be made with the SSL cert at the cerPath.
Returns
NULLABLE, a smart pointer to a request if all params are valid.

◆ getCertPath()

const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getCertPath ( ) const
inline
Returns
the optional filepath to the SSL Certificate which can be used for this request.

◆ getFilename()

const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getFilename ( ) const
inline
Returns
the filename to be used for this artifact in case we cannot fetch the name from HTTP headers.

◆ getRequestType()

Type alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getRequestType ( ) const
inlineoverridevirtual
Returns
the type of the request.

Implements alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest.

◆ getSummary()

std::string alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getSummary ( ) const
inlineoverridevirtual
Returns
a concatenated string that describes the request.

Implements alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest.

◆ getUrl()

const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getUrl ( ) const
inline
Returns
the URL used to download the requested file.

◆ needsUnpacking()

bool alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::needsUnpacking ( ) const
inlineoverridevirtual
Returns
weather the artifact needs to be unpacked or not.

Implements alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest.

◆ toJsonString()

std::string alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::toJsonString ( ) const
overridevirtual
Returns
a JSON representation of this request that includes all of its component.

Implements alexaClientSDK::acsdkAssets::commonInterfaces::ArtifactRequest.


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