AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
SelectObjectContentHandler.h
1
6#pragma once
7#include <aws/core/client/AWSError.h>
8#include <aws/core/utils/HashingUtils.h>
9#include <aws/core/utils/event/EventStreamHandler.h>
10#include <aws/s3/S3Errors.h>
11#include <aws/s3/S3_EXPORTS.h>
12#include <aws/s3/model/ProgressEvent.h>
13#include <aws/s3/model/RecordsEvent.h>
14#include <aws/s3/model/SelectObjectContentInitialResponse.h>
15#include <aws/s3/model/StatsEvent.h>
16
17namespace Aws {
18namespace S3 {
19namespace Model {
21
23 typedef std::function<void(const SelectObjectContentInitialResponse&)> SelectObjectContentInitialResponseCallback;
24 typedef std::function<void(const SelectObjectContentInitialResponse&, const Utils::Event::InitialResponseType)>
25 SelectObjectContentInitialResponseCallbackEx;
26 typedef std::function<void(const RecordsEvent&)> RecordsEventCallback;
27 typedef std::function<void(const StatsEvent&)> StatsEventCallback;
28 typedef std::function<void(const ProgressEvent&)> ProgressEventCallback;
29 typedef std::function<void()> ContinuationEventCallback;
30 typedef std::function<void()> EndEventCallback;
31 typedef std::function<void(const Aws::Client::AWSError<S3Errors>& error)> ErrorCallback;
32
33 public:
37
38 AWS_S3_API virtual void OnEvent() override;
39
41
47 inline void SetInitialResponseCallbackEx(const SelectObjectContentInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
51 inline void SetInitialResponseCallback(const SelectObjectContentInitialResponseCallback& noArgCallback) {
52 m_onInitialResponse = [noArgCallback](const SelectObjectContentInitialResponse& rs, const Utils::Event::InitialResponseType) {
53 return noArgCallback(rs);
54 };
55 }
57 inline void SetRecordsEventCallback(const RecordsEventCallback& callback) { m_onRecordsEvent = callback; }
58 inline void SetStatsEventCallback(const StatsEventCallback& callback) { m_onStatsEvent = callback; }
59 inline void SetProgressEventCallback(const ProgressEventCallback& callback) { m_onProgressEvent = callback; }
60 inline void SetContinuationEventCallback(const ContinuationEventCallback& callback) { m_onContinuationEvent = callback; }
61 inline void SetEndEventCallback(const EndEventCallback& callback) { m_onEndEvent = callback; }
62 inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
63
64 inline SelectObjectContentInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }
65
66 private:
67 AWS_S3_API void HandleEventInMessage();
68 AWS_S3_API void HandleErrorInMessage();
69 AWS_S3_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
70
71 SelectObjectContentInitialResponseCallbackEx m_onInitialResponse;
72 RecordsEventCallback m_onRecordsEvent;
73 StatsEventCallback m_onStatsEvent;
74 ProgressEventCallback m_onProgressEvent;
75 ContinuationEventCallback m_onContinuationEvent;
76 EndEventCallback m_onEndEvent;
77 ErrorCallback m_onError;
78};
79
80namespace SelectObjectContentEventMapper {
82
84} // namespace SelectObjectContentEventMapper
85} // namespace Model
86} // namespace S3
87} // namespace Aws
void SetRecordsEventCallback(const RecordsEventCallback &callback)
SelectObjectContentInitialResponseCallbackEx & GetInitialResponseCallbackEx()
void SetInitialResponseCallbackEx(const SelectObjectContentInitialResponseCallbackEx &callback)
AWS_S3_API SelectObjectContentHandler & operator=(const SelectObjectContentHandler &)=default
void SetContinuationEventCallback(const ContinuationEventCallback &callback)
AWS_S3_API SelectObjectContentHandler(const SelectObjectContentHandler &)=default
void SetStatsEventCallback(const StatsEventCallback &callback)
void SetEndEventCallback(const EndEventCallback &callback)
void SetInitialResponseCallback(const SelectObjectContentInitialResponseCallback &noArgCallback)
virtual AWS_S3_API void OnEvent() override
void SetOnErrorCallback(const ErrorCallback &callback)
void SetProgressEventCallback(const ProgressEventCallback &callback)
AWS_S3_API SelectObjectContentEventType GetSelectObjectContentEventTypeForName(const Aws::String &name)
AWS_S3_API Aws::String GetNameForSelectObjectContentEventType(SelectObjectContentEventType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String