AWS SDK for C++  1.8.182
AWS SDK for C++
StartStreamTranscriptionHandler.h
Go to the documentation of this file.
1 
6 #pragma once
12 
14 
15 namespace Aws
16 {
17 namespace TranscribeStreamingService
18 {
19 namespace Model
20 {
22  {
23  TRANSCRIPTEVENT,
24  UNKNOWN
25  };
26 
28  {
29  typedef std::function<void(const TranscriptEvent&)> TranscriptEventCallback;
30  typedef std::function<void(const Aws::Client::AWSError<TranscribeStreamingServiceErrors>& error)> ErrorCallback;
31 
32  public:
35 
36  virtual void OnEvent() override;
37 
38  inline void SetTranscriptEventCallback(const TranscriptEventCallback& callback) { m_onTranscriptEvent = 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  TranscriptEventCallback m_onTranscriptEvent;
47  ErrorCallback m_onError;
48  };
49 
50 namespace StartStreamTranscriptionEventMapper
51 {
53 
55 } // namespace StartStreamTranscriptionEventMapper
56 } // namespace Model
57 } // namespace TranscribeStreamingService
58 } // namespace Aws
Aws::TranscribeStreamingService::Model::TranscriptEvent
Definition: TranscriptEvent.h:34
AWS_TRANSCRIBESTREAMINGSERVICE_API
#define AWS_TRANSCRIBESTREAMINGSERVICE_API
Definition: TranscribeStreamingService_EXPORTS.h:28
AWSError.h
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler::operator=
StartStreamTranscriptionHandler & operator=(const StartStreamTranscriptionHandler &)=default
HashingUtils.h
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionEventMapper::GetNameForStartStreamTranscriptionEventType
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String GetNameForStartStreamTranscriptionEventType(StartStreamTranscriptionEventType value)
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler::StartStreamTranscriptionHandler
StartStreamTranscriptionHandler()
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler
Definition: StartStreamTranscriptionHandler.h:28
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler::SetTranscriptEventCallback
void SetTranscriptEventCallback(const TranscriptEventCallback &callback)
Definition: StartStreamTranscriptionHandler.h:38
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionEventType
StartStreamTranscriptionEventType
Definition: StartStreamTranscriptionHandler.h:22
Aws::Utils::Event::EventStreamHandler
Definition: EventStreamHandler.h:29
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler::OnEvent
virtual void OnEvent() override
TranscriptEvent.h
TranscribeStreamingService_EXPORTS.h
Aws::Client::AWSError< TranscribeStreamingServiceErrors >
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionHandler::SetOnErrorCallback
void SetOnErrorCallback(const ErrorCallback &callback)
Definition: StartStreamTranscriptionHandler.h:39
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionEventType::UNKNOWN
@ UNKNOWN
Aws
Definition: AccessManagementClient.h:15
Aws::TranscribeStreamingService::Model::StartStreamTranscriptionEventMapper::GetStartStreamTranscriptionEventTypeForName
AWS_TRANSCRIBESTREAMINGSERVICE_API StartStreamTranscriptionEventType GetStartStreamTranscriptionEventTypeForName(const Aws::String &name)
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
TranscribeStreamingServiceErrors.h