AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
StartCallAnalyticsStreamTranscriptionHandler.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/StartCallAnalyticsStreamTranscriptionInitialResponse.h>
14#include <aws/transcribestreaming/model/UtteranceEvent.h>
15#include <aws/transcribestreaming/model/CategoryEvent.h>
16
17namespace Aws
18{
19namespace TranscribeStreamingService
20{
21namespace Model
22{
24 {
29 };
30
32 {
33 typedef std::function<void(const StartCallAnalyticsStreamTranscriptionInitialResponse&)> StartCallAnalyticsStreamTranscriptionInitialResponseCallback;
34 typedef std::function<void(const StartCallAnalyticsStreamTranscriptionInitialResponse&, const Utils::Event::InitialResponseType)> StartCallAnalyticsStreamTranscriptionInitialResponseCallbackEx;
35 typedef std::function<void(const UtteranceEvent&)> UtteranceEventCallback;
36 typedef std::function<void(const CategoryEvent&)> CategoryEventCallback;
37 typedef std::function<void(const Aws::Client::AWSError<TranscribeStreamingServiceErrors>& error)> ErrorCallback;
38
39 public:
40 AWS_TRANSCRIBESTREAMINGSERVICE_API StartCallAnalyticsStreamTranscriptionHandler();
42
43 AWS_TRANSCRIBESTREAMINGSERVICE_API virtual void OnEvent() override;
44
46
52 inline void SetInitialResponseCallbackEx(const StartCallAnalyticsStreamTranscriptionInitialResponseCallbackEx& callback) { m_onInitialResponse = callback; }
56 inline void SetInitialResponseCallback(const StartCallAnalyticsStreamTranscriptionInitialResponseCallback& noArgCallback)
57 {
58 m_onInitialResponse = [noArgCallback](const StartCallAnalyticsStreamTranscriptionInitialResponse& rs, const Utils::Event::InitialResponseType) { return noArgCallback(rs); };
59 }
61 inline void SetUtteranceEventCallback(const UtteranceEventCallback& callback) { m_onUtteranceEvent = callback; }
62 inline void SetCategoryEventCallback(const CategoryEventCallback& callback) { m_onCategoryEvent = callback; }
63 inline void SetOnErrorCallback(const ErrorCallback& callback) { m_onError = callback; }
64
65 inline StartCallAnalyticsStreamTranscriptionInitialResponseCallbackEx& GetInitialResponseCallbackEx() { return m_onInitialResponse; }
66
67 private:
68 AWS_TRANSCRIBESTREAMINGSERVICE_API void HandleEventInMessage();
69 AWS_TRANSCRIBESTREAMINGSERVICE_API void HandleErrorInMessage();
70 AWS_TRANSCRIBESTREAMINGSERVICE_API void MarshallError(const Aws::String& errorCode, const Aws::String& errorMessage);
71
72 StartCallAnalyticsStreamTranscriptionInitialResponseCallbackEx m_onInitialResponse;
73 UtteranceEventCallback m_onUtteranceEvent;
74 CategoryEventCallback m_onCategoryEvent;
75 ErrorCallback m_onError;
76 };
77
78namespace StartCallAnalyticsStreamTranscriptionEventMapper
79{
81
83} // namespace StartCallAnalyticsStreamTranscriptionEventMapper
84} // namespace Model
85} // namespace TranscribeStreamingService
86} // namespace Aws
virtual AWS_TRANSCRIBESTREAMINGSERVICE_API void OnEvent() override
void SetInitialResponseCallbackEx(const StartCallAnalyticsStreamTranscriptionInitialResponseCallbackEx &callback)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartCallAnalyticsStreamTranscriptionHandler & operator=(const StartCallAnalyticsStreamTranscriptionHandler &)=default
void SetInitialResponseCallback(const StartCallAnalyticsStreamTranscriptionInitialResponseCallback &noArgCallback)
AWS_TRANSCRIBESTREAMINGSERVICE_API Aws::String GetNameForStartCallAnalyticsStreamTranscriptionEventType(StartCallAnalyticsStreamTranscriptionEventType value)
AWS_TRANSCRIBESTREAMINGSERVICE_API StartCallAnalyticsStreamTranscriptionEventType GetStartCallAnalyticsStreamTranscriptionEventTypeForName(const Aws::String &name)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String