NUGU SDK Linux  1.7.6
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 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
42 enum class PhoneCallState {
43  IDLE,
44  OUTGOING,
45  INCOMING,
47 };
48 
53 class NUGU_API IPhoneCallListener : virtual public ICapabilityListener {
54 public:
55  virtual ~IPhoneCallListener() = default;
56 
61  virtual void callStateChanged(PhoneCallState state) = 0;
62 
67  virtual void processSendCandidates(const std::string& payload) = 0;
68 
73  virtual void processMakeCall(const std::string& payload) = 0;
74 
79  virtual void processEndCall(const std::string& payload) = 0;
80 
85  virtual void processAcceptCall(const std::string& payload) = 0;
86 
91  virtual void processBlockIncomingCall(const std::string& payload) = 0;
92 
97  virtual void processBlockNumber(const std::string& payload) = 0;
98 };
99 
104 class NUGU_API IPhoneCallHandler : virtual public ICapabilityInterface {
105 public:
106  virtual ~IPhoneCallHandler() = default;
107 
113  virtual void candidatesListed(const std::string& context_template, const std::string& payload) = 0;
114 
119  virtual void callArrived(const std::string& payload) = 0;
120 
125  virtual void callEnded(const std::string& payload) = 0;
126 
131  virtual void callEstablished(const std::string& payload) = 0;
132 
137  virtual void makeCallSucceeded(const std::string& payload) = 0;
138 
143  virtual void makeCallFailed(const std::string& payload) = 0;
144 
149  virtual void setNumberBlockable(bool flag) = 0;
150 };
151 
156 } // NuguCapability
157 
158 #endif /* __NUGU_PHONE_CALL_INTERFACE_H__ */
phone call handler interface
Definition: phone_call_interface.hh:104
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:53
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:82
capability listener interface
Definition: capability_interface.hh:60
PhoneCallState
Phone call state.
Definition: phone_call_interface.hh:42