NUGU SDK Linux  1.7.6
nugu_runner.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_RUNNER_H__
18 #define __NUGU_RUNNER_H__
19 
20 #include <functional>
21 #include <memory>
22 #include <string>
23 
24 #include <nugu.h>
25 
26 namespace NuguClientKit {
27 
40 struct NUGU_API NuguRunnerPrivate;
41 
45 enum class ExecuteType {
46  Auto,
47  Queued,
48  Blocking
49 };
50 
54 class NUGU_API NuguRunner {
55 public:
59  typedef std::function<void()> request_method;
60 
61 public:
62  NuguRunner();
63  virtual ~NuguRunner();
64 
73  bool invokeMethod(const std::string& tag, request_method method, ExecuteType type = ExecuteType::Auto, int timeout = 0);
74 
75 private:
76  std::unique_ptr<NuguRunnerPrivate> priv;
77 };
78 
79 } // NuguClientKit
80 
81 #endif // __NUGU_RUNNER_H__
NuguRunner.
Definition: nugu_runner.hh:54
std::function< void()> request_method
The request method callback.
Definition: nugu_runner.hh:59
ExecuteType
ExecuteType.
Definition: nugu_runner.hh:45
bool invokeMethod(const std::string &tag, request_method method, ExecuteType type=ExecuteType::Auto, int timeout=0)
Request to execute method on nugu loop.