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

Commit

Permalink
use enums instead of integer constants
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Jun 28, 2022
1 parent e0bbbc1 commit b54435f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions schema/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ service Daemon {

rpc GetFriendList(GetFriendListRequest) returns (GetFriendListResponse) {}

rpc GetPublicID(GetPublicIDRequest) returns (GetPublicIDResponse) {}
rpc GetMyPublicID(GetMyPublicIDRequest) returns (GetMyPublicIDResponse) {}

// use for in-person key exchange
rpc AddSyncFriend(AddSyncFriendRequest) returns (AddSyncFriendResponse) {}

rpc AddAsyncFriend(AddAsyncFriendRequest) returns (AddAsyncFriendResponse) {}
Expand Down Expand Up @@ -62,20 +63,26 @@ message RegisterUserResponse {}

message GetFriendListRequest {}

enum FriendRequestProgress {
Incoming = 0;
OutgoingAsync = 1;
OutgoingSync = 2;
Complete = 3;
}
message FriendInfo {
string unique_name = 1;
string display_name = 2;
string public_id = 3;
int32 progress = 4;
FriendRequestProgress request_progress = 4;
}

message GetFriendListResponse {
repeated FriendInfo friend_infos = 1;
}

message GetPublicIDRequest {}
message GetMyPublicIDRequest {}

message GetPublicIDResponse {
message GetMyPublicIDResponse {
string public_id = 1;
string story = 2; // en encoding of the public identifier in a nice story format
}
Expand All @@ -89,8 +96,10 @@ message AddSyncFriendRequest {
message AddSyncFriendResponse {}

message AddAsyncFriendRequest {
FriendInfo friend_info = 1;
string message = 2;
string unique_name = 1;
string display_name = 2;
string public_id = 3;
string message = 4;
}

message AddAsyncFriendResponse {}
Expand Down

0 comments on commit b54435f

Please sign in to comment.