AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
HTTP2MimeResponseSinkInterface.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_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2MIMERESPONSESINKINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2MIMERESPONSESINKINTERFACE_H_
18 
19 #include <cstddef>
20 #include <cstdint>
21 #include <map>
22 #include <string>
23 
27 
28 namespace alexaClientSDK {
29 namespace avsCommon {
30 namespace utils {
31 namespace http2 {
32 
37 public:
41  virtual ~HTTP2MimeResponseSinkInterface() = default;
42 
52  virtual bool onReceiveResponseCode(long responseCode) = 0;
53 
63  virtual bool onReceiveHeaderLine(const std::string& line) = 0;
64 
74  virtual bool onBeginMimePart(const std::multimap<std::string, std::string>& headers) = 0;
75 
86  virtual HTTP2ReceiveDataStatus onReceiveMimeData(const char* bytes, size_t size) = 0;
87 
96  virtual bool onEndMimePart() = 0;
97 
108  virtual HTTP2ReceiveDataStatus onReceiveNonMimeData(const char* bytes, size_t size) = 0;
109 
118  virtual void onResponseFinished(HTTP2ResponseFinishedStatus status) = 0;
119 };
120 
121 } // namespace http2
122 } // namespace utils
123 } // namespace avsCommon
124 } // namespace alexaClientSDK
125 
126 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_HTTP2_HTTP2MIMERESPONSESINKINTERFACE_H_
::std::string string
Definition: gtest-port.h:1097
virtual HTTP2ReceiveDataStatus onReceiveMimeData(const char *bytes, size_t size)=0
virtual void onResponseFinished(HTTP2ResponseFinishedStatus status)=0
virtual bool onBeginMimePart(const std::multimap< std::string, std::string > &headers)=0
HTTP2ResponseFinishedStatus
Definition: HTTP2ResponseFinishedStatus.h:29
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual HTTP2ReceiveDataStatus onReceiveNonMimeData(const char *bytes, size_t size)=0
HTTP2ReceiveDataStatus
Definition: HTTP2ReceiveDataStatus.h:28

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