Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // MCS protocol for communication between Chrome client and Mobile Connection | 5 // MCS protocol for communication between Chrome client and Mobile Connection |
| 6 // Server . | 6 // Server . |
| 7 | 7 |
| 8 syntax = "proto2"; | 8 syntax = "proto2"; |
| 9 | 9 |
| 10 option optimize_for = LITE_RUNTIME; | 10 option optimize_for = LITE_RUNTIME; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 required bool timeout = 2; | 62 required bool timeout = 2; |
| 63 required int32 interval_ms = 3; | 63 required int32 interval_ms = 3; |
| 64 } | 64 } |
| 65 | 65 |
| 66 message HeartbeatConfig { | 66 message HeartbeatConfig { |
| 67 optional bool upload_stat = 1; | 67 optional bool upload_stat = 1; |
| 68 optional string ip = 2; | 68 optional string ip = 2; |
| 69 optional int32 interval_ms = 3; | 69 optional int32 interval_ms = 3; |
| 70 } | 70 } |
| 71 | 71 |
| 72 // This message must match the definition on the receiving end in GCM. That is | |
| 73 // defined in google3/buzz/mobile/proto/gtalk_core.proto. | |
|
Peter Beverloo
2016/11/28 15:05:15
Let's not refer to google3 paths, as useful as may
harkness
2016/12/01 10:34:34
Done.
| |
| 74 message ClientEvent { | |
| 75 enum Type { | |
| 76 UNKNOWN = 0; | |
| 77 // Count of discarded events if the buffer filled up and was trimmed. | |
| 78 DISCARDED_EVENTS = 1; | |
| 79 // Failed connection event: the connection faliled to be established or we | |
|
Peter Beverloo
2016/11/28 15:05:15
failed
harkness
2016/12/01 10:34:34
Done.
| |
| 80 // had a login error. | |
| 81 FAILED_CONNECTION = 2; | |
| 82 // Successful connection event: information about the last successful | |
| 83 // connection, including the time at which it was established. | |
| 84 SUCCESSFUL_CONNECTION = 3; | |
| 85 } | |
| 86 | |
| 87 // Common fields [1-99] | |
| 88 optional Type type = 1; | |
| 89 | |
| 90 // Fields for DISCARDED_EVENTS messages [100-199] | |
| 91 optional uint32 number_discarded_events = 100; | |
| 92 | |
| 93 // Fields for FAILED_CONNECTION and SUCCESSFUL_CONNECTION messages [200-299] | |
| 94 optional int32 network_type = 200; | |
| 95 optional int32 network_port = 201; | |
|
Peter Beverloo
2016/11/28 15:05:15
nit: this is unused. maybe mark as "reserved" unti
harkness
2016/12/01 10:34:34
Done.
| |
| 96 optional uint64 time_connection_started_ms = 202; | |
| 97 optional uint64 time_connection_ended_ms = 203; | |
| 98 optional int32 error_code = 204; | |
|
Peter Beverloo
2016/11/28 15:05:15
While the server-side does not, I would very much
harkness
2016/12/01 10:34:34
Done.
| |
| 99 | |
| 100 // Fields for SUCCESSFUL_CONNECTION messages [300-399] | |
| 101 optional uint64 time_connection_established_ms = 300; | |
| 102 } | |
| 103 | |
| 72 /** | 104 /** |
| 73 TAG: 2 | 105 TAG: 2 |
| 74 */ | 106 */ |
| 75 message LoginRequest { | 107 message LoginRequest { |
| 76 enum AuthService { | 108 enum AuthService { |
| 77 ANDROID_ID = 2; | 109 ANDROID_ID = 2; |
| 78 } | 110 } |
| 79 required string id = 1; // Must be present ( proto required ), may be empty | 111 required string id = 1; // Must be present ( proto required ), may be empty |
| 80 // string. | 112 // string. |
| 81 // mcs.android.com. | 113 // mcs.android.com. |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 106 optional HeartbeatStat heartbeat_stat = 13; | 138 optional HeartbeatStat heartbeat_stat = 13; |
| 107 // Must be true. | 139 // Must be true. |
| 108 optional bool use_rmq2 = 14; | 140 optional bool use_rmq2 = 14; |
| 109 optional int64 account_id = 15; | 141 optional int64 account_id = 15; |
| 110 | 142 |
| 111 // ANDROID_ID = 2 | 143 // ANDROID_ID = 2 |
| 112 optional AuthService auth_service = 16; | 144 optional AuthService auth_service = 16; |
| 113 | 145 |
| 114 optional int32 network_type = 17; | 146 optional int32 network_type = 17; |
| 115 optional int64 status = 18; | 147 optional int64 status = 18; |
| 148 | |
| 149 // 19, 20, and 21 are not currently populated by Chrome. | |
|
Peter Beverloo
2016/11/28 15:05:15
Protobufs have a statement to reserve fields, whic
harkness
2016/12/01 10:34:34
Done.
| |
| 150 | |
| 151 // Events recorded on the client after the last successful connection. | |
| 152 repeated ClientEvent client_event = 22; | |
| 116 } | 153 } |
| 117 | 154 |
| 118 /** | 155 /** |
| 119 * TAG: 3 | 156 * TAG: 3 |
| 120 */ | 157 */ |
| 121 message LoginResponse { | 158 message LoginResponse { |
| 122 required string id = 1; | 159 required string id = 1; |
| 123 // Not used. | 160 // Not used. |
| 124 optional string jid = 2; | 161 optional string jid = 2; |
| 125 // Null if login was ok. | 162 // Null if login was ok. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 // No last_streamid_received required. This is included within an IqStanza, | 315 // No last_streamid_received required. This is included within an IqStanza, |
| 279 // which includes the last_stream_id_received. | 316 // which includes the last_stream_id_received. |
| 280 } | 317 } |
| 281 | 318 |
| 282 /** | 319 /** |
| 283 Included in IQ sent after LoginResponse from server with ID 12. | 320 Included in IQ sent after LoginResponse from server with ID 12. |
| 284 */ | 321 */ |
| 285 message SelectiveAck { | 322 message SelectiveAck { |
| 286 repeated string id = 1; | 323 repeated string id = 1; |
| 287 } | 324 } |
| OLD | NEW |