bumble 0.0.189__py3-none-any.whl → 0.0.190__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bumble/_version.py +2 -2
- bumble/hfp.py +5 -5
- bumble/transport/tcp_server.py +24 -5
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/METADATA +1 -1
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/RECORD +9 -9
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/LICENSE +0 -0
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/WHEEL +0 -0
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/entry_points.txt +0 -0
- {bumble-0.0.189.dist-info → bumble-0.0.190.dist-info}/top_level.txt +0 -0
bumble/_version.py
CHANGED
bumble/hfp.py
CHANGED
|
@@ -820,11 +820,11 @@ class HfProtocol(pyee.EventEmitter):
|
|
|
820
820
|
return calls
|
|
821
821
|
|
|
822
822
|
async def update_ag_indicator(self, index: int, value: int):
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
)
|
|
823
|
+
# CIEV is in 1-index, while ag_indicators is in 0-index.
|
|
824
|
+
ag_indicator = self.ag_indicators[index - 1]
|
|
825
|
+
ag_indicator.current_status = value
|
|
826
|
+
self.emit('ag_indicator', ag_indicator)
|
|
827
|
+
logger.info(f"AG indicator updated: {ag_indicator.description}, {value}")
|
|
828
828
|
|
|
829
829
|
async def handle_unsolicited(self):
|
|
830
830
|
"""Handle unsolicited result codes sent by the audio gateway."""
|
bumble/transport/tcp_server.py
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
import asyncio
|
|
20
20
|
import logging
|
|
21
|
+
import socket
|
|
21
22
|
|
|
22
23
|
from .common import Transport, StreamPacketSource
|
|
23
24
|
|
|
@@ -28,6 +29,12 @@ logger = logging.getLogger(__name__)
|
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
# -----------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
# A pass-through function to ease mock testing.
|
|
34
|
+
async def _create_server(*args, **kw_args):
|
|
35
|
+
await asyncio.get_running_loop().create_server(*args, **kw_args)
|
|
36
|
+
|
|
37
|
+
|
|
31
38
|
async def open_tcp_server_transport(spec: str) -> Transport:
|
|
32
39
|
'''
|
|
33
40
|
Open a TCP server transport.
|
|
@@ -38,7 +45,22 @@ async def open_tcp_server_transport(spec: str) -> Transport:
|
|
|
38
45
|
|
|
39
46
|
Example: _:9001
|
|
40
47
|
'''
|
|
48
|
+
local_host, local_port = spec.split(':')
|
|
49
|
+
return await _open_tcp_server_transport_impl(
|
|
50
|
+
host=local_host if local_host != '_' else None, port=int(local_port)
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
async def open_tcp_server_transport_with_socket(sock: socket.socket) -> Transport:
|
|
55
|
+
'''
|
|
56
|
+
Open a TCP server transport with an existing socket.
|
|
57
|
+
|
|
58
|
+
One reason to use this variant is to let python pick an unused port.
|
|
59
|
+
'''
|
|
60
|
+
return await _open_tcp_server_transport_impl(sock=sock)
|
|
61
|
+
|
|
41
62
|
|
|
63
|
+
async def _open_tcp_server_transport_impl(**kwargs) -> Transport:
|
|
42
64
|
class TcpServerTransport(Transport):
|
|
43
65
|
async def close(self):
|
|
44
66
|
await super().close()
|
|
@@ -77,13 +99,10 @@ async def open_tcp_server_transport(spec: str) -> Transport:
|
|
|
77
99
|
else:
|
|
78
100
|
logger.debug('no client, dropping packet')
|
|
79
101
|
|
|
80
|
-
local_host, local_port = spec.split(':')
|
|
81
102
|
packet_source = StreamPacketSource()
|
|
82
103
|
packet_sink = TcpServerPacketSink()
|
|
83
|
-
await
|
|
84
|
-
lambda: TcpServerProtocol(packet_source, packet_sink),
|
|
85
|
-
host=local_host if local_host != '_' else None,
|
|
86
|
-
port=int(local_port),
|
|
104
|
+
await _create_server(
|
|
105
|
+
lambda: TcpServerProtocol(packet_source, packet_sink), **kwargs
|
|
87
106
|
)
|
|
88
107
|
|
|
89
108
|
return TcpServerTransport(packet_source, packet_sink)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
bumble/__init__.py,sha256=Q8jkz6rgl95IMAeInQVt_2GLoJl3DcEP2cxtrQ-ho5c,110
|
|
2
|
-
bumble/_version.py,sha256=
|
|
2
|
+
bumble/_version.py,sha256=lIV0i6X65UjykL3W2hVxyK2omTPh4jNlE5Ya4uSriLA,415
|
|
3
3
|
bumble/a2dp.py,sha256=VEeAOCfT1ZqpwnEgel6DJ32vxR8jYX3IAaBfCqPdWO8,22675
|
|
4
4
|
bumble/at.py,sha256=kdrcsx2C8Rg61EWESD2QHwpZntkXkRBJLrPn9auv9K8,2961
|
|
5
5
|
bumble/att.py,sha256=TGzhhBKCQPA_P_eDDSNASJVfa3dCr-QzzrRB3GekrI0,32366
|
|
@@ -22,7 +22,7 @@ bumble/gatt_client.py,sha256=UUOLszwNBbOG0x2nFuIAK2llAysj0zK4euXJxb2gVSo,42523
|
|
|
22
22
|
bumble/gatt_server.py,sha256=uPYbn2-y0MLnyR8xxpOf18gPua_Q49pSlMR1zxEnU-Q,37118
|
|
23
23
|
bumble/hci.py,sha256=3MYwWLuuolxY9xMitm5tOHpqvGKqtsReZ6QUfI1DcVA,267323
|
|
24
24
|
bumble/helpers.py,sha256=m0w4UgFFNDEnXwHrDyfRlcBObdVed2fqXGL0lvR3c8s,12733
|
|
25
|
-
bumble/hfp.py,sha256=
|
|
25
|
+
bumble/hfp.py,sha256=hc7IVZxsb7skfWrxWPyt0BXFQRMh9a7mdv--A9k5aNg,41865
|
|
26
26
|
bumble/hid.py,sha256=Dd4rsmkRxcxt1IjoozJdu9Qd-QWruKJfsiYqTT89NDk,20590
|
|
27
27
|
bumble/host.py,sha256=tLFay8cdJIHl92UyVTvChKQXUh9QEFI3Ib6unYJLLHw,46909
|
|
28
28
|
bumble/keys.py,sha256=58BMWd8LocY0bazVQ-qw3DKrOxgilhYaKBkmJRcNPp4,12593
|
|
@@ -98,7 +98,7 @@ bumble/transport/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
98
98
|
bumble/transport/pyusb.py,sha256=RV42LSRlMhLx1LOdaF8TY4qePPGlONFaPqta7I5mYTw,11987
|
|
99
99
|
bumble/transport/serial.py,sha256=loQxkeG7uE09enXWg2uGbxi6CeG70wn3kzPbEwULKw4,2446
|
|
100
100
|
bumble/transport/tcp_client.py,sha256=deyUJYpj04QE00Mw_PTU5PHPA6mr1Nui3f5-QCy2zOw,1854
|
|
101
|
-
bumble/transport/tcp_server.py,sha256=
|
|
101
|
+
bumble/transport/tcp_server.py,sha256=qcpTeLFSkDWvqHEjYxtZ75wYvAKxa3LiwHJwT5bhn88,3778
|
|
102
102
|
bumble/transport/udp.py,sha256=di8I6HHACgBx3un-dzAahz9lTIUrh4LdeuYpeoifQEM,2239
|
|
103
103
|
bumble/transport/usb.py,sha256=dFNN-kGI3pMTXeT5Amwu2H6e4J48WAJotG_D18W3RBM,21399
|
|
104
104
|
bumble/transport/vhci.py,sha256=iI2WpighnvIP5zeyJUFSbjEdmCo24CWMdICamIcyJck,2250
|
|
@@ -137,9 +137,9 @@ bumble/vendor/android/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
137
137
|
bumble/vendor/android/hci.py,sha256=GZrkhaWmcMt1JpnRhv0NoySGkf2H4lNUV2f_omRZW0I,10741
|
|
138
138
|
bumble/vendor/zephyr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
139
|
bumble/vendor/zephyr/hci.py,sha256=d83bC0TvT947eN4roFjLkQefWtHOoNsr4xib2ctSkvA,3195
|
|
140
|
-
bumble-0.0.
|
|
141
|
-
bumble-0.0.
|
|
142
|
-
bumble-0.0.
|
|
143
|
-
bumble-0.0.
|
|
144
|
-
bumble-0.0.
|
|
145
|
-
bumble-0.0.
|
|
140
|
+
bumble-0.0.190.dist-info/LICENSE,sha256=FvaYh4NRWIGgS_OwoBs5gFgkCmAghZ-DYnIGBZPuw-s,12142
|
|
141
|
+
bumble-0.0.190.dist-info/METADATA,sha256=3toWetMEz1r3wfytRfmK4DjkdzspHLbhVbagGQxyJBk,5684
|
|
142
|
+
bumble-0.0.190.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
143
|
+
bumble-0.0.190.dist-info/entry_points.txt,sha256=UkNj1KMZDhzOb7O4OU7Jn4YI5KaxJZgQF2GF64BwOlQ,883
|
|
144
|
+
bumble-0.0.190.dist-info/top_level.txt,sha256=tV6JJKaHPYMFiJYiBYFW24PCcfLxTJZdlu6BmH3Cb00,7
|
|
145
|
+
bumble-0.0.190.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|