diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-08-02 14:30:34 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-08-02 14:30:34 +0300 |
commit | 80326b5f22f4d859c0b43d2938cc778a33408298 (patch) | |
tree | 6fa66286788a815f73f3e0a1a14780ae2ac9417a /test/example-gatt-server | |
parent | 24739efd35d19a3c919ffeed0d0cc972af46b730 (diff) | |
download | bluez-80326b5f22f4d859c0b43d2938cc778a33408298.tar.gz |
test/example-gatt-server: Add more comments
This adds more comments what the example is doing.
Diffstat (limited to 'test/example-gatt-server')
-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) |