Proto builds

This commit is contained in:
watsonb8 2020-01-19 17:30:09 -05:00
parent 4f67ad908a
commit 4ec9db4a45
2 changed files with 199 additions and 92 deletions

View File

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

View File

@ -1,8 +1,16 @@
syntax = "proto3"; syntax = "proto3";
package Aurora.Proto.Party; package Aurora.Proto.PartyV2;
import "Proto/general.proto"; import "Proto/general.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/field_mask.proto";
//Party
//Members
//EventSubscriptions
//Events
//Media
service RemotePartyService { service RemotePartyService {
//************** //**************
@ -11,12 +19,6 @@ service RemotePartyService {
//Get Party //Get Party
rpc GetParty(Aurora.Proto.General.Empty) returns (Party); rpc GetParty(Aurora.Proto.General.Empty) returns (Party);
//CUSTOM: Join
rpc JoinParty(JoinPartyRequest) returns (JoinPartyResponse);
//CUSTOM: Leave
rpc LeaveParty(LeavePartyRequest) returns (LeavePartyResponse);
//*************** //***************
//Member Resource //Member Resource
//*************** //***************
@ -26,11 +28,20 @@ service RemotePartyService {
//Get //Get
rpc GetMember(GetMemberRequest) returns (Member); 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 //Media Resource
//************** //**************
//List //List
rpc ListMedia(ListMediaRequest) returns (ListMediaResposne); rpc ListMedia(ListMediaRequest) returns (ListMediaResponse);
//Get //Get
rpc GetMedia(GetMediaRequest) returns (RemoteMedia); rpc GetMedia(GetMediaRequest) returns (RemoteMedia);
@ -54,7 +65,7 @@ service RemotePartyService {
rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (Aurora.Proto.General.Empty); rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (Aurora.Proto.General.Empty);
//CUSTOM: Delete all //CUSTOM: Delete all
rpc DeleteAllEventSubsciptions(DeleteAllEventSubscriptions) returns (Aurora.Proto.General.Empty); rpc DeleteAllEventSubscriptions(DeleteAllEventSubscriptionsRequest) returns (Aurora.Proto.General.Empty);
//***** //*****
//Event //Event
@ -64,15 +75,13 @@ service RemotePartyService {
} }
message Party { message Party {
//The resource name of the party
string name = 1; string name = 1;
string displayName = 2; string displayName = 2;
string description = 3; string description = 3;
string host = 4; string hostIp = 4;
Timestamp createdTime = 5; Member hostMember = 5;
} google.protobuf.Timestamp createdTime = 6;
message JoinPartyRequest {
string userName = 2;
} }
enum PartyJoinedStatusEnum { enum PartyJoinedStatusEnum {
@ -80,20 +89,12 @@ enum PartyJoinedStatusEnum {
NotInParty = 1; NotInParty = 1;
} }
message JoinPartyResponse {
PartyJoinedStatusEnum status = 1;
string clientId = 2;
}
message LeavePartyRequest {
string clientId = 1;
}
message LeavePartyResponse { message LeavePartyResponse {
PartyJoinedStatusEnum status = 1; PartyJoinedStatusEnum status = 1;
} }
message PartyMember { message Member {
//Resource name of the party member to be returned
string name = 1; string name = 1;
string userName = 2; string userName = 2;
string id = 3; string id = 3;
@ -102,22 +103,42 @@ message PartyMember {
} }
message ListMembersRequest { message ListMembersRequest {
//Resource name of the parent of the members collection to be returned (The party)
string parent = 1; string parent = 1;
int32 pageSize = 2; int32 pageSize = 2;
string pageToken = 3; string pageToken = 3;
} }
message ListMembersResponse { message ListMembersResponse {
repeated PartyMember members = 1; repeated Member members = 1;
string nextPageToken = 2; string nextPageToken = 2;
} }
message GetMemberRequest { 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;
string memberId = 2;
Member member = 3;
}
message UpdateMemberRequest {
Member member = 1;
google.protobuf.FieldMask updateMask = 2;
}
message DeleteMemberRequest {
//Resource name of the member to be deleted
string name = 1; string name = 1;
} }
message RemoteMedia { message RemoteMedia {
string id = 1; //Resource name of the remote media object
string name = 1;
string title = 2; string title = 2;
string artist = 3; string artist = 3;
string album = 4; string album = 4;
@ -125,6 +146,7 @@ message RemoteMedia {
} }
message ListMediaRequest { message ListMediaRequest {
//Resource name of the parent of the media collection to be listed (The party)
string parent = 1; string parent = 1;
int32 pageSize = 2; int32 pageSize = 2;
string pageToken = 3; string pageToken = 3;
@ -136,10 +158,17 @@ message ListMediaResponse {
} }
message GetMediaRequest { message GetMediaRequest {
//Resource name of the media requested
string name = 1; string name = 1;
} }
message StreamMediaRequest { message StreamMediaRequest {
//Resource name of the media requested
string name = 1;
}
message SyncMediaRequest {
//Resource name of the media to sync with
string name = 1; string name = 1;
} }
@ -150,20 +179,21 @@ message Sync {
/* Event Types */ /* Event Types */
enum EventType { enum EventType {
PartyMemberJoined = 0; MemberCreated = 0;
PartyMemberLeft = 1; MemberDeleted = 1;
MediaPlaying = 2; MediaPlaying = 2;
MediaStopped = 3; MediaStopped = 3;
} }
message BaseEvent { message BaseEvent {
//Resource name of the event ?
string name = 1; string name = 1;
EventType eventType = 2; EventType eventType = 2;
string clientKey = 3; string clientKey = 3;
oneof derivedEvent { oneof derivedEvent {
PartyMemberJoinedEvent partyMemberJoinedEvent = 4; MemberCreatedEvent memberCreatedEvent = 4;
PartyMemberLeftEvent partyMemberLeftEvent = 5; MemberDeletedEvent memberDeletedEvent = 5;
NewMediaPlayingEvent newMediaPlayingEvent = 6; NewMediaPlayingEvent newMediaPlayingEvent = 6;
MediaPausedEvent mediaPausedEvent = 7; MediaPausedEvent mediaPausedEvent = 7;
MediaResumedEvent mediaResumedEvent = 8; MediaResumedEvent mediaResumedEvent = 8;
@ -171,7 +201,7 @@ message BaseEvent {
} }
message NewMediaPlayingEvent { message NewMediaPlayingEvent {
Aurora.Proto.Party.RemoteMediaData media = 1; RemoteMedia media = 1;
} }
message MediaResumedEvent { message MediaResumedEvent {
@ -182,20 +212,22 @@ message MediaPausedEvent {
Aurora.Proto.General.Empty empty = 1; Aurora.Proto.General.Empty empty = 1;
} }
message PartyMemberJoinedEvent { message MemberCreatedEvent {
Aurora.Proto.Party.PartyMember member = 1; Member member = 1;
} }
message PartyMemberLeftEvent { message MemberDeletedEvent {
Aurora.Proto.Party.PartyMember member = 1; Member member = 1;
} }
message EventSubscription { message EventSubscription {
//Resource name of the event
string name = 1; string name = 1;
EventType type = 2; EventType type = 2;
} }
message ListEventSubscriptionsRequest { message ListEventSubscriptionsRequest {
//Resource name of parent to the subscription list (The member)
string parent = 1; string parent = 1;
int32 pageSize = 2; int32 pageSize = 2;
string pageToken = 3; string pageToken = 3;
@ -207,18 +239,22 @@ message ListEventSubscriptionsResponse {
} }
message CreateEventSubscriptionRequest { message CreateEventSubscriptionRequest {
//Resource name of the parent to the subscription list (The member)
string parent = 1; string parent = 1;
EventSubscription eventSubscription = 2; EventSubscription eventSubscription = 2;
} }
message DeleteEventSubscriptionRequest { message DeleteEventSubscriptionRequest {
//Resource name of the subscription to delete
string name = 1; string name = 1;
} }
message DeleteAllEventSubscriptionsRequest { message DeleteAllEventSubscriptionsRequest {
//Resource name of the parent to the subscription list (the member)
string parent = 1; string parent = 1;
} }
message GetEventsRequest { message GetEventsRequest {
//Resource name of the parent to the event stream (the member)
string parent = 1; string parent = 1;
} }