NUGU SDK Linux  1.7.5
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 
22 namespace NuguCapability {
23 
24 using namespace NuguClientKit;
25 
40 enum class MessageState {
44 };
45 
50 class IMessageListener : virtual public ICapabilityListener {
51 public:
52  virtual ~IMessageListener() = default;
53 
58  virtual void processSendCandidates(const std::string& payload) = 0;
59 
64  virtual void processSendMessage(const std::string& payload) = 0;
65 
70  virtual void processGetMessage(const std::string& payload) = 0;
71 
79  virtual void messageStateChanged(MessageState state, const std::string& received_time, const std::string& token, const std::string& dialog_id) = 0;
80 };
81 
86 class IMessageHandler : virtual public ICapabilityInterface {
87 public:
88  virtual ~IMessageHandler() = default;
89 
95  virtual void candidatesListed(const std::string& context_template, const std::string& payload) = 0;
96 
101  virtual void sendMessageSucceeded(const std::string& payload) = 0;
102 
107  virtual void sendMessageFailed(const std::string& payload) = 0;
108 
113  virtual void getMessageSucceeded(const std::string& payload) = 0;
114 
119  virtual void getMessageFailed(const std::string& payload) = 0;
120 };
121 
126 } // NuguCapability
127 
128 #endif /* __NUGU_MESSAGE_INTERFACE_H__ */
message handler interface
Definition: message_interface.hh:86
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:50
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:81
capability listener interface
Definition: capability_interface.hh:59
MessageState
MessageState.
Definition: message_interface.hh:40