2016-08-17 00:43:39 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package ricochet;
|
|
|
|
|
|
|
|
message ConversationEvent {
|
|
|
|
enum Type {
|
|
|
|
NULL = 0;
|
|
|
|
POPULATE = 1;
|
|
|
|
RECEIVE = 2;
|
|
|
|
SEND = 3;
|
|
|
|
UPDATE = 4;
|
|
|
|
}
|
|
|
|
Type type = 1;
|
|
|
|
|
|
|
|
Message msg = 2;
|
|
|
|
}
|
|
|
|
|
2016-10-05 21:38:18 +00:00
|
|
|
message MonitorConversationsRequest {
|
|
|
|
}
|
|
|
|
|
2016-08-17 00:43:39 +00:00
|
|
|
message Entity {
|
2016-10-05 21:38:18 +00:00
|
|
|
// contactId and address MAY be unspecified for self
|
2016-08-17 00:43:39 +00:00
|
|
|
int32 contactId = 1;
|
|
|
|
string address = 2;
|
2016-10-05 21:38:18 +00:00
|
|
|
bool isSelf = 3;
|
2016-08-17 00:43:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
Entity sender = 1;
|
|
|
|
Entity recipient = 2;
|
|
|
|
int64 timestamp = 3;
|
2016-10-05 21:38:18 +00:00
|
|
|
// Identifiers are unique for the tuple of (sender, recipient, direction)
|
|
|
|
// within a single session, and should be randomized between sessions to
|
|
|
|
// reduce the chance of collision.
|
|
|
|
uint64 identifier = 4;
|
2016-08-17 00:43:39 +00:00
|
|
|
|
|
|
|
enum Status {
|
|
|
|
NULL = 0;
|
2016-10-16 00:57:08 +00:00
|
|
|
ERROR = 1;
|
|
|
|
// Outbound
|
2016-08-17 00:43:39 +00:00
|
|
|
QUEUED = 2;
|
|
|
|
SENDING = 3;
|
|
|
|
DELIVERED = 4;
|
2016-10-16 00:57:08 +00:00
|
|
|
// Inbound
|
|
|
|
UNREAD = 5;
|
|
|
|
READ = 6;
|
2016-08-17 00:43:39 +00:00
|
|
|
}
|
|
|
|
Status status = 5;
|
|
|
|
|
|
|
|
string text = 6;
|
|
|
|
}
|
|
|
|
|
2016-10-16 00:57:08 +00:00
|
|
|
message MarkConversationReadRequest {
|
|
|
|
Entity entity = 1;
|
|
|
|
uint64 lastRecvIdentifier = 2;
|
|
|
|
}
|
|
|
|
|