AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
FocusState.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_FOCUSSTATE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_FOCUSSTATE_H_
18 
19 #include <sstream>
20 #include <string>
21 
22 namespace alexaClientSDK {
23 namespace avsCommon {
24 namespace avs {
25 
29 enum class FocusState {
31  FOREGROUND,
32 
34  BACKGROUND,
35 
37  NONE
38 };
39 
46 inline std::string focusStateToString(FocusState state) {
47  switch (state) {
49  return "FOREGROUND";
51  return "BACKGROUND";
52  case FocusState::NONE:
53  return "NONE";
54  }
55  return "Unknown State";
56 }
57 
65 inline std::ostream& operator<<(std::ostream& stream, const FocusState& state) {
66  return stream << focusStateToString(state);
67 }
68 
69 } // namespace avs
70 } // namespace avsCommon
71 } // namespace alexaClientSDK
72 
73 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_FOCUSSTATE_H_
Represents the highest focus a Channel can have.
FocusState
Definition: FocusState.h:29
This focus is used to represent when a Channel is not being used or when an observer should stop...
std::ostream & operator<<(std::ostream &stream, AlexaResponseType responseType)
Definition: AlexaResponseType.h:93
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Represents the intermediate level focus a Channel can have.
std::string focusStateToString(FocusState state)
Definition: FocusState.h:46

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