mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I71bb49fe74104964088d392b12775ec2a253b1c9
41 lines
1.1 KiB
Protocol Buffer
41 lines
1.1 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package location.nearby.mediums;
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
option java_outer_classname = "BleFramesProto";
|
|
option java_package = "com.google.location.nearby.mediums.proto";
|
|
option objc_class_prefix = "GNCM";
|
|
|
|
// This should map exactly to BleAdvertisement's socket versions.
|
|
// TODO(alexanderkang): Make BleAdvertisement reference this proto.
|
|
// https://cs.corp.google.com/piper///depot/google3/java/com/google/android/gmscore/dev/modules/nearby/src/com/google/android/gms/nearby/mediums/bluetoothlowenergy/BleAdvertisement.java?l=57&cl=CS&rcl=214509192
|
|
enum SocketVersion {
|
|
UNKNOWN_SOCKET_VERSION = 0;
|
|
V1 = 1;
|
|
V2 = 2;
|
|
}
|
|
|
|
message SocketControlFrame {
|
|
enum ControlFrameType {
|
|
UNKNOWN_CONTROL_FRAME_TYPE = 0;
|
|
INTRODUCTION = 1;
|
|
DISCONNECTION = 2;
|
|
}
|
|
|
|
optional ControlFrameType type = 1;
|
|
|
|
// Exactly one of the following fields will be set.
|
|
optional IntroductionFrame introduction = 2;
|
|
optional DisconnectionFrame disconnection = 3;
|
|
}
|
|
|
|
message IntroductionFrame {
|
|
optional bytes service_id_hash = 1;
|
|
optional SocketVersion socket_version = 2;
|
|
}
|
|
|
|
message DisconnectionFrame {
|
|
optional bytes service_id_hash = 1;
|
|
}
|