The Battle for Wesnoth  1.17.0-dev
battery_info.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018 - 2021
3  by Martin HrubĂ˝ <hrubymar10@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #include "battery_info.hpp"
17 
18 #ifdef _WIN32
20 #endif
21 
22 #ifdef __APPLE__
23 #include "apple_battery_info.hpp"
24 #endif
25 
26 #ifdef HAVE_LIBDBUS
28 #endif
29 
30 namespace desktop {
31 namespace battery_info {
32 
34 {
35 #if defined(_WIN32)
37 #elif defined(__APPLE__)
39 #elif defined(HAVE_LIBDBUS)
41 #else
42  return false;
43 #endif
44 }
45 
47 {
48 #if defined(_WIN32)
50 #elif defined(__APPLE__)
52 #elif defined(HAVE_LIBDBUS)
54 #else
55  return -1;
56 #endif
57 }
58 
59 } // end namespace battery_info
60 } // end namespace desktop
static bool does_device_have_battery()
bool does_device_have_battery()
double get_battery_percentage()
double get_battery_percentage()
static double get_battery_percentage()