| 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 // ClientEvents are used to inform the server of failed and successful |
| 73 // connections. |
| 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 failed to be established or we |
| 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 // Network type is a value in net::NetworkChangeNotifier::ConnectionType. |
| 95 optional int32 network_type = 200; |
| 96 // Reserved for network_port. |
| 97 reserved 201; |
| 98 optional uint64 time_connection_started_ms = 202; |
| 99 optional uint64 time_connection_ended_ms = 203; |
| 100 // Error code should be a net::Error value. |
| 101 optional int32 error_code = 204; |
| 102 |
| 103 // Fields for SUCCESSFUL_CONNECTION messages [300-399] |
| 104 optional uint64 time_connection_established_ms = 300; |
| 105 } |
| 106 |
| 72 /** | 107 /** |
| 73 TAG: 2 | 108 TAG: 2 |
| 74 */ | 109 */ |
| 75 message LoginRequest { | 110 message LoginRequest { |
| 76 enum AuthService { | 111 enum AuthService { |
| 77 ANDROID_ID = 2; | 112 ANDROID_ID = 2; |
| 78 } | 113 } |
| 79 required string id = 1; // Must be present ( proto required ), may be empty | 114 required string id = 1; // Must be present ( proto required ), may be empty |
| 80 // string. | 115 // string. |
| 81 // mcs.android.com. | 116 // mcs.android.com. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 106 optional HeartbeatStat heartbeat_stat = 13; | 141 optional HeartbeatStat heartbeat_stat = 13; |
| 107 // Must be true. | 142 // Must be true. |
| 108 optional bool use_rmq2 = 14; | 143 optional bool use_rmq2 = 14; |
| 109 optional int64 account_id = 15; | 144 optional int64 account_id = 15; |
| 110 | 145 |
| 111 // ANDROID_ID = 2 | 146 // ANDROID_ID = 2 |
| 112 optional AuthService auth_service = 16; | 147 optional AuthService auth_service = 16; |
| 113 | 148 |
| 114 optional int32 network_type = 17; | 149 optional int32 network_type = 17; |
| 115 optional int64 status = 18; | 150 optional int64 status = 18; |
| 151 |
| 152 // 19, 20, and 21 are not currently populated by Chrome. |
| 153 reserved 19, 20, 21; |
| 154 |
| 155 // Events recorded on the client after the last successful connection. |
| 156 repeated ClientEvent client_event = 22; |
| 116 } | 157 } |
| 117 | 158 |
| 118 /** | 159 /** |
| 119 * TAG: 3 | 160 * TAG: 3 |
| 120 */ | 161 */ |
| 121 message LoginResponse { | 162 message LoginResponse { |
| 122 required string id = 1; | 163 required string id = 1; |
| 123 // Not used. | 164 // Not used. |
| 124 optional string jid = 2; | 165 optional string jid = 2; |
| 125 // Null if login was ok. | 166 // 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, | 319 // No last_streamid_received required. This is included within an IqStanza, |
| 279 // which includes the last_stream_id_received. | 320 // which includes the last_stream_id_received. |
| 280 } | 321 } |
| 281 | 322 |
| 282 /** | 323 /** |
| 283 Included in IQ sent after LoginResponse from server with ID 12. | 324 Included in IQ sent after LoginResponse from server with ID 12. |
| 284 */ | 325 */ |
| 285 message SelectiveAck { | 326 message SelectiveAck { |
| 286 repeated string id = 1; | 327 repeated string id = 1; |
| 287 } | 328 } |
| OLD | NEW |