NUGU SDK Linux  1.7.6
system_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_SYSTEM_INTERFACE_H__
18 #define __NUGU_SYSTEM_INTERFACE_H__
19 
21 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
41 enum class SystemException {
47 };
48 
52 enum class RevokeReason {
55 };
56 
61 class NUGU_API ISystemListener : virtual public ICapabilityListener {
62 public:
63  virtual ~ISystemListener() = default;
64 
70  virtual void onException(SystemException exception, const std::string& dialog_id) = 0;
71 
75  virtual void onTurnOff() = 0;
76 
81  virtual void onRevoke(RevokeReason reason) = 0;
82 
87  virtual void onNoDirective(const std::string& dialog_id) = 0;
88 };
89 
94 class NUGU_API ISystemHandler : virtual public ICapabilityInterface {
95 public:
96  virtual ~ISystemHandler() = default;
97 
101  virtual void synchronizeState() = 0;
102 
106  virtual void updateUserActivity() = 0;
107 };
108 
113 } // NuguCapability
114 
115 #endif /* __NUGU_SYSTEM_INTERFACE_H__ */
system handler interface
Definition: system_interface.hh:94
virtual void updateUserActivity()=0
Update a timer that measures the user's inactivity.
virtual void synchronizeState()=0
When the device is connected to NUGU Platform, all state information is delivered through the context...
system listener interface
Definition: system_interface.hh:61
virtual void onException(SystemException exception, const std::string &dialog_id)=0
Deliver the exception received from the server to the user.
virtual void onRevoke(RevokeReason reason)=0
Received a revoke request from the server.
virtual void onTurnOff()=0
Received a device turn off request from the server.
virtual void onNoDirective(const std::string &dialog_id)=0
Received a no directive from the server.
capability interface
Definition: capability_interface.hh:82
capability listener interface
Definition: capability_interface.hh:60
RevokeReason
RevokeReason.
Definition: system_interface.hh:52
SystemException
SystemException.
Definition: system_interface.hh:41