NUGU SDK Linux  1.7.6
message_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_MESSAGE_INTERFACE_H__
18 #define __NUGU_MESSAGE_INTERFACE_H__
19 
20 #include <clientkit/capability.hh>
21 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
41 enum class MessageState {
45 };
46 
51 class NUGU_API IMessageListener : virtual public ICapabilityListener {
52 public:
53  virtual ~IMessageListener() = default;
54 
59  virtual void processSendCandidates(const std::string& payload) = 0;
60 
65  virtual void processSendMessage(const std::string& payload) = 0;
66 
71  virtual void processGetMessage(const std::string& payload) = 0;
72 
80  virtual void messageStateChanged(MessageState state, const std::string& received_time, const std::string& token, const std::string& dialog_id) = 0;
81 };
82 
87 class NUGU_API IMessageHandler : virtual public ICapabilityInterface {
88 public:
89  virtual ~IMessageHandler() = default;
90 
96  virtual void candidatesListed(const std::string& context_template, const std::string& payload) = 0;
97 
102  virtual void sendMessageSucceeded(const std::string& payload) = 0;
103 
108  virtual void sendMessageFailed(const std::string& payload) = 0;
109 
114  virtual void getMessageSucceeded(const std::string& payload) = 0;
115 
120  virtual void getMessageFailed(const std::string& payload) = 0;
121 };
122 
127 } // NuguCapability
128 
129 #endif /* __NUGU_MESSAGE_INTERFACE_H__ */
message handler interface
Definition: message_interface.hh:87
virtual void sendMessageSucceeded(const std::string &payload)=0
The succeed result of send message process.
virtual void getMessageFailed(const std::string &payload)=0
The failed result of get message process.
virtual void candidatesListed(const std::string &context_template, const std::string &payload)=0
The result of send candidates process.
virtual void getMessageSucceeded(const std::string &payload)=0
The succeed result of get message process.
virtual void sendMessageFailed(const std::string &payload)=0
The failed result of send message process.
message listener interface
Definition: message_interface.hh:51
virtual void processSendCandidates(const std::string &payload)=0
Process send candidates.
virtual void processSendMessage(const std::string &payload)=0
Process send message.
virtual void processGetMessage(const std::string &payload)=0
Process get message.
virtual void messageStateChanged(MessageState state, const std::string &received_time, const std::string &token, const std::string &dialog_id)=0
Report changes in the speech state to the user.
capability interface
Definition: capability_interface.hh:82
capability listener interface
Definition: capability_interface.hh:60
MessageState
MessageState.
Definition: message_interface.hh:41