]> Repositories - Adafruit_Blinka-hackapet.git/blob - src/_bleio.py
Merge pull request #243 from caternuson/win_hid_fix
[Adafruit_Blinka-hackapet.git] / src / _bleio.py
1 """This is a stub of _bleio for use in GitHub Actions CI. It is NOT meant to provide _bleio
2    functionality in CPython."""
3
4 adapter = None
5
6 class Attribute:
7     NO_ACCESS = 0
8     OPEN = 0
9     ENCRYPT_NO_MITM = 0
10     ENCRYPT_WITH_MITM = 0
11     LESC_ENCRYPT_WITH_MITM = 0
12     SIGNED_NO_MITM = 0
13     SIGNED_WITH_MITM = 0
14
15 class UUID:
16     def __init__(self, uuid):
17         pass
18
19 class Descriptor:
20     @staticmethod
21     def add_to_characteristic(characteristic, uuid, *, read_perm=Attribute.OPEN,
22                               write_perm=Attribute.OPEN, max_length=20, fixed_length=False,
23                               initial_value=b''):
24         pass
25
26 class CharacteristicBuffer:
27     pass
28
29 class PacketBuffer:
30     pass
31
32 class Characteristic:
33     BROADCAST = 0
34     READ = 0
35     WRITE = 0
36     NOTIFY = 0
37     INDICATE = 0
38     WRITE_NO_RESPONSE = 0
39
40     @staticmethod
41     def add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN,
42                        write_perm=Attribute.OPEN, max_length=20, fixed_length=False,
43                        initial_value=None):
44         raise NotImplementedError()
45
46