X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/7fef76c707cdeac37c1ad5d9dcd495ef0ea81497..f1fc945c2c578da2e3a6c2e2b91c47a27dfc6353:/src/_bleio.py diff --git a/src/_bleio.py b/src/_bleio.py index 6423c27..d6c1426 100755 --- a/src/_bleio.py +++ b/src/_bleio.py @@ -1,6 +1,8 @@ """This is a stub of _bleio for use in GitHub Actions CI. It is NOT meant to provide _bleio functionality in CPython.""" +adapter = None + class Attribute: NO_ACCESS = 0 OPEN = 0 @@ -14,6 +16,19 @@ class UUID: def __init__(self, uuid): pass +class Descriptor: + @staticmethod + def add_to_characteristic(characteristic, uuid, *, read_perm=Attribute.OPEN, + write_perm=Attribute.OPEN, max_length=20, fixed_length=False, + initial_value=b''): + pass + +class CharacteristicBuffer: + pass + +class PacketBuffer: + pass + class Characteristic: BROADCAST = 0 READ = 0 @@ -21,3 +36,11 @@ class Characteristic: NOTIFY = 0 INDICATE = 0 WRITE_NO_RESPONSE = 0 + + @staticmethod + def add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN, + write_perm=Attribute.OPEN, max_length=20, fixed_length=False, + initial_value=None): + raise NotImplementedError() + +