diff --git a/Aurora/Aurora.csproj b/Aurora/Aurora.csproj index 1c6f392..7982957 100644 --- a/Aurora/Aurora.csproj +++ b/Aurora/Aurora.csproj @@ -1,87 +1,158 @@ - + netstandard2.0 true - + pdbonly true - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + Player.xaml - - - - - + + + + + + - - - - + + + + - + PreserveNewest - - - - - - + + + + + + \ No newline at end of file diff --git a/Aurora/Proto/party.v2.proto b/Aurora/Proto/party.v2.proto index 1c84f06..55eb9b2 100644 --- a/Aurora/Proto/party.v2.proto +++ b/Aurora/Proto/party.v2.proto @@ -1,8 +1,16 @@ syntax = "proto3"; -package Aurora.Proto.Party; +package Aurora.Proto.PartyV2; import "Proto/general.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/field_mask.proto"; + +//Party + //Members + //EventSubscriptions + //Events + //Media service RemotePartyService { //************** @@ -11,12 +19,6 @@ service RemotePartyService { //Get 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 //*************** @@ -26,11 +28,20 @@ service RemotePartyService { //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 (ListMediaResposne); + rpc ListMedia(ListMediaRequest) returns (ListMediaResponse); //Get rpc GetMedia(GetMediaRequest) returns (RemoteMedia); @@ -54,7 +65,7 @@ service RemotePartyService { rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (Aurora.Proto.General.Empty); //CUSTOM: Delete all - rpc DeleteAllEventSubsciptions(DeleteAllEventSubscriptions) returns (Aurora.Proto.General.Empty); + rpc DeleteAllEventSubscriptions(DeleteAllEventSubscriptionsRequest) returns (Aurora.Proto.General.Empty); //***** //Event @@ -64,15 +75,13 @@ service RemotePartyService { } message Party { + //The resource name of the party string name = 1; string displayName = 2; string description = 3; - string host = 4; - Timestamp createdTime = 5; -} - -message JoinPartyRequest { - string userName = 2; + string hostIp = 4; + Member hostMember = 5; + google.protobuf.Timestamp createdTime = 6; } enum PartyJoinedStatusEnum { @@ -80,20 +89,12 @@ enum PartyJoinedStatusEnum { NotInParty = 1; } -message JoinPartyResponse { - PartyJoinedStatusEnum status = 1; - string clientId = 2; -} - -message LeavePartyRequest { - string clientId = 1; -} - message LeavePartyResponse { PartyJoinedStatusEnum status = 1; } -message PartyMember { +message Member { + //Resource name of the party member to be returned string name = 1; string userName = 2; string id = 3; @@ -102,22 +103,42 @@ message PartyMember { } 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 PartyMember members = 1; + 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; + 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; } message RemoteMedia { - string id = 1; + //Resource name of the remote media object + string name = 1; string title = 2; string artist = 3; string album = 4; @@ -125,6 +146,7 @@ message RemoteMedia { } 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; @@ -136,10 +158,17 @@ message ListMediaResponse { } message GetMediaRequest { + //Resource name of the media requested 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; } @@ -150,20 +179,21 @@ message Sync { /* Event Types */ enum EventType { - PartyMemberJoined = 0; - PartyMemberLeft = 1; + 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 { - PartyMemberJoinedEvent partyMemberJoinedEvent = 4; - PartyMemberLeftEvent partyMemberLeftEvent = 5; + MemberCreatedEvent memberCreatedEvent = 4; + MemberDeletedEvent memberDeletedEvent = 5; NewMediaPlayingEvent newMediaPlayingEvent = 6; MediaPausedEvent mediaPausedEvent = 7; MediaResumedEvent mediaResumedEvent = 8; @@ -171,7 +201,7 @@ message BaseEvent { } message NewMediaPlayingEvent { - Aurora.Proto.Party.RemoteMediaData media = 1; + RemoteMedia media = 1; } message MediaResumedEvent { @@ -182,20 +212,22 @@ message MediaPausedEvent { Aurora.Proto.General.Empty empty = 1; } -message PartyMemberJoinedEvent { - Aurora.Proto.Party.PartyMember member = 1; +message MemberCreatedEvent { + Member member = 1; } -message PartyMemberLeftEvent { - Aurora.Proto.Party.PartyMember member = 1; +message MemberDeletedEvent { + Member member = 1; } message EventSubscription { + //Resource name of the event string name = 1; EventType type = 2; } message ListEventSubscriptionsRequest { + //Resource name of parent to the subscription list (The member) string parent = 1; int32 pageSize = 2; string pageToken = 3; @@ -207,18 +239,22 @@ message ListEventSubscriptionsResponse { } 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 name = 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; }