AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SelectObjectContentHandler.h
1
6#pragma once
7#include <aws/core/utils/HashingUtils.h>
8#include <aws/core/utils/event/EventStreamHandler.h>
9#include <aws/core/client/AWSError.h>
10#include <aws/s3-crt/S3Crt_EXPORTS.h>
11#include <aws/s3-crt/S3CrtErrors.h>
12
13#include <aws/s3-crt/model/SelectObjectContentInitialResponse.h>
14#include <aws/s3-crt/model/RecordsEvent.h>
15#include <aws/s3-crt/model/StatsEvent.h>
16#include <aws/s3-crt/model/ProgressEvent.h>
17
18namespace Aws
19{
20namespace S3Crt
21{
22namespace Model
23{
25 {
27 RECORDS,
28 STATS,
30 CONT,
31 END,
33 };
34
36 {
37 typedef std::function<void(const SelectObjectContentInitialResponse&)> SelectObjectContentInitialResponseCallback;
38 typedef std::function<void(const SelectObjectContentInitialResponse&, const Utils::Event::InitialResponseType)> SelectObjectContentInitialResponseCallbackEx;
39 typedef std::function<void(const RecordsEvent&)> RecordsEventCallback;
40 typedef std::function<void(const StatsEvent&)> StatsEventCallback;
41 typedef std::function<void(const ProgressEvent&)> ProgressEventCallback;
42 typedef std::function<void()> ContinuationEventCallback;
43 typedef std::function<void()> EndEventCallback;
44 typedef std::function<void(const Aws::Client::AWSError<S3CrtErrors>& error)> ErrorCallback;
45
46 public:
49
50 AWS_S3CRT_API virtual void OnEvent() override;
51
53
59 inline void SetInitialResponseCallbackEx(const SelectObjectContentInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
63 inline void SetInitialResponseCallback(const SelectObjectContentInitialResponseCallback& noArgCallback)
64 {
65 m_onInitialResponse = [noArgCallback](const SelectObjectContentInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
66 }
68 inline void SetRecordsEventCallback(const RecordsEventCallback& callback) { m_onRecordsEvent = callback; }
69 inline void SetStatsEventCallback(const StatsEventCallback& callback) { m_onStatsEvent = callback; }
70 inline void SetProgressEventCallback(const ProgressEventCallback& callback) { m_onProgressEvent = callback; }
71 inline void SetContinuationEventCallback(const ContinuationEventCallback& callback) { m_onContinuationEvent = callback; }
72 inline void SetEndEventCallback(const EndEventCallback& callback) { m_onEndEvent = callback; }
73 inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
74
75 inline SelectObjectContentInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }
76
77 private:
78 AWS_S3CRT_API void HandleEventInMessage();
79 AWS_S3CRT_API void HandleErrorInMessage();
80 AWS_S3CRT_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
81
82 SelectObjectContentInitialResponseCallbackEx m_onInitialResponse;
83 RecordsEventCallback m_onRecordsEvent;
84 StatsEventCallback m_onStatsEvent;
85 ProgressEventCallback m_onProgressEvent;
86 ContinuationEventCallback m_onContinuationEvent;
87 EndEventCallback m_onEndEvent;
88 ErrorCallback m_onError;
89 };
90
91namespace SelectObjectContentEventMapper
92{
94
96} // namespace SelectObjectContentEventMapper
97} // namespace Model
98} // namespace S3Crt
99} // namespace Aws
void SetInitialResponseCallbackEx(const SelectObjectContentInitialResponseCallbackEx &callback)
void SetProgressEventCallback(const ProgressEventCallback &callback)
void SetOnErrorCallback(const ErrorCallback &callback)
SelectObjectContentInitialResponseCallbackEx & GetInitialResponseCallbackEx()
virtual AWS_S3CRT_API void OnEvent() override
void SetRecordsEventCallback(const RecordsEventCallback &callback)
void SetStatsEventCallback(const StatsEventCallback &callback)
void SetEndEventCallback(const EndEventCallback &callback)
void SetContinuationEventCallback(const ContinuationEventCallback &callback)
AWS_S3CRT_API SelectObjectContentHandler & operator=(const SelectObjectContentHandler &)=default
void SetInitialResponseCallback(const SelectObjectContentInitialResponseCallback &noArgCallback)
AWS_S3CRT_API Aws::String GetNameForSelectObjectContentEventType(SelectObjectContentEventType value)
AWS_S3CRT_API SelectObjectContentEventType GetSelectObjectContentEventTypeForName(const Aws::String &name)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String