AWS SDK for C++  1.9.104
AWS SDK for C++
SubscribeToShardHandler.h
Go to the documentation of this file.
1 
6 #pragma once
12 
14 
15 namespace Aws
16 {
17 namespace Kinesis
18 {
19 namespace Model
20 {
22  {
23  SUBSCRIBETOSHARDEVENT,
24  UNKNOWN
25  };
26 
28  {
29  typedef std::function<void(const SubscribeToShardEvent&)> SubscribeToShardEventCallback;
30  typedef std::function<void(const Aws::Client::AWSError<KinesisErrors>& error)> ErrorCallback;
31 
32  public:
35 
36  virtual void OnEvent() override;
37 
38  inline void SetSubscribeToShardEventCallback(const SubscribeToShardEventCallback& callback) { m_onSubscribeToShardEvent = callback; }
39  inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
40 
41  private:
42  void HandleEventInMessage();
43  void HandleErrorInMessage();
44  void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
45 
46  SubscribeToShardEventCallback m_onSubscribeToShardEvent;
47  ErrorCallback m_onError;
48  };
49 
50 namespace SubscribeToShardEventMapper
51 {
53 
55 } // namespace SubscribeToShardEventMapper
56 } // namespace Model
57 } // namespace Kinesis
58 } // namespace Aws
Aws::Kinesis::Model::SubscribeToShardHandler::OnEvent
virtual void OnEvent() override
Aws::Kinesis::Model::SubscribeToShardHandler::SetSubscribeToShardEventCallback
void SetSubscribeToShardEventCallback(const SubscribeToShardEventCallback &callback)
Definition: SubscribeToShardHandler.h:38
KinesisErrors.h
Aws::Kinesis::Model::SubscribeToShardEvent
Definition: SubscribeToShardEvent.h:37
AWSError.h
HashingUtils.h
Aws::Kinesis::Model::SubscribeToShardEventType::UNKNOWN
@ UNKNOWN
Aws::Kinesis::Model::SubscribeToShardHandler
Definition: SubscribeToShardHandler.h:28
AWS_KINESIS_API
#define AWS_KINESIS_API
Definition: Kinesis_EXPORTS.h:28
Aws::Kinesis::Model::SubscribeToShardHandler::SubscribeToShardHandler
SubscribeToShardHandler()
Aws::Kinesis::Model::SubscribeToShardEventMapper::GetSubscribeToShardEventTypeForName
AWS_KINESIS_API SubscribeToShardEventType GetSubscribeToShardEventTypeForName(const Aws::String &name)
Aws::Utils::Event::EventStreamHandler
Definition: EventStreamHandler.h:29
Aws::Kinesis::Model::SubscribeToShardHandler::SetOnErrorCallback
void SetOnErrorCallback(const ErrorCallback &callback)
Definition: SubscribeToShardHandler.h:39
Aws::Client::AWSError< KinesisErrors >
SubscribeToShardEvent.h
Kinesis_EXPORTS.h
Aws::Kinesis::Model::SubscribeToShardEventType
SubscribeToShardEventType
Definition: SubscribeToShardHandler.h:22
Aws
Definition: AccessManagementClient.h:15
Aws::Kinesis::Model::SubscribeToShardEventMapper::GetNameForSubscribeToShardEventType
AWS_KINESIS_API Aws::String GetNameForSubscribeToShardEventType(SubscribeToShardEventType value)
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::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
EventStreamHandler.h
Aws::Kinesis::Model::SubscribeToShardHandler::operator=
SubscribeToShardHandler & operator=(const SubscribeToShardHandler &)=default