File: tether.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (122 lines) | stat: -rw-r--r-- 2,942 bytes parent folder | download | duplicates (6)
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
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Definitions for tether API calls.

syntax = "proto2";

package ash.tether;

option optimize_for = LITE_RUNTIME;

// Types of messages which are sent between tether hosts and tether clients.
enum MessageType {
  UNKNOWN_TYPE = 0;
  TETHER_AVAILABILITY_REQUEST = 1;
  TETHER_AVAILABILITY_RESPONSE = 2;
  CONNECT_TETHERING_REQUEST = 3;
  CONNECT_TETHERING_RESPONSE = 4;
  DISCONNECT_TETHERING_REQUEST = 5;
  KEEP_ALIVE_TICKLE = 6;
  KEEP_ALIVE_TICKLE_RESPONSE = 7;
}

// Meant to communicate the host's current Wifi status. This is intended to
// allow the client to warn the user that Tether will disconnect the host's
// Wi-Fi, if applicable.
// Next id: 3
message WifiStatus {
  enum StatusCode {
    STATUS_UNKNOWN = 0;
    CONNECTED = 1;
    NOT_CONNECTED = 2;
  }

  optional StatusCode status_code = 1;

  // The SSID of the Wifi the host is currently connected to.
  optional string ssid = 2;
}

// Contains details about a device (presumably the host).
// Next id: 7
message DeviceStatus {
  // Battery, from 0 to 100;
  optional int32 battery_percentage = 1;

  // For example, "Google Fi" or "Verizon".
  optional string cell_provider = 2;

  // Number of "bars", from 0 to 4.
  optional int32 connection_strength = 3;

  optional WifiStatus wifi_status = 4;

  // True if Data Saver is on.
  optional bool is_data_saver_enabled = 5;

  // True if cellular data is enabled and a connection can be established.
  optional bool is_cell_data_available = 6;
}

// Next id: 1
message TetherAvailabilityRequest {}

// Next id: 7
message TetherAvailabilityResponse {
  enum ResponseCode {
    UNKNOWN_ERROR = 0;
    TETHER_AVAILABLE = 1;
    SETUP_NEEDED = 2;
    NO_RECEPTION = 3;
    NO_SIM_CARD = 4;
    NOTIFICATIONS_DISABLED_LEGACY = 5;
    NOTIFICATIONS_DISABLED_WITH_NOTIFICATION_CHANNEL = 6;
    LAST_PROVISIONING_FAILED = 7;
  }

  optional ResponseCode response_code = 1;
  optional DeviceStatus device_status = 2;
}

// Next id: 1
message ConnectTetheringRequest {}

// Next id: 10
message ConnectTetheringResponse {
  enum ResponseCode {
    UNKNOWN_ERROR = 0;
    SUCCESS = 1;
    PROVISIONING_FAILED = 2;
    TETHERING_TIMEOUT = 3;
    TETHERING_UNSUPPORTED = 4;
    NO_CELL_DATA = 5;
    ENABLING_HOTSPOT_FAILED = 6;
    ENABLING_HOTSPOT_TIMEOUT = 7;
    INVALID_ACTIVE_EXISTING_SOFT_AP_CONFIG = 8;
    INVALID_NEW_SOFT_AP_CONFIG = 9;
    INVALID_WIFI_AP_CONFIG = 10;
  }

  optional ResponseCode response_code = 1;

  // SSID for the new hotspot.
  optional string ssid = 2;

  // Password for the new hotspot.
  optional string password = 3;

  optional DeviceStatus device_status = 4;
}

// Next id: 1
message KeepAliveTickle {}

// Next id: 2
message KeepAliveTickleResponse {
  optional DeviceStatus device_status = 1;
}

// Next id: 1
message DisconnectTetheringRequest {}