AWS SDK for C++  1.9.66
AWS SDK for C++
SelectObjectContentHandler.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <aws/s3-crt/S3CrtErrors.h>
12 
16 
17 namespace Aws
18 {
19 namespace S3Crt
20 {
21 namespace Model
22 {
24  {
25  RECORDS,
26  STATS,
27  PROGRESS,
28  CONT,
29  END,
30  UNKNOWN
31  };
32 
34  {
35  typedef std::function<void(const RecordsEvent&)> RecordsEventCallback;
36  typedef std::function<void(const StatsEvent&)> StatsEventCallback;
37  typedef std::function<void(const ProgressEvent&)> ProgressEventCallback;
38  typedef std::function<void()> ContinuationEventCallback;
39  typedef std::function<void()> EndEventCallback;
40  typedef std::function<void(const Aws::Client::AWSError<S3CrtErrors>& error)> ErrorCallback;
41 
42  public:
45 
46  virtual void OnEvent() override;
47 
48  inline void SetRecordsEventCallback(const RecordsEventCallback& callback) { m_onRecordsEvent = callback; }
49  inline void SetStatsEventCallback(const StatsEventCallback& callback) { m_onStatsEvent = callback; }
50  inline void SetProgressEventCallback(const ProgressEventCallback& callback) { m_onProgressEvent = callback; }
51  inline void SetContinuationEventCallback(const ContinuationEventCallback& callback) { m_onContinuationEvent = callback; }
52  inline void SetEndEventCallback(const EndEventCallback& callback) { m_onEndEvent = callback; }
53  inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
54 
55  private:
56  void HandleEventInMessage();
57  void HandleErrorInMessage();
58  void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
59 
60  RecordsEventCallback m_onRecordsEvent;
61  StatsEventCallback m_onStatsEvent;
62  ProgressEventCallback m_onProgressEvent;
63  ContinuationEventCallback m_onContinuationEvent;
64  EndEventCallback m_onEndEvent;
65  ErrorCallback m_onError;
66  };
67 
68 namespace SelectObjectContentEventMapper
69 {
71 
73 } // namespace SelectObjectContentEventMapper
74 } // namespace Model
75 } // namespace S3Crt
76 } // namespace Aws
Aws::S3Crt::Model::SelectObjectContentHandler
Definition: SelectObjectContentHandler.h:34
Aws::S3Crt::Model::SelectObjectContentEventType::UNKNOWN
@ UNKNOWN
AWSError.h
Aws::S3Crt::Model::SelectObjectContentHandler::SetProgressEventCallback
void SetProgressEventCallback(const ProgressEventCallback &callback)
Definition: SelectObjectContentHandler.h:50
Aws::S3Crt::Model::StatsEvent
Definition: StatsEvent.h:31
HashingUtils.h
StatsEvent.h
Aws::S3Crt::Model::SelectObjectContentHandler::OnEvent
virtual void OnEvent() override
Aws::S3Crt::Model::SelectObjectContentEventType
SelectObjectContentEventType
Definition: SelectObjectContentHandler.h:24
S3CrtErrors.h
Aws::S3Crt::Model::SelectObjectContentEventMapper::GetSelectObjectContentEventTypeForName
AWS_S3CRT_API SelectObjectContentEventType GetSelectObjectContentEventTypeForName(const Aws::String &name)
Aws::S3Crt::Model::SelectObjectContentHandler::SetOnErrorCallback
void SetOnErrorCallback(const ErrorCallback &callback)
Definition: SelectObjectContentHandler.h:53
AWS_S3CRT_API
#define AWS_S3CRT_API
Definition: S3Crt_EXPORTS.h:28
Aws::S3Crt::Model::SelectObjectContentHandler::SetContinuationEventCallback
void SetContinuationEventCallback(const ContinuationEventCallback &callback)
Definition: SelectObjectContentHandler.h:51
Aws::Utils::Event::EventStreamHandler
Definition: EventStreamHandler.h:29
Aws::S3Crt::Model::SelectObjectContentEventMapper::GetNameForSelectObjectContentEventType
AWS_S3CRT_API Aws::String GetNameForSelectObjectContentEventType(SelectObjectContentEventType value)
Aws::S3Crt::Model::SelectObjectContentHandler::SetEndEventCallback
void SetEndEventCallback(const EndEventCallback &callback)
Definition: SelectObjectContentHandler.h:52
Aws::Client::AWSError< S3CrtErrors >
Aws::S3Crt::Model::SelectObjectContentHandler::SelectObjectContentHandler
SelectObjectContentHandler()
Aws::S3Crt::Model::SelectObjectContentHandler::SetStatsEventCallback
void SetStatsEventCallback(const StatsEventCallback &callback)
Definition: SelectObjectContentHandler.h:49
Aws
Definition: AccessManagementClient.h:15
Aws::S3Crt::Model::ProgressEvent
Definition: ProgressEvent.h:32
Aws::Transfer::ErrorCallback
std::function< void(const TransferManager *, const std::shared_ptr< const TransferHandle > &, const Aws::Client::AWSError< Aws::S3::S3Errors > &)> ErrorCallback
Definition: TransferManager.h:30
Aws::S3Crt::Model::SelectObjectContentHandler::SetRecordsEventCallback
void SetRecordsEventCallback(const RecordsEventCallback &callback)
Definition: SelectObjectContentHandler.h:48
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
EventStreamHandler.h
Aws::S3Crt::Model::RecordsEvent
Definition: RecordsEvent.h:23
ProgressEvent.h
Aws::S3Crt::Model::SelectObjectContentHandler::operator=
SelectObjectContentHandler & operator=(const SelectObjectContentHandler &)=default
RecordsEvent.h
S3Crt_EXPORTS.h