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

Commit

Permalink
redesign daemon schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Shengtong Zhang committed Jun 24, 2022
1 parent 49b488b commit 96073e4
Showing 1 changed file with 48 additions and 6 deletions.
54 changes: 48 additions & 6 deletions schema/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ service Daemon {

rpc GetFriendList(GetFriendListRequest) returns (GetFriendListResponse) {}

rpc GenerateFriendKey(GenerateFriendKeyRequest) returns (GenerateFriendKeyResponse) {}
rpc GetPublicID(GetPublicIDRequest) returns (GetPublicIDResponse) {}

rpc AddFriend(AddFriendRequest) returns (AddFriendResponse) {}
rpc AddSyncFriend(AddSyncFriendRequest) returns (AddSyncFriendResponse) {}

rpc SendAysncFriendRequest(SendAsyncFriendRequestRequest) returns (SendAsyncFriendRequestResponse) {}

rpc GetOutgoingAsyncFriendRequests(GetOutgoingAsyncFriendRequestsRequest) returns (GetOutgoingAsyncFriendRequestsResponse) {}

rpc GetIncomingAsyncFriendRequests(GetIncomingAsyncFriendRequestsRequest) returns (GetIncomingAsyncFriendRequestsResponse) {}

rpc DecideAsyncFriendRequest(DecideAsyncFriendRequestRequest) returns (DecideAsyncFriendRequestResponse) {}

rpc RemoveFriend(RemoveFriendRequest) returns (RemoveFriendResponse) {}

Expand Down Expand Up @@ -57,7 +65,8 @@ message GetFriendListRequest {}
message FriendInfo {
string unique_name = 1;
string display_name = 2;
bool enabled = 3;
string public_id = 3;
int32 progress = 4;
}

message GetFriendListResponse {
Expand All @@ -73,12 +82,45 @@ message GenerateFriendKeyResponse {
string key = 1;
}

message AddFriendRequest {
message GetPublicIDRequest {}

message GetPublicIDResponse {
string public_id = 1;
}

message AddSyncFriendRequest {
FriendInfo friend_info = 1;
}

message AddSyncFriendResponse {}

message SendAsyncFriendRequestRequest {
FriendInfo friend_info = 1;
string message = 2;
}

message SendAsyncFriendRequestResponse {}

message GetOutgoingAsyncFriendRequestsRequest {}

message GetOutgoingAsyncFriendRequestsResponse {
repeated FriendInfo friend_infos = 1;
repeated string messages = 2;
}

message GetIncomingAsyncFriendRequestsRequest {}

message GetIncomingAsyncFriendRequestsResponse {
repeated FriendInfo friend_infos = 1;
repeated string messages = 2;
}

message DecideAsyncFriendRequestRequest {
string unique_name = 1;
string key = 2;
bool accept = 2;
}

message AddFriendResponse {}
message DecideAsyncFriendRequestResponse {}

message RemoveFriendRequest {
string unique_name = 1;
Expand Down

0 comments on commit 96073e4

Please sign in to comment.