NUGU SDK Linux  1.7.6
chips_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_CHIPS_INTERFACE_H__
18 #define __NUGU_CHIPS_INTERFACE_H__
19 
21 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
41 enum class ChipsTarget {
42  DM,
43  LISTEN,
44  SPEAKING
45 };
46 
50 enum class ChipsType {
51  NUDGE,
52  ACTION,
53  GENERAL
54 };
55 
60 typedef struct _ChipsInfo {
61  struct Content {
63  std::string text;
64  std::string token;
65  };
66 
67  std::string play_service_id;
69  std::vector<Content> contents;
71 
76 class NUGU_API IChipsListener : virtual public ICapabilityListener {
77 public:
78  virtual ~IChipsListener() = default;
79 
84  virtual void onReceiveRender(const ChipsInfo& chips_info) = 0;
85 };
86 
91 class NUGU_API IChipsHandler : virtual public ICapabilityInterface {
92 public:
93  virtual ~IChipsHandler() = default;
94 
99  virtual void addListener(IChipsListener* listener) = 0;
100 
105  virtual void removeListener(IChipsListener* listener) = 0;
106 };
107 
112 } // NuguCapability
113 
114 #endif /* __NUGU_CHIPS_INTERFACE_H__ */
chips handler interface
Definition: chips_interface.hh:91
virtual void addListener(IChipsListener *listener)=0
Add the IChipsListener object.
virtual void removeListener(IChipsListener *listener)=0
Remove the IChipsListener object.
chips listener interface
Definition: chips_interface.hh:76
virtual void onReceiveRender(const ChipsInfo &chips_info)=0
Notified when receiving Render directive from server.
capability interface
Definition: capability_interface.hh:82
capability listener interface
Definition: capability_interface.hh:60
ChipsType
Chips Type.
Definition: chips_interface.hh:50
ChipsTarget
Chips Target.
Definition: chips_interface.hh:41
struct NuguCapability::_ChipsInfo ChipsInfo
Model for holding chips Info.
Definition: chips_interface.hh:61
std::string text
Definition: chips_interface.hh:63
ChipsType type
Definition: chips_interface.hh:62
std::string token
Definition: chips_interface.hh:64
Model for holding chips Info.
Definition: chips_interface.hh:60
std::vector< Content > contents
Definition: chips_interface.hh:69
std::string play_service_id
Definition: chips_interface.hh:67
ChipsTarget target
Definition: chips_interface.hh:68