NUGU SDK Linux  1.7.6
battery_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_BATTERY_INTERFACE_H__
18 #define __NUGU_BATTERY_INTERFACE_H__
19 
21 #include <nugu.h>
22 
23 namespace NuguCapability {
24 
25 using namespace NuguClientKit;
26 
41 typedef struct _BatteryInfo {
42  int level = -1;
43  bool charging = false;
44  bool approximate_level = false;
46 
51 class NUGU_API IBatteryListener : virtual public ICapabilityListener {
52 public:
53  virtual ~IBatteryListener() = default;
54 
59  virtual void requestContext(BatteryInfo& battery_info) = 0;
60 };
61 
66 class NUGU_API IBatteryHandler : virtual public ICapabilityInterface {
67 public:
68  virtual ~IBatteryHandler() = default;
69 };
70 
75 } // NuguCapability
76 
77 #endif /* __NUGU_BATTERY_INTERFACE_H__ */
battery handler interface
Definition: battery_interface.hh:66
battery listener interface
Definition: battery_interface.hh:51
virtual void requestContext(BatteryInfo &battery_info)=0
Request context information for battery context.
capability interface
Definition: capability_interface.hh:82
capability listener interface
Definition: capability_interface.hh:60
struct NuguCapability::_BatteryInfo BatteryInfo
Battery Information.
Battery Information.
Definition: battery_interface.hh:41
bool charging
Definition: battery_interface.hh:43
bool approximate_level
Definition: battery_interface.hh:44
int level
Definition: battery_interface.hh:42