NUGU SDK Linux  1.7.6
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 #include <nugu.h>
28 
29 namespace NuguClientKit {
30 
43 class NUGU_API NuguClientImpl;
44 
49 class NUGU_API NuguClient {
50 public:
54  class NUGU_API CapabilityBuilder {
55  public:
62 
69 
74  bool construct();
75 
76  private:
77  friend class NuguClient;
78 
79  explicit CapabilityBuilder(NuguClientImpl* client_impl);
80  virtual ~CapabilityBuilder() = default;
81 
82  NuguClientImpl* client_impl = nullptr;
83  };
84 
85  NuguClient();
86  ~NuguClient();
87 
92  void setWakeupWord(const std::string& wakeup_word);
93 
99 
105  bool loadPlugins(const std::string& path = "");
106 
110  void unloadPlugins(void);
111 
115  bool initialize(void);
116 
120  void deInitialize(void);
121 
127 
133 
138  ICapabilityInterface* getCapabilityHandler(const std::string& cname);
139 
145 
151 
156 
161 
162 private:
163  std::unique_ptr<NuguClientImpl> impl;
164  CapabilityBuilder* cap_builder;
165 };
166 
171 } // NuguClientKit
172 
173 #endif /* __NUGU_CLIENT_H__ */
capability interface
Definition: capability_interface.hh:82
IDialogUXStateAggregatorListener interface.
Definition: dialog_ux_state_aggregator_interface.hh:55
IFocusManager.
Definition: focus_manager_interface.hh:128
network manager interface
Definition: network_manager_interface.hh:105
NuguCoreContainer interface.
Definition: nugu_core_container_interface.hh:44
SpeechRecognizerAggregator interface.
Definition: speech_recognizer_aggregator_interface.hh:100
CapabilityBuilder.
Definition: nugu_client.hh:54
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:49
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:51