diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/example-gatt-server | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/example-gatt-server b/test/example-gatt-server index 84905f3d0..44ceb7037 100755 --- a/test/example-gatt-server +++ b/test/example-gatt-server @@ -42,6 +42,9 @@ class FailedException(dbus.exceptions.DBusException): class Application(dbus.service.Object): + """ + org.bluez.GattApplication1 interface implementation + """ def __init__(self, bus): self.path = '/' self.services = [] @@ -74,6 +77,9 @@ class Application(dbus.service.Object): class Service(dbus.service.Object): + """ + org.bluez.GattService1 interface implementation + """ PATH_BASE = '/org/bluez/example/service' def __init__(self, bus, index, uuid, primary): @@ -121,6 +127,9 @@ class Service(dbus.service.Object): class Characteristic(dbus.service.Object): + """ + org.bluez.GattCharacteristic1 interface implementation + """ def __init__(self, bus, index, uuid, flags, service): self.path = service.path + '/char' + str(index) self.bus = bus @@ -195,6 +204,9 @@ class Characteristic(dbus.service.Object): class Descriptor(dbus.service.Object): + """ + org.bluez.GattDescriptor1 interface implementation + """ def __init__(self, bus, index, uuid, flags, characteristic): self.path = characteristic.path + '/desc' + str(index) self.bus = bus @@ -636,6 +648,8 @@ def main(): mainloop = GObject.MainLoop() + print('Registering GATT application...') + service_manager.RegisterApplication(app.get_path(), {}, reply_handler=register_app_cb, error_handler=register_app_error_cb) |