137 Commits

Author SHA1 Message Date
46173f4f99 Refactoring controllers to use publicly accessible CursorLists 2021-04-12 21:54:21 -04:00
4acf091511 Adding a shared library for common classes 2021-04-12 20:58:44 -04:00
6b14d1264a WIP splitting up the viewModels for the party 2021-04-11 20:54:59 -04:00
bf702e403e Entirely too many commits for this 2021-04-11 14:49:44 -04:00
4b22d5d9be Using single issue template 2021-04-11 14:48:36 -04:00
03a091d853 mv issue template 2021-04-11 14:46:08 -04:00
b2fc0121b0 mv issue folder 2021-04-11 14:31:32 -04:00
589773b29c Merge pull request 'feature/ubuntu' (#4) from feature/ubuntu into master
Reviewed-on: http://gitea.watsonlabs.net/watsonb8/aurora/pulls/4
2021-04-11 14:23:03 -04:00
9252f96bdb Merge branch 'master' into feature/ubuntu 2021-04-11 14:22:56 -04:00
733649c62b Adding story templates 2021-04-11 14:21:48 -04:00
dd4632cdb6 Changing folder names 2021-04-10 10:20:50 -04:00
9859358d7b Merge pull request 'feature/ubuntu' (#3) from feature/ubuntu into master
Reviewed-on: http://gitea.watsonlabs.net/watsonb8/aurora/pulls/3
2021-04-10 09:34:18 -04:00
f1a3771912 Merge branch 'master' of ssh://watsonlabs.net:3122/watsonb8/aurora 2021-04-10 09:29:46 -04:00
4d3413b2a2 Disabling test app so that this will run on ubuntu 2021-04-10 09:29:29 -04:00
e3eedc5ffa Updating xamarin and ripping out datagrid 2021-04-03 16:38:44 -04:00
4ee5656358 Moving protos to neutral place to be shared by projects 2021-03-05 23:51:24 -05:00
d307a049f1 Adding workspace 2021-03-05 23:30:12 -05:00
36ceb6c61a Adding readme 2021-03-05 23:17:32 -05:00
b7578de226 Migrating cradle server 2021-03-05 23:13:57 -05:00
8d3efc00fa Merge remote-tracking branch 'aurora-cradle-sharp/develop' 2021-03-05 23:12:18 -05:00
a351fb0b67 mv . files 2021-03-05 23:12:07 -05:00
b8c0dadf91 Migrate aurora-sharp-desktop 2021-03-05 23:10:12 -05:00
d6496355a9 Merge remote-tracking branch 'aurora-sharp-desktop/master'
# Conflicts:
#	README.md
2021-03-05 23:09:55 -05:00
dc6776f70c Adding .vscode 2021-03-05 20:49:49 -05:00
0945ccfd12 Wip 2021-03-05 20:45:26 -05:00
e9065db23c First pass at party service 2021-03-05 19:09:42 -05:00
6f73df0fb7 Updated folder paths 2021-03-05 16:50:54 -05:00
4a4cef8dd7 Adding pagination tests 2021-03-05 16:13:25 -05:00
24fd683cb7 Adding cursor size tests 2021-03-05 14:30:25 -05:00
b61ffde4c9 WIP 2021-03-05 11:56:51 -05:00
91d0a55d5e Re-arranging files to add test project. Adding WIP cursor list 2021-03-04 12:08:53 -05:00
00ab0323c7 Initial Commit 2021-03-04 01:57:21 -05:00
e97698eddb Initial commit 2021-03-04 00:49:26 -05:00
5da500f380 Adding readme 2020-12-20 11:35:16 -05:00
aa876e8494 Removing test scripts 2020-12-20 10:39:04 -05:00
a8d4e6ff1d Updating readme 2020-12-19 17:10:40 -05:00
89b928bd00 Stability fixes with streaming 2020-02-05 18:44:48 -05:00
aae221801a Merge branch 'feature/proto.v2' 2020-02-02 17:28:56 -05:00
be5c9a8de0 using new api 2020-02-02 17:28:34 -05:00
51ab2d9c42 Removed old proto definitions (not tested) 2020-02-02 16:49:01 -05:00
2a7e10364e Added basic unit tests for all controllers 2020-02-02 13:05:14 -05:00
8231a18c3e More progress on IoC. Controllers are implemented 2020-02-02 10:26:47 -05:00
48d0ffa77d Adding dependency injection 2020-01-31 20:41:45 -05:00
f8ad2f459e Added more unit tests for members resource 2020-01-20 23:22:58 -05:00
df2a6b4bfc Successful unit test setup and tear down 2020-01-20 22:53:33 -05:00
28afcf12e4 Added unit test project 2020-01-20 18:38:05 -05:00
320967be89 First pass at members resource controller 2020-01-20 16:55:12 -05:00
4ec9db4a45 Proto builds 2020-01-19 17:30:09 -05:00
4f67ad908a First pass at v2 proto definitions 2020-01-19 16:11:13 -05:00
0967be50ea potential proto stubs 2020-01-18 18:08:03 -05:00
dc7879c23d Cosmetic refactoring 2020-01-18 18:07:31 -05:00
e796bf2f35 Event manager improvements. Changed to console.writeline instead of diagnostics 2020-01-13 19:57:02 -05:00
43c6a5a2c6 More styling 2019-12-23 20:07:07 -05:00
109457d6fa Fixed issue navigating away and back to tab view 2019-12-23 19:06:03 -05:00
f691deab6a Fixed members list 2019-12-23 13:29:06 -05:00
5f241615ad More tab view styling 2019-12-23 12:23:51 -05:00
fa82c4fa30 Merge branch 'feature/party_list' 2019-12-22 23:58:49 -05:00
1a55ce0be1 Progress on party page styling 2019-12-22 23:58:29 -05:00
cc0d113204 Working tab view 2019-12-22 19:30:58 -05:00
945b7e8e11 First pass at tab view 2019-12-22 17:10:06 -05:00
7560e122f8 Added tab view (not working) 2019-12-21 22:21:07 -05:00
881d339ffd Formatting party dialog 2019-12-21 20:12:53 -05:00
7f2080119f Merge branch 'feature/data_grid_enhancements' 2019-12-18 23:04:17 -05:00
7d2f3f9553 Styling changes 2019-12-18 23:04:00 -05:00
1e7e71f29d Second pass at modal 2019-12-18 22:32:08 -05:00
8affc8d2af Progress 2019-12-18 21:55:01 -05:00
9e75dd66c0 Revert "Possible problem detected"
This reverts commit 3b8fe7fb97.
2019-12-18 21:04:23 -05:00
3b8fe7fb97 Possible problem detected 2019-12-18 20:54:47 -05:00
93dc9ae8c9 Work in progress 2019-12-18 20:23:59 -05:00
555eb07ec1 Readability changes to datagrid. Functional changes to come 2019-12-10 21:40:17 -05:00
cf05045448 Progress 2019-12-10 15:10:27 -05:00
01736333e9 First pass at modal dialog 2019-12-07 13:47:45 -05:00
3576a906e2 Moved music playing controls from individual viewmodels to main view 2019-12-04 20:42:23 -08:00
187de97503 Using System.Diagnostics.Debug. First pass at player controls styling 2019-12-04 14:53:49 -08:00
22a524cfd1 Icons finally working with pngs (SVGs later maybe) 2019-12-03 15:51:16 -08:00
c24ff95bfc Progress with icons (not working) 2019-12-03 11:31:02 -08:00
6bb4b5fdd5 More styling 2019-12-01 20:20:55 -08:00
89d7d65d8d Styling improvements 2019-12-01 16:14:36 -08:00
b60f2a4f47 Serious styling. Added data grid src for future modifications in performance 2019-12-01 15:26:13 -08:00
061adabff8 First pass at some styling 2019-12-01 06:53:30 -05:00
ee0f8afd86 Updated grpc version on both projects 2019-11-30 19:30:39 -05:00
82b8705a0c Using css after update (Fix your ish Microsoft) 2019-11-30 15:46:09 -05:00
042a0d466a Updated Xamarin forms and replaced main page with grid instead of master 2019-11-30 14:41:36 -05:00
41e853b1c6 Pretty good audio sync if I do say so myself :) 2019-11-29 22:04:55 -05:00
8bea1d03da Refactored error handler for events 2019-11-29 20:54:49 -05:00
e822829cc0 Now able to switch screens away from party without crashing 2019-11-29 20:51:48 -05:00
ad1fca2009 Added a little more stability (not really) 2019-11-29 19:27:31 -05:00
85ab39defd Code refactoring for cleaner view model design 2019-11-29 12:37:57 -05:00
3398d145ac First pass at syncing worked with some bug fixes 2019-11-12 20:09:45 -05:00
1acc383e90 First pass at sync working. Need to ignore for special cases 2019-11-11 15:10:08 -05:00
5f035e9bcb Both clients playing music 2019-11-10 15:33:06 -05:00
bbf8f3ae57 I think i've got simultaneous playback working but it is hard to test 2019-11-09 14:55:09 -05:00
426a368385 Player working for party view 2019-11-08 20:25:36 -05:00
63efcdad69 Working player contained within main page and control delegated to viewmodels 2019-11-08 19:54:51 -05:00
794b4739b1 Player controls now get dynamically assigned to view model base classes.
This gives view models more freedom in how play events from the player are handled
2019-11-06 22:32:43 -05:00
759c05e53b Successfully playing a song in a party with one member 2019-11-04 01:43:26 -05:00
ac17d9a432 Updated debug scripts 2019-11-04 01:27:55 -05:00
f8ad0399b8 Merge branch 'master' of ssh://watsonb8.ddns.net:2122/aurora/aurora-sharp-desktop 2019-11-03 23:17:46 -05:00
a537edd657 Remote playback almost working 2019-11-03 23:17:34 -05:00
12cacc8001 Add README.md 2019-11-03 20:06:01 -05:00
a13e491a7e Added GetQueue method that returns the hosts library 2019-11-03 16:04:05 -05:00
9a34e31f9c Code runs 2019-11-02 15:47:41 -04:00
a3937e78da Viewmodels are now maintained throughout the app lifecycle 2019-07-15 15:03:59 -04:00
00b39b1d84 EventManager rewritten to support a push arch instead of an internal poll. Crash finally fixed!!! The dangers of threading. 2019-07-15 12:14:38 -04:00
d78dce44f0 Fixed issue with Horizontal list not refreshing. Added clientId to joinPartyResponse. Crashing on multiple user joins. 2019-07-12 11:34:06 -04:00
11a585ecc0 Merge branch 'feature/single_executor' 2019-07-10 18:23:40 -04:00
6a70b3d90f Removed executors. All traffic goes through RPC 2019-07-10 18:23:19 -04:00
e0d5a66cac Left off last commit 2019-07-10 17:17:31 -04:00
c99f752174 Attempts to get horizontal list to work 2019-07-10 17:17:10 -04:00
823e1341ca First pass at events almost buttoned up.
The goal is to get the members list to update when new users enter and leave the party.
2019-07-07 17:12:13 -04:00
74f5d3e9c6 Merge branch 'feature/party_playback_proto' into 'master'
Feature/party playback proto

See merge request aurora/aurora-sharp-desktop!1
2019-07-06 15:53:46 -04:00
2a3290defc Can now somewhat reliably join a party 2019-07-06 15:52:28 -04:00
0d64c0732e Members now appearing on host 2019-07-05 17:37:10 -04:00
b18abf0400 Added script for starting a second instance 2019-07-05 14:17:31 -04:00
ec6a7586c7 Reorganization 2019-07-05 14:17:09 -04:00
a01d399a1f Refactored to only having one executor per platform 2019-07-05 11:37:44 -04:00
0cb0546741 Progress 2019-06-25 21:17:52 -04:00
613365f7ad Merge branch 'master' into feature/party_playback_proto
# Conflicts:
#	Aurora/Aurora.csproj
2019-06-03 11:00:51 -04:00
3d92926922 Merge branch 'feature/party_view' 2019-06-03 10:57:36 -04:00
b0307cf7b3 Beginning stages for party executors 2019-06-03 10:57:05 -04:00
6503d2c410 Protobufs compile 2019-05-31 10:17:14 -04:00
7d94c75f27 Added components to support the party view 2019-05-31 10:12:03 -04:00
d3f51371dd Initial commit for a party view which displays members and the shared queue 2019-05-27 11:23:14 -05:00
9354c0b27b Double click to play a song in the library 2019-05-26 11:33:07 -05:00
64c2285817 MediaChangedEvent now hooked up to player component. 2019-05-24 17:17:14 -04:00
80e9a4543d Added base classes to encapsulate metadata in media 2019-05-24 15:59:26 -04:00
93be6dc100 See commit description for changes
Added PageContainer to dynamically load pages within the main content. Added player component to control music playback(Half functional). Added playback changed event not the player service.
2019-05-24 10:27:19 -04:00
2dbe9cead9 vscode and mono now the supported dev environment 2019-05-22 19:47:27 -04:00
5427d08dd7 Playing works when ran with mono debug 2019-05-22 18:59:15 -04:00
a4276a0d5d Hooked up view with play button
Set up data structures for holding and playing music
2019-05-22 10:30:41 -04:00
65d56a838c And now it builds and runs 2019-05-19 20:25:31 -04:00
4b7c146041 Restructuring. Added services. 2019-05-19 20:21:54 -04:00
1fcaffb9b1 First pass at songs view
Using data grid for songs view. Added FileSystemUtil for async folder traversal
2019-05-19 17:25:42 -04:00
ae6bd68707 Group headings working for navigation menu 2019-05-18 18:18:28 -04:00
9dcd411090 Navigation menu is now a reusable component 2019-05-18 17:25:36 -04:00
62579677cf First pass at navigation with MasterDetail 2019-05-17 18:21:02 -04:00
4f8b6f49fa Initial commit 2019-05-16 18:07:36 -04:00
202 changed files with 10020 additions and 1 deletions

11
.gitea/issue_template.md Normal file
View File

@ -0,0 +1,11 @@
## Story
**As a**:
**I want**:
**So that**:
## Description
## Resources
## Notes

View File

@ -1,2 +1,23 @@
# aurora
# Aurora
A collaborative media player
![Aurora](./aurora-sharp-desktop/Docs/Aurora.png)
## The Problem Statement
Music is a medium that should be consumed together. Aurora aims to creat a music listening experience that can be shared with any number of people no matter where the listeners are. With music perfectly in sync between all listeners, remote listening is as easy as loading the app and connecting to your friends.
## The Tech
- GTK: Aurora takes advantage of Xamarin and GTK under the hood in order to render a sleek, modern, cross platform desktop application.
- gRPC: gRPC is a modern open source high performance RPC framework that can run in any environment. This app is inherently a peer to peer application and as such, gRPC is utilized to efficiently and effectively communicate between aurora nodes by implementing simple service definitions.
## The Future
We are always looking for ways to improve the exerience of the application.
- Aurora Turn Server: The next big step for the application is integrating a custom Aurora turn server so that listeners can connect to one another from different networks while maintaining perfectly synchronized output
- 3rd Party Source Integration: Not everybody has a vast local collection of media that they have been collecting for years. We plan to integrate with 3rd Party music sources such as _Spotify_ and _Apple Music_

36
aurora-cradle-sharp/.gitignore vendored Normal file
View File

@ -0,0 +1,36 @@
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/
# Visual Studio Code
# Rider
.idea
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn
# Visual Studio 2015
.vs/

27
aurora-cradle-sharp/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,27 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/AuroraCradle/bin/Debug/netcoreapp3.1/aurora-cradle-sharp.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}

42
aurora-cradle-sharp/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/AuroraCradle/aurora-cradle-sharp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/aurora-cradle-sharp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/aurora-cradle-sharp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Faker.Net" Version="1.4.108" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AuroraCradle\aurora-cradle-sharp.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,163 @@
using Xunit;
using Aurora.Services.Signal;
using Aurora.Cursor;
using System.Collections.Generic;
using System.Linq;
namespace AuroraCradle.test
{
public class CursorListTest
{
[Theory()]
[InlineData(Aurora.Cursor.SortDirection.Asc)]
[InlineData(Aurora.Cursor.SortDirection.Desc)]
public void CursorListSortOnStringValue(Aurora.Cursor.SortDirection direction)
{
CursorList<Party> list = new CursorList<Party>();
list.Add(new Party() { Name = "asdf", Id = Faker.RandomNumber.Next().ToString() });
list.Add(new Party() { Name = "bsdf", Id = Faker.RandomNumber.Next().ToString() });
list.Add(new Party() { Name = "csdf", Id = Faker.RandomNumber.Next().ToString() });
CursorResult<Party> result = new Cursor<Party>(ref list)
.WithSort(item => item.Value.Name, direction)
.GetNextPage();
if (direction == Aurora.Cursor.SortDirection.Desc)
{
Assert.Collection<Party>(result.Result,
item => item.Name.Equals("asdf"),
item => item.Name.Equals("bsdf"),
item => item.Name.Equals("csdf"));
}
else
{
Assert.Collection<Party>(result.Result,
item => item.Name.Equals("csdf"),
item => item.Name.Equals("bsdf"),
item => item.Name.Equals("asdf"));
}
}
[Theory()]
[InlineData(2)]
[InlineData(10)]
[InlineData(49)]
[InlineData(51)]
[InlineData(-1)]
public void CursorListSizeTest(int size)
{
int numOfItems = 50;
CursorList<Party> list = new CursorList<Party>();
// Add items to cursor list
for (int i = 0; i < numOfItems; i++)
{
list.Add(new Party()
{
Name = string.Join(" ",
Faker.Lorem.Words(2)),
Id = Faker.RandomNumber.Next().ToString()
});
}
Cursor<Party> cursor = new Cursor<Party>(ref list);
if (size < 0)
{
Assert.Throws<System.InvalidOperationException>(() =>
{
cursor.WithSize(size).GetNextPage();
});
}
else if (size > numOfItems)
{
CursorResult<Party> res = cursor.WithSize(size).GetNextPage();
Assert.Equal(res.Result.Count, numOfItems);
}
else if (size < numOfItems && size > 0)
{
CursorResult<Party> res = cursor.WithSize(size).GetNextPage();
Assert.Equal(res.Result.Count, size);
}
}
[Theory()]
[InlineData(2)]
[InlineData(10)]
[InlineData(3)]
public void CursorPaginationTest(int pageSize)
{
int numOfItems = 50;
CursorList<Party> list = new CursorList<Party>();
// Add items to cursor list
for (int i = 0; i < numOfItems; i++)
{
list.Add(new Party()
{
Name = string.Join(" ",
Faker.Lorem.Words(2)),
Id = Faker.RandomNumber.Next().ToString()
});
}
string pageToken = null;
Cursor<Party> cursor = new Cursor<Party>(ref list);
List<Party> pagedResults = new List<Party>();
while (pageToken != string.Empty)
{
CursorResult<Party> res = cursor
.WithSize(pageSize)
.WithNextPageToken(pageToken)
.GetNextPage();
pagedResults.AddRange(res.Result);
pageToken = res.NextPageToken;
}
Assert.Equal(pagedResults.Count, numOfItems);
}
[Fact()]
public void CursorPaginationWithSortTest()
{
int numOfItems = 50;
CursorList<Party> cursorList = new CursorList<Party>();
// Add items to cursor list
for (int i = 0; i < numOfItems; i++)
{
cursorList.Add(new Party()
{
Name = string.Join(" ",
Faker.Lorem.Words(2)),
Id = Faker.RandomNumber.Next().ToString()
});
}
var orderedList = cursorList.ToList().OrderBy(item => item.Value.Name).ToList().ConvertAll(item => item.Value);
string pageToken = null;
Cursor<Party> cursor = new Cursor<Party>(ref cursorList);
List<Party> pagedResults = new List<Party>();
while (pageToken != string.Empty)
{
CursorResult<Party> res = cursor
.WithSize(10)
.WithSort(item => item.Value.Name, Aurora.Cursor.SortDirection.Asc)
.WithNextPageToken(pageToken)
.GetNextPage();
pagedResults.AddRange(res.Result);
pageToken = res.NextPageToken;
}
var list = cursorList.ToList();
for (int i = 0; i < orderedList.Count; i++)
{
Assert.Equal(orderedList[i], pagedResults[i]);
}
}
}
}

View File

@ -0,0 +1,9 @@
using Aurora.Cursor;
namespace Aurora.Services.Signal
{
public partial class Party : ICursorObject
{
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Aurora
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
// Additional configuration is required to successfully run gRPC on macOS.
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

View File

@ -0,0 +1,79 @@
using System.Threading.Tasks;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Aurora.Cursor;
using Microsoft.Extensions.Logging;
namespace Aurora.Services.Signal
{
public partial class SignalService : Signal.SignalBase
{
private CursorList<Party> _partyList;
public override Task<Party> CreateParty(CreatePartyRequest request, ServerCallContext context)
{
Party party = new Party(request.Party);
_partyList.Add(party);
this._logger.LogInformation(string.Format("Added party with name: ${0} to parties", party.Name));
return Task.FromResult(party);
}
public override Task<Empty> DeleteParty(DeletePartyRequest request, ServerCallContext context)
{
if (this._partyList.ContainsKey(request.PartyId))
{
this._partyList.Remove(request.PartyId);
}
this._logger.LogInformation(string.Format("Deleted party with id: ${0} to parties", request.PartyId));
return Task.FromResult(new Empty());
}
public override Task<ListPartiesResponse> ListParties(ListPartiesRequest request, ServerCallContext context)
{
Cursor<Party> cursor = new Cursor<Party>(ref this._partyList);
Aurora.Cursor.SortDirection direction = Aurora.Cursor.SortDirection.Asc;
if (request.OrderDirection == SortDirection.Desc)
{
direction = Aurora.Cursor.SortDirection.Desc;
}
CursorResult<Party> res = cursor
.WithSort(request.OrderBy, direction)
.WithNextPageToken(request.PageToken)
.WithSize(request.PageSize)
.GetNextPage();
ListPartiesResponse response = new ListPartiesResponse()
{
NextPageToken = res.NextPageToken
};
response.Parties.AddRange(res.Result.ConvertAll(party => new PartyListItem()
{
Name = party.Name,
Id = party.Id
}));
return Task.FromResult(response);
}
public override Task<Party> GetParty(GetPartyRequest request, ServerCallContext context)
{
Party party = new Party();
if (this._partyList.ContainsKey(request.PartyId))
{
this._partyList.TryGetValue(request.PartyId, out party);
}
return Task.FromResult(party);
}
public override Task<Party> UpdateParty(UpdatePartyRequest request, ServerCallContext context)
{
throw new System.NotImplementedException();
}
}
}

View File

@ -0,0 +1,17 @@
using Microsoft.Extensions.Logging;
using Aurora.Cursor;
namespace Aurora.Services.Signal
{
public partial class SignalService : Signal.SignalBase
{
private readonly ILogger<SignalService> _logger;
public SignalService(ILogger<SignalService> logger)
{
_logger = logger;
this._partyList = new CursorList<Party>();
}
}
}

View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Aurora.Services.Signal;
namespace Aurora
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddGrpcReflection();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<SignalService>();
if (env.IsDevelopment())
{
endpoints.MapGrpcReflectionService();
}
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909");
});
});
}
}
}

View File

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Grpc": "Information",
"Microsoft": "Information"
}
}
}

View File

@ -0,0 +1,15 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http1"
}
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\..\aurora-proto\Proto\signal.proto" GrpcServices="Server" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.27.0" />
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.35.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,2 @@
# aurora-cradle-sharp

View File

@ -0,0 +1,15 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.exclude": {
"**/obj": true
},
"dotnet-test-explorer.testProjectPath": "./AuroraCradle.test",
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-dotnettools.csharp"
}
}

View File

@ -0,0 +1,10 @@
syntax = "proto3";
package Aurora.Proto.General;
message Chunk {
bytes Content = 1;
}
message Empty{
}

View File

@ -0,0 +1,290 @@
syntax = "proto3";
package Aurora.Proto.Party;
import "general.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/field_mask.proto";
//Party
//Members
//EventSubscriptions
//Events
//Media
service RemotePartyService {
//**************
//Party Resource
//**************
//Get Party
rpc GetParty(Aurora.Proto.General.Empty) returns (Party);
//***************
//Member Resource
//***************
//List
rpc ListMembers(ListMembersRequest) returns (ListMembersResponse);
//Get
rpc GetMember(GetMemberRequest) returns (Member);
//Update
rpc UpdateMember(UpdateMemberRequest) returns (Member);
//Create
rpc CreateMember(CreateMemberRequest) returns (Member);
//Delete
rpc DeleteMember(DeleteMemberRequest) returns (Aurora.Proto.General.Empty) {};
//**************
//Media Resource
//**************
//List
rpc ListMedia(ListMediaRequest) returns (ListMediaResponse);
//Get
rpc GetMedia(GetMediaRequest) returns (Media);
//Create
rpc CreateMedia(CreateMediaRequest) returns (Media);
//Delete
rpc DeleteMedia(DeleteMediaRequest) returns (Aurora.Proto.General.Empty) {};
//CUSTOM: Stream
rpc StreamMedia(StreamMediaRequest) returns (stream Aurora.Proto.General.Chunk) {};
//CUSTOM: Sync
rpc SyncMedia(SyncMediaRequest) returns (stream Sync) {};
//***************************
//EventSubscriptions Resource
//***************************
//List
rpc ListEventSubscriptions(ListEventSubscriptionsRequest) returns (ListEventSubscriptionsResponse);
//Create
rpc CreateEventSubscription(CreateEventSubscriptionRequest) returns (EventSubscription);
//Delete
rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (Aurora.Proto.General.Empty);
//CUSTOM: Create EventSubscription List
rpc CreateEventSubscriptionList(CreateEventSubscriptionListRequest) returns (CreateEventSubscriptionListResponse);
//CUSTOM: Delete all
rpc DeleteAllEventSubscriptions(DeleteAllEventSubscriptionsRequest) returns (Aurora.Proto.General.Empty);
//*****
//Event
//*****
//Get
rpc GetEvents(GetEventsRequest) returns (stream BaseEvent) {};
}
message Party {
//The resource name of the party
string name = 1;
string displayName = 2;
string description = 3;
string hostIp = 4;
Member hostMember = 5;
google.protobuf.Timestamp createdOn = 6;
}
enum PartyJoinedStatusEnum {
InParty = 0;
NotInParty = 1;
}
message LeavePartyResponse {
PartyJoinedStatusEnum status = 1;
}
message Member {
//Resource name of the party member to be returned (Added by server)
string name = 1;
string id = 2;
string userName = 3;
//Added by server
string ipAddress = 4;
//Added by server
google.protobuf.Timestamp addedOn = 5;
}
message ListMembersRequest {
//Resource name of the parent of the members collection to be returned (The party)
string parent = 1;
int32 pageSize = 2;
string pageToken = 3;
}
message ListMembersResponse {
repeated Member members = 1;
string nextPageToken = 2;
}
message GetMemberRequest {
//Resource name of the member to be returned
string name = 1;
}
message CreateMemberRequest {
//Resource name of the parent collection of the member to be created (The party)
string parent = 1;
Member member = 2;
}
message UpdateMemberRequest {
Member member = 1;
google.protobuf.FieldMask updateMask = 2;
}
message DeleteMemberRequest {
//Resource name of the member to be deleted
string name = 1;
}
message Media {
//Resource name of the remote media object
string name = 1;
string title = 2;
string artist = 3;
string album = 4;
string duration = 5;
}
message ListMediaRequest {
//Resource name of the parent of the media collection to be listed (The party)
string parent = 1;
int32 pageSize = 2;
string pageToken = 3;
}
message ListMediaResponse {
repeated Media media = 1;
string nextPageToken = 3;
}
message GetMediaRequest {
//Resource name of the media requested
string name = 1;
}
message CreateMediaRequest {
//Resource name of the parent collection of the member to be created (The party)
string parent = 1;
Media media = 2;
}
message DeleteMediaRequest {
//Resource name of the member to be deleted
string name = 1;
}
message StreamMediaRequest {
//Resource name of the media requested
string name = 1;
}
message SyncMediaRequest {
//Resource name of the media to sync with
string name = 1;
}
message Sync {
int64 serverTimeTicks = 1;
float trackPosition= 2;
}
/* Event Types */
enum EventType {
MemberCreated = 0;
MemberDeleted = 1;
MediaPlaying = 2;
MediaStopped = 3;
}
message BaseEvent {
//Resource name of the event ?
string name = 1;
EventType eventType = 2;
string clientKey = 3;
oneof derivedEvent {
MemberCreatedEvent memberCreatedEvent = 4;
MemberDeletedEvent memberDeletedEvent = 5;
NewMediaPlayingEvent newMediaPlayingEvent = 6;
MediaPausedEvent mediaPausedEvent = 7;
MediaResumedEvent mediaResumedEvent = 8;
}
}
message NewMediaPlayingEvent {
Media media = 1;
}
message MediaResumedEvent {
Aurora.Proto.General.Empty empty = 1;
}
message MediaPausedEvent {
Aurora.Proto.General.Empty empty = 1;
}
message MemberCreatedEvent {
Member member = 1;
}
message MemberDeletedEvent {
string memberName = 1;
}
message EventSubscription {
EventType type = 2;
}
message ListEventSubscriptionsRequest {
//Resource name of parent to the subscription list (The member)
string parent = 1;
int32 pageSize = 2;
string pageToken = 3;
}
message ListEventSubscriptionsResponse {
repeated EventSubscription subscriptions = 1;
}
message CreateEventSubscriptionRequest {
//Resource name of the parent to the subscription list (The member)
string parent = 1;
EventSubscription eventSubscription = 2;
}
message DeleteEventSubscriptionRequest {
//Resource name of the subscription to delete
string parent = 1;
EventType type = 2;
}
message CreateEventSubscriptionListRequest {
//Resource name of the parent to the subscription list (The member)
string parent = 1;
repeated EventSubscription eventSubscriptions = 2;
}
message CreateEventSubscriptionListResponse {
repeated EventSubscription eventSubscriptions = 1;
}
message DeleteAllEventSubscriptionsRequest {
//Resource name of the parent to the subscription list (the member)
string parent = 1;
}
message GetEventsRequest {
//Resource name of the parent to the event stream (the member)
string parent = 1;
}

View File

@ -0,0 +1,167 @@
syntax = "proto3";
option csharp_namespace = "Aurora.Services.Signal";
package signal;
import "google/protobuf/timestamp.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/empty.proto";
service Signal {
//**************
//Party Resource
//**************
//Get Party
rpc ListParties(ListPartiesRequest) returns (ListPartiesResponse);
rpc GetParty(GetPartyRequest) returns (Party);
rpc UpdateParty(UpdatePartyRequest) returns (Party);
rpc CreateParty(CreatePartyRequest) returns (Party);
rpc DeleteParty(DeletePartyRequest) returns (google.protobuf.Empty);
//***************************
//EventSubscriptions Resource
//***************************
//List
rpc ListEventSubscriptions(ListEventSubscriptionsRequest) returns (ListEventSubscriptionsResponse);
//Create
rpc SubscribeToEvent(EventSubscriptionRequest) returns (EventSubscription);
//Delete
rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (google.protobuf.Empty);
//CUSTOM: Create EventSubscription List
rpc SubscribeToEvents(EventSubscriptionListRequest) returns (EventSubscriptionListResponse);
//CUSTOM: Delete all
rpc DeleteAllEventSubscriptions(DeleteAllEventSubscriptionsRequest) returns (google.protobuf.Empty);
//*****
//Event
//*****
//Get
rpc GetEventStream(GetEventsRequest) returns (stream BaseEvent) {};
}
message Party {
//The resource name of the party
string name = 1;
string id = 2;
string display_name = 3;
string description = 4;
string host_ip = 5;
google.protobuf.Timestamp created_on = 6;
}
message PartyListItem {
string name = 1;
string id = 2;
}
message ListPartiesRequest {
int32 page_size = 1;
string page_token = 2;
string order_by = 3;
SortDirection order_direction = 4;
}
enum SortDirection {
Asc = 0;
Desc = 1;
}
message ListPartiesResponse {
repeated PartyListItem parties = 1;
string next_page_token = 2;
}
message GetPartyRequest {
string party_id = 1;
}
message CreatePartyRequest {
string party_id = 1;
Party party = 2;
}
message DeletePartyRequest {
string party_id = 1;
}
message UpdatePartyRequest {
Party party = 1;
google.protobuf.FieldMask update_mask = 2;
}
/* Event Types */
enum EventType {
NewPartiesAvailable = 0;
}
message NewPartiesAvailableEvent {
}
message BaseEvent {
//Resource name of the event ?
string name = 1;
EventType event_type = 2;
oneof derivedEvent {
NewPartiesAvailableEvent new_parties_available_event = 3;
}
}
message EventSubscription {
EventType type = 2;
}
message ListEventSubscriptionsRequest {
//Resource name of parent to the subscription list (The member)
string parent = 1;
int32 page_size = 2;
string page_token = 3;
}
message ListEventSubscriptionsResponse {
repeated EventSubscription subscriptions = 1;
string next_page_token = 2;
}
message EventSubscriptionRequest {
//Resource name of the parent to the subscription list (The member)
string parent = 1;
EventSubscription event_subscription = 2;
}
message DeleteEventSubscriptionRequest {
//Resource name of the subscription to delete
string parent = 1;
EventType type = 2;
}
message EventSubscriptionListRequest {
//Resource name of the parent to the subscription list (The member)
string parent = 1;
repeated EventSubscription event_subscriptions = 2;
}
message EventSubscriptionListResponse {
repeated EventSubscription event_subscriptions = 1;
}
message DeleteAllEventSubscriptionsRequest {
//Resource name of the parent to the subscription list (the member)
string parent = 1;
}
message GetEventsRequest {
//Resource name of the parent to the event stream (the member)
string parent = 1;
}

351
aurora-shared/.gitignore vendored Normal file
View File

@ -0,0 +1,351 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
start*.sh

View File

@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Aurora.Cursor
{
public enum SortDirection
{
Asc,
Desc,
}
public class Cursor<T> where T : ICursorObject
{
private CursorList<T> _list;
private string _previousPageToken;
private string _nextPageToken;
private int _pageSize;
private Func<KeyValuePair<string, T>, string> _sortDelgate;
private SortDirection _direction;
public Cursor(ref CursorList<T> list)
{
this._list = list;
this._previousPageToken = string.Empty;
this._nextPageToken = string.Empty;
this._pageSize = 10;
this._sortDelgate = delegate (KeyValuePair<string, T> item)
{
return item.Key;
};
}
public CursorResult<T> GetNextPage()
{
if (this._pageSize < 0)
{
throw new InvalidOperationException("Page Size must be greater than zero");
}
List<KeyValuePair<string, T>> tmpList;
// Sort reference list
if (this._direction == SortDirection.Desc)
{
tmpList = this._list.OrderByDescending(this._sortDelgate).ToList();
}
else
{
tmpList = this._list.OrderBy(this._sortDelgate).ToList();
}
if (tmpList == null)
{
throw new System.NullReferenceException();
}
int startIdx = 0;
if (!string.IsNullOrEmpty(this._nextPageToken))
{
// TODO find another way to index into the list that's not a regular array search
startIdx = tmpList.FindIndex(item => item.Key == this._nextPageToken) + 1;
}
int adjustedSize = this._pageSize;
if (startIdx + this._pageSize > tmpList.Count)
{
adjustedSize = this._pageSize - ((startIdx + _pageSize) - tmpList.Count);
}
List<KeyValuePair<string, T>> selection = new List<KeyValuePair<string, T>>();
if (adjustedSize != 0)
{
selection = tmpList.GetRange(startIdx, adjustedSize);
}
return new CursorResult<T>
{
NextPageToken = this._pageSize == selection.Count ? selection[selection.Count - 1].Key : string.Empty,
PrevPageToken = string.Empty,
Count = this._list.Count,
Result = selection.ConvertAll(item => item.Value)
};
}
public CursorResult<T> GetPreviousPage()
{
throw new NotImplementedException();
}
public Cursor<T> WithNextPageToken(string nextPageToken)
{
this._nextPageToken = nextPageToken;
return this;
}
public Cursor<T> WithPreviousPageToken(string prevPageToken)
{
this._previousPageToken = prevPageToken;
return this;
}
public Cursor<T> WithSort(Func<KeyValuePair<string, T>, string> sortDelegate, SortDirection direction)
{
this._sortDelgate = sortDelegate;
this._direction = direction;
return this;
}
public Cursor<T> WithSort(string key, SortDirection direction)
{
this._sortDelgate = (item) => key;
this._direction = direction;
return this;
}
public Cursor<T> WithSize(int size)
{
this._pageSize = size;
return this;
}
}
}

View File

@ -0,0 +1,32 @@
using System.Collections.Generic;
using System.Collections;
using System;
using System.Linq;
using Aurora.Utils;
namespace Aurora.Cursor
{
public class CursorList<T> : SortedList<string, T> where T : ICursorObject
{
public CursorList()
{
}
public CursorList<T> Add(T item)
{
string id = item.Id;
if (item.Id == null)
{
id = HashUtil.GetHash(new string[] { item.GetHashCode().ToString() }).ToString();
item.Id = id;
}
this.Add(id, item);
return this;
}
}
}

View File

@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace Aurora.Cursor
{
public interface ICursorObject
{
string Id { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace Aurora.Cursor
{
public class CursorResult<T>
{
public CursorResult()
{
Result = new List<T>();
}
public CursorResult(CursorResult<T> cpy)
{
NextPageToken = cpy.NextPageToken;
PrevPageToken = cpy.PrevPageToken;
Result = cpy.Result;
Count = cpy.Count;
}
public string NextPageToken { get; set; }
public string PrevPageToken { get; set; }
public List<T> Result { get; set; }
public int Count { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System.Security.Cryptography;
using System.Text;
using System;
namespace Aurora.Utils
{
public class HashUtil
{
public static Guid GetHash(string[] inputs)
{
string input = "";
foreach (string str in inputs)
{
input += str;
}
byte[] stringbytes = Encoding.UTF8.GetBytes(input);
byte[] hashedBytes = new System.Security.Cryptography
.SHA1CryptoServiceProvider()
.ComputeHash(stringbytes);
Array.Resize(ref hashedBytes, 16);
return new Guid(hashedBytes);
}
}
}

View File

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>aurora_shared</RootNamespace>
</PropertyGroup>
</Project>

351
aurora-sharp-desktop/.gitignore vendored Normal file
View File

@ -0,0 +1,351 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
start*.sh

View File

@ -0,0 +1,36 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "build-and-start-debug-server",
"name": "Start and Attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 55555,
},
{
"preLaunchTask": "Attach",
"name": "Attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 55555,
},
{
"preLaunchTask": "build",
"name": "Launch",
"type": "mono",
"request": "launch",
"console": "internalConsole",
"program": "${workspaceFolder}/Aurora.gtk/bin/Debug/Aurora.gtk.exe",
"args": [
"--debug",
"--debuggre-agent=transport=dt_socket,server=y,address=127.0.0.1:5555"
]
}
]
}

45
aurora-sharp-desktop/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,45 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build"
],
"group": "build",
"problemMatcher": "$msCompile"
},
{
"label": "build-and-start-debug-server",
"type": "shell",
"isBackground": true,
"command": "./start.sh",
// This task is run before some debug tasks.
// Problem is, it's a watch script, and since it never exits, VSCode
// complains. All this is needed so VSCode just lets it run.
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
}
]
}

View File

@ -0,0 +1,541 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Xamarin.Forms.5.0.0.2012\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.5.0.0.2012\build\Xamarin.Forms.props')" />
<Import Project="..\packages\Grpc.Tools.2.25.0\build\Grpc.Tools.props" Condition="Exists('..\packages\Grpc.Tools.2.25.0\build\Grpc.Tools.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Aurora.gtk</RootNamespace>
<AssemblyName>Aurora.gtk</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Mono.Posix" />
<Reference Include="Xamarin.Forms.Core">
<HintPath>..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform">
<HintPath>..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\packages\Xamarin.Forms.5.0.0.2012\lib\netstandard2.0\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="OpenTK">
<HintPath>..\packages\OpenTK.3.1.0\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="webkit-sharp">
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2012\lib\net45\webkit-sharp.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform.GTK">
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2012\lib\net45\Xamarin.Forms.Platform.GTK.dll</HintPath>
</Reference>
<Reference Include="System.Reflection">
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System.Reflection.TypeExtensions">
<HintPath>..\packages\System.Reflection.TypeExtensions.4.6.0\lib\net461\System.Reflection.TypeExtensions.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization.Primitives">
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="taglib-sharp">
<HintPath>..\packages\taglib-sharp-netstandard2.0.2.1.0\lib\netstandard2.0\taglib-sharp.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="LibVLCSharp">
<HintPath>..\packages\LibVLCSharp.3.3.1\lib\net40\LibVLCSharp.dll</HintPath>
</Reference>
<Reference Include="LibVLCSharp.Forms">
<HintPath>..\packages\LibVLCSharp.Forms.3.3.1\lib\netstandard2.0\LibVLCSharp.Forms.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="LibVLCSharp.GTK">
<HintPath>..\packages\LibVLCSharp.GTK.3.3.1\lib\net47\LibVLCSharp.GTK.dll</HintPath>
</Reference>
<Reference Include="LibVLCSharp.Forms.Platforms.GTK">
<HintPath>..\packages\LibVLCSharp.Forms.GTK.3.3.1\lib\net47\LibVLCSharp.Forms.Platforms.GTK.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.10.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\System.Interactive.Async.4.0.0\lib\net461\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api">
<HintPath>..\packages\Grpc.Core.Api.2.25.0\lib\net45\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.2.25.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Plugin.Settings.Abstractions">
<HintPath>..\packages\Xam.Plugins.Settings.3.1.1\lib\net45\Plugin.Settings.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Plugin.Settings">
<HintPath>..\packages\Xam.Plugins.Settings.3.1.1\lib\net45\Plugin.Settings.dll</HintPath>
</Reference>
<Reference Include="Sharpnado.Infrastructure">
<HintPath>..\packages\Sharpnado.Forms.HorizontalListView.1.3.0\lib\netstandard2.0\Sharpnado.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Sharpnado.Presentation.Forms">
<HintPath>..\packages\Sharpnado.Forms.HorizontalListView.1.3.0\lib\netstandard2.0\Sharpnado.Presentation.Forms.dll</HintPath>
</Reference>
<Reference Include="System.Buffers">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Numerics.Vectors">
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Memory">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="System.Linq.Async">
<HintPath>..\packages\System.Linq.Async.4.0.0\lib\net461\System.Linq.Async.dll</HintPath>
</Reference>
<Reference Include="OpenTK.GLControl">
<HintPath>..\packages\OpenTK.GLControl.3.0.1\lib\net20\OpenTK.GLControl.dll</HintPath>
</Reference>
<Reference Include="DLToolkit.Forms.Controls.FlowListView">
<HintPath>..\packages\DLToolkit.Forms.Controls.FlowListView.2.0.11\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+netstandard1.0\DLToolkit.Forms.Controls.FlowListView.dll</HintPath>
</Reference>
<Reference Include="CarouselView.FormsPlugin.Abstractions">
<HintPath>..\packages\CarouselView.FormsPlugin.5.2.0\lib\netstandard2.0\CarouselView.FormsPlugin.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Autofac">
<HintPath>..\packages\Autofac.5.0.0\lib\net461\Autofac.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Xamarin.Forms.DataGrid">
<HintPath>..\packages\Xamarin.Forms.DataGrid.4.8.0\lib\netstandard2.0\Xamarin.Forms.DataGrid.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="LibVLCSharp.GTK.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="LibVLCSharp.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MainWindow.cs" />
<Compile Include="gtk-gui\MainWindow.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Helpers\Settings.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Themes\apps.rc" />
<None Include="Themes\assets-dark.svg" />
<None Include="Themes\assets.svg" />
<None Include="Themes\assets.txt" />
<None Include="Themes\gtkrc" />
<None Include="Themes\gtkrc-dark" />
<None Include="Themes\gtkrc-light" />
<None Include="Themes\hacks.rc" />
<None Include="Themes\main.rc" />
<None Include="Themes\render-assets-dark.sh" />
<None Include="Themes\render-assets.sh" />
<None Include="Themes\assets\border.png" />
<None Include="Themes\assets\button-active.png" />
<None Include="Themes\assets\button-hover.png" />
<None Include="Themes\assets\button-insensitive.png" />
<None Include="Themes\assets\button.png" />
<None Include="Themes\assets\checkbox-checked-active.png" />
<None Include="Themes\assets\checkbox-checked-hover.png" />
<None Include="Themes\assets\checkbox-checked-insensitive.png" />
<None Include="Themes\assets\checkbox-checked.png" />
<None Include="Themes\assets\checkbox-mixed-active.png" />
<None Include="Themes\assets\checkbox-mixed-hover.png" />
<None Include="Themes\assets\checkbox-mixed-insensitive.png" />
<None Include="Themes\assets\checkbox-mixed.png" />
<None Include="Themes\assets\checkbox-unchecked-active.png" />
<None Include="Themes\assets\checkbox-unchecked-hover.png" />
<None Include="Themes\assets\checkbox-unchecked-insensitive.png" />
<None Include="Themes\assets\checkbox-unchecked.png" />
<None Include="Themes\assets\combo-ltr-button-active.png" />
<None Include="Themes\assets\combo-ltr-button-hover.png" />
<None Include="Themes\assets\combo-ltr-button-insensitive.png" />
<None Include="Themes\assets\combo-ltr-button.png" />
<None Include="Themes\assets\combo-ltr-entry-active.png" />
<None Include="Themes\assets\combo-ltr-entry-insensitive.png" />
<None Include="Themes\assets\combo-ltr-entry.png" />
<None Include="Themes\assets\combo-rtl-button-active.png" />
<None Include="Themes\assets\combo-rtl-button-hover.png" />
<None Include="Themes\assets\combo-rtl-button-insensitive.png" />
<None Include="Themes\assets\combo-rtl-button.png" />
<None Include="Themes\assets\combo-rtl-entry-active.png" />
<None Include="Themes\assets\combo-rtl-entry-insensitive.png" />
<None Include="Themes\assets\combo-rtl-entry.png" />
<None Include="Themes\assets\entry-active.png" />
<None Include="Themes\assets\entry-background-insensitive.png" />
<None Include="Themes\assets\entry-background.png" />
<None Include="Themes\assets\entry-insensitive.png" />
<None Include="Themes\assets\entry.png" />
<None Include="Themes\assets\flat-button-active.png" />
<None Include="Themes\assets\flat-button-hover.png" />
<None Include="Themes\assets\flat-button-insensitive.png" />
<None Include="Themes\assets\flat-button.png" />
<None Include="Themes\assets\focus.png" />
<None Include="Themes\assets\frame-inline.png" />
<None Include="Themes\assets\frame-notebook.png" />
<None Include="Themes\assets\frame.png" />
<None Include="Themes\assets\handle-horz-active.png" />
<None Include="Themes\assets\handle-horz-hover.png" />
<None Include="Themes\assets\handle-horz.png" />
<None Include="Themes\assets\handle-vert-active.png" />
<None Include="Themes\assets\handle-vert-hover.png" />
<None Include="Themes\assets\handle-vert.png" />
<None Include="Themes\assets\menu-checkbox-checked-insensitive.png" />
<None Include="Themes\assets\menu-checkbox-checked.png" />
<None Include="Themes\assets\menu-checkbox-mixed-insensitive.png" />
<None Include="Themes\assets\menu-checkbox-mixed.png" />
<None Include="Themes\assets\menu-checkbox-unchecked-insensitive.png" />
<None Include="Themes\assets\menu-checkbox-unchecked.png" />
<None Include="Themes\assets\menu-radio-checked-insensitive.png" />
<None Include="Themes\assets\menu-radio-checked.png" />
<None Include="Themes\assets\menu-radio-mixed-insensitive.png" />
<None Include="Themes\assets\menu-radio-mixed.png" />
<None Include="Themes\assets\menu-radio-unchecked-insensitive.png" />
<None Include="Themes\assets\menu-radio-unchecked.png" />
<None Include="Themes\assets\notebook-combo-ltr-entry-active.png" />
<None Include="Themes\assets\notebook-combo-ltr-entry-insensitive.png" />
<None Include="Themes\assets\notebook-combo-ltr-entry.png" />
<None Include="Themes\assets\notebook-combo-rtl-entry-active.png" />
<None Include="Themes\assets\notebook-combo-rtl-entry-insensitive.png" />
<None Include="Themes\assets\notebook-combo-rtl-entry.png" />
<None Include="Themes\assets\notebook-entry-active.png" />
<None Include="Themes\assets\notebook-entry-insensitive.png" />
<None Include="Themes\assets\notebook-entry.png" />
<None Include="Themes\assets\pan-down-alt-insensitive.png" />
<None Include="Themes\assets\pan-down-alt.png" />
<None Include="Themes\assets\pan-down-insensitive.png" />
<None Include="Themes\assets\pan-down.png" />
<None Include="Themes\assets\pan-left-alt-insensitive.png" />
<None Include="Themes\assets\pan-left-alt.png" />
<None Include="Themes\assets\pan-left-insensitive.png" />
<None Include="Themes\assets\pan-left-semi.png" />
<None Include="Themes\assets\pan-left.png" />
<None Include="Themes\assets\pan-right-alt-insensitive.png" />
<None Include="Themes\assets\pan-right-alt.png" />
<None Include="Themes\assets\pan-right-insensitive.png" />
<None Include="Themes\assets\pan-right-semi.png" />
<None Include="Themes\assets\pan-right.png" />
<None Include="Themes\assets\pan-up-alt-insensitive.png" />
<None Include="Themes\assets\pan-up-alt.png" />
<None Include="Themes\assets\pan-up-insensitive.png" />
<None Include="Themes\assets\pan-up.png" />
<None Include="Themes\assets\progressbar-progress.png" />
<None Include="Themes\assets\progressbar-trough.png" />
<None Include="Themes\assets\radio-checked-active.png" />
<None Include="Themes\assets\radio-checked-hover.png" />
<None Include="Themes\assets\radio-checked-insensitive.png" />
<None Include="Themes\assets\radio-checked.png" />
<None Include="Themes\assets\radio-mixed-active.png" />
<None Include="Themes\assets\radio-mixed-hover.png" />
<None Include="Themes\assets\radio-mixed-insensitive.png" />
<None Include="Themes\assets\radio-mixed.png" />
<None Include="Themes\assets\radio-unchecked-active.png" />
<None Include="Themes\assets\radio-unchecked-hover.png" />
<None Include="Themes\assets\radio-unchecked-insensitive.png" />
<None Include="Themes\assets\radio-unchecked.png" />
<None Include="Themes\assets\scale-horz-trough-active.png" />
<None Include="Themes\assets\scale-horz-trough-insensitive.png" />
<None Include="Themes\assets\scale-horz-trough.png" />
<None Include="Themes\assets\scale-slider-active.png" />
<None Include="Themes\assets\scale-slider-hover.png" />
<None Include="Themes\assets\scale-slider-insensitive.png" />
<None Include="Themes\assets\scale-slider.png" />
<None Include="Themes\assets\scale-vert-trough-active.png" />
<None Include="Themes\assets\scale-vert-trough-insensitive.png" />
<None Include="Themes\assets\scale-vert-trough.png" />
<None Include="Themes\assets\scrollbar-horz-slider-active.png" />
<None Include="Themes\assets\scrollbar-horz-slider-hover.png" />
<None Include="Themes\assets\scrollbar-horz-slider-insensitive.png" />
<None Include="Themes\assets\scrollbar-horz-slider.png" />
<None Include="Themes\assets\scrollbar-horz-trough.png" />
<None Include="Themes\assets\scrollbar-vert-ltr-slider-active.png" />
<None Include="Themes\assets\scrollbar-vert-ltr-slider-hover.png" />
<None Include="Themes\assets\scrollbar-vert-ltr-slider-insensitive.png" />
<None Include="Themes\assets\scrollbar-vert-ltr-slider.png" />
<None Include="Themes\assets\scrollbar-vert-ltr-trough.png" />
<None Include="Themes\assets\scrollbar-vert-rtl-slider-active.png" />
<None Include="Themes\assets\scrollbar-vert-rtl-slider-hover.png" />
<None Include="Themes\assets\scrollbar-vert-rtl-slider-insensitive.png" />
<None Include="Themes\assets\scrollbar-vert-rtl-slider.png" />
<None Include="Themes\assets\scrollbar-vert-rtl-trough.png" />
<None Include="Themes\assets\spin-ltr-down-active.png" />
<None Include="Themes\assets\spin-ltr-down-hover.png" />
<None Include="Themes\assets\spin-ltr-down-insensitive.png" />
<None Include="Themes\assets\spin-ltr-down.png" />
<None Include="Themes\assets\spin-ltr-up-active.png" />
<None Include="Themes\assets\spin-ltr-up-hover.png" />
<None Include="Themes\assets\spin-ltr-up-insensitive.png" />
<None Include="Themes\assets\spin-ltr-up.png" />
<None Include="Themes\assets\spin-rtl-down-active.png" />
<None Include="Themes\assets\spin-rtl-down-hover.png" />
<None Include="Themes\assets\spin-rtl-down-insensitive.png" />
<None Include="Themes\assets\spin-rtl-down.png" />
<None Include="Themes\assets\spin-rtl-up-active.png" />
<None Include="Themes\assets\spin-rtl-up-hover.png" />
<None Include="Themes\assets\spin-rtl-up-insensitive.png" />
<None Include="Themes\assets\spin-rtl-up.png" />
<None Include="Themes\assets\tab.png" />
<None Include="Themes\assets\treeview-ltr-button-active.png" />
<None Include="Themes\assets\treeview-ltr-button-hover.png" />
<None Include="Themes\assets\treeview-ltr-button.png" />
<None Include="Themes\assets\treeview-rtl-button-active.png" />
<None Include="Themes\assets\treeview-rtl-button-hover.png" />
<None Include="Themes\assets\treeview-rtl-button.png" />
<None Include="Themes\assets-dark\border.png" />
<None Include="Themes\assets-dark\button-active.png" />
<None Include="Themes\assets-dark\button-hover.png" />
<None Include="Themes\assets-dark\button-insensitive.png" />
<None Include="Themes\assets-dark\button.png" />
<None Include="Themes\assets-dark\checkbox-checked-active.png" />
<None Include="Themes\assets-dark\checkbox-checked-hover.png" />
<None Include="Themes\assets-dark\checkbox-checked-insensitive.png" />
<None Include="Themes\assets-dark\checkbox-checked.png" />
<None Include="Themes\assets-dark\checkbox-mixed-active.png" />
<None Include="Themes\assets-dark\checkbox-mixed-hover.png" />
<None Include="Themes\assets-dark\checkbox-mixed-insensitive.png" />
<None Include="Themes\assets-dark\checkbox-mixed.png" />
<None Include="Themes\assets-dark\checkbox-unchecked-active.png" />
<None Include="Themes\assets-dark\checkbox-unchecked-hover.png" />
<None Include="Themes\assets-dark\checkbox-unchecked-insensitive.png" />
<None Include="Themes\assets-dark\checkbox-unchecked.png" />
<None Include="Themes\assets-dark\combo-ltr-button-active.png" />
<None Include="Themes\assets-dark\combo-ltr-button-hover.png" />
<None Include="Themes\assets-dark\combo-ltr-button-insensitive.png" />
<None Include="Themes\assets-dark\combo-ltr-button.png" />
<None Include="Themes\assets-dark\combo-ltr-entry-active.png" />
<None Include="Themes\assets-dark\combo-ltr-entry-insensitive.png" />
<None Include="Themes\assets-dark\combo-ltr-entry.png" />
<None Include="Themes\assets-dark\combo-rtl-button-active.png" />
<None Include="Themes\assets-dark\combo-rtl-button-hover.png" />
<None Include="Themes\assets-dark\combo-rtl-button-insensitive.png" />
<None Include="Themes\assets-dark\combo-rtl-button.png" />
<None Include="Themes\assets-dark\combo-rtl-entry-active.png" />
<None Include="Themes\assets-dark\combo-rtl-entry-insensitive.png" />
<None Include="Themes\assets-dark\combo-rtl-entry.png" />
<None Include="Themes\assets-dark\entry-active.png" />
<None Include="Themes\assets-dark\entry-background-insensitive.png" />
<None Include="Themes\assets-dark\entry-background.png" />
<None Include="Themes\assets-dark\entry-insensitive.png" />
<None Include="Themes\assets-dark\entry.png" />
<None Include="Themes\assets-dark\flat-button-active.png" />
<None Include="Themes\assets-dark\flat-button-hover.png" />
<None Include="Themes\assets-dark\flat-button-insensitive.png" />
<None Include="Themes\assets-dark\flat-button.png" />
<None Include="Themes\assets-dark\focus.png" />
<None Include="Themes\assets-dark\frame-inline.png" />
<None Include="Themes\assets-dark\frame-notebook.png" />
<None Include="Themes\assets-dark\frame.png" />
<None Include="Themes\assets-dark\handle-horz-active.png" />
<None Include="Themes\assets-dark\handle-horz-hover.png" />
<None Include="Themes\assets-dark\handle-horz.png" />
<None Include="Themes\assets-dark\handle-vert-active.png" />
<None Include="Themes\assets-dark\handle-vert-hover.png" />
<None Include="Themes\assets-dark\handle-vert.png" />
<None Include="Themes\assets-dark\menu-checkbox-checked-insensitive.png" />
<None Include="Themes\assets-dark\menu-checkbox-checked.png" />
<None Include="Themes\assets-dark\menu-checkbox-mixed-insensitive.png" />
<None Include="Themes\assets-dark\menu-checkbox-mixed.png" />
<None Include="Themes\assets-dark\menu-checkbox-unchecked-insensitive.png" />
<None Include="Themes\assets-dark\menu-checkbox-unchecked.png" />
<None Include="Themes\assets-dark\menu-radio-checked-insensitive.png" />
<None Include="Themes\assets-dark\menu-radio-checked.png" />
<None Include="Themes\assets-dark\menu-radio-mixed-insensitive.png" />
<None Include="Themes\assets-dark\menu-radio-mixed.png" />
<None Include="Themes\assets-dark\menu-radio-unchecked-insensitive.png" />
<None Include="Themes\assets-dark\menu-radio-unchecked.png" />
<None Include="Themes\assets-dark\notebook-combo-ltr-entry-active.png" />
<None Include="Themes\assets-dark\notebook-combo-ltr-entry-insensitive.png" />
<None Include="Themes\assets-dark\notebook-combo-ltr-entry.png" />
<None Include="Themes\assets-dark\notebook-combo-rtl-entry-active.png" />
<None Include="Themes\assets-dark\notebook-combo-rtl-entry-insensitive.png" />
<None Include="Themes\assets-dark\notebook-combo-rtl-entry.png" />
<None Include="Themes\assets-dark\notebook-entry-active.png" />
<None Include="Themes\assets-dark\notebook-entry-insensitive.png" />
<None Include="Themes\assets-dark\notebook-entry.png" />
<None Include="Themes\assets-dark\pan-down-alt-insensitive.png" />
<None Include="Themes\assets-dark\pan-down-alt.png" />
<None Include="Themes\assets-dark\pan-down-insensitive.png" />
<None Include="Themes\assets-dark\pan-down.png" />
<None Include="Themes\assets-dark\pan-left-alt-insensitive.png" />
<None Include="Themes\assets-dark\pan-left-alt.png" />
<None Include="Themes\assets-dark\pan-left-insensitive.png" />
<None Include="Themes\assets-dark\pan-left-semi.png" />
<None Include="Themes\assets-dark\pan-left.png" />
<None Include="Themes\assets-dark\pan-right-alt-insensitive.png" />
<None Include="Themes\assets-dark\pan-right-alt.png" />
<None Include="Themes\assets-dark\pan-right-insensitive.png" />
<None Include="Themes\assets-dark\pan-right-semi.png" />
<None Include="Themes\assets-dark\pan-right.png" />
<None Include="Themes\assets-dark\pan-up-alt-insensitive.png" />
<None Include="Themes\assets-dark\pan-up-alt.png" />
<None Include="Themes\assets-dark\pan-up-insensitive.png" />
<None Include="Themes\assets-dark\pan-up.png" />
<None Include="Themes\assets-dark\progressbar-progress.png" />
<None Include="Themes\assets-dark\progressbar-trough.png" />
<None Include="Themes\assets-dark\radio-checked-active.png" />
<None Include="Themes\assets-dark\radio-checked-hover.png" />
<None Include="Themes\assets-dark\radio-checked-insensitive.png" />
<None Include="Themes\assets-dark\radio-checked.png" />
<None Include="Themes\assets-dark\radio-mixed-active.png" />
<None Include="Themes\assets-dark\radio-mixed-hover.png" />
<None Include="Themes\assets-dark\radio-mixed-insensitive.png" />
<None Include="Themes\assets-dark\radio-mixed.png" />
<None Include="Themes\assets-dark\radio-unchecked-active.png" />
<None Include="Themes\assets-dark\radio-unchecked-hover.png" />
<None Include="Themes\assets-dark\radio-unchecked-insensitive.png" />
<None Include="Themes\assets-dark\radio-unchecked.png" />
<None Include="Themes\assets-dark\scale-horz-trough-active.png" />
<None Include="Themes\assets-dark\scale-horz-trough-insensitive.png" />
<None Include="Themes\assets-dark\scale-horz-trough.png" />
<None Include="Themes\assets-dark\scale-slider-active.png" />
<None Include="Themes\assets-dark\scale-slider-hover.png" />
<None Include="Themes\assets-dark\scale-slider-insensitive.png" />
<None Include="Themes\assets-dark\scale-slider.png" />
<None Include="Themes\assets-dark\scale-vert-trough-active.png" />
<None Include="Themes\assets-dark\scale-vert-trough-insensitive.png" />
<None Include="Themes\assets-dark\scale-vert-trough.png" />
<None Include="Themes\assets-dark\scrollbar-horz-slider-active.png" />
<None Include="Themes\assets-dark\scrollbar-horz-slider-hover.png" />
<None Include="Themes\assets-dark\scrollbar-horz-slider-insensitive.png" />
<None Include="Themes\assets-dark\scrollbar-horz-slider.png" />
<None Include="Themes\assets-dark\scrollbar-horz-trough.png" />
<None Include="Themes\assets-dark\scrollbar-vert-ltr-slider-active.png" />
<None Include="Themes\assets-dark\scrollbar-vert-ltr-slider-hover.png" />
<None Include="Themes\assets-dark\scrollbar-vert-ltr-slider-insensitive.png" />
<None Include="Themes\assets-dark\scrollbar-vert-ltr-slider.png" />
<None Include="Themes\assets-dark\scrollbar-vert-ltr-trough.png" />
<None Include="Themes\assets-dark\scrollbar-vert-rtl-slider-active.png" />
<None Include="Themes\assets-dark\scrollbar-vert-rtl-slider-hover.png" />
<None Include="Themes\assets-dark\scrollbar-vert-rtl-slider-insensitive.png" />
<None Include="Themes\assets-dark\scrollbar-vert-rtl-slider.png" />
<None Include="Themes\assets-dark\scrollbar-vert-rtl-trough.png" />
<None Include="Themes\assets-dark\spin-ltr-down-active.png" />
<None Include="Themes\assets-dark\spin-ltr-down-hover.png" />
<None Include="Themes\assets-dark\spin-ltr-down-insensitive.png" />
<None Include="Themes\assets-dark\spin-ltr-down.png" />
<None Include="Themes\assets-dark\spin-ltr-up-active.png" />
<None Include="Themes\assets-dark\spin-ltr-up-hover.png" />
<None Include="Themes\assets-dark\spin-ltr-up-insensitive.png" />
<None Include="Themes\assets-dark\spin-ltr-up.png" />
<None Include="Themes\assets-dark\spin-rtl-down-active.png" />
<None Include="Themes\assets-dark\spin-rtl-down-hover.png" />
<None Include="Themes\assets-dark\spin-rtl-down-insensitive.png" />
<None Include="Themes\assets-dark\spin-rtl-down.png" />
<None Include="Themes\assets-dark\spin-rtl-up-active.png" />
<None Include="Themes\assets-dark\spin-rtl-up-hover.png" />
<None Include="Themes\assets-dark\spin-rtl-up-insensitive.png" />
<None Include="Themes\assets-dark\spin-rtl-up.png" />
<None Include="Themes\assets-dark\tab.png" />
<None Include="Themes\assets-dark\treeview-ltr-button-active.png" />
<None Include="Themes\assets-dark\treeview-ltr-button-hover.png" />
<None Include="Themes\assets-dark\treeview-ltr-button.png" />
<None Include="Themes\assets-dark\treeview-rtl-button-active.png" />
<None Include="Themes\assets-dark\treeview-rtl-button-hover.png" />
<None Include="Themes\assets-dark\treeview-rtl-button.png" />
<None Include="libvlc.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="OpenTK.dll.config" />
<None Include="webkit-sharp.dll.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aurora\Aurora.csproj">
<Project>{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}</Project>
<Name>Aurora</Name>
</ProjectReference>
<ProjectReference Include="..\..\aurora-shared\aurora-shared.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\play.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\like.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\forwards.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\backward.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\pause.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\menu.png">
</Content>
<Content Include="Resources\shuffle.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\loop.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Tools.2.25.0\build\Grpc.Tools.targets" Condition="Exists('..\packages\Grpc.Tools.2.25.0\build\Grpc.Tools.targets')" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Import Project="..\packages\Grpc.Core.2.25.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.25.0\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\VideoLAN.LibVLC.Mac.3.1.3.1\build\VideoLAN.LibVLC.Mac.targets" Condition="Exists('..\packages\VideoLAN.LibVLC.Mac.3.1.3.1\build\VideoLAN.LibVLC.Mac.targets')" />
<Import Project="..\packages\Xamarin.Forms.5.0.0.2012\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.5.0.0.2012\build\Xamarin.Forms.targets')" />
</Project>

View File

@ -0,0 +1,44 @@
/*
// Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
using Plugin.Settings;
using Plugin.Settings.Abstractions;
namespace Aurora.gtk.Helpers
{
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the same exact way with getters
/// and setters.
/// </summary>
public static class Settings
{
private static ISettings AppSettings
{
get
{
return CrossSettings.Current;
}
}
#region Setting Constants
private const string SettingsKey = "settings_key";
private static readonly string SettingsDefault = string.Empty;
#endregion
public static string GeneralSettings
{
get
{
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
}
set
{
AppSettings.AddOrUpdateValue(SettingsKey, value);
}
}
}
}*/

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dllmap
os="linux"
dll="opengl32.dll"
target="libGL.so.1"/>
<dllmap
os="linux"
dll="glu32.dll"
target="libGLU.so.1"/>
<dllmap
os="linux"
dll="openal32.dll"
target="libopenal.so.1"/>
<dllmap
os="linux"
dll="alut.dll"
target="libalut.so.0"/>
<dllmap
os="linux"
dll="opencl.dll"
target="libOpenCL.so"/>
<dllmap
os="linux"
dll="libX11"
target="libX11.so.6"/>
<dllmap
os="linux"
dll="libXi"
target="libXi.so.6"/>
<dllmap
os="linux"
dll="SDL2.dll"
target="libSDL2-2.0.so.0"/>
<dllmap
os="osx"
dll="opengl32.dll"
target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap
os="osx"
dll="openal32.dll"
target="/System/Library/Frameworks/OpenAL.framework/OpenAL"/>
<dllmap
os="osx"
dll="alut.dll"
target="/System/Library/Frameworks/OpenAL.framework/OpenAL"/>
<dllmap
os="osx"
dll="libGLES.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="libGLESv1_CM.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="libGLESv2.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="opencl.dll"
target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap
os="osx"
dll="SDL2.dll"
target="libSDL2.dylib"/><!-- XQuartz compatibility (X11 on Mac) -->
<dllmap
os="osx"
dll="libGL.so.1"
target="/usr/X11/lib/libGL.dylib"/>
<dllmap
os="osx"
dll="libX11"
target="/usr/X11R6/lib/libX11.dylib"/>
<dllmap
os="osx"
dll="libXcursor.so.1"
target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap
os="osx"
dll="libXi"
target="/usr/X11/lib/libXi.dylib"/>
<dllmap
os="osx"
dll="libXinerama"
target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap
os="osx"
dll="libXrandr.so.2"
target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dllmap
os="linux"
dll="opengl32.dll"
target="libGL.so.1"/>
<dllmap
os="linux"
dll="glu32.dll"
target="libGLU.so.1"/>
<dllmap
os="linux"
dll="openal32.dll"
target="libopenal.so.1"/>
<dllmap
os="linux"
dll="alut.dll"
target="libalut.so.0"/>
<dllmap
os="linux"
dll="opencl.dll"
target="libOpenCL.so"/>
<dllmap
os="linux"
dll="libX11"
target="libX11.so.6"/>
<dllmap
os="linux"
dll="libXi"
target="libXi.so.6"/>
<dllmap
os="linux"
dll="SDL2.dll"
target="libSDL2-2.0.so.0"/>
<dllmap
os="osx"
dll="opengl32.dll"
target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap
os="osx"
dll="openal32.dll"
target="/System/Library/Frameworks/OpenAL.framework/OpenAL"/>
<dllmap
os="osx"
dll="alut.dll"
target="/System/Library/Frameworks/OpenAL.framework/OpenAL"/>
<dllmap
os="osx"
dll="libGLES.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="libGLESv1_CM.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="libGLESv2.dll"
target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES"/>
<dllmap
os="osx"
dll="opencl.dll"
target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap
os="osx"
dll="SDL2.dll"
target="libSDL2.dylib"/><!-- XQuartz compatibility (X11 on Mac) -->
<dllmap
os="osx"
dll="libGL.so.1"
target="/usr/X11/lib/libGL.dylib"/>
<dllmap
os="osx"
dll="libX11"
target="/usr/X11R6/lib/libX11.dylib"/>
<dllmap
os="osx"
dll="libXcursor.so.1"
target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap
os="osx"
dll="libXi"
target="/usr/X11/lib/libXi.dylib"/>
<dllmap
os="osx"
dll="libXinerama"
target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap
os="osx"
dll="libXrandr.so.2"
target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,16 @@
using System;
using Gtk;
public partial class MainWindow : Gtk.Window
{
public MainWindow() : base(Gtk.WindowType.Toplevel)
{
Build();
}
protected void OnDeleteEvent(object sender, DeleteEventArgs a)
{
Application.Quit();
a.RetVal = true;
}
}

View File

@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,31 @@
using System;
using LibVLCSharp.Forms.Shared;
using Xamarin.Forms.Platform.GTK;
namespace Aurora.gtk
{
class MainClass
{
[STAThread]
public static void Main(string[] args)
{
Gtk.Application.Init();
LibVLCSharpFormsRenderer.Init();
DLToolkit.Forms.Controls.FlowListView.Init();
// For some reason, Xamarin does not pick the LibVLCSharp.Form.Platforms.Gtk assembly as a renderer assembly.
// Add it manually.
//Also css doesn't work without adding the Xaml assembly
global::Xamarin.Forms.Forms.Init(new[] { typeof(LibVLCSharp.Forms.Platforms.GTK.VideoViewRenderer).Assembly, typeof(Xamarin.Forms.Xaml.ArrayExtension).Assembly });
var app = new App();
var window = new FormsWindow();
window.LoadApplication(app);
window.SetApplicationTitle("Aurora");
window.Show();
Gtk.Application.Run();
}
}
}

View File

@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Aurora.gtk")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,22 @@
// This file has been generated by the GUI designer. Do not modify.
public partial class MainWindow
{
protected virtual void Build()
{
global::Stetic.Gui.Initialize(this);
// Widget MainWindow
this.Name = "MainWindow";
this.Title = global::Mono.Unix.Catalog.GetString("MainWindow");
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
if ((this.Child != null))
{
this.Child.ShowAll();
}
this.DefaultWidth = 400;
this.DefaultHeight = 300;
this.Show();
this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
}
}

View File

@ -0,0 +1,30 @@
// This file has been generated by the GUI designer. Do not modify.
namespace Stetic
{
internal class Gui
{
private static bool initialized;
internal static void Initialize(Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false))
{
Stetic.Gui.initialized = true;
}
}
}
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup(System.Type type)
{
return Stetic.ActionGroups.GetActionGroup(type.FullName);
}
public static Gtk.ActionGroup GetActionGroup(string name)
{
return null;
}
}
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<stetic-interface>
<configuration>
<images-root-path>..</images-root-path>
<target-gtk-version>2.12</target-gtk-version>
</configuration>
<import>
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<widget-library name="../../packages/Xamarin.Forms.Platform.GTK.4.3.0.991211/lib/net45/webkit-sharp.dll" />
<widget-library name="../../packages/LibVLCSharp.GTK.3.3.1/lib/net47/LibVLCSharp.GTK.dll" />
<widget-library name="../bin/Debug/Aurora.gtk.exe" internal="true" />
</import>
<widget class="Gtk.Window" id="MainWindow" design-size="400 300">
<property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property>
<property name="WindowPosition">CenterOnParent</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" />
<child>
<placeholder />
</child>
</widget>
</stetic-interface>

Binary file not shown.

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="5.0.0" targetFramework="net47" />
<package id="CarouselView.FormsPlugin" version="5.2.0" targetFramework="net47" />
<package id="DLToolkit.Forms.Controls.FlowListView" version="2.0.11" targetFramework="net47" />
<package id="Google.Protobuf" version="3.10.1" targetFramework="net47" />
<package id="Grpc" version="2.25.0" targetFramework="net47" />
<package id="Grpc.Core" version="2.25.0" targetFramework="net47" />
<package id="Grpc.Core.Api" version="2.25.0" targetFramework="net47" />
<package id="Grpc.Tools" version="2.25.0" targetFramework="net47" developmentDependency="true" />
<package id="LibVLCSharp" version="3.3.1" targetFramework="net47" requireReinstallation="true" />
<package id="LibVLCSharp.Forms" version="3.3.1" targetFramework="net47" />
<package id="LibVLCSharp.Forms.GTK" version="3.3.1" targetFramework="net47" />
<package id="LibVLCSharp.GTK" version="3.3.1" targetFramework="net47" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net47" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net47" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net47" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net47" />
<package id="OpenTK" version="3.1.0" targetFramework="net47" />
<package id="OpenTK.GLControl" version="3.0.1" targetFramework="net47" />
<package id="Sharpnado.Forms.HorizontalListView" version="1.3.0" targetFramework="net47" />
<package id="System.Buffers" version="4.4.0" targetFramework="net47" />
<package id="System.Interactive.Async" version="4.0.0" targetFramework="net47" />
<package id="System.Linq.Async" version="4.0.0" targetFramework="net47" />
<package id="System.Memory" version="4.5.3" targetFramework="net47" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net47" />
<package id="System.Reflection" version="4.3.0" targetFramework="net47" />
<package id="System.Reflection.TypeExtensions" version="4.6.0" targetFramework="net47" requireReinstallation="true" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net47" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net47" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net47" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net47" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net47" />
<package id="taglib-sharp-netstandard2.0" version="2.1.0" targetFramework="net47" />
<package id="VideoLAN.LibVLC.Mac" version="3.1.3.1" targetFramework="net47" />
<package id="Xam.Plugins.Settings" version="3.1.1" targetFramework="net47" />
<package id="Xamarin.Forms" version="5.0.0.2012" targetFramework="net47" />
<package id="Xamarin.Forms.DataGrid" version="4.8.0" targetFramework="net47" />
<package id="Xamarin.Forms.Platform.GTK" version="5.0.0.2012" targetFramework="net47" />
</packages>

View File

@ -0,0 +1,5 @@
<configuration>
<dllmap dll="webkit-1.0" target="libwebkitgtk-1.0.0.dylib"/>
<dllmap dll="webkit-1.0" os="linux" target="libwebkitgtk-1.0.so.0"/>
<dllmap dll="webkit-1.0" os="windows" target="libwebkitgtk-1.0-0.dll"/>
</configuration>

View File

@ -0,0 +1,57 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aurora", "Aurora\Aurora.csproj", "{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aurora.gtk", "Aurora.gtk\Aurora.gtk.csproj", "{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}"
EndProject
#Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aurora.test", "Aurora.test\Aurora.test.csproj", "{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}"
#EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|iPhone.Build.0 = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|iPhone.ActiveCfg = Release|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|iPhone.Build.0 = Release|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F51282-39BE-4FE3-8EC7-6D108F5DD0FD}.Release|Any CPU.Build.0 = Release|Any CPU
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|iPhone.ActiveCfg = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|iPhone.Build.0 = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|iPhone.ActiveCfg = Release|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|iPhone.Build.0 = Release|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{E8C8C24A-5C51-47CB-B241-F5A9F0E808B1}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|iPhone.Build.0 = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|iPhone.ActiveCfg = Release|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|iPhone.Build.0 = Release|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45680D8A-1AF1-4D93-AAC0-59CDB01CED5D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,64 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Grpc.Core" Version="2.26.0" />
<PackageReference Include="Grpc.Tools" Version="2.26.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Grpc" Version="2.26.0" />
<PackageReference Include="Autofac" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<Protobuf Remove="..\Aurora\Proto\general.proto" />
<Protobuf Remove="..\Aurora\Proto\party.v2.proto" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aurora\Aurora.csproj" />
<ProjectReference Include="..\..\aurora-shared\aurora-shared.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Resources\Jidenna\The Chief\04 Bambi.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\14 Bully Of The Earth.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\12 Some Kind Of Way.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\03 Trampoline.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\09 Safari.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\05 Helicopters _ Beware.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\08 The Let Out.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\10 Adaora.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\07 2 Points.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\06 Long Live The Chief.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\11 Little Bit More.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Resources\Jidenna\The Chief\13 White Niggas.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,100 @@
using NUnit.Framework;
using Aurora.Proto.Party;
using Aurora.Services.Server;
using Aurora.Services.EventManager;
using Grpc.Core;
using System.Threading.Tasks;
using System.Threading;
using Autofac;
namespace Aurora.test.ControllerTests
{
public class EventTest
{
private RemotePartyService.RemotePartyServiceClient _remotePartyService;
private Channel _channel;
private IContainer _container;
private IServerService _serverService;
#region Setup
[SetUp]
public void Setup()
{
_container = SetupUtil.SetupOneTime();
_remotePartyService = SetupUtil.Setup(ref _container, ref _serverService, ref _channel);
}
[TearDown]
public async Task TearDown()
{
await _serverService.Stop();
await _channel.ShutdownAsync();
_container.Dispose();
}
#endregion Setup
[Test]
[TestCase(EventType.MediaPlaying)]
public void Asdf(EventType value)
{
Assert.AreEqual(1, 1);
}
[Test]
[TestCase(EventType.MediaPlaying)]
[TestCase(EventType.MediaStopped)]
[TestCase(EventType.MemberCreated)]
[TestCase(EventType.MemberDeleted)]
public async Task TestEventSubscriptions(EventType value)
{
using (var scope = _container.BeginLifetimeScope())
{
IEventManager eventManager = scope.Resolve<IEventManager>();
//Create new party member
Member member = _remotePartyService.CreateMember(new CreateMemberRequest()
{
Parent = "party1",
Member = new Member()
{
UserName = "newMember1",
IpAddress = ServerService.GetLocalIPAddress(),
}
});
//Subscribe to event type
_remotePartyService.CreateEventSubscription(new CreateEventSubscriptionRequest()
{
Parent = member.Name,
EventSubscription = new EventSubscription()
{
Type = value
}
});
BaseEvent @event = new BaseEvent
{
EventType = value,
};
//Fire event
CancellationTokenSource eventCancellationTokenSource = new CancellationTokenSource();
BaseEvent newEvent = null;
Task.Run(async () => { await Task.Delay(1000); eventManager.FireEvent(@event); });
using (AsyncServerStreamingCall<BaseEvent> eventStream = _remotePartyService
.GetEvents(new GetEventsRequest() { Parent = member.Name }))
{
while ((!eventCancellationTokenSource.Token.IsCancellationRequested &&
await eventStream.ResponseStream.MoveNext(eventCancellationTokenSource.Token)))
{
newEvent = new BaseEvent(eventStream.ResponseStream.Current);
break;
}
};
Assert.AreEqual(newEvent.EventType, value);
}
}
}
}

View File

@ -0,0 +1,78 @@
using NUnit.Framework;
using Aurora.Proto.Party;
using Aurora.Services.Server;
using Grpc.Core;
using System.Threading.Tasks;
using System.Linq;
using System.IO;
using Autofac;
namespace Aurora.test.ControllerTests
{
public class MediaControllerTests
{
private RemotePartyService.RemotePartyServiceClient _remotePartyService;
private Channel _channel;
private IContainer _container;
private IServerService _serverService;
#region Setup
[OneTimeSetUp]
public void SetupOneTime()
{
_container = SetupUtil.SetupOneTime();
}
[OneTimeTearDown]
public void TearDownOneTime()
{
_container.Dispose();
}
[SetUp]
public void Setup()
{
_remotePartyService = SetupUtil.Setup(ref _container, ref _serverService, ref _channel);
}
[TearDown]
public async Task TearDown()
{
await _serverService.Stop();
await _channel.ShutdownAsync();
}
#endregion Setup
[Test]
public void TestNotEmpty()
{
ListMediaResponse resp = _remotePartyService.ListMedia(new ListMediaRequest()
{
Parent = "testParty",
PageSize = 5
});
Assert.NotNull(resp.Media);
Assert.NotZero(resp.Media.Count);
Assert.AreEqual(resp.Media.Count, 5);
}
[Test]
public void GetMediaTest()
{
ListMediaResponse resp = _remotePartyService.ListMedia(new ListMediaRequest()
{
Parent = "testParty",
PageSize = 5
});
Media media = _remotePartyService.GetMedia(new GetMediaRequest()
{
Name = resp.Media[0].Name
});
Assert.NotNull(media);
Assert.AreEqual(media.Name, resp.Media[0].Name);
}
}
}

View File

@ -0,0 +1,206 @@
using NUnit.Framework;
using Aurora.Proto.Party;
using Aurora.Services.Server;
using Grpc.Core;
using System.Threading.Tasks;
using System.Linq;
using Autofac;
namespace Aurora.test.ControllerTests
{
public class MemberControllerTests
{
private RemotePartyService.RemotePartyServiceClient _remotePartyService;
private Channel _channel;
private IContainer _container;
private IServerService _serverService;
#region Setup
[OneTimeSetUp]
public void SetupOneTime()
{
_container = SetupUtil.SetupOneTime();
}
[OneTimeTearDown]
public void TearDownOneTime()
{
_container.Dispose();
}
[SetUp]
public void Setup()
{
_remotePartyService = SetupUtil.Setup(ref _container, ref _serverService, ref _channel);
}
[TearDown]
public async Task TearDown()
{
await _serverService.Stop();
await _channel.ShutdownAsync();
}
#endregion Setup
[Test]
public void DefaultTest()
{
ListMembersResponse resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 10,
});
Assert.NotNull(resp);
Assert.GreaterOrEqual(resp.Members.Count, 1);
}
[Test]
[TestCase("Alex")]
[TestCase("Alex Goldberg")]
[TestCase("Alex/goldberg")]
[TestCase("alex@welcome.com")]
public void CreateMemberTest(string value)
{
Member member = _remotePartyService.CreateMember(new CreateMemberRequest()
{
Parent = "party1",
Member = new Member()
{
UserName = value,
IpAddress = ServerService.GetLocalIPAddress(),
}
});
Assert.NotNull(member);
}
static object[] MultipleMembersCases =
{
new object[] {"Tupac", "Aubrey Grahm", "Beyonce Knowls", "Ke$ha", "A$ap Ferg"},
};
[Test]
[TestCaseSource("MultipleMembersCases")]
public void CreateMultiplMembersTest(object[] memberNames)
{
//Add members
foreach (string name in memberNames)
{
Member member = _remotePartyService.CreateMember(new CreateMemberRequest()
{
Parent = "party1",
Member = new Member()
{
UserName = name
}
});
Assert.NotNull(member);
}
//List members
ListMembersResponse resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 10,
});
Assert.NotNull(resp);
Assert.AreEqual(resp.Members.Count, 6);
}
[Test]
[TestCaseSource("MultipleMembersCases")]
public void DeleteMemberTest(object[] memberNames)
{
//Add members
foreach (string name in memberNames)
{
Member member = _remotePartyService.CreateMember(new CreateMemberRequest()
{
Parent = "party1",
Member = new Member()
{
UserName = name
}
});
Assert.NotNull(member);
}
//List members
ListMembersResponse resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 10,
});
Assert.NotNull(resp);
Assert.AreEqual(resp.Members.Count, 6);
string keshaResourceName = resp.Members.First(member => member.UserName == "Ke$ha").Name;
//Delete member
_remotePartyService.DeleteMember(new DeleteMemberRequest()
{
Name = keshaResourceName
});
//List members
resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 10,
});
Assert.NotNull(resp);
Assert.AreEqual(resp.Members.Count, 5);
Assert.False(resp.Members.Any(member => member.UserName == "Ke$sha"));
}
static object[] PagingCases =
{
new object[] {"Tupac", "Aubrey Grahm", "Beyonce Knowls", "Ke$ha", "A$ap Ferg", "asdf", "sdfa", "dfas", "fasd"},
};
[Test]
[TestCaseSource("PagingCases")]
public void MemberPagingTest(object[] members)
{
foreach (string name in members)
{
Member member = _remotePartyService.CreateMember(new CreateMemberRequest()
{
Parent = "party1",
Member = new Member()
{
UserName = name
}
});
Assert.NotNull(member);
}
//List members
ListMembersResponse resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 2,
});
string nextPageToken = resp.NextPageToken;
Assert.AreEqual(resp.Members.Count, 2);
//List members
resp = _remotePartyService.ListMembers(new ListMembersRequest()
{
Parent = "party1",
PageSize = 2,
PageToken = nextPageToken,
});
Assert.AreEqual(resp.Members.Count, 2);
}
}
}

View File

@ -0,0 +1,53 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Aurora.Proto.Party;
using Aurora.Services.Server;
using Grpc.Core;
using Autofac;
namespace Aurora.test.ControllerTests
{
public class PartyControllerTests
{
private RemotePartyService.RemotePartyServiceClient _remotePartyService;
private Channel _channel;
private IContainer _container;
private IServerService _serverService;
#region Setup
[OneTimeSetUp]
public void SetupOneTime()
{
_container = SetupUtil.SetupOneTime();
}
[OneTimeTearDown]
public void TearDownOneTime()
{
_container.Dispose();
}
[SetUp]
public void Setup()
{
_remotePartyService = SetupUtil.Setup(ref _container, ref _serverService, ref _channel);
}
[TearDown]
public async Task TearDown()
{
await _serverService.Stop();
await _channel.ShutdownAsync();
}
#endregion Setup
[Test]
public void DefaultTest()
{
Party party = _remotePartyService.GetParty(new Proto.General.Empty());
Assert.NotNull(party);
Assert.AreEqual(party.Name, "party/party1");
}
}
}

View File

@ -0,0 +1,39 @@
using Autofac;
using Aurora.Proto.Party;
using Aurora.Services.Server;
using Aurora.Services.Library;
using Aurora.Services.Settings;
using Aurora.Services.EventManager;
using Aurora.test.Models.Mock;
using System.IO;
using Grpc.Core;
namespace Aurora.test.ControllerTests
{
public class SetupUtil
{
public static IContainer SetupOneTime()
{
ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<ServerService>().As<IServerService>().SingleInstance();
builder.RegisterInstance<ISettingsService>(new SettingsServiceMock()
{
Username = "Test User 1",
DefaultPort = 4005,
LibraryLocation = string.Format("{0}/Resources", Directory.GetCurrentDirectory())
}).SingleInstance();
builder.RegisterType<LibraryService>().As<ILibraryService>().SingleInstance();
builder.RegisterType<EventManager>().As<IEventManager>().SingleInstance();
return builder.Build();
}
public static RemotePartyService.RemotePartyServiceClient Setup(ref IContainer container, ref IServerService serverService, ref Channel channel)
{
serverService = container.Resolve<IServerService>();
serverService.Start("testParty", "asdf");
channel = new Channel(string.Format("{0}:{1}", ServerService.GetLocalIPAddress(), 8080), ChannelCredentials.Insecure);
return new RemotePartyService.RemotePartyServiceClient(channel);
}
}
}

View File

@ -0,0 +1,39 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
namespace Aurora.test.Models
{
public class CallContext : ServerCallContext
{
protected override string MethodCore => throw new NotImplementedException();
protected override string HostCore => throw new NotImplementedException();
protected override string PeerCore => throw new NotImplementedException();
protected override DateTime DeadlineCore => throw new NotImplementedException();
protected override Metadata RequestHeadersCore => throw new NotImplementedException();
protected override CancellationToken CancellationTokenCore => throw new NotImplementedException();
protected override Metadata ResponseTrailersCore => throw new NotImplementedException();
protected override Status StatusCore { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
protected override WriteOptions WriteOptionsCore { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
protected override AuthContext AuthContextCore => throw new NotImplementedException();
protected override ContextPropagationToken CreatePropagationTokenCore(ContextPropagationOptions options)
{
throw new NotImplementedException();
}
protected override Task WriteResponseHeadersAsyncCore(Metadata responseHeaders)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,35 @@
using Aurora.Services.Settings;
using Plugin.Settings.Abstractions;
namespace Aurora.test.Models.Mock
{
public class SettingsServiceMock : ISettingsService
{
public SettingsServiceMock()
{
}
public ISettings AppSettings { get; set; }
/// <summary>
/// The user's username. This is persisted.
/// </summary>
/// <value></value>
public string Username { get; set; }
/// <summary>
/// The default port to use. This is persisted.
/// </summary>
/// <value></value>
public int DefaultPort { get; set; }
/// <summary>
/// The current sessions clientId. This is assigned by the server. This is not persisted.
/// </summary>
/// <value></value>
public string ClientName { get; set; }
public string LibraryLocation { get; set; }
}
}

View File

@ -0,0 +1,11 @@
.primaryColor {
background-color: #000000;
}
.accentColor {
background-color: #181818;
}
.secondAccentColor {
background-color: #303030
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:converters="clr-namespace:Aurora.Design.Converters"
x:Class="Aurora.App">
<Application.Resources>
<ResourceDictionary><!-- GENERAL COLORS -->
<Color
x:Key="WhiteColor">#FFFFFF</Color>
<Color
x:Key="BlackColor">#000000</Color><!-- THEME COLORS -->
<Color
x:Key="AccentColor">#F5C210</Color>
<Color
x:Key="ToolbarColor">#151C25</Color>
<Color
x:Key="BackgroundColor">#1E2634</Color>
<Color
x:Key="DarkBackgroundColor">#151C25</Color>
<Color
x:Key="MenuBackgroundColor">#44545C</Color><!-- CONVERTERS -->
<converters:InverseBoolConverter
x:Key="InverseBoolConverter"/>
<converters:ToUpperConverter
x:Key="ToUpperConverter"/>
<StyleSheet
Source="App.css"/>
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@ -0,0 +1,71 @@
using System;
using Aurora.Design.Views.Main;
using Aurora.Design.Views.Albums;
using Aurora.Design.Views.Artists;
using Aurora.Design.Views.Party;
using Aurora.Design.Views.Profile;
using Aurora.Design.Views.Songs;
using Aurora.Design.Views.Stations;
using Aurora.Services.EventManager;
using Aurora.Services;
using Autofac;
using LibVLCSharp.Shared;
using Xamarin.Forms;
using Aurora.Services.Player;
using Aurora.Services.Settings;
using Aurora.Services.Library;
namespace Aurora
{
public partial class App : Application
{
private static IContainer _container;
public App()
{
InitializeComponent();
Core.Initialize();
//Register DI
ContainerBuilder _builder = new ContainerBuilder();
_builder.RegisterInstance<IPlayer>(new PlayerService()).SingleInstance();
_builder.RegisterType<Global>().As<Global>().SingleInstance();
_builder.RegisterType<PlayerService>().As<IPlayer>().SingleInstance();
_builder.RegisterType<SettingsService>().As<ISettingsService>().SingleInstance();
_builder.RegisterType<LibraryService>().As<ILibraryService>().SingleInstance();
_builder.RegisterType<EventManager>().As<IEventManager>().SingleInstance();
_builder.RegisterType<MainView>().SingleInstance();
_builder.RegisterType<AlbumsViewModel>();
_builder.RegisterType<ArtistsViewModel>();
_builder.RegisterType<PartyViewModel>();
_builder.RegisterType<ProfileViewModel>();
_builder.RegisterType<SongsViewModel>();
_builder.RegisterType<HostPartyViewModel>();
_builder.RegisterType<StationsViewModel>();
// _builder.RegisterInstance<ISettingsService>(new SettingsService()).SingleInstance();
_container = _builder.Build();
MainPage = _container.Resolve<MainView>();
}
public static IContainer Container
{
get { return _container; }
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}

View File

@ -0,0 +1,3 @@
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

View File

@ -0,0 +1,89 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceAssemblyReference>true</ProduceAssemblyReference>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>pdbonly</DebugType>
<OutputPath></OutputPath>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="taglib-sharp-netstandard2.0" Version="2.1.0" />
<PackageReference Include="LibVLCSharp.Forms" Version="3.3.1" />
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
<PackageReference Include="Grpc" Version="2.25.0" />
<PackageReference Include="Grpc.Tools" Version="2.25.0" PrivateAssests="All">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Google.Protobuf" Version="3.10.1" />
<PackageReference Include="Xam.Plugins.Settings" Version="3.1.1" />
<PackageReference Include="Sharpnado.Forms.HorizontalListView" Version="1.3.0" />
<PackageReference Include="DLToolkit.Forms.Controls.FlowListView" Version="2.0.11" />
<PackageReference Include="CarouselView.FormsPlugin" Version="5.2.0" />
<PackageReference Include="Autofac" Version="5.0.0" />
<PackageReference Include="Xamarin.Forms.DataGrid" Version="4.8.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Design\" />
<Folder Include="Design\Components\" />
<Folder Include="Design\Views\" />
<Folder Include="Design\Views\Songs\" />
<Folder Include="Design\Views\MainView\" />
<Folder Include="Design\Behaviors\" />
<Folder Include="Design\Components\NavigationMenu\" />
<Folder Include="Design\Views\Albums\" />
<Folder Include="Design\Views\Artists\" />
<Folder Include="Design\Views\Stations\" />
<Folder Include="Utils\" />
<Folder Include="Models\" />
<Folder Include="Services\" />
<Folder Include="Design\Views\Party\" />
<Folder Include="Design\Components\MemberList\" />
<Folder Include="Design\Components\Library\" />
<Folder Include="Design\Views\Profile\" />
<Folder Include="Resources\" />
<Folder Include="Design\Extensions\" />
<Folder Include="Design\Components\ImageButton\" />
<Folder Include="Design\Components\Dialogs\" />
<Folder Include="Design\Views\Party\NewPartyDialog\" />
<Folder Include="Design\Components\TabView\" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Design\Behaviors\DeselectItemBehaviorBase.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="Design\Components\MusicPlayer\Player.xaml.cs">
<DependentUpon>Player.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\..\aurora-proto\Proto\general.proto" />
<Protobuf Include="..\..\aurora-proto\Proto\party.proto" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\backward.png" />
<EmbeddedResource Include="Resources\forwards.png" />
<EmbeddedResource Include="Resources\like.png" />
<EmbeddedResource Include="Resources\play.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Design\Components\NavigationMenu\NavigationMenu.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Remove="Design\Resources\unselected.png" />
<None Remove="Design\Components\MediaPlayer\play.png" />
<None Remove="Resources\backward.png" />
<None Remove="Resources\forwards.png" />
<None Remove="Resources\like.png" />
<None Remove="Resources\play.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\aurora-shared\aurora-shared.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,35 @@
using System;
namespace Aurora.Models.Media
{
public class AudioMetadata : BaseMetadata
{
public void AutioMetadata()
{
}
/// <summary>
/// The title of the song.
/// </summary>
/// <value></value>
public string Title { get; set; }
/// <summary>
/// The artist of the song.
/// </summary>
/// <value></value>
public string Artist { get; set; }
/// <summary>
/// The album from which the song belongs.
/// </summary>
/// <value></value>
public string Album { get; set; }
/// <summary>
/// The duration of the song.
/// </summary>
/// <value></value>
public string Duration { get; set; }
}
}

View File

@ -0,0 +1,63 @@
using System;
using System.IO;
using System.Threading.Tasks;
namespace Aurora.Models.Media
{
public abstract class BaseMedia
{
private Stream _stream;
public BaseMedia()
{
//TODO need to make sure this is unique
Id = Guid.NewGuid().ToString();
}
#region Properties
public string Id { get; protected set; }
public abstract MediaTypeEnum MediaType { get; }
public abstract BaseMetadata Metadata { get; protected set; }
public bool IsLoaded
{
get
{
return DataStream != null;
}
}
#endregion Properties
public virtual Task Load()
{
return Task.FromResult(default(object));
}
public virtual void Unload()
{
}
/// <summary>
/// Gets or sets the data stream that holds the song.
/// </summary>
/// <value>The data stream.</value>
public Stream DataStream
{
get
{
return _stream;
}
protected set
{
if (value != _stream)
{
_stream = value;
}
}
}
}
}

View File

@ -0,0 +1,17 @@
using System;
namespace Aurora.Models.Media
{
public class BaseMetadata
{
public BaseMetadata()
{
}
/// <summary>
/// Extra data associated with a song.
/// </summary>
/// <value></value>
public object ExtraData { get; set; }
}
}

View File

@ -0,0 +1,73 @@
using System;
using System.IO;
using System.Threading.Tasks;
namespace Aurora.Models.Media
{
public class LocalAudio : BaseMedia
{
public LocalAudio(FileInfo fileInfo)
{
File = fileInfo;
LoadMetadata();
}
public LocalAudio(LocalAudio copy)
{
File = copy.File;
LoadMetadata();
}
#region Properties
public FileInfo File { get; private set; }
public override BaseMetadata Metadata { get; protected set; }
public override MediaTypeEnum MediaType
{
get { return MediaTypeEnum.Audio; }
}
#endregion Properties
/// <summary>
/// Override load method.
/// </summary>
public override async Task Load()
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
this.DataStream = System.IO.File.OpenRead(File.FullName);
await base.Load();
}
/// <summary>
/// Override unload method
/// </summary>
public override void Unload()
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
base.Unload();
}
private void LoadMetadata()
{
TagLib.File tagFile = TagLib.File.Create(File.FullName);
Metadata = new AudioMetadata()
{
Title = tagFile.Tag.Title,
Album = tagFile.Tag.Album,
Artist = tagFile.Tag.FirstAlbumArtist,
ExtraData = tagFile.Tag
};
}
}
}

Some files were not shown because too many files have changed in this diff Show More