AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MockHTTP2MimeRequestEncodeSource.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_AVSCOMMON_UTILS_HTTP2_MOCKHTTP2MIMEREQUESTENCODESOURCE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_AVSCOMMON_UTILS_HTTP2_MOCKHTTP2MIMEREQUESTENCODESOURCE_H_
18 
19 #include <string>
20 #include <vector>
22 
23 namespace alexaClientSDK {
24 namespace avsCommon {
25 namespace utils {
26 namespace http2 {
32 public:
40  const std::vector<std::string>& m_data,
41  const std::vector<std::vector<std::string>>& m_headers);
42 
46  HTTP2SendDataResult onSendMimePartData(char* bytes, size_t size) override;
47  std::vector<std::string> getRequestHeaderLines() override;
49 
54 
59  std::vector<std::string> m_data;
61 
63  std::vector<std::vector<std::string>> m_headers;
64 
67 
69  size_t m_index;
70 
73 
75  bool m_abort;
76 
78  size_t m_pauseCount;
79 };
80 } // namespace http2
81 } // namespace utils
82 } // namespace avsCommon
83 } // namespace alexaClientSDK
84 
85 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_AVSCOMMON_UTILS_HTTP2_MOCKHTTP2MIMEREQUESTENCODESOURCE_H_
std::vector< std::vector< std::string > > m_headers
Stores the MIME header parts.
Definition: MockHTTP2MimeRequestEncodeSource.h:63
std::vector< std::string > m_data
Stores the MIME data parts.
Definition: MockHTTP2MimeRequestEncodeSource.h:60
size_t m_pauseCount
PAUSE count.
Definition: MockHTTP2MimeRequestEncodeSource.h:78
bool m_slowSource
Enable sending PAUSE intermittently.
Definition: MockHTTP2MimeRequestEncodeSource.h:72
std::vector< std::string > getRequestHeaderLines() override
Definition: MockHTTP2MimeRequestEncodeSource.cpp:67
Definition: HTTP2MimeRequestSourceInterface.h:35
Definition: MockHTTP2MimeRequestEncodeSource.h:31
HTTP2SendDataResult onSendMimePartData(char *bytes, size_t size) override
Definition: MockHTTP2MimeRequestEncodeSource.cpp:45
size_t m_index
Index of current MIME part being read.
Definition: MockHTTP2MimeRequestEncodeSource.h:69
HTTP2GetMimeHeadersResult getMimePartHeaderLines() override
Definition: MockHTTP2MimeRequestEncodeSource.cpp:31
bool m_abort
If ABORT is to be sent.
Definition: MockHTTP2MimeRequestEncodeSource.h:75
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
MockHTTP2MimeRequestEncodeSource(const std::vector< std::string > &m_data, const std::vector< std::vector< std::string >> &m_headers)
Definition: MockHTTP2MimeRequestEncodeSource.cpp:71
size_t m_bytesWritten
Index into the current MIME data part.
Definition: MockHTTP2MimeRequestEncodeSource.h:66

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