AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
DialogUXStateObserverInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
17 
18 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_DIALOGUXSTATEOBSERVERINTERFACE_H_
19 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_DIALOGUXSTATEOBSERVERINTERFACE_H_
20 
21 #include <ostream>
22 #include <string>
23 
24 namespace alexaClientSDK {
25 namespace avsCommon {
26 namespace sdkInterfaces {
27 
30 public:
32  enum class DialogUXState {
34  IDLE,
35 
37  LISTENING,
38 
40  EXPECTING,
41 
46  THINKING,
47 
49  SPEAKING,
50 
57  FINISHED
58  };
59 
63  virtual ~DialogUXStateObserverInterface() = default;
64 
71  virtual void onDialogUXStateChanged(DialogUXState newState) = 0;
72 
80 };
81 
83  switch (state) {
85  return "IDLE";
87  return "LISTENING";
89  return "EXPECTING";
91  return "THINKING";
93  return "SPEAKING";
95  return "FINISHED";
96  }
97  return "Unknown State";
98 }
99 
107 inline std::ostream& operator<<(std::ostream& stream, const DialogUXStateObserverInterface::DialogUXState& state) {
108  return stream << DialogUXStateObserverInterface::stateToString(state);
109 }
110 
111 } // namespace sdkInterfaces
112 } // namespace avsCommon
113 } // namespace alexaClientSDK
114 
115 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_DIALOGUXSTATEOBSERVERINTERFACE_H_
std::ostream & operator<<(std::ostream &stream, const AudioInputProcessorObserverInterface::State &state)
Definition: AudioInputProcessorObserverInterface.h:94
::std::string string
Definition: gtest-port.h:1097
static std::string stateToString(DialogUXState state)
Definition: DialogUXStateObserverInterface.h:82
DialogUXState
The different dialog specific AVS UX states.
Definition: DialogUXStateObserverInterface.h:32
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
A dialog specific UX state observer.
Definition: DialogUXStateObserverInterface.h:29

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0