NUGU SDK Linux  1.7.5
nugu_client.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_CLIENT_H__
18 #define __NUGU_CLIENT_H__
19 
20 #include <memory>
21 #include <string>
22 
27 
28 namespace NuguClientKit {
29 
42 class NuguClientImpl;
43 
48 class NuguClient {
49 public:
54  public:
61 
68 
73  bool construct();
74 
75  private:
76  friend class NuguClient;
77 
78  explicit CapabilityBuilder(NuguClientImpl* client_impl);
79  virtual ~CapabilityBuilder() = default;
80 
81  NuguClientImpl* client_impl = nullptr;
82  };
83 
84  NuguClient();
85  ~NuguClient();
86 
91  void setWakeupWord(const std::string& wakeup_word);
92 
98 
104  bool loadPlugins(const std::string& path = "");
105 
109  void unloadPlugins(void);
110 
114  bool initialize(void);
115 
119  void deInitialize(void);
120 
126 
132 
137  ICapabilityInterface* getCapabilityHandler(const std::string& cname);
138 
144 
150 
155 
160 
161 private:
162  std::unique_ptr<NuguClientImpl> impl;
163  CapabilityBuilder* cap_builder;
164 };
165 
170 } // NuguClientKit
171 
172 #endif /* __NUGU_CLIENT_H__ */
capability interface
Definition: capability_interface.hh:81
IDialogUXStateAggregatorListener interface.
Definition: dialog_ux_state_aggregator_interface.hh:54
IFocusManager.
Definition: focus_manager_interface.hh:126
network manager interface
Definition: network_manager_interface.hh:103
NuguCoreContainer interface.
Definition: nugu_core_container_interface.hh:43
SpeechRecognizerAggregator interface.
Definition: speech_recognizer_aggregator_interface.hh:99
CapabilityBuilder.
Definition: nugu_client.hh:53
CapabilityBuilder * add(ICapabilityInterface *cap_instance)
Add capability instance. It could create from CapabilityFactory or by self as inhering ICapabilityInt...
bool construct()
Construct with capabilities added to CapabilityBuilder.
CapabilityBuilder * setWakeupModel(const WakeupModelFile &model_file)
Set wakeup model file for composing SpeechRecognizerAggregator.
NUGU Client.
Definition: nugu_client.hh:48
INuguCoreContainer * getNuguCoreContainer()
Get NuguCoreContainer object.
CapabilityBuilder * getCapabilityBuilder()
Get CapabilityBuilder object.
bool loadPlugins(const std::string &path="")
Request NUGU SDK to load all plugins from directory. If this function is not called directly,...
void deInitialize(void)
Request NUGU SDK deinitialization.
void setWakeupWord(const std::string &wakeup_word)
Set wakeup word.
void removeDialogUXStateListener(IDialogUXStateAggregatorListener *listener)
Remove DialogUXStateAggregatorListener.
IFocusManager * getFocusManager()
Get instance of FocusManager.
void unloadPlugins(void)
Request NUGU SDK to unload all plugins.
void addDialogUXStateListener(IDialogUXStateAggregatorListener *listener)
Add DialogUXStateAggregatorListener.
INetworkManager * getNetworkManager()
Get NetworkManager object.
bool initialize(void)
Request NUGU SDK initialization.
ICapabilityInterface * getCapabilityHandler(const std::string &cname)
Get instance of CapabilityAgent.
ISpeechRecognizerAggregator * getSpeechRecognizerAggregator()
Get instance of SpeechRecognizerAggregator.
Model for holding Wakeup model file info.
Definition: wakeup_interface.hh:49