NUGU SDK Linux  1.7.6
extension_interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 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_EXTENSION_INTERFACE_H__
18 #define __NUGU_EXTENSION_INTERFACE_H__
19 
21 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
42 class NUGU_API IExtensionListener : virtual public ICapabilityListener {
43 public:
44  virtual ~IExtensionListener() = default;
45 
52  virtual void receiveAction(const std::string& data, const std::string& ps_id, const std::string& dialog_id) = 0;
53 
58  virtual void requestContext(std::string& context_info) = 0;
59 };
60 
65 class NUGU_API IExtensionHandler : virtual public ICapabilityInterface {
66 public:
67  virtual ~IExtensionHandler() = default;
68 
72  virtual void actionSucceeded() = 0;
73 
77  virtual void actionFailed() = 0;
78 
84  virtual void commandIssued(const std::string& ps_id, const std::string& data) = 0;
85 };
86 
91 } // NuguCapability
92 
93 #endif /* __NUGU_EXTENSION_INTERFACE_H__ */
extension handler interface
Definition: extension_interface.hh:65
virtual void actionSucceeded()=0
Call if handling action succeed.
virtual void actionFailed()=0
Call if handling action fail.
virtual void commandIssued(const std::string &ps_id, const std::string &data)=0
Request the specific command to Play.
extension listener interface
Definition: extension_interface.hh:42
virtual void receiveAction(const std::string &data, const std::string &ps_id, const std::string &dialog_id)=0
Notified when receiving Action directive from server.
virtual void requestContext(std::string &context_info)=0
Request context information for extension context.
capability interface
Definition: capability_interface.hh:82
capability listener interface
Definition: capability_interface.hh:60