2019-06-03 14:57:05 +00:00
|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
2019-07-05 21:37:10 +00:00
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
using Aurora.Models;
|
2019-07-05 18:17:09 +00:00
|
|
|
using Aurora.Executors;
|
|
|
|
using Aurora.Services;
|
|
|
|
using Aurora.Proto;
|
|
|
|
using Aurora.RemoteImpl;
|
2019-06-03 14:57:05 +00:00
|
|
|
|
2019-07-05 18:17:09 +00:00
|
|
|
namespace Aurora.Executors
|
2019-06-03 14:57:05 +00:00
|
|
|
{
|
2019-07-05 15:37:44 +00:00
|
|
|
public class HostExecutor : BaseExecutor
|
2019-06-03 14:57:05 +00:00
|
|
|
{
|
2019-07-05 21:37:10 +00:00
|
|
|
RemotePartyServiceImpl _remotePartyServiceImpl;
|
2019-07-05 15:37:44 +00:00
|
|
|
RemotePlaybackServiceImpl _remotePlaybackImpl;
|
|
|
|
public HostExecutor()
|
2019-06-03 14:57:05 +00:00
|
|
|
{
|
2019-07-05 21:37:10 +00:00
|
|
|
_remotePartyServiceImpl = new RemotePartyServiceImpl();
|
2019-07-05 18:17:09 +00:00
|
|
|
_remotePlaybackImpl = new RemotePlaybackServiceImpl();
|
2019-06-03 14:57:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
{
|
2019-07-05 15:37:44 +00:00
|
|
|
//Register grpc RemoteService with singleton server service
|
2019-07-05 21:37:10 +00:00
|
|
|
ServerService.Instance.RegisterService(RemotePartyService.BindService(_remotePartyServiceImpl));
|
2019-07-05 15:37:44 +00:00
|
|
|
ServerService.Instance.RegisterService(RemotePlaybackService.BindService(_remotePlaybackImpl));
|
2019-06-03 14:57:05 +00:00
|
|
|
}
|
|
|
|
|
2019-07-05 21:37:10 +00:00
|
|
|
#region Properties
|
|
|
|
public override ObservableCollection<PartyMember> PartyMembers
|
|
|
|
{
|
|
|
|
get { return _remotePartyServiceImpl.PartyMembers; }
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion Properties
|
|
|
|
|
2019-06-03 14:57:05 +00:00
|
|
|
public override async void Close()
|
|
|
|
{
|
|
|
|
await ServerService.Instance.Stop();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void AddToQueue()
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
2019-07-05 21:37:10 +00:00
|
|
|
public override ObservableCollection<PartyMember> GetMembers()
|
2019-06-03 14:57:05 +00:00
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void GetQueue()
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void RemoveFromQueue()
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void Run()
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|