Alexa Auto SDK  2.0.0
PhoneCallController.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_H
17 #define AACE_PHONECALLCONTROLLER_PHONECALLCONTROLLER_H
18 
19 #include <string>
20 #include <unordered_map>
21 
22 #include "AACE/Core/PlatformInterface.h"
23 #include "PhoneCallControllerEngineInterfaces.h"
24 
27 namespace aace {
28 namespace phoneCallController {
29 
40 protected:
41  PhoneCallController() = default;
42 
43 public:
44 
49 
54 
59 
64 
69 
70  virtual ~PhoneCallController();
71 
108  virtual bool dial( const std::string& payload ) = 0;
109 
127  virtual bool redial( const std::string& payload ) = 0;
128 
141  virtual void answer( const std::string& payload ) = 0;
142 
155  virtual void stop( const std::string& payload ) = 0;
156 
171  virtual void sendDTMF( const std::string& payload ) = 0;
172 
179 
187  void callStateChanged( CallState state, const std::string& callId, const std::string& callerId = "" );
188 
196  void callFailed( const std::string& callId, CallError code, const std::string& message = "" );
197 
204  void callerIdReceived( const std::string& callId, const std::string& callerId );
205 
213  void sendDTMFSucceeded( const std::string& callId );
214 
224  void sendDTMFFailed( const std::string& callId, DTMFError code, const std::string& message = "" );
225 
236  void deviceConfigurationUpdated( std::unordered_map<CallingDeviceConfigurationProperty, bool> configurationMap );
237 
241  std::string createCallId();
242 
249  void setEngineInterface( std::shared_ptr<PhoneCallControllerEngineInterface> phoneCallControllerEngineInterface );
250 
251 private:
252  std::shared_ptr<PhoneCallControllerEngineInterface> m_phoneCallControllerEngineInterface;
253 };
254 
255 } // aace::phoneCallController
256 } // aace
257 
258 #endif
void deviceConfigurationUpdated(std::unordered_map< CallingDeviceConfigurationProperty, bool > configurationMap)
Definition: PhoneCallController.cpp:56
std::string createCallId()
Definition: PhoneCallController.cpp:62
CallError
Definition: PhoneCallControllerEngineInterfaces.h:114
void callFailed(const std::string &callId, CallError code, const std::string &message="")
Definition: PhoneCallController.cpp:33
CallingDeviceConfigurationProperty
Definition: PhoneCallControllerEngineInterfaces.h:97
Definition: PlatformInterface.h:29
virtual void answer(const std::string &payload)=0
Definition: AddressBook.h:26
void callStateChanged(CallState state, const std::string &callId, const std::string &callerId="")
Definition: PhoneCallController.cpp:27
ConnectionState
Definition: PhoneCallControllerEngineInterfaces.h:34
virtual void stop(const std::string &payload)=0
Definition: PhoneCallController.h:39
void sendDTMFSucceeded(const std::string &callId)
Definition: PhoneCallController.cpp:45
void sendDTMFFailed(const std::string &callId, DTMFError code, const std::string &message="")
Definition: PhoneCallController.cpp:50
void connectionStateChanged(ConnectionState state)
Definition: PhoneCallController.cpp:21
virtual bool redial(const std::string &payload)=0
CallState
Definition: PhoneCallControllerEngineInterfaces.h:52
virtual bool dial(const std::string &payload)=0
void callerIdReceived(const std::string &callId, const std::string &callerId)
Definition: PhoneCallController.cpp:39
virtual void sendDTMF(const std::string &payload)=0
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