mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
89 lines
1.8 KiB
Protocol Buffer
89 lines
1.8 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package location.nearby.proto;
|
|
|
|
import "logs/proto/logs_annotations/logs_annotations.proto";
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
option (logs_proto.file_not_used_for_logging_except_enums) = true;
|
|
option java_api_version = 2;
|
|
option java_package = "com.google.location.nearby.proto";
|
|
option java_outer_classname = "BootstrapEnums";
|
|
option go_api_flag = "OPEN_TO_OPAQUE_HYBRID"; // See http://go/go-api-flag.
|
|
|
|
// Medium used for offline socket.
|
|
enum SocketMedium {
|
|
SOCKET_MEDIUM_UNKNOWN = 0;
|
|
|
|
// Bluetooth rfcomm socket.
|
|
SOCKET_BLUETOOTH_RFCOMM = 1;
|
|
|
|
// BLE gatt socket.
|
|
SOCKET_BLE_GATT = 2;
|
|
}
|
|
|
|
enum NearbyBootstrapEvent {
|
|
EVENT_UNKNOWN = 0;
|
|
|
|
// Enable target mode.
|
|
EVENT_ENABLE_TARGET = 1;
|
|
|
|
// Disable target mode.
|
|
EVENT_DISABLE_TARGET = 2;
|
|
|
|
// Start scan devices.
|
|
EVENT_START_SCAN = 3;
|
|
|
|
// Stop scan devices.
|
|
EVENT_STOP_SCAN = 4;
|
|
|
|
// Find one or more scan results.
|
|
EVENT_HAS_SCAN_RESULT = 5;
|
|
|
|
// Start connect in SPAKE.
|
|
EVENT_START_CONNECT_SPAKE = 6;
|
|
|
|
// Start connect in ECDH.
|
|
EVENT_START_CONNECT_ECDH = 7;
|
|
|
|
// Input token for SPAKE connection if previous one is incorrect.
|
|
EVENT_INPUT_TOKEN = 8;
|
|
|
|
// Confirm connection for ECDH connection.
|
|
EVENT_CONFIRM = 9;
|
|
|
|
// Disconnect.
|
|
EVENT_DISCONNECT = 10;
|
|
|
|
// Connection is established.
|
|
EVENT_CONNECTED = 11;
|
|
|
|
// Connection is disconnected.
|
|
EVENT_DISCONNECTED = 12;
|
|
|
|
// Connect is timeout.
|
|
EVENT_CONNECT_TIMEOUT = 13;
|
|
}
|
|
|
|
enum NearbyBootstrapDeviceType {
|
|
DEVICE_TYPE_UNKNOWN = 0;
|
|
|
|
DEVICE_TYPE_ANDROID_PHONE = 1;
|
|
|
|
DEVICE_TYPE_ANDROID_TABLET = 2;
|
|
|
|
DEVICE_TYPE_ANDROID_TV = 3;
|
|
|
|
DEVICE_TYPE_ANDROID_WEAR = 4;
|
|
}
|
|
|
|
enum NearbyBootstrapDeviceRole {
|
|
DEVICE_ROLE_UNKNOWN = 0;
|
|
|
|
// Device to be bootstrapped.
|
|
DEVICE_ROLE_TARGET = 1;
|
|
|
|
// Device that initiate the bootstrap.
|
|
DEVICE_ROLE_SOURCE = 2;
|
|
}
|