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