AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Friends | List of all members
alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder Class Reference

#include <HTTP2MimeRequestEncoder.h>

Inheritance diagram for alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder:
Collaboration graph
[legend]

Public Member Functions

 HTTP2MimeRequestEncoder (const std::string &boundary, std::shared_ptr< HTTP2MimeRequestSourceInterface > source)
 
 ~HTTP2MimeRequestEncoder ()=default
 
HTTP2RequestSourceInterface methods.
HTTP2SendDataResult onSendData (char *bytes, size_t size) override
 
std::vector< std::string > getRequestHeaderLines () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::http2::HTTP2RequestSourceInterface
virtual ~HTTP2RequestSourceInterface ()=default
 

Friends

std::ostream & operator<< (std::ostream &stream, State state)
 

Detailed Description

Class that adapts between HTTP2MimeRequestSourceInterface and a HTTP2RequestSourceInterface providing the encoding of discreet mime parts in to a single request stream.

Constructor & Destructor Documentation

◆ HTTP2MimeRequestEncoder()

alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder::HTTP2MimeRequestEncoder ( const std::string &  boundary,
std::shared_ptr< HTTP2MimeRequestSourceInterface source 
)

Create an HTTP2MimeRequestEncoder.

Parameters
boundaryThe mime boundary to include between mime parts.
sourcePointer to an object providing the mime parts in sequence.

◆ ~HTTP2MimeRequestEncoder()

alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder::~HTTP2MimeRequestEncoder ( )
default

Destructor.

Member Function Documentation

◆ getRequestHeaderLines()

std::vector<std::string> alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder::getRequestHeaderLines ( )
overridevirtual

Get the header lines that should be output with this HTTP2 request.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Returns
The header lines that should be output with this request.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2RequestSourceInterface.

◆ onSendData()

HTTP2SendDataResult alexaClientSDK::avsCommon::utils::http2::HTTP2MimeRequestEncoder::onSendData ( char *  bytes,
size_t  size 
)
overridevirtual

Notification of the need to provide body data for an HTTP2 request.

Note
Calls to this method may block network operations for the associated instance of HTTP2ConnectionInterface, so they should return quickly.
Parameters
bytesThe buffer to receive the bytes to send.
sizeThe max number of bytes to copy.
Returns
Result indicating the disposition of the operation and number of bytes copied.
See also
HTTPSendDataResult.

Implements alexaClientSDK::avsCommon::utils::http2::HTTP2RequestSourceInterface.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
State  state 
)
friend

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