Alexa Auto SDK  2.0.0
PhoneCallControllerEngineInterfaces.h
1 /*
2  * Copyright 2017-2019 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 
27 public:
28 
34  enum class ConnectionState {
35 
39  CONNECTED,
40 
45  };
46 
52  enum class CallState {
53 
61  IDLE,
62 
66  DIALING,
67 
71  OUTBOUND_RINGING,
72 
80  ACTIVE,
81 
85  CALL_RECEIVED,
86 
90  INBOUND_RINGING
91  };
92 
98 
106  DTMF_SUPPORTED
107  };
108 
114  enum class CallError {
115 
119  NO_CARRIER,
120 
125  BUSY,
126 
130  NO_ANSWER,
131 
135  NO_NUMBER_FOR_REDIAL,
136 
140  OTHER
141  };
142 
148  enum class DTMFError {
149 
153  CALL_NOT_IN_PROGRESS,
154 
158  DTMF_FAILED
159  };
160 
161  virtual void onConnectionStateChanged( ConnectionState state ) = 0;
162  virtual void onCallStateChanged ( CallState state, const std::string& callId, const std::string& callerId ) = 0;
163  virtual void onCallFailed( const std::string& callId, CallError code, const std::string& message ) = 0;
164  virtual void onCallerIdReceived( const std::string& callId, const std::string& callerId ) = 0;
165  virtual void onSendDTMFSucceeded( const std::string& callId) = 0;
166  virtual void onSendDTMFFailed( const std::string& callId, DTMFError code, const std::string& message ) = 0;
167  virtual void onDeviceConfigurationUpdated( std::unordered_map<PhoneCallControllerEngineInterface::CallingDeviceConfigurationProperty, bool> configurationMap ) = 0;
168  virtual std::string onCreateCallId() = 0;
169 };
170 
171 } // aace::phoneCallController
172 } // aace
173 
174 namespace std {
177  return hash<int>()(static_cast<int>(x));
178  }
179  };
180 }
181 
182 #endif
CallError
Definition: PhoneCallControllerEngineInterfaces.h:114
CallingDeviceConfigurationProperty
Definition: PhoneCallControllerEngineInterfaces.h:97
Definition: PhoneCallControllerEngineInterfaces.h:174
Definition: AddressBook.h:26
Definition: PhoneCallControllerEngineInterfaces.h:25
ConnectionState
Definition: PhoneCallControllerEngineInterfaces.h:34
CallState
Definition: PhoneCallControllerEngineInterfaces.h:52
DTMFError
Definition: PhoneCallControllerEngineInterfaces.h:148

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