NUGU SDK Linux  1.7.5
phone_call_interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 SK Telecom Co., Ltd. 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  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __NUGU_PHONE_CALL_INTERFACE_H__
18 #define __NUGU_PHONE_CALL_INTERFACE_H__
19 
21 
22 namespace NuguCapability {
23 
24 using namespace NuguClientKit;
25 
41 enum class PhoneCallState {
42  IDLE,
43  OUTGOING,
44  INCOMING,
46 };
47 
52 class IPhoneCallListener : virtual public ICapabilityListener {
53 public:
54  virtual ~IPhoneCallListener() = default;
55 
60  virtual void callStateChanged(PhoneCallState state) = 0;
61 
66  virtual void processSendCandidates(const std::string& payload) = 0;
67 
72  virtual void processMakeCall(const std::string& payload) = 0;
73 
78  virtual void processEndCall(const std::string& payload) = 0;
79 
84  virtual void processAcceptCall(const std::string& payload) = 0;
85 
90  virtual void processBlockIncomingCall(const std::string& payload) = 0;
91 
96  virtual void processBlockNumber(const std::string& payload) = 0;
97 };
98 
103 class IPhoneCallHandler : virtual public ICapabilityInterface {
104 public:
105  virtual ~IPhoneCallHandler() = default;
106 
112  virtual void candidatesListed(const std::string& context_template, const std::string& payload) = 0;
113 
118  virtual void callArrived(const std::string& payload) = 0;
119 
124  virtual void callEnded(const std::string& payload) = 0;
125 
130  virtual void callEstablished(const std::string& payload) = 0;
131 
136  virtual void makeCallSucceeded(const std::string& payload) = 0;
137 
142  virtual void makeCallFailed(const std::string& payload) = 0;
143 
148  virtual void setNumberBlockable(bool flag) = 0;
149 };
150 
155 } // NuguCapability
156 
157 #endif /* __NUGU_PHONE_CALL_INTERFACE_H__ */
phone call handler interface
Definition: phone_call_interface.hh:103
virtual void makeCallFailed(const std::string &payload)=0
The failed result of make call process.
virtual void makeCallSucceeded(const std::string &payload)=0
The succeeded result of make call process.
virtual void setNumberBlockable(bool flag)=0
Set whether numbers can be blocked.
virtual void callEnded(const std::string &payload)=0
Notify when call is ended.
virtual void callEstablished(const std::string &payload)=0
Notify when call is established.
virtual void callArrived(const std::string &payload)=0
Notify when call is arrived.
virtual void candidatesListed(const std::string &context_template, const std::string &payload)=0
The result of send candidates process.
phone call listener interface
Definition: phone_call_interface.hh:52
virtual void processMakeCall(const std::string &payload)=0
Process make call.
virtual void processEndCall(const std::string &payload)=0
Process end call.
virtual void callStateChanged(PhoneCallState state)=0
Report changes in the phone call state to the user.
virtual void processBlockIncomingCall(const std::string &payload)=0
Process block incoming call.
virtual void processSendCandidates(const std::string &payload)=0
Process send candidates.
virtual void processBlockNumber(const std::string &payload)=0
Process block number.
virtual void processAcceptCall(const std::string &payload)=0
Process accept call.
capability interface
Definition: capability_interface.hh:81
capability listener interface
Definition: capability_interface.hh:59
PhoneCallState
Phone call state.
Definition: phone_call_interface.hh:41