diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 23:31:11 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 23:31:11 -0500 |
commit | f15482d3f189c378d4e4cf2dfc69eefa522b30aa (patch) | |
tree | f5aee9590e530358fe5fcfac1f1917e6a29f4d07 /src/notifier.h | |
parent | 079ac51da565af4882b79c14b3a4782e5c919dd3 (diff) | |
download | ayatana-indicator-power-f15482d3f189c378d4e4cf2dfc69eefa522b30aa.tar.gz ayatana-indicator-power-f15482d3f189c378d4e4cf2dfc69eefa522b30aa.tar.bz2 ayatana-indicator-power-f15482d3f189c378d4e4cf2dfc69eefa522b30aa.zip |
on the bus, publish the battery's power_level as strings rather than ints
Diffstat (limited to 'src/notifier.h')
-rw-r--r-- | src/notifier.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/notifier.h b/src/notifier.h index c23c585..18e25d7 100644 --- a/src/notifier.h +++ b/src/notifier.h @@ -35,15 +35,6 @@ G_BEGIN_DECLS typedef struct _IndicatorPowerNotifier IndicatorPowerNotifier; typedef struct _IndicatorPowerNotifierClass IndicatorPowerNotifierClass; -typedef enum -{ - POWER_LEVEL_OK, - POWER_LEVEL_LOW, - POWER_LEVEL_VERY_LOW, - POWER_LEVEL_CRITICAL -} -PowerLevel; - /** * The Indicator Power Notifier. */ @@ -72,7 +63,11 @@ void indicator_power_notifier_set_bus (IndicatorPowerNotifier * self, void indicator_power_notifier_set_battery (IndicatorPowerNotifier * self, IndicatorPowerDevice * battery); -PowerLevel indicator_power_notifier_get_power_level (IndicatorPowerDevice * battery); +#define POWER_LEVEL_STR_OK "ok" +#define POWER_LEVEL_STR_LOW "low" +#define POWER_LEVEL_STR_VERY_LOW "very_low" +#define POWER_LEVEL_STR_CRITICAL "critical" +const char * indicator_power_notifier_get_power_level (IndicatorPowerDevice * battery); G_END_DECLS |