ricochet-go/rpc/contact.proto

64 lines
1013 B
Protocol Buffer

syntax = "proto3";
package ricochet;
message Contact {
int32 id = 1;
string address = 2;
string nickname = 3;
string whenCreated = 4;
string lastConnected = 5;
ContactRequest request = 6;
enum Status {
OFFLINE = 0;
ONLINE = 1;
REQUEST = 2;
REJECTED = 3;
}
Status status = 10;
}
message ContactRequest {
enum Direction {
INBOUND = 0;
OUTBOUND = 1;
}
Direction direction = 1;
string address = 2;
string nickname = 3;
string text = 4;
}
message MonitorContactsRequest {
}
message ContactEvent {
enum Type {
NULL = 0;
POPULATE = 1;
ADD = 2;
UPDATE = 3;
DELETE = 4;
}
Type type = 1;
oneof subject {
Contact contact = 2;
ContactRequest request = 3;
}
}
message AddContactReply {
}
message DeleteContactRequest {
int32 id = 1;
string address = 2;
}
message DeleteContactReply {
}
message RejectInboundRequestReply {
}