-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed6749f
commit 8a523fe
Showing
7 changed files
with
53 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace SpotifyTools.Contracts | ||
{ | ||
public interface IAppStatusReporting | ||
{ | ||
void NotifyAntiSleepingModeIsActivated(); | ||
void NotifyAntiSleepingModeIsDisabled(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
SpotifySleepModeStopper/Domain/AppStatesManagement/AppStateReporting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using SpotifyTools.Contracts; | ||
|
||
namespace SpotifyTools.Domain.AppStatesManagement | ||
{ | ||
public class AppStateReporting : IAppStatusReporting | ||
{ | ||
private readonly Action _whenAntiSleepModeActivated; | ||
private readonly Action _whenAntiSleepModeDisabled; | ||
|
||
public AppStateReporting(Action whenAntiSleepModeActivated, Action whenAntiSleepModeDisabled) | ||
{ | ||
_whenAntiSleepModeActivated = whenAntiSleepModeActivated; | ||
_whenAntiSleepModeDisabled = whenAntiSleepModeDisabled; | ||
} | ||
|
||
public void NotifyAntiSleepingModeIsActivated() | ||
{ | ||
_whenAntiSleepModeActivated(); | ||
} | ||
|
||
public void NotifyAntiSleepingModeIsDisabled() | ||
{ | ||
_whenAntiSleepModeDisabled(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters