Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Async friending schema #22

Merged
merged 6 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions schema/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ message GetFriendListResponse {
repeated FriendInfo friend_infos = 1;
}

message GenerateFriendKeyRequest {
string unique_name = 1;
string display_name = 2;
}

message GenerateFriendKeyResponse {
string key = 1;
}

message GetPublicIDRequest {}

message GetPublicIDResponse {
Expand Down
26 changes: 25 additions & 1 deletion schema/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ service Server {
// Sending and receiving protobufs
rpc SendMessage(SendMessageInfo) returns (SendMessageResponse) {}
rpc ReceiveMessage(ReceiveMessageInfo) returns (ReceiveMessageResponse) {}

// Making Friends protobufs
rpc AddFriendAsync(AddFriendAsyncInfo) returns (AddFriendAsyncResponse) {}

rpc GetAsyncFriendRequests(GetAsyncFriendRequestsInfo) returns (GetAsyncFriendRequestsResponse) {}
}

// The RegisterInfo message is sent to the server to register a new user.
message RegisterInfo {
bytes public_key = 1;
bytes friend_request_public_key = 1;
string beta_key = 2;
}

Expand Down Expand Up @@ -45,4 +50,23 @@ message ReceiveMessageInfo {
message ReceiveMessageResponse {
bytes pir_answer = 1;
bytes pir_answer_acks = 2;
}

message AddFriendAsyncInfo {
int32 index = 1;
bytes request = 2;
string authentication_token = 3;
}

message AddFriendAsyncResponse {
}

message GetAsyncFriendRequestsInfo {
int32 start_index = 1;
int32 end_index = 2;
}

message GetAsyncFriendRequestsResponse {
repeated bytes requests = 1;
repeated bytes friend_request_public_key = 2;
}