AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
CallStateObserverInterface.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_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_CALLSTATEOBSERVERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_CALLSTATEOBSERVERINTERFACE_H_
18 
19 #include <iostream>
20 
21 namespace alexaClientSDK {
22 namespace avsCommon {
23 namespace sdkInterfaces {
24 
29 public:
31  enum class CallState {
33  CONNECTING,
41  NONE
42  };
43 
45  typedef struct CallStateInfo {
71  bool isDropIn;
72  } CallStateInfo;
73 
77  virtual ~CallStateObserverInterface() = default;
78 
84  virtual void onCallStateChange(CallState state) = 0;
85 
91  virtual void onCallStateInfoChange(const CallStateInfo& stateInfo);
92 
103  static bool isStateActive(const CallStateObserverInterface::CallState& state);
104 };
105 
113 inline std::ostream& operator<<(std::ostream& stream, const CallStateObserverInterface::CallState& state) {
114  switch (state) {
116  stream << "CONNECTING";
117  return stream;
119  stream << "INBOUND_RINGING";
120  return stream;
122  stream << "CALL_CONNECTED";
123  return stream;
125  stream << "CALL_DISCONNECTED";
126  return stream;
128  stream << "NONE";
129  return stream;
130  }
131  return stream << "UNKNOWN STATE";
132 }
133 
135  switch (state) {
139  return true;
142  return false;
143  }
144  return false;
145 }
146 
149  return;
150 }
151 
152 } // namespace sdkInterfaces
153 } // namespace avsCommon
154 } // namespace alexaClientSDK
155 
156 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_CALLSTATEOBSERVERINTERFACE_H_
std::string outboundRingbackUrl
Outbound ringtone url.
Definition: CallStateObserverInterface.h:69
std::ostream & operator<<(std::ostream &stream, const AudioInputProcessorObserverInterface::State &state)
Definition: AudioInputProcessorObserverInterface.h:94
virtual void onCallStateInfoChange(const CallStateInfo &stateInfo)
Definition: CallStateObserverInterface.h:147
std::string callType
The type of the call.
Definition: CallStateObserverInterface.h:49
std::string endpointLabel
Information about the endpoint of the contact.
Definition: CallStateObserverInterface.h:57
std::string displayName
Contact name to be displayed.
Definition: CallStateObserverInterface.h:55
::std::string string
Definition: gtest-port.h:1097
CallState callState
An enum representing the state of a call.
Definition: CallStateObserverInterface.h:47
std::string callProviderType
Textual description of exact call provider type.
Definition: CallStateObserverInterface.h:61
static bool isStateActive(const CallStateObserverInterface::CallState &state)
Definition: CallStateObserverInterface.h:134
std::string currentSipUserAgentState
Current sipUserAgent state.
Definition: CallStateObserverInterface.h:53
CallState
An enumeration representing the state of a call.
Definition: CallStateObserverInterface.h:31
An struct containing call state information.
Definition: CallStateObserverInterface.h:45
std::string inboundCalleeName
Name of callee for whom incoming call is intended.
Definition: CallStateObserverInterface.h:59
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool isDropIn
This indicates if it&#39;s a drop in call or not.
Definition: CallStateObserverInterface.h:71
std::string inboundRingtoneUrl
Inbound ringtone url.
Definition: CallStateObserverInterface.h:67
struct alexaClientSDK::avsCommon::sdkInterfaces::CallStateObserverInterface::CallStateInfo CallStateInfo
An struct containing call state information.
std::string previousSipUserAgentState
Previous sipUserAgent state.
Definition: CallStateObserverInterface.h:51
std::string callProviderImageUrl
Definition: CallStateObserverInterface.h:65

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