diff --git a/doc/gatt-api.txt b/doc/gatt-api.txt
index 232ffa0..ad2ab16 100644
--- a/doc/gatt-api.txt
+++ b/doc/gatt-api.txt
when a notification or indication is received, upon
which a PropertiesChanged signal will be emitted.
- boolean Notifying [read-only]
+ boolean Notifying [read-only, optional]
True, if notifications or indications on this
characteristic are currently enabled.
diff --git a/src/gatt-client.c b/src/gatt-client.c
index a018c8c..52add1d 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
return TRUE;
}
+static gboolean
+characteristic_notifying_exists(const GDBusPropertyTable *property, void *data)
+{
+ struct characteristic *chrc = data;
+
+ return (chrc->props & BT_GATT_CHRC_PROP_NOTIFY ||
+ chrc->props & BT_GATT_CHRC_PROP_INDICATE);
+}
+
struct chrc_prop_data {
uint8_t prop;
char *str;
{ "Value", "ay", characteristic_get_value, NULL,
characteristic_value_exists,
G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
- { "Notifying", "b", characteristic_get_notifying, NULL, NULL,
+ { "Notifying", "b", characteristic_get_notifying, NULL,
+ characteristic_notifying_exists,
G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
{ "Flags", "as", characteristic_get_flags, NULL, NULL,
G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },