NUGU SDK Linux  1.7.5
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 
22 namespace NuguCapability {
23 
24 using namespace NuguClientKit;
25 
40 enum class SystemException {
46 };
47 
51 enum class RevokeReason {
54 };
55 
60 class ISystemListener : virtual public ICapabilityListener {
61 public:
62  virtual ~ISystemListener() = default;
63 
69  virtual void onException(SystemException exception, const std::string& dialog_id) = 0;
70 
74  virtual void onTurnOff() = 0;
75 
80  virtual void onRevoke(RevokeReason reason) = 0;
81 
86  virtual void onNoDirective(const std::string& dialog_id) = 0;
87 };
88 
93 class ISystemHandler : virtual public ICapabilityInterface {
94 public:
95  virtual ~ISystemHandler() = default;
96 
100  virtual void synchronizeState() = 0;
101 
105  virtual void updateUserActivity() = 0;
106 };
107 
112 } // NuguCapability
113 
114 #endif /* __NUGU_SYSTEM_INTERFACE_H__ */
system handler interface
Definition: system_interface.hh:93
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:60
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:81
capability listener interface
Definition: capability_interface.hh:59
RevokeReason
RevokeReason.
Definition: system_interface.hh:51
SystemException
SystemException.
Definition: system_interface.hh:40