aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Duarte <licorne@google.com>2021-10-19 14:21:39 +0000
committerDavid Duarte <licorne@google.com>2021-10-20 13:05:32 +0000
commit2e4202b9f163798e2b85c177e39853b80388568d (patch)
tree583925d14413cddea9d1deff149428a2c6bf943d
parenta4384bca1bb60592efb54c33b445aed08f1b1f0b (diff)
downloadmmi2grpc-2e4202b9f163798e2b85c177e39853b80388568d.tar.gz
grpc: Generate custom services
Change-Id: I3784f9bf473e335a53f1e5d15a4426a1f2cfbd55
-rw-r--r--.gitignore4
-rw-r--r--README.md8
-rwxr-xr-xbuild.sh18
-rw-r--r--facade/__init__.py (renamed from lib/__init__.py)0
-rw-r--r--interact/__init__.py2
-rw-r--r--interact/l2cap.py51
-rw-r--r--lib/proto/__init__.py0
-rw-r--r--lib/proto/common_pb2.py304
-rw-r--r--lib/proto/common_pb2_grpc.py4
-rw-r--r--lib/proto/l2cap_pb2.py1017
-rw-r--r--lib/proto/l2cap_pb2_grpc.py533
-rw-r--r--lib/proto/neighbor_pb2.py481
-rw-r--r--lib/proto/neighbor_pb2_grpc.py267
-rw-r--r--lib/proto/rootservice_pb2.py288
-rw-r--r--lib/proto/rootservice_pb2_grpc.py161
-rw-r--r--proto/facade/common.proto (renamed from proto/common.proto)2
-rw-r--r--proto/facade/l2cap.proto (renamed from proto/l2cap.proto)2
-rw-r--r--proto/facade/neighbor.proto (renamed from proto/neighbor.proto)2
-rw-r--r--proto/facade/rootservice.proto (renamed from proto/rootservice.proto)4
-rwxr-xr-xprotoc-gen-custom_grpc79
-rw-r--r--requirements.txt3
-rwxr-xr-xsetup.py59
22 files changed, 178 insertions, 3111 deletions
diff --git a/.gitignore b/.gitignore
index bbf3300..3b6e253 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
virtualenv
out/
-__pycache__ \ No newline at end of file
+__pycache__
+facade/*
+!facade/__init__.py
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..298b0d2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# mmi2grpc
+
+## Build grpc interfaces
+
+```bash
+./setup.py build_grpc
+```
+
diff --git a/build.sh b/build.sh
deleted file mode 100755
index d645542..0000000
--- a/build.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-PYTHON_OUT="lib"
-PROTO_FOLDER="proto"
-
-mkdir ${PYTHON_OUT}
-
-python3 -m grpc_tools.protoc \
- -I . \
- --python_out=${PYTHON_OUT} \
- --grpc_python_out=${PYTHON_OUT} \
- "${PROTO_FOLDER}/l2cap.proto" \
- "${PROTO_FOLDER}/neighbor.proto" \
- "${PROTO_FOLDER}/common.proto" \
- "${PROTO_FOLDER}/rootservice.proto"
-
-touch "${PYTHON_OUT}/__init__.py"
-touch "${PYTHON_OUT}/proto/__init__.py" \ No newline at end of file
diff --git a/lib/__init__.py b/facade/__init__.py
index e69de29..e69de29 100644
--- a/lib/__init__.py
+++ b/facade/__init__.py
diff --git a/interact/__init__.py b/interact/__init__.py
index 9b5830a..0f08de1 100644
--- a/interact/__init__.py
+++ b/interact/__init__.py
@@ -6,4 +6,4 @@ GRPC_PORT = 8999
def run(profile: str, interaction_id: str, pts_addr: bytes):
channel = grpc.insecure_channel(f'localhost:{GRPC_PORT}')
if profile == "L2CAP":
- l2cap.interact(channel, interaction_id, pts_addr) \ No newline at end of file
+ l2cap.interact(channel, interaction_id, pts_addr)
diff --git a/interact/l2cap.py b/interact/l2cap.py
index c31e042..4ee8e7d 100644
--- a/interact/l2cap.py
+++ b/interact/l2cap.py
@@ -1,58 +1,47 @@
import os
from grpc import Channel
-from lib.proto import l2cap_pb2_grpc
-from lib.proto import neighbor_pb2_grpc
-from lib.proto.common_pb2 import BluetoothAddress
-from lib.proto.l2cap_pb2 import CloseChannelRequest, OpenChannelRequest, SetEnableDynamicChannelRequest, RetransmissionFlowControlMode, DynamicChannelPacket, OpenChannelRequest
-from lib.proto.neighbor_pb2 import EnableMsg
-PSM = 1 # TODO: Add it to either utils.py or config file
+from facade import l2cap_grpc, neighbor_grpc
+from facade.common_pb2 import BluetoothAddress
+from facade.l2cap_pb2 import RetransmissionFlowControlMode
+PSM = 1 # TODO: Add it to either utils.py or config file
def interact(channel: Channel, interaction_id: str, pts_addr: bytes):
print(f'mmi_id: {interaction_id}')
addr = BluetoothAddress(address=pts_addr)
- l2cap = l2cap_pb2_grpc.L2capClassicModuleFacadeStub(channel)
- neighbor = neighbor_pb2_grpc.NeighborFacadeStub(channel)
+ l2cap = l2cap_grpc.L2capClassicModuleFacade(channel)
+ neighbor = neighbor_grpc.NeighborFacade(channel)
if interaction_id == "MMI_TESTER_ENABLE_CONNECTION":
- neighbor.EnablePageScan(EnableMsg(enabled=True))
+ neighbor.EnablePageScan(enabled=True)
l2cap.SetDynamicChannel(
- SetEnableDynamicChannelRequest(
- psm=PSM,
- enable=True,
- retransmission_mode=RetransmissionFlowControlMode.BASIC
- )
+ psm=PSM,
+ enable=True,
+ retransmission_mode=RetransmissionFlowControlMode.BASIC
)
if interaction_id == "MMI_IUT_SEND_CONFIG_REQ":
pass
if interaction_id == "MMI_IUT_SEND_L2CAP_DATA":
payload = b'\x00' + os.urandom(40) + b'\x00'
l2cap.SendDynamicChannelPacket(
- DynamicChannelPacket(
- remote=addr,
- psm=PSM,
- payload=payload
- )
+ remote=addr,
+ psm=PSM,
+ payload=payload
)
if interaction_id == "MMI_IUT_INITIATE_ACL_CONNECTION":
l2cap.SetDynamicChannel(
- SetEnableDynamicChannelRequest(
- psm=PSM,
- enable=True,
- retransmission_mode=RetransmissionFlowControlMode.BASIC
- )
+ psm=PSM,
+ enable=True,
+ retransmission_mode=RetransmissionFlowControlMode.BASIC
)
l2cap.OpenChannel(
- OpenChannelRequest(
- remote=addr,
- psm=PSM,
- mode=RetransmissionFlowControlMode.BASIC
- )
+ remote=addr,
+ psm=PSM,
+ mode=RetransmissionFlowControlMode.BASIC
)
if interaction_id == ("MMI_IUT_DISABLE_CONNECTION" or "MMI_IUT_SEND_DISCONNECT_RSP"):
- print(f'Sending CLOSE CHANNEL')
- l2cap.CloseChannel(CloseChannelRequest(psm=PSM))
+ l2cap.CloseChannel(psm=PSM)
if interaction_id == "MMI_IUT_SEND_ACL_DISCONNECTON":
pass
if interaction_id == "MMI_IUT_SEND_CONFIG_RSP":
diff --git a/lib/proto/__init__.py b/lib/proto/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/lib/proto/__init__.py
+++ /dev/null
diff --git a/lib/proto/common_pb2.py b/lib/proto/common_pb2.py
deleted file mode 100644
index 6d55382..0000000
--- a/lib/proto/common_pb2.py
+++ /dev/null
@@ -1,304 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: proto/common.proto
-"""Generated protocol buffer code."""
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='proto/common.proto',
- package='bluetooth.facade',
- syntax='proto3',
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x12proto/common.proto\x12\x10\x62luetooth.facade\"\x07\n\x05\x45mpty\"\x17\n\x04\x44\x61ta\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\"#\n\x10\x42luetoothAddress\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\"\x89\x01\n\x18\x42luetoothAddressWithType\x12\x33\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\x12\x38\n\x04type\x18\x02 \x01(\x0e\x32*.bluetooth.facade.BluetoothAddressTypeEnum*\x8a\x01\n\x18\x42luetoothAddressTypeEnum\x12\x19\n\x15PUBLIC_DEVICE_ADDRESS\x10\x00\x12\x19\n\x15RANDOM_DEVICE_ADDRESS\x10\x01\x12\x1b\n\x17PUBLIC_IDENTITY_ADDRESS\x10\x02\x12\x1b\n\x17RANDOM_IDENTITY_ADDRESS\x10\x03*\x9f\x01\n\x1b\x42luetoothOwnAddressTypeEnum\x12\x1d\n\x19USE_PUBLIC_DEVICE_ADDRESS\x10\x00\x12\x1d\n\x19USE_RANDOM_DEVICE_ADDRESS\x10\x01\x12 \n\x1cRESOLVABLE_OR_PUBLIC_ADDRESS\x10\x02\x12 \n\x1cRESOLVABLE_OR_RANDOM_ADDRESS\x10\x03*l\n\x1c\x42luetoothPeerAddressTypeEnum\x12%\n!PUBLIC_DEVICE_OR_IDENTITY_ADDRESS\x10\x00\x12%\n!RANDOM_DEVICE_OR_IDENTITY_ADDRESS\x10\x01\x62\x06proto3'
-)
-
-_BLUETOOTHADDRESSTYPEENUM = _descriptor.EnumDescriptor(
- name='BluetoothAddressTypeEnum',
- full_name='bluetooth.facade.BluetoothAddressTypeEnum',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='PUBLIC_DEVICE_ADDRESS', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RANDOM_DEVICE_ADDRESS', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PUBLIC_IDENTITY_ADDRESS', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RANDOM_IDENTITY_ADDRESS', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=252,
- serialized_end=390,
-)
-_sym_db.RegisterEnumDescriptor(_BLUETOOTHADDRESSTYPEENUM)
-
-BluetoothAddressTypeEnum = enum_type_wrapper.EnumTypeWrapper(_BLUETOOTHADDRESSTYPEENUM)
-_BLUETOOTHOWNADDRESSTYPEENUM = _descriptor.EnumDescriptor(
- name='BluetoothOwnAddressTypeEnum',
- full_name='bluetooth.facade.BluetoothOwnAddressTypeEnum',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='USE_PUBLIC_DEVICE_ADDRESS', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='USE_RANDOM_DEVICE_ADDRESS', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RESOLVABLE_OR_PUBLIC_ADDRESS', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RESOLVABLE_OR_RANDOM_ADDRESS', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=393,
- serialized_end=552,
-)
-_sym_db.RegisterEnumDescriptor(_BLUETOOTHOWNADDRESSTYPEENUM)
-
-BluetoothOwnAddressTypeEnum = enum_type_wrapper.EnumTypeWrapper(_BLUETOOTHOWNADDRESSTYPEENUM)
-_BLUETOOTHPEERADDRESSTYPEENUM = _descriptor.EnumDescriptor(
- name='BluetoothPeerAddressTypeEnum',
- full_name='bluetooth.facade.BluetoothPeerAddressTypeEnum',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='PUBLIC_DEVICE_OR_IDENTITY_ADDRESS', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RANDOM_DEVICE_OR_IDENTITY_ADDRESS', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=554,
- serialized_end=662,
-)
-_sym_db.RegisterEnumDescriptor(_BLUETOOTHPEERADDRESSTYPEENUM)
-
-BluetoothPeerAddressTypeEnum = enum_type_wrapper.EnumTypeWrapper(_BLUETOOTHPEERADDRESSTYPEENUM)
-PUBLIC_DEVICE_ADDRESS = 0
-RANDOM_DEVICE_ADDRESS = 1
-PUBLIC_IDENTITY_ADDRESS = 2
-RANDOM_IDENTITY_ADDRESS = 3
-USE_PUBLIC_DEVICE_ADDRESS = 0
-USE_RANDOM_DEVICE_ADDRESS = 1
-RESOLVABLE_OR_PUBLIC_ADDRESS = 2
-RESOLVABLE_OR_RANDOM_ADDRESS = 3
-PUBLIC_DEVICE_OR_IDENTITY_ADDRESS = 0
-RANDOM_DEVICE_OR_IDENTITY_ADDRESS = 1
-
-
-
-_EMPTY = _descriptor.Descriptor(
- name='Empty',
- full_name='bluetooth.facade.Empty',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=40,
- serialized_end=47,
-)
-
-
-_DATA = _descriptor.Descriptor(
- name='Data',
- full_name='bluetooth.facade.Data',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='payload', full_name='bluetooth.facade.Data.payload', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=49,
- serialized_end=72,
-)
-
-
-_BLUETOOTHADDRESS = _descriptor.Descriptor(
- name='BluetoothAddress',
- full_name='bluetooth.facade.BluetoothAddress',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='address', full_name='bluetooth.facade.BluetoothAddress.address', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=74,
- serialized_end=109,
-)
-
-
-_BLUETOOTHADDRESSWITHTYPE = _descriptor.Descriptor(
- name='BluetoothAddressWithType',
- full_name='bluetooth.facade.BluetoothAddressWithType',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='address', full_name='bluetooth.facade.BluetoothAddressWithType.address', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='bluetooth.facade.BluetoothAddressWithType.type', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=112,
- serialized_end=249,
-)
-
-_BLUETOOTHADDRESSWITHTYPE.fields_by_name['address'].message_type = _BLUETOOTHADDRESS
-_BLUETOOTHADDRESSWITHTYPE.fields_by_name['type'].enum_type = _BLUETOOTHADDRESSTYPEENUM
-DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY
-DESCRIPTOR.message_types_by_name['Data'] = _DATA
-DESCRIPTOR.message_types_by_name['BluetoothAddress'] = _BLUETOOTHADDRESS
-DESCRIPTOR.message_types_by_name['BluetoothAddressWithType'] = _BLUETOOTHADDRESSWITHTYPE
-DESCRIPTOR.enum_types_by_name['BluetoothAddressTypeEnum'] = _BLUETOOTHADDRESSTYPEENUM
-DESCRIPTOR.enum_types_by_name['BluetoothOwnAddressTypeEnum'] = _BLUETOOTHOWNADDRESSTYPEENUM
-DESCRIPTOR.enum_types_by_name['BluetoothPeerAddressTypeEnum'] = _BLUETOOTHPEERADDRESSTYPEENUM
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), {
- 'DESCRIPTOR' : _EMPTY,
- '__module__' : 'proto.common_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.Empty)
- })
-_sym_db.RegisterMessage(Empty)
-
-Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), {
- 'DESCRIPTOR' : _DATA,
- '__module__' : 'proto.common_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.Data)
- })
-_sym_db.RegisterMessage(Data)
-
-BluetoothAddress = _reflection.GeneratedProtocolMessageType('BluetoothAddress', (_message.Message,), {
- 'DESCRIPTOR' : _BLUETOOTHADDRESS,
- '__module__' : 'proto.common_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.BluetoothAddress)
- })
-_sym_db.RegisterMessage(BluetoothAddress)
-
-BluetoothAddressWithType = _reflection.GeneratedProtocolMessageType('BluetoothAddressWithType', (_message.Message,), {
- 'DESCRIPTOR' : _BLUETOOTHADDRESSWITHTYPE,
- '__module__' : 'proto.common_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.BluetoothAddressWithType)
- })
-_sym_db.RegisterMessage(BluetoothAddressWithType)
-
-
-# @@protoc_insertion_point(module_scope)
diff --git a/lib/proto/common_pb2_grpc.py b/lib/proto/common_pb2_grpc.py
deleted file mode 100644
index 2daafff..0000000
--- a/lib/proto/common_pb2_grpc.py
+++ /dev/null
@@ -1,4 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
diff --git a/lib/proto/l2cap_pb2.py b/lib/proto/l2cap_pb2.py
deleted file mode 100644
index f0bdde7..0000000
--- a/lib/proto/l2cap_pb2.py
+++ /dev/null
@@ -1,1017 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: proto/l2cap.proto
-"""Generated protocol buffer code."""
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import common_pb2 as proto_dot_common__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='proto/l2cap.proto',
- package='bluetooth.l2cap.classic',
- syntax='proto3',
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x11proto/l2cap.proto\x12\x17\x62luetooth.l2cap.classic\x1a\x12proto/common.proto\"\xae\x01\n\"LinkSecurityInterfaceCallbackEvent\x12\x33\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\x12S\n\nevent_type\x18\x02 \x01(\x0e\x32?.bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEventType\")\n\x16RegisterChannelRequest\x12\x0f\n\x07\x63hannel\x18\x01 \x01(\r\"M\n\x17\x43onnectionCompleteEvent\x12\x32\n\x06remote\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\"Z\n\x14\x43onnectionCloseEvent\x12\x32\n\x06remote\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\x12\x0e\n\x06reason\x18\x02 \x01(\r\"\x9b\x01\n\x12OpenChannelRequest\x12\x32\n\x06remote\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\x12\x0b\n\x03psm\x18\x02 \x01(\r\x12\x44\n\x04mode\x18\x03 \x01(\x0e\x32\x36.bluetooth.l2cap.classic.RetransmissionFlowControlMode\"\"\n\x13\x43loseChannelRequest\x12\x0b\n\x03psm\x18\x01 \x01(\r\"`\n\x12\x43hannelSignalEvent\x12\x0b\n\x03\x63id\x18\x01 \x01(\r\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.bluetooth.l2cap.classic.ChannelSignalEventType\"`\n\x15SendL2capPacketResult\x12G\n\x0bresult_type\x18\x01 \x01(\x0e\x32\x32.bluetooth.l2cap.classic.SendL2capPacketResultType\"R\n\x0bL2capPacket\x12\r\n\x03psm\x18\x01 \x01(\rH\x00\x12\x13\n\tfixed_cid\x18\x02 \x01(\rH\x00\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x42\x0e\n\x0c\x63hannel_type\"\x92\x01\n\x1eSetEnableDynamicChannelRequest\x12\x0b\n\x03psm\x18\x01 \x01(\r\x12\x0e\n\x06\x65nable\x18\x02 \x01(\x08\x12S\n\x13retransmission_mode\x18\x03 \x01(\x0e\x32\x36.bluetooth.l2cap.classic.RetransmissionFlowControlMode\"h\n\x14\x44ynamicChannelPacket\x12\x32\n\x06remote\x18\x01 \x01(\x0b\x32\".bluetooth.facade.BluetoothAddress\x12\x0b\n\x03psm\x18\x02 \x01(\r\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\"6\n\x17SetTrafficPausedRequest\x12\x0e\n\x06paused\x18\x01 \x01(\x08\x12\x0b\n\x03psm\x18\x02 \x01(\r\",\n\x1cGetChannelQueueDepthResponse\x12\x0c\n\x04size\x18\x01 \x01(\r*\xd0\x01\n&LinkSecurityInterfaceCallbackEventType\x12\x10\n\x0cON_CONNECTED\x10\x00\x12\x13\n\x0fON_DISCONNECTED\x10\x01\x12\x1e\n\x1aON_AUTHENTICATION_COMPLETE\x10\x02\x12\x18\n\x14ON_ENCRYPTION_CHANGE\x10\x03\x12\x1f\n\x1bON_READ_REMOTE_VERSION_INFO\x10\x04\x12$\n ON_READ_REMOTE_EXTENDED_FEATURES\x10\x05*G\n\x1dRetransmissionFlowControlMode\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x45RTM\x10\x01\x12\x11\n\rERTM_OPTIONAL\x10\x02*<\n\x16\x43hannelSignalEventType\x12\x08\n\x04OPEN\x10\x00\x12\t\n\x05\x43LOSE\x10\x01\x12\r\n\tCONFIGURE\x10\x02*0\n\x19SendL2capPacketResultType\x12\x06\n\x02OK\x10\x00\x12\x0b\n\x07\x42\x41\x44_CID\x10\x01*\x9e\x01\n\x15\x43lassicSecurityPolicy\x12\x17\n\x13\x45NCRYPTED_TRANSPORT\x10\x00\x12%\n!AUTHENTICATED_ENCRYPTED_TRANSPORT\x10\x01\x12\x08\n\x04\x42\x45ST\x10\x02\x12;\n7_SDP_ONLY_NO_SECURITY_WHATSOEVER_PLAINTEXT_TRANSPORT_OK\x10\x03\x32\xc6\x0b\n\x18L2capClassicModuleFacade\x12h\n\x17\x46\x65tchConnectionComplete\x12\x17.bluetooth.facade.Empty\x1a\x30.bluetooth.l2cap.classic.ConnectionCompleteEvent\"\x00\x30\x01\x12\x62\n\x14\x46\x65tchConnectionClose\x12\x17.bluetooth.facade.Empty\x1a-.bluetooth.l2cap.classic.ConnectionCloseEvent\"\x00\x30\x01\x12U\n\x0bOpenChannel\x12+.bluetooth.l2cap.classic.OpenChannelRequest\x1a\x17.bluetooth.facade.Empty\"\x00\x12W\n\x0c\x43loseChannel\x12,.bluetooth.l2cap.classic.CloseChannelRequest\x1a\x17.bluetooth.facade.Empty\"\x00\x12S\n\x0e\x46\x65tchL2capData\x12\x17.bluetooth.facade.Empty\x1a$.bluetooth.l2cap.classic.L2capPacket\"\x00\x30\x01\x12g\n\x11SetDynamicChannel\x12\x37.bluetooth.l2cap.classic.SetEnableDynamicChannelRequest\x1a\x17.bluetooth.facade.Empty\"\x00\x12\x64\n\x18SendDynamicChannelPacket\x12-.bluetooth.l2cap.classic.DynamicChannelPacket\x1a\x17.bluetooth.facade.Empty\"\x00\x12_\n\x10SetTrafficPaused\x12\x30.bluetooth.l2cap.classic.SetTrafficPausedRequest\x1a\x17.bluetooth.facade.Empty\"\x00\x12h\n\x14GetChannelQueueDepth\x12\x17.bluetooth.facade.Empty\x1a\x35.bluetooth.l2cap.classic.GetChannelQueueDepthResponse\"\x00\x12^\n\x1dInitiateConnectionForSecurity\x12\".bluetooth.facade.BluetoothAddress\x1a\x17.bluetooth.facade.Empty\"\x00\x12y\n\x1d\x46\x65tchSecurityConnectionEvents\x12\x17.bluetooth.facade.Empty\x1a;.bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEvent\"\x00\x30\x01\x12`\n\x1fSecurityLinkEnsureAuthenticated\x12\".bluetooth.facade.BluetoothAddress\x1a\x17.bluetooth.facade.Empty\"\x00\x12Q\n\x10SecurityLinkHold\x12\".bluetooth.facade.BluetoothAddress\x1a\x17.bluetooth.facade.Empty\"\x00\x12W\n\x16SecurityLinkDisconnect\x12\".bluetooth.facade.BluetoothAddress\x1a\x17.bluetooth.facade.Empty\"\x00\x12T\n\x13SecurityLinkRelease\x12\".bluetooth.facade.BluetoothAddress\x1a\x17.bluetooth.facade.Empty\"\x00\x62\x06proto3'
- ,
- dependencies=[proto_dot_common__pb2.DESCRIPTOR,])
-
-_LINKSECURITYINTERFACECALLBACKEVENTTYPE = _descriptor.EnumDescriptor(
- name='LinkSecurityInterfaceCallbackEventType',
- full_name='bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEventType',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='ON_CONNECTED', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ON_DISCONNECTED', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ON_AUTHENTICATION_COMPLETE', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ON_ENCRYPTION_CHANGE', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ON_READ_REMOTE_VERSION_INFO', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ON_READ_REMOTE_EXTENDED_FEATURES', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1289,
- serialized_end=1497,
-)
-_sym_db.RegisterEnumDescriptor(_LINKSECURITYINTERFACECALLBACKEVENTTYPE)
-
-LinkSecurityInterfaceCallbackEventType = enum_type_wrapper.EnumTypeWrapper(_LINKSECURITYINTERFACECALLBACKEVENTTYPE)
-_RETRANSMISSIONFLOWCONTROLMODE = _descriptor.EnumDescriptor(
- name='RetransmissionFlowControlMode',
- full_name='bluetooth.l2cap.classic.RetransmissionFlowControlMode',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='BASIC', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ERTM', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ERTM_OPTIONAL', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1499,
- serialized_end=1570,
-)
-_sym_db.RegisterEnumDescriptor(_RETRANSMISSIONFLOWCONTROLMODE)
-
-RetransmissionFlowControlMode = enum_type_wrapper.EnumTypeWrapper(_RETRANSMISSIONFLOWCONTROLMODE)
-_CHANNELSIGNALEVENTTYPE = _descriptor.EnumDescriptor(
- name='ChannelSignalEventType',
- full_name='bluetooth.l2cap.classic.ChannelSignalEventType',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='OPEN', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='CLOSE', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='CONFIGURE', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1572,
- serialized_end=1632,
-)
-_sym_db.RegisterEnumDescriptor(_CHANNELSIGNALEVENTTYPE)
-
-ChannelSignalEventType = enum_type_wrapper.EnumTypeWrapper(_CHANNELSIGNALEVENTTYPE)
-_SENDL2CAPPACKETRESULTTYPE = _descriptor.EnumDescriptor(
- name='SendL2capPacketResultType',
- full_name='bluetooth.l2cap.classic.SendL2capPacketResultType',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='OK', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='BAD_CID', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1634,
- serialized_end=1682,
-)
-_sym_db.RegisterEnumDescriptor(_SENDL2CAPPACKETRESULTTYPE)
-
-SendL2capPacketResultType = enum_type_wrapper.EnumTypeWrapper(_SENDL2CAPPACKETRESULTTYPE)
-_CLASSICSECURITYPOLICY = _descriptor.EnumDescriptor(
- name='ClassicSecurityPolicy',
- full_name='bluetooth.l2cap.classic.ClassicSecurityPolicy',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='ENCRYPTED_TRANSPORT', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='AUTHENTICATED_ENCRYPTED_TRANSPORT', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='BEST', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='_SDP_ONLY_NO_SECURITY_WHATSOEVER_PLAINTEXT_TRANSPORT_OK', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1685,
- serialized_end=1843,
-)
-_sym_db.RegisterEnumDescriptor(_CLASSICSECURITYPOLICY)
-
-ClassicSecurityPolicy = enum_type_wrapper.EnumTypeWrapper(_CLASSICSECURITYPOLICY)
-ON_CONNECTED = 0
-ON_DISCONNECTED = 1
-ON_AUTHENTICATION_COMPLETE = 2
-ON_ENCRYPTION_CHANGE = 3
-ON_READ_REMOTE_VERSION_INFO = 4
-ON_READ_REMOTE_EXTENDED_FEATURES = 5
-BASIC = 0
-ERTM = 1
-ERTM_OPTIONAL = 2
-OPEN = 0
-CLOSE = 1
-CONFIGURE = 2
-OK = 0
-BAD_CID = 1
-ENCRYPTED_TRANSPORT = 0
-AUTHENTICATED_ENCRYPTED_TRANSPORT = 1
-BEST = 2
-_SDP_ONLY_NO_SECURITY_WHATSOEVER_PLAINTEXT_TRANSPORT_OK = 3
-
-
-
-_LINKSECURITYINTERFACECALLBACKEVENT = _descriptor.Descriptor(
- name='LinkSecurityInterfaceCallbackEvent',
- full_name='bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEvent',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='address', full_name='bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEvent.address', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='event_type', full_name='bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEvent.event_type', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=67,
- serialized_end=241,
-)
-
-
-_REGISTERCHANNELREQUEST = _descriptor.Descriptor(
- name='RegisterChannelRequest',
- full_name='bluetooth.l2cap.classic.RegisterChannelRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='channel', full_name='bluetooth.l2cap.classic.RegisterChannelRequest.channel', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=243,
- serialized_end=284,
-)
-
-
-_CONNECTIONCOMPLETEEVENT = _descriptor.Descriptor(
- name='ConnectionCompleteEvent',
- full_name='bluetooth.l2cap.classic.ConnectionCompleteEvent',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='remote', full_name='bluetooth.l2cap.classic.ConnectionCompleteEvent.remote', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=286,
- serialized_end=363,
-)
-
-
-_CONNECTIONCLOSEEVENT = _descriptor.Descriptor(
- name='ConnectionCloseEvent',
- full_name='bluetooth.l2cap.classic.ConnectionCloseEvent',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='remote', full_name='bluetooth.l2cap.classic.ConnectionCloseEvent.remote', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='reason', full_name='bluetooth.l2cap.classic.ConnectionCloseEvent.reason', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=365,
- serialized_end=455,
-)
-
-
-_OPENCHANNELREQUEST = _descriptor.Descriptor(
- name='OpenChannelRequest',
- full_name='bluetooth.l2cap.classic.OpenChannelRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='remote', full_name='bluetooth.l2cap.classic.OpenChannelRequest.remote', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.OpenChannelRequest.psm', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='mode', full_name='bluetooth.l2cap.classic.OpenChannelRequest.mode', index=2,
- number=3, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=458,
- serialized_end=613,
-)
-
-
-_CLOSECHANNELREQUEST = _descriptor.Descriptor(
- name='CloseChannelRequest',
- full_name='bluetooth.l2cap.classic.CloseChannelRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.CloseChannelRequest.psm', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=615,
- serialized_end=649,
-)
-
-
-_CHANNELSIGNALEVENT = _descriptor.Descriptor(
- name='ChannelSignalEvent',
- full_name='bluetooth.l2cap.classic.ChannelSignalEvent',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='cid', full_name='bluetooth.l2cap.classic.ChannelSignalEvent.cid', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='bluetooth.l2cap.classic.ChannelSignalEvent.type', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=651,
- serialized_end=747,
-)
-
-
-_SENDL2CAPPACKETRESULT = _descriptor.Descriptor(
- name='SendL2capPacketResult',
- full_name='bluetooth.l2cap.classic.SendL2capPacketResult',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='result_type', full_name='bluetooth.l2cap.classic.SendL2capPacketResult.result_type', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=749,
- serialized_end=845,
-)
-
-
-_L2CAPPACKET = _descriptor.Descriptor(
- name='L2capPacket',
- full_name='bluetooth.l2cap.classic.L2capPacket',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.L2capPacket.psm', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='fixed_cid', full_name='bluetooth.l2cap.classic.L2capPacket.fixed_cid', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='payload', full_name='bluetooth.l2cap.classic.L2capPacket.payload', index=2,
- number=3, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='channel_type', full_name='bluetooth.l2cap.classic.L2capPacket.channel_type',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=847,
- serialized_end=929,
-)
-
-
-_SETENABLEDYNAMICCHANNELREQUEST = _descriptor.Descriptor(
- name='SetEnableDynamicChannelRequest',
- full_name='bluetooth.l2cap.classic.SetEnableDynamicChannelRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.SetEnableDynamicChannelRequest.psm', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='enable', full_name='bluetooth.l2cap.classic.SetEnableDynamicChannelRequest.enable', index=1,
- number=2, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='retransmission_mode', full_name='bluetooth.l2cap.classic.SetEnableDynamicChannelRequest.retransmission_mode', index=2,
- number=3, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=932,
- serialized_end=1078,
-)
-
-
-_DYNAMICCHANNELPACKET = _descriptor.Descriptor(
- name='DynamicChannelPacket',
- full_name='bluetooth.l2cap.classic.DynamicChannelPacket',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='remote', full_name='bluetooth.l2cap.classic.DynamicChannelPacket.remote', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.DynamicChannelPacket.psm', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='payload', full_name='bluetooth.l2cap.classic.DynamicChannelPacket.payload', index=2,
- number=3, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1080,
- serialized_end=1184,
-)
-
-
-_SETTRAFFICPAUSEDREQUEST = _descriptor.Descriptor(
- name='SetTrafficPausedRequest',
- full_name='bluetooth.l2cap.classic.SetTrafficPausedRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='paused', full_name='bluetooth.l2cap.classic.SetTrafficPausedRequest.paused', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='psm', full_name='bluetooth.l2cap.classic.SetTrafficPausedRequest.psm', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1186,
- serialized_end=1240,
-)
-
-
-_GETCHANNELQUEUEDEPTHRESPONSE = _descriptor.Descriptor(
- name='GetChannelQueueDepthResponse',
- full_name='bluetooth.l2cap.classic.GetChannelQueueDepthResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='size', full_name='bluetooth.l2cap.classic.GetChannelQueueDepthResponse.size', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1242,
- serialized_end=1286,
-)
-
-_LINKSECURITYINTERFACECALLBACKEVENT.fields_by_name['address'].message_type = proto_dot_common__pb2._BLUETOOTHADDRESS
-_LINKSECURITYINTERFACECALLBACKEVENT.fields_by_name['event_type'].enum_type = _LINKSECURITYINTERFACECALLBACKEVENTTYPE
-_CONNECTIONCOMPLETEEVENT.fields_by_name['remote'].message_type = proto_dot_common__pb2._BLUETOOTHADDRESS
-_CONNECTIONCLOSEEVENT.fields_by_name['remote'].message_type = proto_dot_common__pb2._BLUETOOTHADDRESS
-_OPENCHANNELREQUEST.fields_by_name['remote'].message_type = proto_dot_common__pb2._BLUETOOTHADDRESS
-_OPENCHANNELREQUEST.fields_by_name['mode'].enum_type = _RETRANSMISSIONFLOWCONTROLMODE
-_CHANNELSIGNALEVENT.fields_by_name['type'].enum_type = _CHANNELSIGNALEVENTTYPE
-_SENDL2CAPPACKETRESULT.fields_by_name['result_type'].enum_type = _SENDL2CAPPACKETRESULTTYPE
-_L2CAPPACKET.oneofs_by_name['channel_type'].fields.append(
- _L2CAPPACKET.fields_by_name['psm'])
-_L2CAPPACKET.fields_by_name['psm'].containing_oneof = _L2CAPPACKET.oneofs_by_name['channel_type']
-_L2CAPPACKET.oneofs_by_name['channel_type'].fields.append(
- _L2CAPPACKET.fields_by_name['fixed_cid'])
-_L2CAPPACKET.fields_by_name['fixed_cid'].containing_oneof = _L2CAPPACKET.oneofs_by_name['channel_type']
-_SETENABLEDYNAMICCHANNELREQUEST.fields_by_name['retransmission_mode'].enum_type = _RETRANSMISSIONFLOWCONTROLMODE
-_DYNAMICCHANNELPACKET.fields_by_name['remote'].message_type = proto_dot_common__pb2._BLUETOOTHADDRESS
-DESCRIPTOR.message_types_by_name['LinkSecurityInterfaceCallbackEvent'] = _LINKSECURITYINTERFACECALLBACKEVENT
-DESCRIPTOR.message_types_by_name['RegisterChannelRequest'] = _REGISTERCHANNELREQUEST
-DESCRIPTOR.message_types_by_name['ConnectionCompleteEvent'] = _CONNECTIONCOMPLETEEVENT
-DESCRIPTOR.message_types_by_name['ConnectionCloseEvent'] = _CONNECTIONCLOSEEVENT
-DESCRIPTOR.message_types_by_name['OpenChannelRequest'] = _OPENCHANNELREQUEST
-DESCRIPTOR.message_types_by_name['CloseChannelRequest'] = _CLOSECHANNELREQUEST
-DESCRIPTOR.message_types_by_name['ChannelSignalEvent'] = _CHANNELSIGNALEVENT
-DESCRIPTOR.message_types_by_name['SendL2capPacketResult'] = _SENDL2CAPPACKETRESULT
-DESCRIPTOR.message_types_by_name['L2capPacket'] = _L2CAPPACKET
-DESCRIPTOR.message_types_by_name['SetEnableDynamicChannelRequest'] = _SETENABLEDYNAMICCHANNELREQUEST
-DESCRIPTOR.message_types_by_name['DynamicChannelPacket'] = _DYNAMICCHANNELPACKET
-DESCRIPTOR.message_types_by_name['SetTrafficPausedRequest'] = _SETTRAFFICPAUSEDREQUEST
-DESCRIPTOR.message_types_by_name['GetChannelQueueDepthResponse'] = _GETCHANNELQUEUEDEPTHRESPONSE
-DESCRIPTOR.enum_types_by_name['LinkSecurityInterfaceCallbackEventType'] = _LINKSECURITYINTERFACECALLBACKEVENTTYPE
-DESCRIPTOR.enum_types_by_name['RetransmissionFlowControlMode'] = _RETRANSMISSIONFLOWCONTROLMODE
-DESCRIPTOR.enum_types_by_name['ChannelSignalEventType'] = _CHANNELSIGNALEVENTTYPE
-DESCRIPTOR.enum_types_by_name['SendL2capPacketResultType'] = _SENDL2CAPPACKETRESULTTYPE
-DESCRIPTOR.enum_types_by_name['ClassicSecurityPolicy'] = _CLASSICSECURITYPOLICY
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-LinkSecurityInterfaceCallbackEvent = _reflection.GeneratedProtocolMessageType('LinkSecurityInterfaceCallbackEvent', (_message.Message,), {
- 'DESCRIPTOR' : _LINKSECURITYINTERFACECALLBACKEVENT,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.LinkSecurityInterfaceCallbackEvent)
- })
-_sym_db.RegisterMessage(LinkSecurityInterfaceCallbackEvent)
-
-RegisterChannelRequest = _reflection.GeneratedProtocolMessageType('RegisterChannelRequest', (_message.Message,), {
- 'DESCRIPTOR' : _REGISTERCHANNELREQUEST,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.RegisterChannelRequest)
- })
-_sym_db.RegisterMessage(RegisterChannelRequest)
-
-ConnectionCompleteEvent = _reflection.GeneratedProtocolMessageType('ConnectionCompleteEvent', (_message.Message,), {
- 'DESCRIPTOR' : _CONNECTIONCOMPLETEEVENT,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.ConnectionCompleteEvent)
- })
-_sym_db.RegisterMessage(ConnectionCompleteEvent)
-
-ConnectionCloseEvent = _reflection.GeneratedProtocolMessageType('ConnectionCloseEvent', (_message.Message,), {
- 'DESCRIPTOR' : _CONNECTIONCLOSEEVENT,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.ConnectionCloseEvent)
- })
-_sym_db.RegisterMessage(ConnectionCloseEvent)
-
-OpenChannelRequest = _reflection.GeneratedProtocolMessageType('OpenChannelRequest', (_message.Message,), {
- 'DESCRIPTOR' : _OPENCHANNELREQUEST,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.OpenChannelRequest)
- })
-_sym_db.RegisterMessage(OpenChannelRequest)
-
-CloseChannelRequest = _reflection.GeneratedProtocolMessageType('CloseChannelRequest', (_message.Message,), {
- 'DESCRIPTOR' : _CLOSECHANNELREQUEST,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.CloseChannelRequest)
- })
-_sym_db.RegisterMessage(CloseChannelRequest)
-
-ChannelSignalEvent = _reflection.GeneratedProtocolMessageType('ChannelSignalEvent', (_message.Message,), {
- 'DESCRIPTOR' : _CHANNELSIGNALEVENT,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.ChannelSignalEvent)
- })
-_sym_db.RegisterMessage(ChannelSignalEvent)
-
-SendL2capPacketResult = _reflection.GeneratedProtocolMessageType('SendL2capPacketResult', (_message.Message,), {
- 'DESCRIPTOR' : _SENDL2CAPPACKETRESULT,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.SendL2capPacketResult)
- })
-_sym_db.RegisterMessage(SendL2capPacketResult)
-
-L2capPacket = _reflection.GeneratedProtocolMessageType('L2capPacket', (_message.Message,), {
- 'DESCRIPTOR' : _L2CAPPACKET,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.L2capPacket)
- })
-_sym_db.RegisterMessage(L2capPacket)
-
-SetEnableDynamicChannelRequest = _reflection.GeneratedProtocolMessageType('SetEnableDynamicChannelRequest', (_message.Message,), {
- 'DESCRIPTOR' : _SETENABLEDYNAMICCHANNELREQUEST,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.SetEnableDynamicChannelRequest)
- })
-_sym_db.RegisterMessage(SetEnableDynamicChannelRequest)
-
-DynamicChannelPacket = _reflection.GeneratedProtocolMessageType('DynamicChannelPacket', (_message.Message,), {
- 'DESCRIPTOR' : _DYNAMICCHANNELPACKET,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.DynamicChannelPacket)
- })
-_sym_db.RegisterMessage(DynamicChannelPacket)
-
-SetTrafficPausedRequest = _reflection.GeneratedProtocolMessageType('SetTrafficPausedRequest', (_message.Message,), {
- 'DESCRIPTOR' : _SETTRAFFICPAUSEDREQUEST,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.SetTrafficPausedRequest)
- })
-_sym_db.RegisterMessage(SetTrafficPausedRequest)
-
-GetChannelQueueDepthResponse = _reflection.GeneratedProtocolMessageType('GetChannelQueueDepthResponse', (_message.Message,), {
- 'DESCRIPTOR' : _GETCHANNELQUEUEDEPTHRESPONSE,
- '__module__' : 'proto.l2cap_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.l2cap.classic.GetChannelQueueDepthResponse)
- })
-_sym_db.RegisterMessage(GetChannelQueueDepthResponse)
-
-
-
-_L2CAPCLASSICMODULEFACADE = _descriptor.ServiceDescriptor(
- name='L2capClassicModuleFacade',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade',
- file=DESCRIPTOR,
- index=0,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_start=1846,
- serialized_end=3324,
- methods=[
- _descriptor.MethodDescriptor(
- name='FetchConnectionComplete',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.FetchConnectionComplete',
- index=0,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_CONNECTIONCOMPLETEEVENT,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='FetchConnectionClose',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.FetchConnectionClose',
- index=1,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_CONNECTIONCLOSEEVENT,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='OpenChannel',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.OpenChannel',
- index=2,
- containing_service=None,
- input_type=_OPENCHANNELREQUEST,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='CloseChannel',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.CloseChannel',
- index=3,
- containing_service=None,
- input_type=_CLOSECHANNELREQUEST,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='FetchL2capData',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.FetchL2capData',
- index=4,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_L2CAPPACKET,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SetDynamicChannel',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SetDynamicChannel',
- index=5,
- containing_service=None,
- input_type=_SETENABLEDYNAMICCHANNELREQUEST,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SendDynamicChannelPacket',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SendDynamicChannelPacket',
- index=6,
- containing_service=None,
- input_type=_DYNAMICCHANNELPACKET,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SetTrafficPaused',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SetTrafficPaused',
- index=7,
- containing_service=None,
- input_type=_SETTRAFFICPAUSEDREQUEST,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='GetChannelQueueDepth',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.GetChannelQueueDepth',
- index=8,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_GETCHANNELQUEUEDEPTHRESPONSE,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='InitiateConnectionForSecurity',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.InitiateConnectionForSecurity',
- index=9,
- containing_service=None,
- input_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='FetchSecurityConnectionEvents',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.FetchSecurityConnectionEvents',
- index=10,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_LINKSECURITYINTERFACECALLBACKEVENT,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SecurityLinkEnsureAuthenticated',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SecurityLinkEnsureAuthenticated',
- index=11,
- containing_service=None,
- input_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SecurityLinkHold',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SecurityLinkHold',
- index=12,
- containing_service=None,
- input_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SecurityLinkDisconnect',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SecurityLinkDisconnect',
- index=13,
- containing_service=None,
- input_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SecurityLinkRelease',
- full_name='bluetooth.l2cap.classic.L2capClassicModuleFacade.SecurityLinkRelease',
- index=14,
- containing_service=None,
- input_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_L2CAPCLASSICMODULEFACADE)
-
-DESCRIPTOR.services_by_name['L2capClassicModuleFacade'] = _L2CAPCLASSICMODULEFACADE
-
-# @@protoc_insertion_point(module_scope)
diff --git a/lib/proto/l2cap_pb2_grpc.py b/lib/proto/l2cap_pb2_grpc.py
deleted file mode 100644
index 74b9a86..0000000
--- a/lib/proto/l2cap_pb2_grpc.py
+++ /dev/null
@@ -1,533 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from . import common_pb2 as proto_dot_common__pb2
-from . import l2cap_pb2 as proto_dot_l2cap__pb2
-
-
-class L2capClassicModuleFacadeStub(object):
- """Missing associated documentation comment in .proto file."""
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.FetchConnectionComplete = channel.unary_stream(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchConnectionComplete',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_l2cap__pb2.ConnectionCompleteEvent.FromString,
- )
- self.FetchConnectionClose = channel.unary_stream(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchConnectionClose',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_l2cap__pb2.ConnectionCloseEvent.FromString,
- )
- self.OpenChannel = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/OpenChannel',
- request_serializer=proto_dot_l2cap__pb2.OpenChannelRequest.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.CloseChannel = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/CloseChannel',
- request_serializer=proto_dot_l2cap__pb2.CloseChannelRequest.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.FetchL2capData = channel.unary_stream(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchL2capData',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_l2cap__pb2.L2capPacket.FromString,
- )
- self.SetDynamicChannel = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SetDynamicChannel',
- request_serializer=proto_dot_l2cap__pb2.SetEnableDynamicChannelRequest.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SendDynamicChannelPacket = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SendDynamicChannelPacket',
- request_serializer=proto_dot_l2cap__pb2.DynamicChannelPacket.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SetTrafficPaused = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SetTrafficPaused',
- request_serializer=proto_dot_l2cap__pb2.SetTrafficPausedRequest.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.GetChannelQueueDepth = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/GetChannelQueueDepth',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_l2cap__pb2.GetChannelQueueDepthResponse.FromString,
- )
- self.InitiateConnectionForSecurity = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/InitiateConnectionForSecurity',
- request_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.FetchSecurityConnectionEvents = channel.unary_stream(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchSecurityConnectionEvents',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_l2cap__pb2.LinkSecurityInterfaceCallbackEvent.FromString,
- )
- self.SecurityLinkEnsureAuthenticated = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkEnsureAuthenticated',
- request_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SecurityLinkHold = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkHold',
- request_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SecurityLinkDisconnect = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkDisconnect',
- request_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SecurityLinkRelease = channel.unary_unary(
- '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkRelease',
- request_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
-
-
-class L2capClassicModuleFacadeServicer(object):
- """Missing associated documentation comment in .proto file."""
-
- def FetchConnectionComplete(self, request, context):
- """Testing Android Bluetooth stack only. Optional for other stack.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def FetchConnectionClose(self, request, context):
- """Testing Android Bluetooth stack only. Optional for other stack.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def OpenChannel(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def CloseChannel(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def FetchL2capData(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SetDynamicChannel(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SendDynamicChannelPacket(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SetTrafficPaused(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def GetChannelQueueDepth(self, request, context):
- """Get the buffer size of channel queue end for L2CAP user (how many packets we can buffer
- before L2CAP user dequeues.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def InitiateConnectionForSecurity(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def FetchSecurityConnectionEvents(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SecurityLinkEnsureAuthenticated(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SecurityLinkHold(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SecurityLinkDisconnect(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SecurityLinkRelease(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_L2capClassicModuleFacadeServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'FetchConnectionComplete': grpc.unary_stream_rpc_method_handler(
- servicer.FetchConnectionComplete,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_l2cap__pb2.ConnectionCompleteEvent.SerializeToString,
- ),
- 'FetchConnectionClose': grpc.unary_stream_rpc_method_handler(
- servicer.FetchConnectionClose,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_l2cap__pb2.ConnectionCloseEvent.SerializeToString,
- ),
- 'OpenChannel': grpc.unary_unary_rpc_method_handler(
- servicer.OpenChannel,
- request_deserializer=proto_dot_l2cap__pb2.OpenChannelRequest.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'CloseChannel': grpc.unary_unary_rpc_method_handler(
- servicer.CloseChannel,
- request_deserializer=proto_dot_l2cap__pb2.CloseChannelRequest.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'FetchL2capData': grpc.unary_stream_rpc_method_handler(
- servicer.FetchL2capData,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_l2cap__pb2.L2capPacket.SerializeToString,
- ),
- 'SetDynamicChannel': grpc.unary_unary_rpc_method_handler(
- servicer.SetDynamicChannel,
- request_deserializer=proto_dot_l2cap__pb2.SetEnableDynamicChannelRequest.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SendDynamicChannelPacket': grpc.unary_unary_rpc_method_handler(
- servicer.SendDynamicChannelPacket,
- request_deserializer=proto_dot_l2cap__pb2.DynamicChannelPacket.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SetTrafficPaused': grpc.unary_unary_rpc_method_handler(
- servicer.SetTrafficPaused,
- request_deserializer=proto_dot_l2cap__pb2.SetTrafficPausedRequest.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'GetChannelQueueDepth': grpc.unary_unary_rpc_method_handler(
- servicer.GetChannelQueueDepth,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_l2cap__pb2.GetChannelQueueDepthResponse.SerializeToString,
- ),
- 'InitiateConnectionForSecurity': grpc.unary_unary_rpc_method_handler(
- servicer.InitiateConnectionForSecurity,
- request_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'FetchSecurityConnectionEvents': grpc.unary_stream_rpc_method_handler(
- servicer.FetchSecurityConnectionEvents,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_l2cap__pb2.LinkSecurityInterfaceCallbackEvent.SerializeToString,
- ),
- 'SecurityLinkEnsureAuthenticated': grpc.unary_unary_rpc_method_handler(
- servicer.SecurityLinkEnsureAuthenticated,
- request_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SecurityLinkHold': grpc.unary_unary_rpc_method_handler(
- servicer.SecurityLinkHold,
- request_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SecurityLinkDisconnect': grpc.unary_unary_rpc_method_handler(
- servicer.SecurityLinkDisconnect,
- request_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SecurityLinkRelease': grpc.unary_unary_rpc_method_handler(
- servicer.SecurityLinkRelease,
- request_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'bluetooth.l2cap.classic.L2capClassicModuleFacade', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class L2capClassicModuleFacade(object):
- """Missing associated documentation comment in .proto file."""
-
- @staticmethod
- def FetchConnectionComplete(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchConnectionComplete',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_l2cap__pb2.ConnectionCompleteEvent.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def FetchConnectionClose(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchConnectionClose',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_l2cap__pb2.ConnectionCloseEvent.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def OpenChannel(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/OpenChannel',
- proto_dot_l2cap__pb2.OpenChannelRequest.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def CloseChannel(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/CloseChannel',
- proto_dot_l2cap__pb2.CloseChannelRequest.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def FetchL2capData(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchL2capData',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_l2cap__pb2.L2capPacket.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SetDynamicChannel(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SetDynamicChannel',
- proto_dot_l2cap__pb2.SetEnableDynamicChannelRequest.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SendDynamicChannelPacket(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SendDynamicChannelPacket',
- proto_dot_l2cap__pb2.DynamicChannelPacket.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SetTrafficPaused(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SetTrafficPaused',
- proto_dot_l2cap__pb2.SetTrafficPausedRequest.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def GetChannelQueueDepth(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/GetChannelQueueDepth',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_l2cap__pb2.GetChannelQueueDepthResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def InitiateConnectionForSecurity(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/InitiateConnectionForSecurity',
- proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def FetchSecurityConnectionEvents(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/FetchSecurityConnectionEvents',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_l2cap__pb2.LinkSecurityInterfaceCallbackEvent.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SecurityLinkEnsureAuthenticated(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkEnsureAuthenticated',
- proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SecurityLinkHold(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkHold',
- proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SecurityLinkDisconnect(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkDisconnect',
- proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SecurityLinkRelease(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.l2cap.classic.L2capClassicModuleFacade/SecurityLinkRelease',
- proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/lib/proto/neighbor_pb2.py b/lib/proto/neighbor_pb2.py
deleted file mode 100644
index be9e5ba..0000000
--- a/lib/proto/neighbor_pb2.py
+++ /dev/null
@@ -1,481 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: proto/neighbor.proto
-"""Generated protocol buffer code."""
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import common_pb2 as proto_dot_common__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='proto/neighbor.proto',
- package='bluetooth.neighbor',
- syntax='proto3',
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x14proto/neighbor.proto\x12\x12\x62luetooth.neighbor\x1a\x12proto/common.proto\"\x1c\n\tEnableMsg\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"L\n\x13\x44iscoverabilitiyMsg\x12\x35\n\x04mode\x18\x01 \x01(\x0e\x32\'.bluetooth.neighbor.DiscoverabilityMode\"\xab\x01\n\nInquiryMsg\x12=\n\x0cinquiry_mode\x18\x01 \x01(\x0e\x32\'.bluetooth.neighbor.DiscoverabilityMode\x12\x33\n\x0bresult_mode\x18\x02 \x01(\x0e\x32\x1e.bluetooth.neighbor.ResultMode\x12\x14\n\x0clength_1_28s\x18\x03 \x01(\r\x12\x13\n\x0bmax_results\x18\x04 \x01(\r\"\"\n\x10InquiryResultMsg\x12\x0e\n\x06packet\x18\x01 \x01(\x0c\"`\n\x14RemoteNameRequestMsg\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12!\n\x19page_scan_repetition_mode\x18\x02 \x01(\r\x12\x14\n\x0c\x63lock_offset\x18\x03 \x01(\r\"F\n\x15RemoteNameResponseMsg\x12\x0e\n\x06status\x18\x01 \x01(\r\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0c\x12\x0c\n\x04name\x18\x03 \x01(\x0c*8\n\x13\x44iscoverabilityMode\x12\x07\n\x03OFF\x10\x00\x12\x0b\n\x07LIMITED\x10\x01\x12\x0b\n\x07GENERAL\x10\x02*2\n\nResultMode\x12\x0c\n\x08STANDARD\x10\x00\x12\x08\n\x04RSSI\x10\x01\x12\x0c\n\x08\x45XTENDED\x10\x02\x32\xe6\x04\n\x0eNeighborFacade\x12M\n\x11SetConnectability\x12\x1d.bluetooth.neighbor.EnableMsg\x1a\x17.bluetooth.facade.Empty\"\x00\x12X\n\x12SetDiscoverability\x12\'.bluetooth.neighbor.DiscoverabilitiyMsg\x1a\x17.bluetooth.facade.Empty\"\x00\x12Z\n\x0eSetInquiryMode\x12\x1e.bluetooth.neighbor.InquiryMsg\x1a$.bluetooth.neighbor.InquiryResultMsg\"\x00\x30\x01\x12U\n\x0eReadRemoteName\x12(.bluetooth.neighbor.RemoteNameRequestMsg\x1a\x17.bluetooth.facade.Empty\"\x00\x12]\n\x13GetRemoteNameEvents\x12\x17.bluetooth.facade.Empty\x1a).bluetooth.neighbor.RemoteNameResponseMsg\"\x00\x30\x01\x12M\n\x11\x45nableInquiryScan\x12\x1d.bluetooth.neighbor.EnableMsg\x1a\x17.bluetooth.facade.Empty\"\x00\x12J\n\x0e\x45nablePageScan\x12\x1d.bluetooth.neighbor.EnableMsg\x1a\x17.bluetooth.facade.Empty\"\x00\x62\x06proto3'
- ,
- dependencies=[proto_dot_common__pb2.DESCRIPTOR,])
-
-_DISCOVERABILITYMODE = _descriptor.EnumDescriptor(
- name='DiscoverabilityMode',
- full_name='bluetooth.neighbor.DiscoverabilityMode',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='OFF', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='LIMITED', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='GENERAL', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=552,
- serialized_end=608,
-)
-_sym_db.RegisterEnumDescriptor(_DISCOVERABILITYMODE)
-
-DiscoverabilityMode = enum_type_wrapper.EnumTypeWrapper(_DISCOVERABILITYMODE)
-_RESULTMODE = _descriptor.EnumDescriptor(
- name='ResultMode',
- full_name='bluetooth.neighbor.ResultMode',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='STANDARD', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='RSSI', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='EXTENDED', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=610,
- serialized_end=660,
-)
-_sym_db.RegisterEnumDescriptor(_RESULTMODE)
-
-ResultMode = enum_type_wrapper.EnumTypeWrapper(_RESULTMODE)
-OFF = 0
-LIMITED = 1
-GENERAL = 2
-STANDARD = 0
-RSSI = 1
-EXTENDED = 2
-
-
-
-_ENABLEMSG = _descriptor.Descriptor(
- name='EnableMsg',
- full_name='bluetooth.neighbor.EnableMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='enabled', full_name='bluetooth.neighbor.EnableMsg.enabled', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=64,
- serialized_end=92,
-)
-
-
-_DISCOVERABILITIYMSG = _descriptor.Descriptor(
- name='DiscoverabilitiyMsg',
- full_name='bluetooth.neighbor.DiscoverabilitiyMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='mode', full_name='bluetooth.neighbor.DiscoverabilitiyMsg.mode', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=94,
- serialized_end=170,
-)
-
-
-_INQUIRYMSG = _descriptor.Descriptor(
- name='InquiryMsg',
- full_name='bluetooth.neighbor.InquiryMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='inquiry_mode', full_name='bluetooth.neighbor.InquiryMsg.inquiry_mode', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='result_mode', full_name='bluetooth.neighbor.InquiryMsg.result_mode', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='length_1_28s', full_name='bluetooth.neighbor.InquiryMsg.length_1_28s', index=2,
- number=3, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='max_results', full_name='bluetooth.neighbor.InquiryMsg.max_results', index=3,
- number=4, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=173,
- serialized_end=344,
-)
-
-
-_INQUIRYRESULTMSG = _descriptor.Descriptor(
- name='InquiryResultMsg',
- full_name='bluetooth.neighbor.InquiryResultMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='packet', full_name='bluetooth.neighbor.InquiryResultMsg.packet', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=346,
- serialized_end=380,
-)
-
-
-_REMOTENAMEREQUESTMSG = _descriptor.Descriptor(
- name='RemoteNameRequestMsg',
- full_name='bluetooth.neighbor.RemoteNameRequestMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='address', full_name='bluetooth.neighbor.RemoteNameRequestMsg.address', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='page_scan_repetition_mode', full_name='bluetooth.neighbor.RemoteNameRequestMsg.page_scan_repetition_mode', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='clock_offset', full_name='bluetooth.neighbor.RemoteNameRequestMsg.clock_offset', index=2,
- number=3, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=382,
- serialized_end=478,
-)
-
-
-_REMOTENAMERESPONSEMSG = _descriptor.Descriptor(
- name='RemoteNameResponseMsg',
- full_name='bluetooth.neighbor.RemoteNameResponseMsg',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='status', full_name='bluetooth.neighbor.RemoteNameResponseMsg.status', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='address', full_name='bluetooth.neighbor.RemoteNameResponseMsg.address', index=1,
- number=2, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='bluetooth.neighbor.RemoteNameResponseMsg.name', index=2,
- number=3, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=480,
- serialized_end=550,
-)
-
-_DISCOVERABILITIYMSG.fields_by_name['mode'].enum_type = _DISCOVERABILITYMODE
-_INQUIRYMSG.fields_by_name['inquiry_mode'].enum_type = _DISCOVERABILITYMODE
-_INQUIRYMSG.fields_by_name['result_mode'].enum_type = _RESULTMODE
-DESCRIPTOR.message_types_by_name['EnableMsg'] = _ENABLEMSG
-DESCRIPTOR.message_types_by_name['DiscoverabilitiyMsg'] = _DISCOVERABILITIYMSG
-DESCRIPTOR.message_types_by_name['InquiryMsg'] = _INQUIRYMSG
-DESCRIPTOR.message_types_by_name['InquiryResultMsg'] = _INQUIRYRESULTMSG
-DESCRIPTOR.message_types_by_name['RemoteNameRequestMsg'] = _REMOTENAMEREQUESTMSG
-DESCRIPTOR.message_types_by_name['RemoteNameResponseMsg'] = _REMOTENAMERESPONSEMSG
-DESCRIPTOR.enum_types_by_name['DiscoverabilityMode'] = _DISCOVERABILITYMODE
-DESCRIPTOR.enum_types_by_name['ResultMode'] = _RESULTMODE
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-EnableMsg = _reflection.GeneratedProtocolMessageType('EnableMsg', (_message.Message,), {
- 'DESCRIPTOR' : _ENABLEMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.EnableMsg)
- })
-_sym_db.RegisterMessage(EnableMsg)
-
-DiscoverabilitiyMsg = _reflection.GeneratedProtocolMessageType('DiscoverabilitiyMsg', (_message.Message,), {
- 'DESCRIPTOR' : _DISCOVERABILITIYMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.DiscoverabilitiyMsg)
- })
-_sym_db.RegisterMessage(DiscoverabilitiyMsg)
-
-InquiryMsg = _reflection.GeneratedProtocolMessageType('InquiryMsg', (_message.Message,), {
- 'DESCRIPTOR' : _INQUIRYMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.InquiryMsg)
- })
-_sym_db.RegisterMessage(InquiryMsg)
-
-InquiryResultMsg = _reflection.GeneratedProtocolMessageType('InquiryResultMsg', (_message.Message,), {
- 'DESCRIPTOR' : _INQUIRYRESULTMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.InquiryResultMsg)
- })
-_sym_db.RegisterMessage(InquiryResultMsg)
-
-RemoteNameRequestMsg = _reflection.GeneratedProtocolMessageType('RemoteNameRequestMsg', (_message.Message,), {
- 'DESCRIPTOR' : _REMOTENAMEREQUESTMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.RemoteNameRequestMsg)
- })
-_sym_db.RegisterMessage(RemoteNameRequestMsg)
-
-RemoteNameResponseMsg = _reflection.GeneratedProtocolMessageType('RemoteNameResponseMsg', (_message.Message,), {
- 'DESCRIPTOR' : _REMOTENAMERESPONSEMSG,
- '__module__' : 'proto.neighbor_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.neighbor.RemoteNameResponseMsg)
- })
-_sym_db.RegisterMessage(RemoteNameResponseMsg)
-
-
-
-_NEIGHBORFACADE = _descriptor.ServiceDescriptor(
- name='NeighborFacade',
- full_name='bluetooth.neighbor.NeighborFacade',
- file=DESCRIPTOR,
- index=0,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_start=663,
- serialized_end=1277,
- methods=[
- _descriptor.MethodDescriptor(
- name='SetConnectability',
- full_name='bluetooth.neighbor.NeighborFacade.SetConnectability',
- index=0,
- containing_service=None,
- input_type=_ENABLEMSG,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SetDiscoverability',
- full_name='bluetooth.neighbor.NeighborFacade.SetDiscoverability',
- index=1,
- containing_service=None,
- input_type=_DISCOVERABILITIYMSG,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='SetInquiryMode',
- full_name='bluetooth.neighbor.NeighborFacade.SetInquiryMode',
- index=2,
- containing_service=None,
- input_type=_INQUIRYMSG,
- output_type=_INQUIRYRESULTMSG,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='ReadRemoteName',
- full_name='bluetooth.neighbor.NeighborFacade.ReadRemoteName',
- index=3,
- containing_service=None,
- input_type=_REMOTENAMEREQUESTMSG,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='GetRemoteNameEvents',
- full_name='bluetooth.neighbor.NeighborFacade.GetRemoteNameEvents',
- index=4,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=_REMOTENAMERESPONSEMSG,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='EnableInquiryScan',
- full_name='bluetooth.neighbor.NeighborFacade.EnableInquiryScan',
- index=5,
- containing_service=None,
- input_type=_ENABLEMSG,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='EnablePageScan',
- full_name='bluetooth.neighbor.NeighborFacade.EnablePageScan',
- index=6,
- containing_service=None,
- input_type=_ENABLEMSG,
- output_type=proto_dot_common__pb2._EMPTY,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_NEIGHBORFACADE)
-
-DESCRIPTOR.services_by_name['NeighborFacade'] = _NEIGHBORFACADE
-
-# @@protoc_insertion_point(module_scope)
diff --git a/lib/proto/neighbor_pb2_grpc.py b/lib/proto/neighbor_pb2_grpc.py
deleted file mode 100644
index fc71c18..0000000
--- a/lib/proto/neighbor_pb2_grpc.py
+++ /dev/null
@@ -1,267 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from . import common_pb2 as proto_dot_common__pb2
-from . import neighbor_pb2 as proto_dot_neighbor__pb2
-
-
-class NeighborFacadeStub(object):
- """Missing associated documentation comment in .proto file."""
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.SetConnectability = channel.unary_unary(
- '/bluetooth.neighbor.NeighborFacade/SetConnectability',
- request_serializer=proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SetDiscoverability = channel.unary_unary(
- '/bluetooth.neighbor.NeighborFacade/SetDiscoverability',
- request_serializer=proto_dot_neighbor__pb2.DiscoverabilitiyMsg.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.SetInquiryMode = channel.unary_stream(
- '/bluetooth.neighbor.NeighborFacade/SetInquiryMode',
- request_serializer=proto_dot_neighbor__pb2.InquiryMsg.SerializeToString,
- response_deserializer=proto_dot_neighbor__pb2.InquiryResultMsg.FromString,
- )
- self.ReadRemoteName = channel.unary_unary(
- '/bluetooth.neighbor.NeighborFacade/ReadRemoteName',
- request_serializer=proto_dot_neighbor__pb2.RemoteNameRequestMsg.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.GetRemoteNameEvents = channel.unary_stream(
- '/bluetooth.neighbor.NeighborFacade/GetRemoteNameEvents',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_neighbor__pb2.RemoteNameResponseMsg.FromString,
- )
- self.EnableInquiryScan = channel.unary_unary(
- '/bluetooth.neighbor.NeighborFacade/EnableInquiryScan',
- request_serializer=proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
- self.EnablePageScan = channel.unary_unary(
- '/bluetooth.neighbor.NeighborFacade/EnablePageScan',
- request_serializer=proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- response_deserializer=proto_dot_common__pb2.Empty.FromString,
- )
-
-
-class NeighborFacadeServicer(object):
- """Missing associated documentation comment in .proto file."""
-
- def SetConnectability(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SetDiscoverability(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def SetInquiryMode(self, request, context):
- """Sets inquiry mode and fetches inquiry result HCI packet
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def ReadRemoteName(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def GetRemoteNameEvents(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def EnableInquiryScan(self, request, context):
- """TODO: Should we use a blocking call for ReadRemoteName instead? (Note: blocking model may not work for GD stack)
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def EnablePageScan(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_NeighborFacadeServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'SetConnectability': grpc.unary_unary_rpc_method_handler(
- servicer.SetConnectability,
- request_deserializer=proto_dot_neighbor__pb2.EnableMsg.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SetDiscoverability': grpc.unary_unary_rpc_method_handler(
- servicer.SetDiscoverability,
- request_deserializer=proto_dot_neighbor__pb2.DiscoverabilitiyMsg.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'SetInquiryMode': grpc.unary_stream_rpc_method_handler(
- servicer.SetInquiryMode,
- request_deserializer=proto_dot_neighbor__pb2.InquiryMsg.FromString,
- response_serializer=proto_dot_neighbor__pb2.InquiryResultMsg.SerializeToString,
- ),
- 'ReadRemoteName': grpc.unary_unary_rpc_method_handler(
- servicer.ReadRemoteName,
- request_deserializer=proto_dot_neighbor__pb2.RemoteNameRequestMsg.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'GetRemoteNameEvents': grpc.unary_stream_rpc_method_handler(
- servicer.GetRemoteNameEvents,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_neighbor__pb2.RemoteNameResponseMsg.SerializeToString,
- ),
- 'EnableInquiryScan': grpc.unary_unary_rpc_method_handler(
- servicer.EnableInquiryScan,
- request_deserializer=proto_dot_neighbor__pb2.EnableMsg.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- 'EnablePageScan': grpc.unary_unary_rpc_method_handler(
- servicer.EnablePageScan,
- request_deserializer=proto_dot_neighbor__pb2.EnableMsg.FromString,
- response_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'bluetooth.neighbor.NeighborFacade', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class NeighborFacade(object):
- """Missing associated documentation comment in .proto file."""
-
- @staticmethod
- def SetConnectability(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.neighbor.NeighborFacade/SetConnectability',
- proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SetDiscoverability(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.neighbor.NeighborFacade/SetDiscoverability',
- proto_dot_neighbor__pb2.DiscoverabilitiyMsg.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def SetInquiryMode(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.neighbor.NeighborFacade/SetInquiryMode',
- proto_dot_neighbor__pb2.InquiryMsg.SerializeToString,
- proto_dot_neighbor__pb2.InquiryResultMsg.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def ReadRemoteName(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.neighbor.NeighborFacade/ReadRemoteName',
- proto_dot_neighbor__pb2.RemoteNameRequestMsg.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def GetRemoteNameEvents(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_stream(request, target, '/bluetooth.neighbor.NeighborFacade/GetRemoteNameEvents',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_neighbor__pb2.RemoteNameResponseMsg.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def EnableInquiryScan(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.neighbor.NeighborFacade/EnableInquiryScan',
- proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def EnablePageScan(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.neighbor.NeighborFacade/EnablePageScan',
- proto_dot_neighbor__pb2.EnableMsg.SerializeToString,
- proto_dot_common__pb2.Empty.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/lib/proto/rootservice_pb2.py b/lib/proto/rootservice_pb2.py
deleted file mode 100644
index 5944a74..0000000
--- a/lib/proto/rootservice_pb2.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: proto/rootservice.proto
-"""Generated protocol buffer code."""
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import common_pb2 as proto_dot_common__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='proto/rootservice.proto',
- package='bluetooth.facade',
- syntax='proto3',
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x17proto/rootservice.proto\x12\x10\x62luetooth.facade\x1a\x12proto/common.proto\"Q\n\x11StartStackRequest\x12<\n\x11module_under_test\x18\x01 \x01(\x0e\x32!.bluetooth.facade.BluetoothModule\"\x14\n\x12StartStackResponse\"\x12\n\x10StopStackRequest\"\x13\n\x11StopStackResponse*Z\n\x0f\x42luetoothModule\x12\x07\n\x03HAL\x10\x00\x12\x07\n\x03HCI\x10\x01\x12\x12\n\x0eHCI_INTERFACES\x10\x02\x12\t\n\x05L2CAP\x10\x03\x12\x0c\n\x08SECURITY\x10\x04\x12\x08\n\x04SHIM\x10\x05\x32\xbf\x01\n\nRootFacade\x12Y\n\nStartStack\x12#.bluetooth.facade.StartStackRequest\x1a$.bluetooth.facade.StartStackResponse\"\x00\x12V\n\tStopStack\x12\".bluetooth.facade.StopStackRequest\x1a#.bluetooth.facade.StopStackResponse\"\x00\x32\x65\n\x10ReadOnlyProperty\x12Q\n\x10ReadLocalAddress\x12\x17.bluetooth.facade.Empty\x1a\".bluetooth.facade.BluetoothAddress\"\x00\x62\x06proto3'
- ,
- dependencies=[proto_dot_common__pb2.DESCRIPTOR,])
-
-_BLUETOOTHMODULE = _descriptor.EnumDescriptor(
- name='BluetoothModule',
- full_name='bluetooth.facade.BluetoothModule',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='HAL', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='HCI', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='HCI_INTERFACES', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='L2CAP', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='SECURITY', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='SHIM', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=211,
- serialized_end=301,
-)
-_sym_db.RegisterEnumDescriptor(_BLUETOOTHMODULE)
-
-BluetoothModule = enum_type_wrapper.EnumTypeWrapper(_BLUETOOTHMODULE)
-HAL = 0
-HCI = 1
-HCI_INTERFACES = 2
-L2CAP = 3
-SECURITY = 4
-SHIM = 5
-
-
-
-_STARTSTACKREQUEST = _descriptor.Descriptor(
- name='StartStackRequest',
- full_name='bluetooth.facade.StartStackRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='module_under_test', full_name='bluetooth.facade.StartStackRequest.module_under_test', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=65,
- serialized_end=146,
-)
-
-
-_STARTSTACKRESPONSE = _descriptor.Descriptor(
- name='StartStackResponse',
- full_name='bluetooth.facade.StartStackResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=148,
- serialized_end=168,
-)
-
-
-_STOPSTACKREQUEST = _descriptor.Descriptor(
- name='StopStackRequest',
- full_name='bluetooth.facade.StopStackRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=170,
- serialized_end=188,
-)
-
-
-_STOPSTACKRESPONSE = _descriptor.Descriptor(
- name='StopStackResponse',
- full_name='bluetooth.facade.StopStackResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=190,
- serialized_end=209,
-)
-
-_STARTSTACKREQUEST.fields_by_name['module_under_test'].enum_type = _BLUETOOTHMODULE
-DESCRIPTOR.message_types_by_name['StartStackRequest'] = _STARTSTACKREQUEST
-DESCRIPTOR.message_types_by_name['StartStackResponse'] = _STARTSTACKRESPONSE
-DESCRIPTOR.message_types_by_name['StopStackRequest'] = _STOPSTACKREQUEST
-DESCRIPTOR.message_types_by_name['StopStackResponse'] = _STOPSTACKRESPONSE
-DESCRIPTOR.enum_types_by_name['BluetoothModule'] = _BLUETOOTHMODULE
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-StartStackRequest = _reflection.GeneratedProtocolMessageType('StartStackRequest', (_message.Message,), {
- 'DESCRIPTOR' : _STARTSTACKREQUEST,
- '__module__' : 'proto.rootservice_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.StartStackRequest)
- })
-_sym_db.RegisterMessage(StartStackRequest)
-
-StartStackResponse = _reflection.GeneratedProtocolMessageType('StartStackResponse', (_message.Message,), {
- 'DESCRIPTOR' : _STARTSTACKRESPONSE,
- '__module__' : 'proto.rootservice_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.StartStackResponse)
- })
-_sym_db.RegisterMessage(StartStackResponse)
-
-StopStackRequest = _reflection.GeneratedProtocolMessageType('StopStackRequest', (_message.Message,), {
- 'DESCRIPTOR' : _STOPSTACKREQUEST,
- '__module__' : 'proto.rootservice_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.StopStackRequest)
- })
-_sym_db.RegisterMessage(StopStackRequest)
-
-StopStackResponse = _reflection.GeneratedProtocolMessageType('StopStackResponse', (_message.Message,), {
- 'DESCRIPTOR' : _STOPSTACKRESPONSE,
- '__module__' : 'proto.rootservice_pb2'
- # @@protoc_insertion_point(class_scope:bluetooth.facade.StopStackResponse)
- })
-_sym_db.RegisterMessage(StopStackResponse)
-
-
-
-_ROOTFACADE = _descriptor.ServiceDescriptor(
- name='RootFacade',
- full_name='bluetooth.facade.RootFacade',
- file=DESCRIPTOR,
- index=0,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_start=304,
- serialized_end=495,
- methods=[
- _descriptor.MethodDescriptor(
- name='StartStack',
- full_name='bluetooth.facade.RootFacade.StartStack',
- index=0,
- containing_service=None,
- input_type=_STARTSTACKREQUEST,
- output_type=_STARTSTACKRESPONSE,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name='StopStack',
- full_name='bluetooth.facade.RootFacade.StopStack',
- index=1,
- containing_service=None,
- input_type=_STOPSTACKREQUEST,
- output_type=_STOPSTACKRESPONSE,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_ROOTFACADE)
-
-DESCRIPTOR.services_by_name['RootFacade'] = _ROOTFACADE
-
-
-_READONLYPROPERTY = _descriptor.ServiceDescriptor(
- name='ReadOnlyProperty',
- full_name='bluetooth.facade.ReadOnlyProperty',
- file=DESCRIPTOR,
- index=1,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- serialized_start=497,
- serialized_end=598,
- methods=[
- _descriptor.MethodDescriptor(
- name='ReadLocalAddress',
- full_name='bluetooth.facade.ReadOnlyProperty.ReadLocalAddress',
- index=0,
- containing_service=None,
- input_type=proto_dot_common__pb2._EMPTY,
- output_type=proto_dot_common__pb2._BLUETOOTHADDRESS,
- serialized_options=None,
- create_key=_descriptor._internal_create_key,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_READONLYPROPERTY)
-
-DESCRIPTOR.services_by_name['ReadOnlyProperty'] = _READONLYPROPERTY
-
-# @@protoc_insertion_point(module_scope)
diff --git a/lib/proto/rootservice_pb2_grpc.py b/lib/proto/rootservice_pb2_grpc.py
deleted file mode 100644
index 961bd9f..0000000
--- a/lib/proto/rootservice_pb2_grpc.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from . import common_pb2 as proto_dot_common__pb2
-from . import rootservice_pb2 as proto_dot_rootservice__pb2
-
-
-class RootFacadeStub(object):
- """Missing associated documentation comment in .proto file."""
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.StartStack = channel.unary_unary(
- '/bluetooth.facade.RootFacade/StartStack',
- request_serializer=proto_dot_rootservice__pb2.StartStackRequest.SerializeToString,
- response_deserializer=proto_dot_rootservice__pb2.StartStackResponse.FromString,
- )
- self.StopStack = channel.unary_unary(
- '/bluetooth.facade.RootFacade/StopStack',
- request_serializer=proto_dot_rootservice__pb2.StopStackRequest.SerializeToString,
- response_deserializer=proto_dot_rootservice__pb2.StopStackResponse.FromString,
- )
-
-
-class RootFacadeServicer(object):
- """Missing associated documentation comment in .proto file."""
-
- def StartStack(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def StopStack(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_RootFacadeServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'StartStack': grpc.unary_unary_rpc_method_handler(
- servicer.StartStack,
- request_deserializer=proto_dot_rootservice__pb2.StartStackRequest.FromString,
- response_serializer=proto_dot_rootservice__pb2.StartStackResponse.SerializeToString,
- ),
- 'StopStack': grpc.unary_unary_rpc_method_handler(
- servicer.StopStack,
- request_deserializer=proto_dot_rootservice__pb2.StopStackRequest.FromString,
- response_serializer=proto_dot_rootservice__pb2.StopStackResponse.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'bluetooth.facade.RootFacade', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class RootFacade(object):
- """Missing associated documentation comment in .proto file."""
-
- @staticmethod
- def StartStack(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.facade.RootFacade/StartStack',
- proto_dot_rootservice__pb2.StartStackRequest.SerializeToString,
- proto_dot_rootservice__pb2.StartStackResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
- @staticmethod
- def StopStack(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.facade.RootFacade/StopStack',
- proto_dot_rootservice__pb2.StopStackRequest.SerializeToString,
- proto_dot_rootservice__pb2.StopStackResponse.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
-
-
-class ReadOnlyPropertyStub(object):
- """Missing associated documentation comment in .proto file."""
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.ReadLocalAddress = channel.unary_unary(
- '/bluetooth.facade.ReadOnlyProperty/ReadLocalAddress',
- request_serializer=proto_dot_common__pb2.Empty.SerializeToString,
- response_deserializer=proto_dot_common__pb2.BluetoothAddress.FromString,
- )
-
-
-class ReadOnlyPropertyServicer(object):
- """Missing associated documentation comment in .proto file."""
-
- def ReadLocalAddress(self, request, context):
- """Missing associated documentation comment in .proto file."""
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_ReadOnlyPropertyServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'ReadLocalAddress': grpc.unary_unary_rpc_method_handler(
- servicer.ReadLocalAddress,
- request_deserializer=proto_dot_common__pb2.Empty.FromString,
- response_serializer=proto_dot_common__pb2.BluetoothAddress.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'bluetooth.facade.ReadOnlyProperty', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
-
-
- # This class is part of an EXPERIMENTAL API.
-class ReadOnlyProperty(object):
- """Missing associated documentation comment in .proto file."""
-
- @staticmethod
- def ReadLocalAddress(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(request, target, '/bluetooth.facade.ReadOnlyProperty/ReadLocalAddress',
- proto_dot_common__pb2.Empty.SerializeToString,
- proto_dot_common__pb2.BluetoothAddress.FromString,
- options, channel_credentials,
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/proto/common.proto b/proto/facade/common.proto
index a68bff2..222caca 100644
--- a/proto/common.proto
+++ b/proto/facade/common.proto
@@ -34,4 +34,4 @@ message BluetoothAddressWithType {
enum BluetoothPeerAddressTypeEnum {
PUBLIC_DEVICE_OR_IDENTITY_ADDRESS = 0x0;
RANDOM_DEVICE_OR_IDENTITY_ADDRESS = 0x1;
-} \ No newline at end of file
+}
diff --git a/proto/l2cap.proto b/proto/facade/l2cap.proto
index 4aa4422..7951ec4 100644
--- a/proto/l2cap.proto
+++ b/proto/facade/l2cap.proto
@@ -2,7 +2,7 @@ syntax = "proto3";
package bluetooth.l2cap.classic;
-import "proto/common.proto";
+import "facade/common.proto";
service L2capClassicModuleFacade {
rpc FetchConnectionComplete(facade.Empty) returns (stream ConnectionCompleteEvent) {
diff --git a/proto/neighbor.proto b/proto/facade/neighbor.proto
index 6fb7b05..03defe1 100644
--- a/proto/neighbor.proto
+++ b/proto/facade/neighbor.proto
@@ -2,7 +2,7 @@ syntax = "proto3";
package bluetooth.neighbor;
-import "proto/common.proto";
+import "facade/common.proto";
service NeighborFacade {
rpc SetConnectability(EnableMsg) returns (facade.Empty) {}
diff --git a/proto/rootservice.proto b/proto/facade/rootservice.proto
index 2ab245d..63ec41a 100644
--- a/proto/rootservice.proto
+++ b/proto/facade/rootservice.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package bluetooth.facade;
-import "proto/common.proto";
+import "facade/common.proto";
service RootFacade {
rpc StartStack(StartStackRequest) returns (StartStackResponse) {}
@@ -29,4 +29,4 @@ message StopStackResponse {}
service ReadOnlyProperty {
rpc ReadLocalAddress(Empty) returns (BluetoothAddress) {}
-} \ No newline at end of file
+}
diff --git a/protoc-gen-custom_grpc b/protoc-gen-custom_grpc
new file mode 100755
index 0000000..a45dc19
--- /dev/null
+++ b/protoc-gen-custom_grpc
@@ -0,0 +1,79 @@
+#!/usr/bin/env python3
+import sys
+
+from google.protobuf.compiler.plugin_pb2 import CodeGeneratorRequest, CodeGeneratorResponse
+
+
+def eprint(*args, **kwargs):
+ print(*args, file=sys.stderr, **kwargs)
+
+
+request = CodeGeneratorRequest.FromString(sys.stdin.buffer.read())
+
+
+def import_type(imports, type):
+ package = type[1:type.rindex('.')]
+ type_name = type[type.rindex('.')+1:]
+ file = next(filter(lambda x: x.package == package, request.proto_file))
+ python_path = file.name.replace('.proto', '').replace('/', '.')
+ as_name = python_path.replace('.', '_dot_') + '__pb2'
+ module_path = python_path[:python_path.rindex('.')]
+ module_name = python_path[python_path.rindex('.')+1:] + '_pb2'
+ imports.add(f'from {module_path} import {module_name} as {as_name}')
+ return f'{as_name}.{type_name}'
+
+
+def generate_method(imports, file, service, method):
+ input_mode = 'stream' if method.client_streaming else 'unary'
+ output_mode = 'stream' if method.server_streaming else 'unary'
+
+ input_type = import_type(imports, method.input_type)
+ output_type = import_type(imports, method.output_type)
+
+ if input_mode == 'stream':
+ raise Error("TODO: stream as input type")
+
+ return (
+ f'def {method.name}(self, **kwargs):\n'
+ f' return self.channel.{input_mode}_{output_mode}(\n'
+ f" '/{file.package}.{service.name}/{method.name}',\n"
+ f' request_serializer={input_type}.SerializeToString,\n'
+ f' response_deserializer={output_type}.FromString\n'
+ f' )({input_type}(**kwargs))'
+ ).split('\n')
+
+
+def generate_service(imports, file, service):
+ methods = '\n\n '.join([
+ '\n '.join(
+ generate_method(imports, file, service, method)
+ ) for method in service.method
+ ])
+ return (
+ f'class {service.name}:\n'
+ f' def __init__(self, channel):\n'
+ f' self.channel = channel\n'
+ f'\n'
+ f' {methods}\n'
+ ).split('\n')
+
+
+files = []
+
+for file_name in request.file_to_generate:
+ file = next(filter(lambda x: x.name == file_name, request.proto_file))
+
+ imports = set([])
+
+ services = '\n'.join(sum([
+ generate_service(imports, file, service) for service in file.service
+ ], []))
+
+ files.append(CodeGeneratorResponse.File(
+ name=file_name.replace('.proto', '_grpc.py'),
+ content='\n'.join(imports) + '\n\n' + services
+ ))
+
+reponse = CodeGeneratorResponse(file=files)
+
+sys.stdout.buffer.write(reponse.SerializeToString())
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..31854ce
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+protobuf==3.18.1
+grpcio==1.41.0
+grpcio-tools==1.41.0
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..20fd953
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python3
+from setuptools import setup, Command
+from setuptools.command.build_py import build_py
+import os
+
+package_directory = os.path.dirname(os.path.realpath(__file__))
+
+os.environ["PATH"] = package_directory + ':' + os.environ["PATH"]
+
+
+class BuildGrpc(Command):
+ """GRPC build command."""
+ description = 'build grpc files'
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ from grpc_tools import protoc
+
+ protoc.main([
+ 'grpc_tools.protoc',
+ '-I=proto',
+ '--python_out=.',
+ '--custom_grpc_out=.',
+ 'facade/l2cap.proto',
+ 'facade/neighbor.proto',
+ 'facade/common.proto',
+ 'facade/rootservice.proto',
+ ])
+
+
+class BuildPyCommand(build_py):
+ """Custom build command."""
+
+ def run(self):
+ self.run_command('build_grpc')
+ build_py.run(self)
+
+
+setup(
+ name='mmi2grpc',
+ version='0.0.1',
+ packages=['interact', 'facade'],
+ install_requires=[
+ 'grpcio',
+ ],
+ setup_requires=[
+ 'grpcio-tools'
+ ],
+ cmdclass={
+ 'build_grpc': BuildGrpc,
+ 'build_py': BuildPyCommand,
+ }
+)