Alexa Auto SDK  2.3.1
PhoneCallControllerEngineInterfaces.h
1 /*
2  * Copyright 2017-2020 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 AACE_PHONECALLCONTROLLER_PHONECALLCONTROLLER_ENGINE_INTERFACE_H
17 #define AACE_PHONECALLCONTROLLER_PHONECALLCONTROLLER_ENGINE_INTERFACE_H
18 
19 namespace aace {
20 namespace phoneCallController {
21 
26 public:
32  enum class ConnectionState {
33 
37  CONNECTED,
38 
43  };
44 
50  enum class CallState {
51 
59  IDLE,
60 
64  DIALING,
65 
69  OUTBOUND_RINGING,
70 
78  ACTIVE,
79 
83  CALL_RECEIVED,
84 
88  INBOUND_RINGING
89  };
90 
96 
104  DTMF_SUPPORTED
105  };
106 
112  enum class CallError {
113 
117  NO_CARRIER,
118 
123  BUSY,
124 
128  NO_ANSWER,
129 
133  NO_NUMBER_FOR_REDIAL,
134 
138  OTHER
139  };
140 
146  enum class DTMFError {
147 
151  CALL_NOT_IN_PROGRESS,
152 
156  DTMF_FAILED
157  };
158 
159  virtual void onConnectionStateChanged(ConnectionState state) = 0;
160  virtual void onCallStateChanged(CallState state, const std::string& callId, const std::string& callerId) = 0;
161  virtual void onCallFailed(const std::string& callId, CallError code, const std::string& message) = 0;
162  virtual void onCallerIdReceived(const std::string& callId, const std::string& callerId) = 0;
163  virtual void onSendDTMFSucceeded(const std::string& callId) = 0;
164  virtual void onSendDTMFFailed(const std::string& callId, DTMFError code, const std::string& message) = 0;
165  virtual void onDeviceConfigurationUpdated(
166  std::unordered_map<PhoneCallControllerEngineInterface::CallingDeviceConfigurationProperty, bool>
167  configurationMap) = 0;
168  virtual std::string onCreateCallId() = 0;
169 };
170 
171 } // namespace phoneCallController
172 } // namespace aace
173 
174 namespace std {
175 template <>
177  size_t operator()(
179  return hash<int>()(static_cast<int>(x));
180  }
181 };
182 } // namespace std
183 
184 #endif
CallError
Definition: PhoneCallControllerEngineInterfaces.h:112
CallingDeviceConfigurationProperty
Definition: PhoneCallControllerEngineInterfaces.h:95
Definition: PhoneCallControllerEngineInterfaces.h:174
Definition: AddressBook.h:26
Definition: PhoneCallControllerEngineInterfaces.h:25
ConnectionState
Definition: PhoneCallControllerEngineInterfaces.h:32
CallState
Definition: PhoneCallControllerEngineInterfaces.h:50
DTMFError
Definition: PhoneCallControllerEngineInterfaces.h:146

Alexa Auto SDK 2.3.1 - Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0