AlexaClientSDK  1.24.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Enumerations | Functions | Variables
alexaClientSDK::avsCommon::utils::http2 Namespace Reference

Namespaces

 test
 

Classes

class  HTTP2ConnectionFactoryInterface
 
class  HTTP2ConnectionInterface
 
class  HTTP2ConnectionObserverInterface
 
struct  HTTP2GetMimeHeadersResult
 
class  HTTP2MimeRequestEncoder
 
class  HTTP2MimeRequestSourceInterface
 
class  HTTP2MimeResponseDecoder
 
class  HTTP2MimeResponseSinkInterface
 
class  HTTP2RequestConfig
 
class  HTTP2RequestInterface
 
class  HTTP2RequestSourceInterface
 
class  HTTP2ResponseSinkInterface
 
struct  HTTP2SendDataResult
 
class  MockHTTP2MimeRequestEncodeSource
 
class  MockHTTP2MimeResponseDecodeSink
 

Enumerations

enum  HTTP2ConnectionStatus { HTTP2ConnectionStatus::CONNECTING, HTTP2ConnectionStatus::CONNECTED, HTTP2ConnectionStatus::DISCONNECTED }
 
enum  HTTP2ReceiveDataStatus { HTTP2ReceiveDataStatus::SUCCESS, HTTP2ReceiveDataStatus::PAUSE, HTTP2ReceiveDataStatus::ABORT }
 
enum  HTTP2RequestType { HTTP2RequestType::GET, HTTP2RequestType::POST }
 
enum  HTTP2ResponseFinishedStatus { HTTP2ResponseFinishedStatus::COMPLETE, HTTP2ResponseFinishedStatus::TIMEOUT, HTTP2ResponseFinishedStatus::CANCELLED, HTTP2ResponseFinishedStatus::INTERNAL_ERROR }
 
enum  HTTP2SendStatus { HTTP2SendStatus::CONTINUE, HTTP2SendStatus::PAUSE, HTTP2SendStatus::COMPLETE, HTTP2SendStatus::ABORT }
 

Functions

std::ostream & operator<< (std::ostream &stream, HTTP2RequestType type)
 
std::ostream & operator<< (std::ostream &stream, HTTP2ResponseFinishedStatus status)
 
std::ostream & operator<< (std::ostream &stream, HTTP2MimeRequestEncoder::State state)
 
static const std::string TAG ("HTTP2MimeResponseDecoder")
 String to identify log entries originating from this file. More...
 

Variables

static const std::string BOUNDARY_HEADER_PREFIX = "Content-Type: multipart/form-data; boundary="
 
static const std::string CRLF = "\r\n"
 
static const std::string TWO_DASHES = "--"
 
static const char CARRIAGE_RETURN_ASCII = 13
 ASCII value of CR. More...
 
static const char QUOTES_CHAR = '\"'
 ASCII value of Double Quotes (") More...
 
static const char LINE_FEED_ASCII = 10
 ASCII value of LF. More...
 
static const char CRLF_SEQUENCE [] = {CARRIAGE_RETURN_ASCII, LINE_FEED_ASCII}
 CRLF sequence. More...
 
static const int LEADING_CRLF_CHAR_SIZE = sizeof(CRLF_SEQUENCE) / sizeof(*CRLF_SEQUENCE)
 Size of CLRF in chars. More...
 
static const std::string BOUNDARY_PREFIX = "boundary="
 MIME boundary string prefix in HTTP header. More...
 
static const std::unordered_set< char > BOUNDARY_ALLOWED_NON_ALPHA_CHARS
 Non alpha-numeric chars that are allowed as part of the Boundary as per RFC2046. More...
 
static const size_t BOUNDARY_MAX_LENGTH = 70
 Max length of the boundary as per RFC2046 (inclusive) More...
 

Enumeration Type Documentation

◆ HTTP2ConnectionStatus

The status of an HTTP2Connection.

Enumerator
CONNECTING 

Establishing a connection to an endpoint.

CONNECTED 

Connected to an endpoint.

DISCONNECTED 

Not CONNECTING or CONNECTED to an endpoint.

◆ HTTP2ReceiveDataStatus

Status returned from HTTP2ResponseSinkInterface::onReceiveData() and HTTP2MimeResponseSinkInterface::onReceiveMimePartData().

Enumerator
SUCCESS 

Successful receipt of all data passed in this call.

PAUSE 

Not ready to receive data. Retry receiving this data later.

ABORT 

Data not received. Abort receiving further data for this response.

◆ HTTP2RequestType

Type of request mde over an HTTP2Connection.

Enumerator
GET 

A HTTP2 GET request.

POST 

A HTTP2 POST request.

◆ HTTP2ResponseFinishedStatus

Status provided when an HTTP2 response is finished.

Enumerator
COMPLETE 

Receipt of the response was completed.

TIMEOUT 

Receipt of the response was not completed due to a timeout.

CANCELLED 

Receipt of the response was not completed because the operation was cancelled.

INTERNAL_ERROR 

Receipt of the response was not completed due to an internal error.

◆ HTTP2SendStatus

Status returned from various send operations.

Enumerator
CONTINUE 

Operation succeeded. Continue.

PAUSE 

Operation delayed. Retry later.

COMPLETE 

Operation completed successfully.

ABORT 

Operation failed. Abort.

Function Documentation

◆ operator<<() [1/3]

std::ostream& alexaClientSDK::avsCommon::utils::http2::operator<< ( std::ostream &  stream,
HTTP2RequestType  type 
)
inline

◆ operator<<() [2/3]

std::ostream& alexaClientSDK::avsCommon::utils::http2::operator<< ( std::ostream &  stream,
HTTP2ResponseFinishedStatus  status 
)
inline

Write a HTTP2ResponseFinishedStatus value to an ostream as a string.

Parameters
streamThe stream to write the value to.
statusThe status to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

◆ operator<<() [3/3]

std::ostream& alexaClientSDK::avsCommon::utils::http2::operator<< ( std::ostream &  stream,
HTTP2MimeRequestEncoder::State  state 
)

◆ TAG()

static const std::string alexaClientSDK::avsCommon::utils::http2::TAG ( "HTTP2MimeResponseDecoder"  )
static

String to identify log entries originating from this file.

Variable Documentation

◆ BOUNDARY_ALLOWED_NON_ALPHA_CHARS

const std::unordered_set<char> alexaClientSDK::avsCommon::utils::http2::BOUNDARY_ALLOWED_NON_ALPHA_CHARS
static
Initial value:
=
{'\'', '(', ')', '+', '_', ',', '-', '.', '/', ':', '=', '?'}

Non alpha-numeric chars that are allowed as part of the Boundary as per RFC2046.

◆ BOUNDARY_HEADER_PREFIX

const std::string alexaClientSDK::avsCommon::utils::http2::BOUNDARY_HEADER_PREFIX = "Content-Type: multipart/form-data; boundary="
static

◆ BOUNDARY_MAX_LENGTH

const size_t alexaClientSDK::avsCommon::utils::http2::BOUNDARY_MAX_LENGTH = 70
static

Max length of the boundary as per RFC2046 (inclusive)

◆ BOUNDARY_PREFIX

const std::string alexaClientSDK::avsCommon::utils::http2::BOUNDARY_PREFIX = "boundary="
static

MIME boundary string prefix in HTTP header.

◆ CARRIAGE_RETURN_ASCII

const char alexaClientSDK::avsCommon::utils::http2::CARRIAGE_RETURN_ASCII = 13
static

ASCII value of CR.

◆ CRLF

const std::string alexaClientSDK::avsCommon::utils::http2::CRLF = "\r\n"
static

◆ CRLF_SEQUENCE

const char alexaClientSDK::avsCommon::utils::http2::CRLF_SEQUENCE[] = {CARRIAGE_RETURN_ASCII, LINE_FEED_ASCII}
static

CRLF sequence.

◆ LEADING_CRLF_CHAR_SIZE

const int alexaClientSDK::avsCommon::utils::http2::LEADING_CRLF_CHAR_SIZE = sizeof(CRLF_SEQUENCE) / sizeof(*CRLF_SEQUENCE)
static

Size of CLRF in chars.

◆ LINE_FEED_ASCII

const char alexaClientSDK::avsCommon::utils::http2::LINE_FEED_ASCII = 10
static

ASCII value of LF.

◆ QUOTES_CHAR

const char alexaClientSDK::avsCommon::utils::http2::QUOTES_CHAR = '\"'
static

ASCII value of Double Quotes (")

◆ TWO_DASHES

const std::string alexaClientSDK::avsCommon::utils::http2::TWO_DASHES = "--"
static

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