diff options
author | charles kerr <charlesk@canonical.com> | 2016-01-01 15:58:55 -0600 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 10:17:14 +0200 |
commit | a8fd3f49bf6509bd4545aec3292d2fc022d847ca (patch) | |
tree | 303f33fab30a4dea88d8f096b9a4369a0d3bf565 /src/notifier.h | |
parent | 2b939453598cc1fd8f1c40e5d6cbfd63cb852fb4 (diff) | |
download | ayatana-indicator-power-a8fd3f49bf6509bd4545aec3292d2fc022d847ca.tar.gz ayatana-indicator-power-a8fd3f49bf6509bd4545aec3292d2fc022d847ca.tar.bz2 ayatana-indicator-power-a8fd3f49bf6509bd4545aec3292d2fc022d847ca.zip |
make a SoundPlayer interface so we can mock it in the tests
this requires an annoying amount of scaffolding:
1. implement gst and mock classes to implement the SoundPlayer interface
2. modify notifier to take a SoundPlayer argument in its ctor
3. modify service to take a Notifier argument in its ctor instead of instantiating it on its own
4. change main to update the startup steps for player/notifier/service
Diffstat (limited to 'src/notifier.h')
-rw-r--r-- | src/notifier.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/notifier.h b/src/notifier.h index 18e25d7..9625c07 100644 --- a/src/notifier.h +++ b/src/notifier.h @@ -23,6 +23,7 @@ #include <gio/gio.h> #include "device.h" +#include "sound-player.h" G_BEGIN_DECLS @@ -55,7 +56,7 @@ struct _IndicatorPowerNotifierClass GType indicator_power_notifier_get_type (void); -IndicatorPowerNotifier * indicator_power_notifier_new (void); +IndicatorPowerNotifier * indicator_power_notifier_new (IndicatorPowerSoundPlayer * sound_player); void indicator_power_notifier_set_bus (IndicatorPowerNotifier * self, GDBusConnection * connection); @@ -63,6 +64,9 @@ void indicator_power_notifier_set_bus (IndicatorPowerNotifier * self, void indicator_power_notifier_set_battery (IndicatorPowerNotifier * self, IndicatorPowerDevice * battery); +void indicator_power_notifier_set_sound_player (IndicatorPowerNotifier * self, + IndicatorPowerSoundPlayer * battery); + #define POWER_LEVEL_STR_OK "ok" #define POWER_LEVEL_STR_LOW "low" #define POWER_LEVEL_STR_VERY_LOW "very_low" |