-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the service more unit-testable.
- Loading branch information
Chris Wood
committed
May 31, 2020
1 parent
ec0716e
commit 1dad219
Showing
16 changed files
with
98 additions
and
22 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
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 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 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 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,10 @@ | ||
using System.Threading.Tasks; | ||
using WebOsTv.Net.Responses.Api; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface IApiService | ||
{ | ||
Task<ServiceListResponse.ServiceItem[]> ListServicesAsync(); | ||
} | ||
} |
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,15 @@ | ||
using System.Threading.Tasks; | ||
using WebOsTv.Net.Responses.Apps; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface IAppsService | ||
{ | ||
Task CloseAsync(string appId); | ||
Task<string> GetCurrentAsync(); | ||
Task LaunchAsync(string appId); | ||
Task LaunchBrowserAsync(string url); | ||
Task LaunchYouTubeVideoAsync(string videoId); | ||
Task<ListLaunchPointsResponse.LaunchPoint[]> ListAsync(); | ||
} | ||
} |
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,14 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface IAudioService | ||
{ | ||
Task<AudioService.VolumeDetails> VolumeGetAsync(); | ||
Task VolumeDownAsync(int by = 1); | ||
Task VolumeUpAsync(int by = 1); | ||
Task MuteAsync(); | ||
Task UnmuteAsync(); | ||
Task SetVolumeAsync(int volume); | ||
} | ||
} |
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,9 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface IControlService | ||
{ | ||
Task SendIntentAsync(ControlService.ControlIntent intent); | ||
} | ||
} |
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,9 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface INotificationService | ||
{ | ||
Task SendToastAsync(string message); | ||
} | ||
} |
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,19 @@ | ||
using System.Threading.Tasks; | ||
using WebOsTv.Net.Responses.Tv; | ||
|
||
namespace WebOsTv.Net.Services | ||
{ | ||
public interface ITvService | ||
{ | ||
Task ChannelDownAsync(); | ||
Task<ChannelListResponse.Channel[]> ListChannelsAsync(); | ||
Task ChannelUpAsync(); | ||
Task<ExternalInputListResponse.Device[]> ListInputsAsync(); | ||
Task<GetChannelProgramInfoResponse.ProgramItem[]> GetProgramInfoAsync(); | ||
Task<string> GetCurrentChannelAsync(); | ||
Task SetInputAsync(string inputId); | ||
Task TurnOn3dAsync(); | ||
Task TurnOff3dAsync(); | ||
Task<ThreeDimensionStatusResponse.Status3d> Get3dStatusAsync(); | ||
} | ||
} |
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 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