Introduce call infrastructure

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-09-28 11:33:38 +02:00
co-authored by Nathan Sobo
parent ebb5ffcedc
commit 4a9bf8f4fe
11 changed files with 249 additions and 45 deletions
+17 -3
View File
@@ -16,7 +16,8 @@ message Envelope {
JoinRoom join_room = 10;
JoinRoomResponse join_room_response = 11;
Call call = 12;
CallResponse call_response = 13;
IncomingCall incoming_call = 1000;
RespondToCall respond_to_call = 13;
RoomUpdated room_updated = 14;
RegisterProject register_project = 15;
@@ -149,6 +150,7 @@ message JoinRoomResponse {
message Room {
repeated Participant participants = 1;
repeated uint64 pending_calls_to_user_ids = 2;
}
message Participant {
@@ -171,9 +173,21 @@ message ParticipantLocation {
message External {}
}
message Call {}
message Call {
uint64 room_id = 1;
uint64 to_user_id = 2;
}
message CallResponse {}
message IncomingCall {
uint64 room_id = 1;
uint64 from_user_id = 2;
repeated uint64 participant_user_ids = 3;
}
message RespondToCall {
uint64 room_id = 1;
bool accept = 2;
}
message RoomUpdated {
Room room = 1;
+5
View File
@@ -83,6 +83,7 @@ messages!(
(ApplyCompletionAdditionalEditsResponse, Background),
(BufferReloaded, Foreground),
(BufferSaved, Foreground),
(Call, Foreground),
(ChannelMessageSent, Foreground),
(CopyProjectEntry, Foreground),
(CreateBufferForPeer, Foreground),
@@ -117,6 +118,7 @@ messages!(
(GetProjectSymbols, Background),
(GetProjectSymbolsResponse, Background),
(GetUsers, Foreground),
(IncomingCall, Foreground),
(UsersResponse, Foreground),
(JoinChannel, Foreground),
(JoinChannelResponse, Foreground),
@@ -151,6 +153,7 @@ messages!(
(RequestJoinProject, Foreground),
(RespondToContactRequest, Foreground),
(RespondToJoinProjectRequest, Foreground),
(RoomUpdated, Foreground),
(SaveBuffer, Foreground),
(SearchProject, Background),
(SearchProjectResponse, Background),
@@ -179,6 +182,7 @@ request_messages!(
ApplyCompletionAdditionalEdits,
ApplyCompletionAdditionalEditsResponse
),
(Call, Ack),
(CopyProjectEntry, ProjectEntryResponse),
(CreateProjectEntry, ProjectEntryResponse),
(CreateRoom, CreateRoomResponse),
@@ -200,6 +204,7 @@ request_messages!(
(JoinChannel, JoinChannelResponse),
(JoinProject, JoinProjectResponse),
(JoinRoom, JoinRoomResponse),
(IncomingCall, Ack),
(OpenBufferById, OpenBufferResponse),
(OpenBufferByPath, OpenBufferResponse),
(OpenBufferForSymbol, OpenBufferForSymbolResponse),