From a8fd3f49bf6509bd4545aec3292d2fc022d847ca Mon Sep 17 00:00:00 2001 From: charles kerr Date: Fri, 1 Jan 2016 15:58:55 -0600 Subject: 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 --- src/service.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/service.h') diff --git a/src/service.h b/src/service.h index 76ed10f..00ed3e6 100644 --- a/src/service.h +++ b/src/service.h @@ -24,6 +24,7 @@ #include #include "device-provider.h" +#include "notifier.h" G_BEGIN_DECLS @@ -64,11 +65,15 @@ struct _IndicatorPowerServiceClass GType indicator_power_service_get_type (void); -IndicatorPowerService * indicator_power_service_new (IndicatorPowerDeviceProvider * provider); +IndicatorPowerService * indicator_power_service_new (IndicatorPowerDeviceProvider * provider, + IndicatorPowerNotifier * notifier); void indicator_power_service_set_device_provider (IndicatorPowerService * self, IndicatorPowerDeviceProvider * provider); +void indicator_power_service_set_notifier (IndicatorPowerService * self, + IndicatorPowerNotifier * notifier); + IndicatorPowerDevice * indicator_power_service_choose_primary_device (GList * devices); -- cgit v1.2.3