Coverage for src / bluetooth_sig / gatt / services / http_proxy.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-03 16:41 +0000

1"""HttpProxy Service implementation.""" 

2 

3from __future__ import annotations 

4 

5from typing import ClassVar 

6 

7from ..characteristics.registry import CharacteristicName 

8from .base import BaseGattService 

9 

10 

11class HttpProxyService(BaseGattService): 

12 """HTTP Proxy Service implementation (0x1823). 

13 

14 Enables a BLE device to act as an HTTP proxy, allowing 

15 constrained devices to make HTTP requests via a gateway. 

16 """ 

17 

18 _service_name: str | None = "HTTP Proxy" 

19 

20 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = { 

21 CharacteristicName.URI: True, 

22 CharacteristicName.HTTP_HEADERS: True, 

23 CharacteristicName.HTTP_ENTITY_BODY: True, 

24 CharacteristicName.HTTP_CONTROL_POINT: True, 

25 CharacteristicName.HTTP_STATUS_CODE: True, 

26 CharacteristicName.HTTPS_SECURITY: True, 

27 }