AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
StartMedicalStreamTranscriptionHandler.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/transcribestreaming/TranscribeStreamingService_EXPORTS.h>
11#include <aws/transcribestreaming/TranscribeStreamingServiceErrors.h>
12
13#include <aws/transcribestreaming/model/StartMedicalStreamTranscriptionInitialResponse.h>
14#include <aws/transcribestreaming/model/MedicalTranscriptEvent.h>
15
16namespace Aws
17{
18namespace TranscribeStreamingService
19{
20namespace Model
21{
23 {
27 };
28
30 {
31 typedef std::function<void(const StartMedicalStreamTranscriptionInitialResponse&)> StartMedicalStreamTranscriptionInitialResponseCallback;
32 typedef std::function<void(const StartMedicalStreamTranscriptionInitialResponse&, const Utils::Event::InitialResponseType)> StartMedicalStreamTranscriptionInitialResponseCallbackEx;
33 typedef std::function<void(const MedicalTranscriptEvent&)> MedicalTranscriptEventCallback;
34 typedef std::function<void(const Aws::Client::AWSError<TranscribeStreamingServiceErrors>& error)> ErrorCallback;
35
36 public:
37 AWS_TRANSCRIBESTREAMINGSERVICE_API StartMedicalStreamTranscriptionHandler();
39
40 AWS_TRANSCRIBESTREAMINGSERVICE_API virtual void OnEvent() override;
41
43
49 inline void SetInitialResponseCallbackEx(const StartMedicalStreamTranscriptionInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
53 inline void SetInitialResponseCallback(const StartMedicalStreamTranscriptionInitialResponseCallback& noArgCallback)
54 {
55 m_onInitialResponse = [noArgCallback](const StartMedicalStreamTranscriptionInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
56 }
58 inline void SetMedicalTranscriptEventCallback(const MedicalTranscriptEventCallback& callback) { m_onMedicalTranscriptEvent = callback; }
59 inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
60
61 inline StartMedicalStreamTranscriptionInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }
62
63 private:
64 AWS_TRANSCRIBESTREAMINGSERVICE_API void HandleEventInMessage();
65 AWS_TRANSCRIBESTREAMINGSERVICE_API void HandleErrorInMessage();
66 AWS_TRANSCRIBESTREAMINGSERVICE_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
67
68 StartMedicalStreamTranscriptionInitialResponseCallbackEx m_onInitialResponse;
69 MedicalTranscriptEventCallback m_onMedicalTranscriptEvent;
70 ErrorCallback m_onError;
71 };
72
73namespace StartMedicalStreamTranscriptionEventMapper
74{
76
78} // namespace StartMedicalStreamTranscriptionEventMapper
79} // namespace Model
80} // namespace TranscribeStreamingService
81} // namespace Aws
AWS_TRANSCRIBESTREAMINGSERVICE_API StartMedicalStreamTranscriptionHandler & operator=(const StartMedicalStreamTranscriptionHandler &)=default
virtual AWS_TRANSCRIBESTREAMINGSERVICE_API void OnEvent() override
void SetInitialResponseCallbackEx(const StartMedicalStreamTranscriptionInitialResponseCallbackEx &callback)
void SetInitialResponseCallback(const StartMedicalStreamTranscriptionInitialResponseCallback &noArgCallback)
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String GetNameForStartMedicalStreamTranscriptionEventType(StartMedicalStreamTranscriptionEventType value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartMedicalStreamTranscriptionEventType GetStartMedicalStreamTranscriptionEventTypeForName(const Aws::String &name)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String