AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
EventStreamDecoder.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/utils/Array.h>
10#include <aws/core/utils/event/EventStreamHandler.h>
11#include <aws/event-stream/event_stream.h>
12
13namespace Aws
14{
15 namespace Utils
16 {
17 namespace Event
18 {
19 class AWS_CORE_API EventStreamDecoder
20 {
21 public:
24
28 inline explicit operator bool() const { return *m_eventStreamHandler; }
29
34 void Pump(const ByteBuffer& data);
35 void Pump(const ByteBuffer& data, size_t length);
36
40 void Reset();
41
46
47 protected:
55 static void onPayloadSegment(
56 aws_event_stream_streaming_decoder* decoder,
57 aws_byte_buf* payload,
58 int8_t isFinalSegment,
59 void* context);
60
67 static void onPreludeReceived(
68 aws_event_stream_streaming_decoder* decoder,
69 aws_event_stream_message_prelude* prelude,
70 void* context);
71
79 static void onHeaderReceived(
80 aws_event_stream_streaming_decoder* decoder,
81 aws_event_stream_message_prelude* prelude,
82 aws_event_stream_header_value_pair* header,
83 void* context);
84
93 static void onError(
94 aws_event_stream_streaming_decoder* decoder,
95 aws_event_stream_message_prelude* prelude,
96 int errorCode,
97 const char* message,
98 void* context);
99
104 aws_event_stream_streaming_decoder m_decoder;
106 };
107 }
108 }
109}
static void onError(aws_event_stream_streaming_decoder *decoder, aws_event_stream_message_prelude *prelude, int errorCode, const char *message, void *context)
static void onPreludeReceived(aws_event_stream_streaming_decoder *decoder, aws_event_stream_message_prelude *prelude, void *context)
void Pump(const ByteBuffer &data, size_t length)
EventStreamDecoder(EventStreamHandler *handler)
void ResetEventStreamHandler(EventStreamHandler *handler)
static void onHeaderReceived(aws_event_stream_streaming_decoder *decoder, aws_event_stream_message_prelude *prelude, aws_event_stream_header_value_pair *header, void *context)
static void onPayloadSegment(aws_event_stream_streaming_decoder *decoder, aws_byte_buf *payload, int8_t isFinalSegment, void *context)
aws_event_stream_streaming_decoder m_decoder
void Pump(const ByteBuffer &data)