NUGU SDK Linux  1.7.5
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 
22 namespace NuguCapability {
23 
24 using namespace NuguClientKit;
25 
40 enum class ChipsTarget {
41  DM,
42  LISTEN,
43  SPEAKING
44 };
45 
49 enum class ChipsType {
50  NUDGE,
51  ACTION,
52  GENERAL
53 };
54 
59 typedef struct _ChipsInfo {
60  struct Content {
62  std::string text;
63  std::string token;
64  };
65 
66  std::string play_service_id;
68  std::vector<Content> contents;
70 
75 class IChipsListener : virtual public ICapabilityListener {
76 public:
77  virtual ~IChipsListener() = default;
78 
83  virtual void onReceiveRender(const ChipsInfo& chips_info) = 0;
84 };
85 
90 class IChipsHandler : virtual public ICapabilityInterface {
91 public:
92  virtual ~IChipsHandler() = default;
93 
98  virtual void addListener(IChipsListener* listener) = 0;
99 
104  virtual void removeListener(IChipsListener* listener) = 0;
105 };
106 
111 } // NuguCapability
112 
113 #endif /* __NUGU_CHIPS_INTERFACE_H__ */
chips handler interface
Definition: chips_interface.hh:90
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:75
virtual void onReceiveRender(const ChipsInfo &chips_info)=0
Notified when receiving Render directive from server.
capability interface
Definition: capability_interface.hh:81
capability listener interface
Definition: capability_interface.hh:59
ChipsType
Chips Type.
Definition: chips_interface.hh:49
ChipsTarget
Chips Target.
Definition: chips_interface.hh:40
struct NuguCapability::_ChipsInfo ChipsInfo
Model for holding chips Info.
Definition: chips_interface.hh:60
std::string text
Definition: chips_interface.hh:62
ChipsType type
Definition: chips_interface.hh:61
std::string token
Definition: chips_interface.hh:63
Model for holding chips Info.
Definition: chips_interface.hh:59
std::vector< Content > contents
Definition: chips_interface.hh:68
std::string play_service_id
Definition: chips_interface.hh:66
ChipsTarget target
Definition: chips_interface.hh:67