AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MixingBehavior.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 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_MIXINGBEHAVIOR_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_MIXINGBEHAVIOR_H_
18 
19 #include <string>
20 
21 namespace alexaClientSDK {
22 namespace avsCommon {
23 namespace avs {
24 
25 enum class MixingBehavior {
27  PRIMARY,
28 
31  MAY_DUCK,
32 
34  MUST_PAUSE,
35 
37  MUST_STOP,
38 
40  UNDEFINED
41 };
42 
50  switch (behavior) {
52  return "PRIMARY";
54  return "MAY_DUCK";
56  return "MUST_PAUSE";
58  return "MUST_STOP";
60  return "UNDEFINED";
61  }
62  return "UNDEFINED";
63 }
64 
75  behavior = MixingBehavior::PRIMARY;
76  } else if (mixingBehaviorToString(MixingBehavior::MAY_DUCK) == input) {
77  behavior = MixingBehavior::MAY_DUCK;
79  behavior = MixingBehavior::MUST_PAUSE;
81  behavior = MixingBehavior::MUST_STOP;
82  }
83 
84  return behavior;
85 }
86 
94 inline std::ostream& operator<<(std::ostream& stream, const MixingBehavior& behavior) {
95  return stream << mixingBehaviorToString(behavior);
96 }
97 
98 } // namespace avs
99 } // namespace avsCommon
100 } // namespace alexaClientSDK
101 
102 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_MIXINGBEHAVIOR_H_
Indicates that the corresponding Activity must stop.
MixingBehavior
Definition: MixingBehavior.h:25
::std::string string
Definition: gtest-port.h:1097
Indicates that the corresponding ContentType was undefined/unitialized.
std::ostream & operator<<(std::ostream &stream, AlexaResponseType responseType)
Definition: AlexaResponseType.h:93
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Indicates that the corresponding Activity must pause.
Indicates that the corresponding Activity is the primary Activity on the AFML Channel.
MixingBehavior getMixingBehavior(const std::string &input)
Definition: MixingBehavior.h:72
std::string mixingBehaviorToString(MixingBehavior behavior)
Definition: MixingBehavior.h:49

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