This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora/Proto/party.v2.proto

259 lines
5.9 KiB
Protocol Buffer
Raw Normal View History

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