Rip out project registration and use sharing/unsharing instead

This commit is contained in:
Antonio Scandurra 2022-09-30 12:23:57 +02:00
parent be8990ea78
commit 074b8f18d1
7 changed files with 333 additions and 525 deletions

View file

@ -22,15 +22,14 @@ message Envelope {
DeclineCall decline_call = 13;
RoomUpdated room_updated = 14;
RegisterProject register_project = 15;
RegisterProjectResponse register_project_response = 16;
UnregisterProject unregister_project = 17;
ShareProject share_project = 15;
ShareProjectResponse share_project_response = 16;
UnshareProject unshare_project = 17;
JoinProject join_project = 21;
JoinProjectResponse join_project_response = 22;
LeaveProject leave_project = 23;
AddProjectCollaborator add_project_collaborator = 24;
RemoveProjectCollaborator remove_project_collaborator = 25;
UnshareProject unshare_project = 26;
GetDefinition get_definition = 27;
GetDefinitionResponse get_definition_response = 28;
@ -195,13 +194,13 @@ message RoomUpdated {
Room room = 1;
}
message RegisterProject {}
message ShareProject {}
message RegisterProjectResponse {
message ShareProjectResponse {
uint64 project_id = 1;
}
message UnregisterProject {
message UnshareProject {
uint64 project_id = 1;
}
@ -285,10 +284,6 @@ message RemoveProjectCollaborator {
uint32 peer_id = 2;
}
message UnshareProject {
uint64 project_id = 1;
}
message GetDefinition {
uint64 project_id = 1;
uint64 buffer_id = 2;

View file

@ -141,10 +141,8 @@ messages!(
(PrepareRename, Background),
(PrepareRenameResponse, Background),
(ProjectEntryResponse, Foreground),
(RegisterProjectResponse, Foreground),
(RemoveContact, Foreground),
(Ping, Foreground),
(RegisterProject, Foreground),
(RegisterProjectActivity, Foreground),
(ReloadBuffers, Foreground),
(ReloadBuffersResponse, Foreground),
@ -158,11 +156,12 @@ messages!(
(SearchProjectResponse, Background),
(SendChannelMessage, Foreground),
(SendChannelMessageResponse, Foreground),
(ShareProject, Foreground),
(ShareProjectResponse, Foreground),
(ShowContacts, Foreground),
(StartLanguageServer, Foreground),
(Test, Foreground),
(Unfollow, Foreground),
(UnregisterProject, Foreground),
(UnshareProject, Foreground),
(UpdateBuffer, Foreground),
(UpdateBufferFile, Foreground),
@ -212,7 +211,6 @@ request_messages!(
(Ping, Ack),
(PerformRename, PerformRenameResponse),
(PrepareRename, PrepareRenameResponse),
(RegisterProject, RegisterProjectResponse),
(ReloadBuffers, ReloadBuffersResponse),
(RequestContact, Ack),
(RemoveContact, Ack),
@ -221,8 +219,8 @@ request_messages!(
(SaveBuffer, BufferSaved),
(SearchProject, SearchProjectResponse),
(SendChannelMessage, SendChannelMessageResponse),
(ShareProject, ShareProjectResponse),
(Test, Test),
(UnregisterProject, Ack),
(UpdateBuffer, Ack),
(UpdateWorktree, Ack),
);
@ -263,7 +261,6 @@ entity_messages!(
SearchProject,
StartLanguageServer,
Unfollow,
UnregisterProject,
UnshareProject,
UpdateBuffer,
UpdateBufferFile,