1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
|
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package remoting.ftl;
// Enums
// This is exactly google.protobuf.Duration. The Chromium proto_library
// template has trouble importing protobuf outside the current directory.
message Duration {
int64 seconds = 1;
int32 nanos = 2;
}
message ApiVersion {
enum Value {
UNKNOWN = 0;
V4 = 4;
}
}
message Platform {
// Added the FTL_ prefix because OS names are polluted by Chromium macros.
enum Type {
UNKNOWN = 0;
FTL_ANDROID = 1;
FTL_IOS = 2;
FTL_TEST = 4;
FTL_DESKTOP = 6;
FTL_WEB = 7;
}
}
message IdType {
enum Type {
UNKNOWN = 0;
SYSTEM = 7;
EMAIL = 16;
}
}
message DeviceIdType {
enum Type {
UNKNOWN = 0;
WEB_UUID = 3;
CHROMOTING_HOST_ID = 6;
CLIENT_UUID = 7;
}
}
message SignInGaiaMode {
enum Value {
DEFAULT_CREATE_ACCOUNT = 0;
LOOKUP = 1;
LOOKUP_AND_SIGN_IN = 2;
}
}
message ChromotingCapability {
enum Feature {
UNKNOWN = 0;
SERIALIZED_XMPP_SIGNALING = 256;
WEBRTC_SIGNALING = 257;
}
}
message FtlCapability {
enum Feature {
UNKNOWN = 0;
RECEIVE_CALLS_FROM_GAIA = 86;
GAIA_REACHABLE = 87;
}
}
// Messages
message ClientInfo {
// Renamed from major, minor, point because they are defined in glibc macros.
int32 version_major = 3;
int32 version_minor = 4;
int32 version_point = 5;
ApiVersion.Value api_version = 7;
Platform.Type platform_type = 9;
}
message Id {
IdType.Type type = 1;
string id = 2;
string app = 3;
}
message RequestHeader {
string request_id = 1;
string app = 3;
bytes auth_token_payload = 6;
ClientInfo client_info = 7;
Id requester_id = 10;
}
message ResponseHeader {
uint64 rpc_global_id = 2;
int64 txn_timestamp_usec = 4;
}
message ICEServerList {
repeated string urls = 1;
string username = 2;
string credential = 3;
string hostname = 5;
int64 max_rate_kbps = 10;
}
message ICEConfiguration {
Duration lifetime_duration = 1;
repeated ICEServerList ice_servers = 2;
string ice_transport_policy = 6;
}
message DeviceId {
DeviceIdType.Type type = 1;
string id = 2;
}
message RegisterData {
DeviceId device_id = 1;
string locale = 8;
repeated int32 caps = 9;
}
message AuthToken {
bytes payload = 1;
int64 expires_in = 2;
}
message InboxMessage {
enum MessageType {
UNKNOWN = 0;
CHROMOTING_MESSAGE = 29;
}
enum MessageClass {
USER = 0; // USER both persists the message and sends a GCM tickle
STATUS = 3; // STATUS persists the message and doesn't send GCM tickle
}
string message_id = 1;
MessageType message_type = 2;
MessageClass message_class = 5;
Id sender_id = 8;
bytes sender_registration_id = 17;
Id receiver_id = 9;
bytes message = 12;
}
message ReceiverMessage {
string message_id = 1;
Id receiver_id = 2;
}
// Requests and responses
message GetICEServerRequest {
RequestHeader header = 1;
bool unblock_me = 2;
string ice_config_preference = 3;
}
message GetICEServerResponse {
ResponseHeader header = 1;
ICEConfiguration ice_config = 4;
}
message SignInGaiaRequest {
RequestHeader header = 1;
RegisterData register_data = 2;
SignInGaiaMode.Value mode = 3;
string app = 4;
}
message SignInGaiaResponse {
ResponseHeader header = 1;
bytes registration_id = 2;
AuthToken auth_token = 4;
}
message BatchAckMessagesRequest {
RequestHeader header = 1;
repeated string message_ids = 4;
}
message BatchAckMessagesResponse {
ResponseHeader header = 1;
}
message ReceiveMessagesRequest {
RequestHeader header = 1;
}
message ReceiveMessagesResponse {
message Pong {}
message StartOfBatch { int32 count = 1; }
message EndOfBatch {}
message RefreshResult {}
oneof body {
InboxMessage inbox_message = 2;
Pong pong = 3;
StartOfBatch start_of_batch = 4;
EndOfBatch end_of_batch = 5;
RefreshResult refresh_result = 6;
}
}
message InboxSendRequest {
Id dest_id = 1;
repeated bytes dest_registration_ids = 9;
InboxMessage message = 2;
RequestHeader header = 3;
int64 time_to_live = 5;
}
message InboxSendResponse {
ResponseHeader header = 1;
int64 timestamp = 2;
}
|